/* Shajarah website. Palette and type are shared with FahmQuran (FahmQuran/website/css/style.css):
   a night-sky shell, parchment for Quranic text, gold for reward, emerald for the home. */

@font-face { font-family: 'Fraunces'; src: url(../fonts/Fraunces.ttf) format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'SourceSans3'; src: url(../fonts/SourceSans3.ttf) format('truetype'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'AmiriQuran'; src: url(../fonts/AmiriQuran-Regular.ttf) format('truetype'); font-display: block; }

:root {
  --night: #0B1517;
  --night-raised: #11211F;
  --night-high: #173029;
  --night-line: #24403A;
  --moon: #E9EFEC;
  --moon-muted: #A5B7B1;
  --parchment: #F5EDDD;
  --parchment-deep: #EADFC8;
  --ink: #241C14;
  --ink-muted: #5E5141;
  --gold: #D4AE55;
  --gold-hi: #EBCB7E;
  --gold-deep: #76591A;
  --emerald: #46B08F;
  --emerald-deep: #1E6B55;

  --display: 'Fraunces', 'Times New Roman', serif;
  --body: 'SourceSans3', system-ui, sans-serif;
  --arabic: 'AmiriQuran', 'Amiri', serif;
  --gutter: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --hair: rgba(212, 174, 85, .22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--night); color: var(--moon);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body.loading { overflow: hidden; }
body.no-gl { background: radial-gradient(ellipse at 50% 20%, #173029 0%, var(--night) 60%) fixed; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--gold-hi); font-variation-settings: 'SOFT' 100; }
[lang="ar"] { font-family: var(--arabic); font-weight: 400; }
::selection { background: rgba(212, 174, 85, .35); color: var(--moon); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- fixed layers ---------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(5, 10, 11, .8) 100%);
}
.veil::after { content: ''; position: absolute; inset: 0; background: var(--night); opacity: var(--dim, 0); }
.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--emerald), var(--gold)); }

/* ---------- loader ---------- */
#loader { position: fixed; inset: 0; z-index: 100; background: var(--night); display: grid; place-items: center; transition: opacity 1.4s var(--ease), visibility 1.4s; }
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; padding: 0 24px; }
.loader-ar { font-family: var(--arabic); font-size: clamp(30px, 6vw, 56px); color: var(--gold); margin: 0 0 28px; line-height: 2; opacity: 0; animation: rise 1.8s var(--ease) .2s forwards; text-shadow: 0 0 40px rgba(212, 174, 85, .35); }
.loader-bar { width: 180px; height: 1px; margin: 0 auto; background: var(--night-line); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: var(--p, 0%); background: var(--gold); transition: width .4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- cursor ---------- */
#cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; mix-blend-mode: screen; }
#cursor .c-dot, #cursor .c-ring { position: fixed; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
#cursor .c-dot { width: 5px; height: 5px; background: var(--gold-hi); }
#cursor .c-ring { width: 34px; height: 34px; border: 1px solid rgba(212, 174, 85, .55); transition: width .35s var(--ease), height .35s var(--ease), border-color .35s; }
#cursor.hover .c-ring { width: 66px; height: 66px; border-color: rgba(235, 203, 126, .9); }
@media (hover: none), (pointer: coarse) { #cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor input { cursor: none; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter); transition: background .6s, padding .6s, transform .7s var(--ease);
}
.nav.solid { padding-top: 14px; padding-bottom: 14px; background: linear-gradient(to bottom, rgba(11, 21, 23, .9), rgba(11, 21, 23, 0)); }
.nav.hide { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: baseline; gap: 12px; }
.brand-ar { font-family: var(--arabic); color: var(--gold); font-size: 26px; line-height: 1; }
.brand-en { font-family: var(--display); font-size: 21px; font-weight: 400; letter-spacing: .01em; }
.nav nav { display: flex; gap: 34px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--moon-muted); }
.nav nav a { position: relative; padding: 6px 0; transition: color .3s; }
.nav nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--gold); transition: right .5s var(--ease); }
.nav nav a:hover { color: var(--moon); }
.nav nav a:hover::after { right: 0; }
@media (max-width: 960px) { .nav nav { display: none; } }
@media (max-width: 520px) { .nav .pill { display: none; } }

.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 999px;
  border: 1px solid rgba(212, 174, 85, .45); color: var(--moon); font: 600 14px/1 var(--body); letter-spacing: .05em;
  background: rgba(17, 33, 31, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s, background .3s, color .3s, transform .3s var(--ease); cursor: pointer;
}
.pill:hover { border-color: var(--gold); background: rgba(212, 174, 85, .12); }
.pill-gold { background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, #b8923e); color: #231A05; border-color: transparent; padding: 18px 34px; font-size: 16px; box-shadow: 0 10px 40px -10px rgba(212, 174, 85, .6); }
.pill-gold:hover { background: var(--gold-hi); color: #231A05; }

.chapters {
  position: fixed; right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 6; display: flex; flex-direction: column; gap: 16px;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--moon-muted); transition: opacity .6s; text-align: right;
}
.chapters span { opacity: .3; transition: opacity .5s, color .5s; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.chapters span i { font-style: normal; font-family: var(--arabic); font-size: 17px; letter-spacing: 0; order: 2; width: 18px; text-align: center; }
.chapters span.on { opacity: 1; color: var(--gold); }
.chapters.off { opacity: 0; }
@media (max-width: 1100px) { .chapters { display: none; } }

/* ---------- type ---------- */
.eyebrow { font-size: 11.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 0 0 22px; font-weight: 600; display: flex; align-items: center; gap: 14px; }
.center .eyebrow, .hero .eyebrow, .name .eyebrow, .word .eyebrow { justify-content: center; }
.eyebrow .num { font-family: var(--display); font-size: 13px; letter-spacing: .1em; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--hair); border-radius: 50%; }
.display { font-family: var(--display); font-weight: 300; font-size: clamp(42px, 6.2vw, 96px); line-height: 1; letter-spacing: -.03em; margin: 0 0 28px; font-variation-settings: 'opsz' 144, 'SOFT' 50; }
.sec-lede { color: var(--moon-muted); font-size: clamp(17px, 1.35vw, 20px); max-width: 600px; margin: 0; }
.center .sec-lede { margin: 0 auto; }

/* split headings: each word rises from a mask */
.split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.3s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.split.in .w > span { transform: none; }
.split-fade { opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.split-fade.in { opacity: 1; transform: none; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.3s var(--ease), transform 1.3s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- sections ---------- */
main { position: relative; z-index: 5; }
.sec { position: relative; padding: clamp(110px, 16vh, 200px) var(--gutter); }
.sec-head { max-width: 860px; margin-bottom: clamp(48px, 8vh, 100px); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* hero */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; justify-content: center; text-align: center; padding-bottom: 6vh; }
.hero-inner { max-width: 1000px; }
.hero h1 { margin: 0; font-weight: 300; }
.hero-ar { display: block; font-family: var(--arabic); color: var(--gold); font-size: clamp(44px, 6vw, 84px); line-height: 1.7; text-shadow: 0 0 60px rgba(212, 174, 85, .45); }
.hero-en { display: block; font-family: var(--display); font-size: clamp(64px, 11vw, 176px); line-height: .9; letter-spacing: -.045em; font-weight: 200; font-variation-settings: 'opsz' 144, 'SOFT' 100;
  background: linear-gradient(180deg, #fff 10%, var(--moon) 45%, var(--gold-hi) 110%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tag { font-family: var(--display); font-weight: 300; font-size: clamp(19px, 1.9vw, 26px); color: var(--moon-muted); margin: 26px 0 0; }
.scroll-cue { margin-top: 34px; font-size: 10.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--moon-muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.scroll-cue span { width: 1px; height: 52px; background: linear-gradient(to bottom, transparent, var(--gold)); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.hero .hero-ar, .hero .hero-en { opacity: 0; filter: blur(14px); transform: scale(1.04); transition: opacity 2.2s var(--ease), filter 2.2s var(--ease), transform 2.6s var(--ease); }
body.ready .hero .hero-ar { opacity: 1; filter: none; transform: none; transition-delay: .2s; }
body.ready .hero .hero-en { opacity: 1; filter: none; transform: none; transition-delay: .5s; }

/* story chapters: text on one side, the 3D form on the other */
.story { min-height: 130vh; display: flex; align-items: center; }
.story.tall { min-height: 260vh; align-items: flex-start; }
.story-text { max-width: 540px; position: relative; text-shadow: 0 2px 30px rgba(5, 10, 11, .9); }
.story-text::before { content: ''; position: absolute; inset: -80px -110px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(8, 15, 16, .72), rgba(8, 15, 16, 0)); }
.story-text.sticky { position: sticky; top: 18vh; }
.story[data-side="right"] { justify-content: flex-end; }
.story[data-side="right"] .story-text { margin-right: clamp(0px, 9vw, 150px); }
.story h2 { font-family: var(--display); font-weight: 300; font-size: clamp(36px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -.02em; margin: 0 0 26px; font-variation-settings: 'opsz' 144, 'SOFT' 50; }
.lede { color: var(--moon); opacity: .86; font-size: clamp(17px, 1.3vw, 19.5px); margin: 0 0 16px; }
.lede.dim { color: var(--moon-muted); opacity: 1; }
.ar-big { font-family: var(--arabic); font-size: clamp(64px, 8vw, 116px); color: rgba(212, 174, 85, .16); line-height: 1.6; margin: 6px 0 0; text-shadow: none; }

.stats { list-style: none; padding: 0; margin: 30px 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.stats li { display: flex; flex-direction: column; }
.stats b { font-family: var(--display); font-weight: 200; font-size: clamp(40px, 4.2vw, 62px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; }
.stats span { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-top: 8px; }

.word-card { background: linear-gradient(160deg, var(--parchment), var(--parchment-deep)); color: var(--ink); border-radius: 20px; padding: 16px 22px 18px; text-align: center; width: 230px; margin: 4px 0 24px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(212, 174, 85, .4), 0 0 80px -20px rgba(212, 174, 85, .35); text-shadow: none; transform: rotate(-2deg); }
.word-card.in { transform: rotate(-2deg); }
.wc-k { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; margin: 0; }
.wc-ar { font-family: var(--arabic); font-size: 46px; line-height: 1.7; margin: 0; }
.wc-tr { font-style: italic; color: var(--ink-muted); margin: -6px 0 4px; font-size: 14px; }
.wc-en { font-family: var(--display); font-size: 19px; font-weight: 500; margin: 0; }
.badge-line { color: var(--moon-muted); font-size: 15px; margin: 0 0 26px; }
.ar-inline { font-family: var(--arabic); color: var(--gold); font-size: 1.35em; margin-right: 10px; }

.flow { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 0; border-left: 1px solid var(--hair); }
.flow li { display: flex; gap: 18px; align-items: center; padding: 14px 0 14px 22px; position: relative; }
.flow li::before { content: ''; position: absolute; left: -4px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 12px var(--emerald); }
.flow li:nth-child(2)::before { background: var(--moon); box-shadow: 0 0 12px var(--moon); }
.flow li:nth-child(3)::before { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.flow i { font-style: normal; font-family: var(--arabic); color: var(--gold); font-size: 22px; width: 20px; }
.flow b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.flow span { color: var(--moon-muted); font-size: 14px; }

.juz-count { display: flex; align-items: baseline; gap: 16px; margin: 26px 0 30px; }
.juz-count b { font-family: var(--display); font-weight: 200; font-size: clamp(110px, 14vw, 210px); line-height: .85; color: var(--gold); letter-spacing: -.05em; text-shadow: 0 0 80px rgba(212, 174, 85, .4); font-variant-numeric: tabular-nums; min-width: 1.15em; }
.juz-count span { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--moon-muted); }

.loop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 30px 0 30px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.loop div { padding: 18px 16px 18px 0; position: relative; }
.loop div + div { padding-left: 18px; border-left: 1px solid var(--hair); }
.loop b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; }
.loop span { font-size: 13px; color: var(--moon-muted); }

/* ---------- the wall ---------- */
.showcase { padding-bottom: clamp(90px, 14vh, 160px); }
.room { position: relative; max-width: 1180px; margin: 0 auto; perspective: 1800px; padding: 30px 0 10px; }
.wall-light { position: absolute; left: 50%; top: -10%; width: 90%; height: 120%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 30%, rgba(235, 203, 126, .14), transparent 60%); pointer-events: none; }
.wall-device {
  position: relative; aspect-ratio: 16 / 10; border-radius: 22px; padding: 14px;
  background: linear-gradient(135deg, #7a5f25 0%, #e9cf8c 18%, #9c7a32 34%, #5b461b 52%, #d8b96c 74%, #6d5420 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 80px 140px -40px rgba(0, 0, 0, .95), 0 30px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
  transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, -6deg)); transform-style: preserve-3d; transition: transform 1.2s var(--ease);
}
.wall-glass {
  position: relative; height: 100%; border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 1.08fr 1fr; gap: 2.2%;
  padding: 3.4% 3.6%; background: radial-gradient(ellipse at 20% 0%, #173029 0%, #0B1517 55%, #070e0f 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .9), inset 0 0 60px rgba(0, 0, 0, .6);
  container-type: inline-size;
}
.wall-glass::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background: repeating-conic-gradient(from 22.5deg at 50% 50%, var(--gold) 0deg 1deg, transparent 1deg 45deg); mask: radial-gradient(circle at 78% 120%, #000, transparent 60%); }
.wall-glare { position: absolute; inset: 14px; border-radius: 12px; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .08) 0%, transparent 28%, transparent 70%, rgba(255, 255, 255, .03) 100%); }
.wall-shadow { height: 40px; margin: 0 8%; background: radial-gradient(ellipse at 50% 0%, rgba(0, 0, 0, .6), transparent 70%); }
.caption { text-align: center; font-size: 12.5px; color: var(--moon-muted); opacity: .7; letter-spacing: .04em; margin: 6px 0 0; }

.w-left { display: flex; flex-direction: column; min-width: 0; }
.w-hijri { margin: 0; color: var(--gold); font-size: 1.55cqw; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.w-time { margin: .2cqw 0 0; font-family: var(--display); font-weight: 200; font-size: 13cqw; line-height: .95; letter-spacing: -.04em; font-variant-numeric: tabular-nums; font-variation-settings: 'opsz' 144; }
.w-date { margin: .6cqw 0 0; color: var(--moon-muted); font-size: 1.7cqw; }
.w-next { margin-top: auto; padding: 1.4cqw 1.8cqw; border-radius: 1.4cqw; background: linear-gradient(135deg, rgba(212, 174, 85, .18), rgba(212, 174, 85, .04)); border: 1px solid rgba(212, 174, 85, .35); display: flex; align-items: baseline; justify-content: space-between; }
.w-next-k { margin: 0; font-size: 1.5cqw; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
.w-next-t { margin: 0; font-family: var(--display); font-size: 3cqw; font-variant-numeric: tabular-nums; }
.w-prayers { list-style: none; padding: 0; margin: 1.4cqw 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: .7cqw; }
.w-prayers li { padding: 1cqw .6cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .05); text-align: center; }
.w-prayers li.now { border-color: rgba(70, 176, 143, .6); background: rgba(70, 176, 143, .12); }
.w-prayers b { display: block; font-size: 1.25cqw; letter-spacing: .1em; text-transform: uppercase; color: var(--moon-muted); font-weight: 600; }
.w-prayers span { display: block; font-family: var(--display); font-size: 2.05cqw; font-variant-numeric: tabular-nums; }
.w-prayers small { display: block; font-size: 1.05cqw; color: var(--moon-muted); opacity: .75; }

.w-right { display: grid; grid-template-rows: auto auto 1fr; gap: 1.4cqw; min-width: 0; }
.w-panel { border-radius: 1.6cqw; background: rgba(17, 33, 31, .7); border: 1px solid rgba(255, 255, 255, .06); padding: 1.5cqw 1.8cqw; }
.w-k { margin: 0; font-size: 1.2cqw; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.w-word { background: linear-gradient(160deg, var(--parchment), var(--parchment-deep)); color: var(--ink); text-align: center; }
.w-word .w-k { color: var(--gold-deep); }
.w-word-ar { font-family: var(--arabic); font-size: 5.6cqw; line-height: 1.6; margin: 0; }
.w-word-tr { margin: .4cqw 0 0; font-style: italic; color: var(--ink-muted); font-size: 1.6cqw; }
.w-word-tr span { font-family: var(--display); font-style: normal; color: var(--ink); font-weight: 600; }
.w-word-src { margin: .4cqw 0 0; font-size: 1.05cqw; color: var(--ink-muted); }
.w-khatm { display: flex; align-items: center; gap: 1.8cqw; }
.khatm-ring { width: 10cqw; height: 10cqw; flex: none; overflow: visible; }
.khatm-ring path { fill: none; stroke-width: 7; stroke-linecap: butt; transition: stroke .6s; }
.w-khatm-n { margin: .3cqw 0 0; font-family: var(--display); font-size: 2.4cqw; }
.w-khatm-n b { font-weight: 400; color: var(--gold-hi); }
.w-khatm-s { margin: 0; font-size: 1.3cqw; color: var(--moon-muted); }
.w-avatars { list-style: none; padding: 0; margin: 1cqw 0 0; display: flex; gap: 1.6cqw; }
.w-avatars li { display: flex; flex-direction: column; align-items: center; font-size: 1.25cqw; color: var(--moon-muted); gap: .4cqw; }
.w-avatars span { width: 4.4cqw; height: 4.4cqw; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid var(--c); color: var(--c); font-family: var(--display); font-size: 2cqw; box-shadow: 0 0 2cqw -0.5cqw var(--c); }
.w-family { display: flex; flex-direction: column; justify-content: center; }
.w-gentle { margin: 1.2cqw 0 0; font-size: 1.35cqw; color: var(--moon); opacity: .85; }

.lineup { list-style: none; padding: 0; margin: clamp(50px, 8vh, 90px) auto 0; max-width: 1180px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hair); }
.lineup li { padding: 22px 20px 0 0; }
.lineup li + li { padding-left: 20px; border-left: 1px solid var(--hair); }
.lineup b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(18px, 1.6vw, 24px); }
.lineup span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--moon-muted); }
.lineup li:first-child span { color: var(--gold); }

/* ---------- cipher ---------- */
.cipher-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 7vw, 120px); max-width: 1240px; margin: 0 auto; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 34px 0 0; }
.ticks li { padding: 14px 0 14px 34px; border-top: 1px solid var(--hair); position: relative; color: var(--moon); opacity: .88; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 22px; width: 12px; height: 6px; border-left: 1.5px solid var(--emerald); border-bottom: 1.5px solid var(--emerald); transform: rotate(-45deg); }
.cipher-demo { background: linear-gradient(160deg, rgba(23, 48, 41, .75), rgba(11, 21, 23, .85)); border: 1px solid var(--hair); border-radius: 28px; padding: clamp(24px, 3vw, 40px); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9); }
.cd-k { display: block; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; font-weight: 600; }
.cd-k2 { margin-top: 26px; }
#plain { width: 100%; background: rgba(0, 0, 0, .25); border: 1px solid rgba(212, 174, 85, .35); border-radius: 14px; padding: 16px 18px; color: var(--moon); font: 400 19px/1.3 var(--display); outline: none; transition: border-color .3s, box-shadow .3s; }
#plain:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 174, 85, .12); }
.cd-arrow { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--moon-muted); font-size: 13px; }
.cd-arrow span { width: 1px; height: 36px; background: linear-gradient(to bottom, var(--gold), var(--emerald)); margin-left: 18px; }
.cd-out { display: block; font: 400 13.5px/1.65 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--emerald); word-break: break-all; min-height: 5em; padding: 16px 18px; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(70, 176, 143, .25); }
.cd-wall { margin: 0; font-family: var(--display); font-size: 19px; color: var(--gold-hi); }
.cd-note { margin: 24px 0 0; font-size: 12.5px; color: var(--moon-muted); opacity: .8; }

/* ---------- promise ---------- */
.vows { list-style: none; padding: 0; margin: 0 auto; max-width: 1240px; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.vows li { padding: clamp(26px, 3vw, 42px); border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); position: relative; transition: background .5s; }
.vows li:hover { background: rgba(212, 174, 85, .045); }
.vows i { font-style: normal; font-family: var(--arabic); font-size: 40px; color: transparent; -webkit-text-stroke: 1px rgba(212, 174, 85, .7); line-height: 1; display: block; margin-bottom: 18px; }
.vows h3 { font-family: var(--display); font-weight: 400; font-size: 23px; margin: 0 0 10px; line-height: 1.2; }
.vows p { color: var(--moon-muted); margin: 0; font-size: 15.5px; }
.vow-seal { display: grid; place-items: center; background: radial-gradient(circle, rgba(212, 174, 85, .08), transparent 70%); }
.vow-seal span { font-family: var(--arabic); font-size: clamp(54px, 5vw, 80px); color: rgba(212, 174, 85, .55); line-height: 1.8; }
.vows li:nth-child(2) { transition-delay: .08s; } .vows li:nth-child(3) { transition-delay: .16s; } .vows li:nth-child(4) { transition-delay: .24s; }

/* ---------- road ---------- */
.road .sec-head { max-width: 1240px; margin-left: auto; margin-right: auto; }
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 1240px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: linear-gradient(90deg, var(--gold), var(--emerald) 50%, rgba(70, 176, 143, 0)); }
.timeline li { padding: 40px 26px 0 0; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--night); border: 1px solid var(--gold); }
.timeline li:first-child::before { background: var(--gold); box-shadow: 0 0 18px var(--gold); }
.t-when { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; font-weight: 600; }
.timeline h3 { font-family: var(--display); font-weight: 400; font-size: 25px; margin: 0 0 10px; }
.timeline p:not(.t-when) { color: var(--moon-muted); font-size: 15px; margin: 0; }
.timeline li:nth-child(2) { transition-delay: .1s; } .timeline li:nth-child(3) { transition-delay: .2s; } .timeline li:nth-child(4) { transition-delay: .3s; } .timeline li:nth-child(5) { transition-delay: .4s; }

/* ---------- name ---------- */
.name { min-height: 120vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.name-inner { max-width: 980px; }
.name-ayah { text-wrap: balance; font-family: var(--arabic); font-size: clamp(26px, 3.1vw, 46px); line-height: 2.05; color: var(--gold-hi); margin: 10px 0 18px; text-shadow: 0 0 60px rgba(212, 174, 85, .35); }
.name-en { font-family: var(--display); font-weight: 300; font-style: italic; font-size: clamp(20px, 2vw, 28px); margin: 0 auto 10px; max-width: 760px; }
.name-ref { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--moon-muted); margin: 0 0 46px; }
.name-meaning { color: var(--moon-muted); font-size: clamp(17px, 1.3vw, 20px); max-width: 600px; margin: 0 auto; }

.name-ayah .hl { color: #fff; text-shadow: 0 0 40px rgba(235, 203, 126, .9); }

/* ---------- shajarah: the word ---------- */
.word { min-height: 130vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.word-inner { max-width: 1100px; }
.word-ar { font-family: var(--arabic); font-size: clamp(100px, 14vw, 210px); line-height: 1.75; margin: -.2em 0 .05em; color: transparent;
  background: linear-gradient(180deg, var(--gold-hi) 20%, var(--gold) 60%, var(--gold-deep) 120%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 50px rgba(212, 174, 85, .35)); }
.word-say { display: flex; justify-content: center; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 0 0 34px; }
.word-say i { font-family: var(--display); font-weight: 300; font-size: clamp(28px, 3vw, 42px); color: var(--moon); }
.word-say span { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--moon-muted); }
.word-say b { font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(28px, 3vw, 42px); color: var(--gold-hi); }
.root { list-style: none; padding: 0; margin: 0 auto 10px; display: flex; justify-content: center; gap: clamp(18px, 4vw, 54px); direction: rtl; }
.root li { display: flex; flex-direction: column; align-items: center; width: 84px; padding: 10px 0 14px; border: 1px solid var(--hair); border-radius: 999px 999px 18px 18px; background: rgba(17, 33, 31, .45); }
.root span { font-family: var(--arabic); font-size: 46px; line-height: 1.6; color: var(--gold); }
.root small { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--moon-muted); direction: ltr; }
.word-stats { justify-content: center; margin: 34px 0 6px; gap: 14px 70px; }
.word-stats li { align-items: center; }
.word-note { font-size: 12.5px; letter-spacing: .04em; color: var(--moon-muted); opacity: .8; margin: 8px auto 0; max-width: 640px; }
.wbw { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: clamp(60px, 9vh, 110px) auto 6px; max-width: 1040px; }
.wbw span { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 6px 12px 14px; border-radius: 16px; border: 1px solid transparent; transition: border-color .4s, background .4s; }
.wbw span:hover { border-color: var(--hair); background: rgba(212, 174, 85, .05); }
.wbw b { font-family: var(--arabic); font-weight: 400; font-size: clamp(30px, 3vw, 42px); line-height: 1.9; color: var(--parchment); }
.wbw i { font-family: var(--body); font-size: 13.5px; color: var(--moon-muted); }
.wbw em { font-family: var(--display); font-style: normal; font-size: 16px; color: var(--moon); margin-top: 2px; }
.wbw .key { border-color: rgba(212, 174, 85, .5); background: linear-gradient(160deg, rgba(212, 174, 85, .16), rgba(212, 174, 85, .04)); box-shadow: 0 0 60px -14px rgba(212, 174, 85, .5); }
.wbw .key b { color: var(--gold-hi); }
.wbw .key em { color: var(--gold-hi); }
.hero-gloss { margin: 16px 0 0; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.hero-gloss i { font-family: var(--display); font-size: 15px; letter-spacing: .04em; text-transform: none; color: var(--moon); }

/* ---------- shajarah: the tree grows ---------- */
.grow { min-height: 340vh; }
.stages { display: grid; margin-top: 8px; }
.stage { grid-area: 1 / 1; opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); pointer-events: none; }
.stage.on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.stage-ar { text-align: left; font-family: var(--arabic); font-size: clamp(32px, 3vw, 46px); line-height: 2.2; color: var(--gold-hi); margin: 0 0 8px; text-shadow: 0 0 40px rgba(212, 174, 85, .4); }
.stage-gloss { margin: 0 0 18px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--moon-muted); }
.stage h3 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.2vw, 32px); margin: 0 0 10px; line-height: 1.15; }
.stage p:not(.stage-ar):not(.stage-gloss) { color: var(--moon); opacity: .86; font-size: clamp(16.5px, 1.25vw, 19px); margin: 0; }
.growth { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--moon-muted); }
.growth::before, .growth::after { content: ''; position: absolute; left: 0; top: 0; height: 1px; }
.growth::before { right: 0; background: var(--night-line); }
.growth::after { width: calc(var(--g, 0) * 100%); background: linear-gradient(90deg, var(--gold), var(--emerald) 60%, var(--gold-hi)); box-shadow: 0 0 12px rgba(212, 174, 85, .6); }
.growth li { padding-top: 14px; }

/* ---------- close ---------- */
.close { min-height: 110vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.close-inner { max-width: 1000px; }
.close .display { font-size: clamp(46px, 7.4vw, 120px); }
.ctas { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 44px; }
.wl-soon { margin: 0; color: var(--moon-muted); font-size: 15px; letter-spacing: .02em; }

/* ---------- footer ---------- */
.foot { position: relative; padding: 70px var(--gutter) 40px; border-top: 1px solid var(--hair); background: linear-gradient(to bottom, rgba(11, 21, 23, .4), var(--night)); display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.foot-brand { display: flex; align-items: baseline; gap: 12px; }
.foot-brand .brand-ar { font-size: 34px; }
.foot-brand .brand-en { font-size: 28px; font-family: var(--display); font-weight: 300; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.foot-cols div { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--moon-muted); }
.foot-cols a:hover { color: var(--gold-hi); }
.foot-k { margin: 0 0 6px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.foot-legal { grid-column: 1 / -1; margin: 20px 0 0; font-size: 12.5px; color: var(--moon-muted); opacity: .7; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cipher-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--gold), var(--emerald) 60%, rgba(70, 176, 143, 0)); }
  .timeline li { padding: 0 0 36px 36px; }
  .lineup { grid-template-columns: 1fr 1fr; }
  .lineup li:nth-child(3) { padding-left: 0; border-left: 0; }
  .foot { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .story, .story[data-side="right"] { justify-content: flex-start; align-items: flex-end; min-height: 150vh; padding-bottom: 14vh; }
  .story[data-side="right"] .story-text { margin-right: 0; }
  .story.tall { min-height: 260vh; }
  .story-text.sticky { position: relative; top: auto; margin-top: 120vh; }
  .story-text::before { inset: -40px -30px; background: radial-gradient(closest-side, rgba(8, 15, 16, .88), rgba(8, 15, 16, .55)); }
  .room { margin: 0 -8px; }
  .wall-device { padding: 7px; border-radius: 12px; }
  .wall-glare { inset: 7px; }
  .loop { grid-template-columns: 1fr; }
  .loop div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .grow { min-height: 300vh; }
  .grow .story-text.sticky { margin-top: 170vh; }
  .stages { gap: 34px; }
  .stage { grid-area: auto; opacity: 1; transform: none; filter: none; }
  .growth { display: none; }
  .wbw { gap: 4px; }
  .wbw span { min-width: 0; padding: 4px 8px 10px; }
  .root li { width: 70px; }
  .word-stats { gap: 14px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue span { animation: none; }
  .split .w > span, .reveal, .split-fade { transition: none; transform: none; opacity: 1; }
}
