:root {
  --bg:#faf6ee; --bg2:#f3ecdd; --card:#fffdf8; --ink:#1e2b25; --mut:#67736c; --line:#e3d9c4;
  --acc:#0f5c4b; --accInk:#0b4237; --acc2:#b9862f; --accSoft:rgba(15,92,75,0.08); --goldSoft:rgba(185,134,47,0.14);
  --shadow:0 18px 50px rgba(30,43,37,0.1);
  --serif:'Cormorant Garamond', Georgia, serif; --sans:'Sora', system-ui, sans-serif; --arabic:'Amiri', serif;
}
html[data-theme="dark"] {
  --bg:#0c1b16; --bg2:#0a1512; --card:#13251f; --ink:#f3ede0; --mut:#9aa89f; --line:#23392f;
  --acc:#43c2a2; --accInk:#8fdcc7; --acc2:#d9ab4e; --accSoft:rgba(67,194,162,0.1); --goldSoft:rgba(217,171,78,0.12);
  --shadow:0 18px 50px rgba(0,0,0,0.4);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--sans); transition: background 300ms ease, color 300ms ease; }
a { color: var(--accInk); } a:hover { color: var(--acc2); }
h1, h2, h3, p { margin-top: 0; }
@keyframes archFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(20px,5vw,56px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { display: grid; width: 44px; }
.brand__mark img { width: 100%; display: block; filter: drop-shadow(0 5px 12px rgba(15,92,75,0.28)); }
.brand strong { display: block; font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.1; }
.brand small { display: block; color: var(--mut); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.site-nav a:hover { background: var(--accSoft); color: var(--ink); }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; margin-left: 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; font-size: 15px; }
.theme-toggle:hover { border-color: var(--acc); }
.admin-link { margin-left: 6px; padding: 9px 16px; border-radius: 999px; background: var(--acc); color: #fff !important; text-decoration: none; font-size: 13px; font-weight: 600; }
.admin-link:hover { background: var(--acc2); }

.hero { position: relative; overflow: hidden; padding: clamp(56px,9vw,110px) clamp(20px,5vw,56px) clamp(40px,6vw,72px); text-align: center; }
.hero__watermark { position: absolute; inset: -10% -20% auto; text-align: center; font-family: var(--arabic); font-size: clamp(180px,30vw,420px); line-height: 1; color: var(--accSoft); pointer-events: none; user-select: none; }
.eyebrow { position: relative; margin: 0 0 14px; color: var(--acc2); font-size: 13px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.hero h1 { position: relative; max-width: 820px; margin: 0 auto 20px; font-family: var(--serif); font-size: clamp(44px,6.5vw,84px); font-weight: 600; line-height: 1.02; text-wrap: balance; animation: fadeUp 700ms ease both; }
.hero__lead { position: relative; max-width: 560px; margin: 0 auto 30px; color: var(--mut); font-size: 17px; line-height: 1.7; }
.hero__actions { position: relative; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; background: var(--acc); color: #fff !important; text-decoration: none; font-weight: 600; font-size: 15px; box-shadow: var(--shadow); transition: transform 160ms ease; }
.button--ghost { border: 1px solid var(--line); background: var(--card); color: var(--ink) !important; box-shadow: none; }
.button:hover { transform: translateY(-2px); }
.hero__stats { position: relative; display: flex; justify-content: center; gap: clamp(24px,5vw,64px); margin-top: clamp(36px,5vw,56px); }
.hero__stats > div { display: grid; gap: 2px; }
.hero__stats strong { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--acc); }
.hero__stats span { color: var(--mut); font-size: 13px; }
.hero__stats > i { width: 1px; background: var(--line); }

.section { padding: clamp(30px,5vw,60px) clamp(20px,5vw,56px); max-width: 1240px; margin: 0 auto; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section__head h2, .h2 { margin: 0; font-family: var(--serif); font-size: clamp(28px,3.4vw,42px); font-weight: 600; line-height: 1.08; text-wrap: balance; }
.ar { display: grid; gap: 2px; justify-items: end; text-align: right; }
.ar b { font-family: var(--arabic); font-weight: 400; font-size: 20px; color: var(--acc); line-height: 1.2; }
.ar small { color: var(--mut); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

.launcher { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,230px),1fr)); gap: 16px; }
.tile { display: grid; justify-items: center; gap: 12px; padding: 30px 20px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); text-decoration: none; color: var(--ink) !important; text-align: center; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--acc); }
.tile--planned { border-style: dashed; background: transparent; }
.tile--planned:hover { border-color: var(--acc2); }
.tile__arch { display: grid; place-items: center; width: 74px; height: 88px; border-radius: 999px 999px 12px 12px; background: var(--accSoft); border: 1px solid var(--line); color: var(--acc); animation: archFloat 6s ease-in-out infinite; }
.tile--planned .tile__arch { background: var(--goldSoft); color: var(--acc2); }
.tile:nth-child(2) .tile__arch { animation-delay: -1s; } .tile:nth-child(3) .tile__arch { animation-delay: -2s; }
.tile:nth-child(4) .tile__arch { animation-delay: -3s; } .tile:nth-child(5) .tile__arch { animation-delay: -4s; }
.tile:nth-child(6) .tile__arch { animation-delay: -5s; } .tile:nth-child(7) .tile__arch { animation-delay: -2.5s; }
.tile__arch svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile strong { font-size: 16px; font-weight: 600; }
.tile small { color: var(--mut); font-size: 12px; font-family: ui-monospace, monospace; }
.tile__status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--acc); letter-spacing: 0.1em; text-transform: uppercase; }
.tile__status i { width: 7px; height: 7px; border-radius: 999px; background: var(--acc); }
.tile--planned .tile__status { color: var(--acc2); } .tile--planned .tile__status i { background: var(--acc2); }

.purpose { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.purpose__inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,0.9fr) minmax(0,1.4fr); gap: clamp(24px,5vw,72px); align-items: start; }
.purpose__ar { margin: 0; font-family: var(--arabic); font-size: 30px; color: var(--acc); line-height: 1.6; }
.purpose__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,240px),1fr)); gap: 12px; }
.purpose__item { display: flex; gap: 12px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.purpose__item strong { font-size: 14px; }
.purpose__item p { margin: 4px 0 0; color: var(--mut); font-size: 13px; line-height: 1.55; }

.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,210px),1fr)); gap: 14px; }
.roadmap > div { padding: 24px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.roadmap span { display: block; margin-bottom: 14px; font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--acc2); }
.roadmap strong { font-size: 15px; }
.roadmap p { margin: 6px 0 0; color: var(--mut); font-size: 13.5px; line-height: 1.6; }
.center { text-align: center; } .center .section__head { justify-content: center; }

footer { border-top: 1px solid var(--line); background: var(--bg2); padding: clamp(36px,5vw,60px) clamp(20px,5vw,56px); }
.footer__inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer__brand { display: grid; gap: 10px; max-width: 340px; }
.footer__brand p { margin: 0; color: var(--mut); font-size: 13.5px; line-height: 1.6; }
.footer__verse { margin: 0; font-family: var(--arabic); font-size: 22px; color: var(--acc); }
.footer__cols { display: flex; gap: clamp(24px,5vw,72px); flex-wrap: wrap; }
.footer__cols > div { display: grid; gap: 8px; }
.footer__cols strong { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mut); }
.footer__cols a { text-decoration: none; font-size: 14px; }
.footer__legal { max-width: 1240px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--mut); font-size: 12.5px; }

/* ---------- Admin login ---------- */
.login-main { display: grid; min-height: calc(100vh - 76px); align-content: center; }
.login-shell { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(320px,0.95fr); gap: clamp(28px,5vw,72px); align-items: center; max-width: 1100px; margin: 0 auto; padding: clamp(36px,6vw,72px) clamp(20px,5vw,56px); }
.login-title { font-family: var(--serif); font-size: clamp(36px,4.6vw,58px); font-weight: 600; line-height: 1.04; text-wrap: balance; margin: 0 0 16px; }
.login-ar { margin: 6px 0 0; font-family: var(--arabic); font-size: 28px; color: var(--acc); }
.login-ar-sub { display: block; margin: 2px 0 18px; color: var(--mut); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.login-proof { display: flex; gap: 8px; flex-wrap: wrap; }
.login-proof span { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--mut); font-size: 12.5px; font-weight: 600; }
.login-card { position: relative; padding: clamp(24px,3vw,34px); border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.login-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-card__head h2 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.login-card__head .eyebrow { margin: 0 0 2px; }
.login-lock { display: grid; place-items: center; width: 52px; height: 62px; border-radius: 999px 999px 10px 10px; background: var(--accSoft); border: 1px solid var(--line); color: var(--acc); }
.login-lock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-form { display: grid; gap: 16px; }
.login-field { display: grid; gap: 7px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); }
.login-field > span { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.login-field svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--mut); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-field input { flex: 1; min-height: 46px; border: 0; background: transparent; color: var(--ink); font: 500 15px var(--sans); outline: none; }
.login-field > span:focus-within { border-color: var(--acc); }
.login-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.login-message { margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--acc2); background: var(--goldSoft); color: var(--ink); font-size: 13.5px; }

/* ---------- Admin workspace ---------- */
.hero--admin { text-align: left; padding-bottom: clamp(24px,4vw,40px); }
.hero--admin .hero__lead { margin: 0 0 26px; }
.admin-title { font-family: var(--serif); font-size: clamp(36px,4.6vw,58px); font-weight: 600; line-height: 1.04; margin: 0 0 16px; max-width: 700px; }
.quick-strip { display: flex; gap: 14px; flex-wrap: wrap; }
.quick-strip > div { display: grid; gap: 2px; min-width: 140px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.quick-strip span { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--acc); }
.quick-strip strong { color: var(--mut); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.admin-note { max-width: 720px; margin: 0 0 20px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--goldSoft); color: var(--ink); font-size: 13.5px; line-height: 1.6; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { display: flex; align-items: center; gap: 9px; flex: 1; min-width: min(100%, 260px); padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--mut); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-height: 44px; border: 0; background: transparent; color: var(--ink); font: 500 14px var(--sans); outline: none; }
.search:focus-within { border-color: var(--acc); }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.segmented__option { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--mut); font: 600 13px var(--sans); cursor: pointer; }
.segmented__option.is-active { background: var(--acc); color: #fff; }
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.category-tabs button { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--mut); font: 600 13px var(--sans); cursor: pointer; }
.category-tabs button:hover { border-color: var(--acc); color: var(--ink); }
.category-tabs button.is-active { background: var(--accInk); border-color: var(--accInk); color: #fff; }
html[data-theme="dark"] .category-tabs button.is-active { color: #0c1b16; }
.admin-manager { padding: clamp(18px,2.5vw,26px); border: 1px solid var(--line); border-radius: 20px; background: var(--card); margin-bottom: 30px; }
.admin-manager__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-manager__head h3 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.admin-manager__head .eyebrow { margin: 0 0 2px; }
.admin-manager__actions { display: flex; gap: 8px; align-items: center; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); cursor: pointer; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { border-color: var(--acc); }
.button { border: 0; cursor: pointer; font-family: var(--sans); }
.site-nav__button { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 13.5px var(--sans); cursor: pointer; }
.site-nav__button:hover { border-color: var(--acc); }
.admin-domain-list { display: grid; gap: 10px; }
.admin-domain-empty { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--mut); font-size: 14px; text-align: center; }
.admin-domain-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.admin-domain-row > div:first-child { display: grid; gap: 2px; }
.admin-domain-row strong { font-size: 14.5px; }
.admin-domain-row > div:first-child span { color: var(--mut); font-size: 12.5px; font-family: ui-monospace, monospace; }
.admin-domain-row > div:last-child { display: flex; align-items: center; gap: 10px; }
.status { padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.status--live { background: var(--accSoft); color: var(--acc); border: 1px solid var(--acc); }
.status--planned { background: var(--goldSoft); color: var(--acc2); border: 1px dashed var(--acc2); }
.remove-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--mut); font: 600 12.5px var(--sans); cursor: pointer; }
.remove-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.remove-link:hover { border-color: #b3402a; color: #b3402a; }

/* app.js-rendered public cards inside admin */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,300px),1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 20px; background: var(--card); overflow: hidden; }
.card__body { padding: 22px 22px 16px; }
.card__pattern { display: none; }
.card__kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--acc2); font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.card__dot { width: 7px; height: 7px; border-radius: 999px; background: var(--acc2); }
.card__title { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.card__title h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.card__top p { margin: 0 0 12px; color: var(--mut); font-size: 13.5px; line-height: 1.6; }
.card__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.card__meta span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--mut); font-size: 11.5px; font-weight: 600; }
.domain { font-size: 12.5px; font-family: ui-monospace, monospace; text-decoration: none; }
.card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg); }
.group { color: var(--mut); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.open-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 13.5px; font-weight: 600; }
.open-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty { padding: 26px; border: 1px dashed var(--line); border-radius: 16px; color: var(--mut); text-align: center; grid-column: 1 / -1; }

/* Modal */
.modal { border: 0; border-radius: 22px; padding: 0; background: transparent; }
.modal::backdrop { background: rgba(12,27,22,0.5); backdrop-filter: blur(4px); }
.modal__panel { display: grid; gap: 14px; width: min(92vw, 440px); padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); font-family: var(--sans); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal__head h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.modal__panel label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); }
.modal__panel input, .modal__panel select, .modal__panel textarea { min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: 500 14px var(--sans); outline: none; }
.modal__panel textarea { resize: vertical; }
.modal__panel input:focus, .modal__panel select:focus, .modal__panel textarea:focus { border-color: var(--acc); }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: stretch; }
  .site-nav { flex-wrap: wrap; justify-content: center; }
  .purpose__inner { grid-template-columns: 1fr; }
  .hero__stats { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }
