:root {
  --night: #0d1712;
  --night-2: #13221a;
  --paper: #f6f0e3;
  --paper-2: #efe6d2;
  --ink: #1d2a22;
  --ink-soft: #55625a;
  --green: #2f5a44;
  --gold: #b8924a;
  --gold-soft: #d8bf86;
  --gold-ink: #8a6a2c;
  --ivory: #f8f2e2;
  --blush: #d6a49a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", "Cormorant Garamond", cursive;
  --sans: "Jost", system-ui, sans-serif;
  --arabic: "Amiri", "Geeza Pro", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 20px; line-height: 1.55; overflow-x: hidden; }
a { color: inherit; }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; background: radial-gradient(120% 80% at 50% 100%, #1b3426 0%, var(--night) 60%); color: var(--ivory); overflow: hidden; }
#cloud { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-text { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: min(78vw, 430px); text-align: center; pointer-events: none; opacity: 0; animation: rise 1.6s ease 2.2s forwards; }
.bismillah { font-family: var(--arabic); color: var(--gold-soft); font-size: clamp(15px, 2.2vw, 19px); margin-bottom: 1.1em; direction: rtl; }
.names { font-family: var(--script); font-weight: 400; font-size: clamp(54px, 11vw, 92px); line-height: 1.02; display: flex; flex-direction: column; align-items: center; text-shadow: 0 2px 30px rgba(13, 23, 18, .9); }
.names .amp { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: .42em; line-height: 1.1; }
.kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .32em; font-size: 12px; margin-top: 1.3em; color: var(--gold-soft); }
.when { font-style: italic; font-size: clamp(17px, 2.4vw, 21px); margin-top: .5em; opacity: .85; }
.scan-note { position: absolute; left: max(16px, env(safe-area-inset-left)); top: max(16px, env(safe-area-inset-top)); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; letter-spacing: .08em; color: rgba(216, 191, 134, .55); }
.scroll-cue { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); width: 22px; height: 36px; margin-left: -11px; border: 1px solid rgba(216, 191, 134, .5); border-radius: 12px; opacity: 0; animation: fade 1s ease 3.4s forwards; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; background: var(--gold-soft); border-radius: 1px; animation: cue 1.8s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes fade { to { opacity: 1; } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Zobab */
section { padding: clamp(72px, 12vw, 140px) 16px; }
.word { max-width: 760px; margin: 0 auto; }
.merge { display: flex; justify-content: center; align-items: baseline; font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 11vw, 120px); line-height: 1; letter-spacing: .03em; margin-bottom: clamp(48px, 8vw, 80px); white-space: nowrap; }
.merge b, .merge i { font-style: normal; font-weight: 500; display: inline-block; overflow: hidden; max-width: 1.1em; transition: opacity .8s ease, max-width 1.2s cubic-bezier(.6, .05, .25, 1) .5s, color .8s ease; }
.merge b { color: var(--ink); }
.merge i { color: rgba(29, 42, 34, .38); }
.merge .and { font-style: italic; font-weight: 400; color: var(--gold); padding: 0 .12em; max-width: 1.4em; }
.merge.on i { opacity: 0; max-width: 0; padding: 0; }
.merge.on b { color: var(--green); }

.entry { border-top: 1px solid rgba(29, 42, 34, .18); padding-top: 28px; }
.entry h2 { font-weight: 500; font-size: clamp(30px, 5vw, 40px); line-height: 1.2; }
.pron { font-family: var(--sans); font-size: 14px !important; letter-spacing: .12em; font-style: normal; font-weight: 400; color: var(--ink-soft); font-size: .6em; margin-left: .3em; }
.pos { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); margin-left: .6em; vertical-align: middle; }
.entry ol { margin: 18px 0 0 1.2em; font-size: clamp(19px, 2.4vw, 22px); }
.entry li { padding-left: .3em; margin-bottom: .6em; }
.entry li::marker { color: var(--gold-ink); font-family: var(--sans); font-size: .8em; }
.ar-inline { font-family: var(--arabic); font-size: 1.05em; }

.thread { margin: clamp(56px, 9vw, 88px) auto 0; max-width: 420px; display: flex; flex-direction: column; gap: 6px; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; font-size: 15px; line-height: 1.35; }
.thread .date { text-align: center; font-size: 11px; color: var(--ink-soft); letter-spacing: .04em; margin-bottom: 6px; }
.msg { max-width: 78%; padding: 8px 13px; border-radius: 18px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.thread.on .msg { opacity: 1; transform: none; }
.msg.me { align-self: flex-end; background: var(--green); color: #f4efe2; border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: var(--paper-2); color: var(--ink); border-bottom-left-radius: 5px; }
.thread .aside { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft); text-align: center; margin-top: 22px; opacity: 0; transition: opacity .8s ease; }
.thread.on .aside { opacity: 1; transition-delay: 3.2s; }

/* Event */
.event { background: var(--night); color: var(--ivory); text-align: center; }
.eyebrow { font-style: italic; color: var(--gold-soft); font-size: clamp(17px, 2.3vw, 20px); }
.event h2 { font-family: var(--script); font-weight: 400; font-size: clamp(52px, 10vw, 84px); line-height: 1.2; margin: .15em 0 .5em; }
.card { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(216, 191, 134, .35); border-radius: 200px 200px 6px 6px; padding: 72px 24px 40px; position: relative; }
.card::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(216, 191, 134, .15); border-radius: 192px 192px 3px 3px; pointer-events: none; }
.cell { padding: 0 18px; }
.cell + .cell { border-left: 1px solid rgba(216, 191, 134, .25); }
.label { font-family: var(--sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: .7em; }
.big { font-size: clamp(22px, 3vw, 28px); font-weight: 500; line-height: 1.25; margin-bottom: .2em; }
.count { min-height: 84px; font-variant-numeric: lining-nums tabular-nums; display: flex; justify-content: center; gap: clamp(18px, 5vw, 48px); margin: 44px 0 36px; font-variant-numeric: tabular-nums; }
.count div { min-width: 64px; }
.count strong { display: block; font-weight: 400; font-size: clamp(40px, 7vw, 60px); line-height: 1; color: var(--gold-soft); }
.count span { font-family: var(--sans); font-size: 11px; letter-spacing: .25em; text-transform: uppercase; opacity: .7; }
.count p { font-style: italic; font-size: 24px; color: var(--gold-soft); }
.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn { font-family: var(--sans); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding: 14px 26px; border-radius: 999px; background: var(--gold); color: var(--night); border: 1px solid var(--gold); transition: background .25s ease, color .25s ease; }
.btn:hover { background: var(--gold-soft); }
.btn.ghost { background: transparent; color: var(--gold-soft); }
.btn.ghost:hover { background: rgba(216, 191, 134, .12); }
.btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

/* Ayah */
.ayah { text-align: center; background: var(--paper); }
.ayah .ar { font-family: var(--arabic); font-size: clamp(32px, 6vw, 50px); color: var(--green); line-height: 1.6; direction: rtl; }
.ayah .en { font-style: italic; font-size: clamp(22px, 3.2vw, 28px); margin-top: .4em; }
.ayah .ref { font-family: var(--sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-ink); margin-top: 1em; }

footer { text-align: center; padding: 56px 16px 64px; border-top: 1px solid rgba(29, 42, 34, .12); color: var(--ink-soft); }
.arch-mark { width: 26px; color: var(--gold); margin-bottom: 14px; }
footer p:first-of-type { font-family: var(--script); font-size: 34px; color: var(--ink); }
.from { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-top: 8px; }

@media (max-width: 620px) {
  body { font-size: 18px; }
  .card { grid-template-columns: 1fr; border-radius: 160px 160px 6px 6px; padding: 64px 16px 32px; }
  .card::before { border-radius: 152px 152px 3px 3px; }
  .cell + .cell { border-left: 0; border-top: 1px solid rgba(216, 191, 134, .25); margin-top: 24px; padding-top: 24px; }
  .count div { min-width: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text, .scroll-cue { animation: none; opacity: 1; }
  .scroll-cue span { animation: none; }
  .merge b, .merge i, .msg, .thread .aside { transition: none; }
}
