/* ============================================================
   MINHAJ — Quran Learning Agency
   Design system + styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Mulish:wght@300;400;500;600;700&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* surfaces */
  --paper:        oklch(0.967 0.013 83);
  --paper-2:      oklch(0.945 0.018 82);
  --paper-edge:   oklch(0.905 0.022 80);
  --night:        oklch(0.205 0.028 168);
  --night-2:      oklch(0.155 0.024 168);
  --night-3:      oklch(0.125 0.020 168);

  /* ink */
  --ink:          oklch(0.275 0.020 165);
  --ink-soft:     oklch(0.430 0.022 165);
  --ink-faint:    oklch(0.585 0.018 165);

  /* brand */
  --emerald:      oklch(0.470 0.072 165);
  --emerald-deep: oklch(0.345 0.055 165);
  --gold:         oklch(0.760 0.105 82);
  --gold-deep:    oklch(0.660 0.110 78);
  --gold-soft:    oklch(0.840 0.072 85);

  /* on-dark */
  --cream-on-dark:    oklch(0.930 0.018 84);
  --cream-on-dark-2:  oklch(0.760 0.020 84);

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Mulish', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--night); }

/* ---- type primitives ---- */
.display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  font-feature-settings: "liga" 1;
}
.eyebrow {
  font-family: 'Mulish', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.amiri { font-family: 'Amiri', serif; }

.section { padding: clamp(80px, 11vw, 152px) var(--gut); position: relative; }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.wrap-narrow { max-width: 820px; margin: 0 auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: 'Mulish', sans-serif; font-weight: 600;
  font-size: 14.5px; letter-spacing: 0.02em;
  padding: 15px 28px; border-radius: 100px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .45s var(--ease-out), background .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  will-change: transform;
}
.btn .arr { transition: transform .45s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

.btn-gold {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg,
    oklch(0.76 0.105 82 / .32) 0%,
    oklch(0.68 0.10 80 / .18) 55%,
    oklch(0.72 0.105 82 / .26) 100%
  );
  backdrop-filter: blur(20px) saturate(1.6) brightness(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.6) brightness(1.1);
  color: oklch(0.97 0.025 86);
  border-color: oklch(0.76 0.105 82 / .52);
  box-shadow:
    0 1.5px 0 oklch(0.98 0.04 88 / .65) inset,
    0 -1px 0 oklch(0.58 0.1 78 / .28) inset,
    0 0 28px -8px oklch(0.76 0.105 82 / .32),
    0 8px 22px -10px oklch(0.2 0.03 168 / .35);
}
.btn-gold::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 52%;
  background: linear-gradient(180deg, oklch(1 0 0 / .22) 0%, oklch(1 0 0 / .05) 60%, transparent 100%);
  border-radius: 100px 100px 50% 50%;
  pointer-events: none; z-index: 1;
}
.btn-gold::after {
  content: ""; position: absolute; top: -4px; bottom: -4px; left: -70%; width: 42%;
  background: linear-gradient(105deg, transparent, oklch(1 0 0 / .45), transparent);
  transform: skewX(-20deg); pointer-events: none;
  z-index: 2;
  transition: left .8s var(--ease-out);
}
.btn-gold:hover::after { left: 125%; }
.btn-gold:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg,
    oklch(0.78 0.105 82 / .42) 0%,
    oklch(0.70 0.10 80 / .26) 55%,
    oklch(0.74 0.105 82 / .36) 100%
  );
  border-color: oklch(0.78 0.105 82 / .72);
  box-shadow:
    0 1.5px 0 oklch(0.98 0.04 88 / .7) inset,
    0 -1px 0 oklch(0.58 0.1 78 / .32) inset,
    0 0 36px -6px oklch(0.76 0.105 82 / .48),
    0 14px 30px -10px oklch(0.2 0.03 168 / .5);
}

.btn-ghost-light {
  color: var(--cream-on-dark); border-color: oklch(1 0 0 / .2);
  background: linear-gradient(135deg, oklch(1 0 0 / .1), oklch(1 0 0 / .04));
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 1px 0 oklch(1 0 0 / .18) inset;
}
.btn-ghost-light:hover { border-color: var(--gold); color: #fff; transform: translateY(-2px); }

.btn-ink {
  background: var(--emerald-deep); color: var(--paper);
  box-shadow: 0 12px 30px -14px var(--emerald-deep);
}
.btn-ink:hover { transform: translateY(-2px); background: var(--emerald); box-shadow: 0 18px 38px -14px var(--emerald-deep); }

.btn-ghost-ink { color: var(--ink); border-color: oklch(0.275 0.02 165 / .2); }
.btn-ghost-ink:hover { border-color: var(--emerald); color: var(--emerald-deep); transform: translateY(-2px); }

.link-underline {
  position: relative; font-weight: 600; color: var(--emerald-deep);
  display: inline-flex; align-items: center; gap: .45em;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(.001); transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.link-underline:hover::after { transform: scaleX(1); }
.link-underline .arr { transition: transform .45s var(--ease-out); }
.link-underline:hover .arr { transform: translateX(4px); }

/* ============================================================
   NAV — floating liquid-glass pill
   ============================================================ */
.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 100;
  width: min(calc(100% - 24px), 1240px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px 9px 22px;
  border-radius: 100px;
  background: linear-gradient(135deg, oklch(0.27 0.038 168 / .55), oklch(0.15 0.026 168 / .5));
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid oklch(1 0 0 / .13);
  box-shadow:
    0 1px 0 oklch(1 0 0 / .16) inset,
    0 -1px 0 oklch(1 0 0 / .05) inset,
    0 18px 44px -22px oklch(0.05 0.02 168 / .6);
  transition: background .5s var(--ease), box-shadow .5s var(--ease);
}
.nav.scrolled {
  background: linear-gradient(135deg, oklch(0.25 0.036 168 / .85), oklch(0.14 0.025 168 / .8));
  box-shadow:
    0 1px 0 oklch(1 0 0 / .14) inset,
    0 -1px 0 oklch(1 0 0 / .05) inset,
    0 22px 50px -22px oklch(0.05 0.02 168 / .7);
}
.nav .btn { padding: 11px 22px; }
.brand { display: flex; align-items: center; gap: 12px; z-index: 2; }
.brand-mark {
  width: 34px; height: 34px; position: relative; flex: none;
  display: grid; place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
  font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: 23px; letter-spacing: .01em; line-height: 1;
  color: var(--cream-on-dark);
}
.brand-sub {
  display: block; font-family: 'Mulish'; font-weight: 600;
  font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-top: 3px;
}

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--cream-on-dark-2);
  position: relative; transition: color .35s var(--ease);
  white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease-out);
}
.nav-links a:hover { color: var(--cream-on-dark); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav .menu-btn { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero-pin { position: relative; height: 220vh; }
.no-pin .hero-pin { height: auto; }
.no-pin .hero { position: relative !important; height: auto !important; min-height: 100svh; }
.hero {
  position: sticky; top: 0; height: 100svh;
  background:
    radial-gradient(120% 90% at 78% 18%, oklch(0.28 0.05 165 / .9), transparent 60%),
    radial-gradient(80% 70% at 20% 100%, oklch(0.18 0.03 168), transparent 70%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 55%, var(--night-3) 100%);
  color: var(--cream-on-dark);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
/* ambient golden bloom behind book */
.hero::before {
  content: ""; position: absolute; z-index: 0;
  width: 64vw; height: 64vw; max-width: 840px; max-height: 840px;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, oklch(0.78 0.11 82 / .26), oklch(0.76 0.105 82 / .07) 42%, transparent 68%);
  filter: blur(10px);
  animation: bloom 9s ease-in-out infinite alternate;
}
/* cinematic edge vignette so the lit mushaf reads as the focal point */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(125% 100% at 50% 40%, transparent 50%, oklch(0.11 0.022 168 / .62) 100%);
}
/* desktop: the headline lifts away as the mushaf opens, handing the stage to the verse */
body:not(.no-pin) .hero-copy {
  opacity: clamp(0, calc(1 - var(--open-p, 0) * 1.7), 1);
  transform: translateY(calc(var(--open-p, 0) * -30px));
  max-height: calc((1 - var(--open-p, 0)) * 230px);
  overflow: hidden;
  will-change: opacity, transform, max-height;
}
@keyframes bloom { from { opacity: .7; transform: translate(-50%,-50%) scale(.96); } to { opacity: 1; transform: translate(-50%,-50%) scale(1.04); } }

/* eight-pointed khatam star lattice, barely-there */
.hero-pattern {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23C9A86A' stroke-opacity='.13'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(110% 110% at 50% 42%, #000, transparent 72%);
          mask-image: radial-gradient(110% 110% at 50% 42%, #000, transparent 72%);
}

.hero-grid {
  position: relative; z-index: 3;
  width: 100%; max-width: 920px; margin: 0 auto;
  height: 100svh;
  padding: calc(64px + 2.6vh) var(--gut) calc(max(12px, 2vh) + clamp(28px, 4.5vw, 52px) + clamp(22px, 3.6vh, 42px));
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(4px, 1vh, 12px);
}

/* hero copy */
.hero-copy { max-width: 740px; display: flex; flex-direction: column; align-items: center; flex: none; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--gold); margin-bottom: clamp(8px, 1.4vh, 16px);
}
.hero-eyebrow .rule { width: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.hero h1 {
  font-size: clamp(34px, min(6vh, 6vw), 72px);
  margin-bottom: clamp(6px, 1.2vh, 14px); color: #fff;
}
.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln i { display: block; font-style: normal; animation: lnUp 1s var(--ease-out) backwards; }
.hero h1 .ln:nth-child(1) i { animation-delay: .25s; }
.hero h1 .ln:nth-child(2) i { animation-delay: .37s; }
.hero h1 .ln:nth-child(3) i { animation-delay: .49s; }
@keyframes lnUp { from { transform: translateY(106%); } to { transform: translateY(0); } }
.hero-eyebrow { animation: heroUp .9s var(--ease-out) .12s backwards; }
.hero-lede { animation: heroUp .9s var(--ease-out) .62s backwards; }
.hero-actions { animation: heroUp .9s var(--ease-out) .74s backwards; }
@keyframes heroUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero h1 em {
  font-style: italic; color: var(--gold-soft);
  font-weight: 500;
}
.hero-lede {
  font-size: clamp(14.5px, 2.1vh, 17px); line-height: 1.55; color: var(--cream-on-dark-2);
  max-width: 520px; margin: 0 auto;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: clamp(6px, 1.2vh, 14px); flex: none; }
.hero-actions .btn { padding: 13px 26px; }

.hero-trust {
  margin-top: 46px; display: flex; align-items: center; gap: 28px;
  color: var(--cream-on-dark-2); font-size: 13.5px;
}
.hero-trust .stat b {
  display: block; font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: 30px; color: var(--gold-soft); line-height: 1;
}
.hero-trust .div { width: 1px; height: 34px; background: oklch(0.93 0.018 84 / .16); }

/* below the book: scroll hint and translation share one slot */
.below-book { display: grid; place-items: center; flex: none; }
.below-book > * { grid-area: 1 / 1; }

/* word-by-word translation under the book */
.verse-translation {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: clamp(16px, 2.6vh, 22px); line-height: 1.45;
  color: var(--cream-on-dark); max-width: 560px; text-align: center;
}
.verse-translation .w {
  display: inline-block; opacity: 0; transform: translateY(8px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: calc(var(--i) * 0.05s);
}
.show-verse .verse-translation .w { opacity: 1; transform: none; }
.verse-translation cite {
  display: block; font-style: normal; font-family: 'Mulish';
  font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-top: clamp(8px, 1.4vh, 14px);
  opacity: 0; transition: opacity .8s var(--ease-out); transition-delay: .45s;
}
.show-verse .verse-translation cite { opacity: 1; }
.verse-translation cite::before { content: ""; display: block; width: 40px; height: 1px; background: var(--gold-deep); opacity: .6; margin: 0 auto 10px; }

/* listen — the mushaf recites the verse */
.listen-btn {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Mulish', sans-serif; font-style: normal; font-weight: 600;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-soft);
  background: linear-gradient(135deg, oklch(1 0 0 / .1), oklch(1 0 0 / .04));
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid oklch(1 0 0 / .2);
  border-radius: 100px; padding: 9px 18px; cursor: pointer;
  box-shadow: 0 1px 0 oklch(1 0 0 / .15) inset;
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity .6s var(--ease-out) .5s, transform .6s var(--ease-out) .5s, border-color .3s var(--ease), color .3s var(--ease);
}
.show-verse .listen-btn { opacity: 1; pointer-events: auto; transform: none; }
.listen-btn:hover { border-color: var(--gold); color: #fff; }
.listen-btn.nudge { animation: nudgePulse 2.2s ease infinite; }
@keyframes nudgePulse {
  0%, 100% { box-shadow: 0 1px 0 oklch(1 0 0 / .15) inset, 0 0 0 0 oklch(0.76 0.105 82 / .45); }
  55%      { box-shadow: 0 1px 0 oklch(1 0 0 / .15) inset, 0 0 0 10px transparent; }
}
.listen-btn .eq { display: inline-flex; gap: 2.5px; align-items: flex-end; height: 12px; }
.listen-btn .eq i { width: 2.5px; height: 5px; background: var(--gold); border-radius: 2px; transition: height .3s var(--ease); }
.listen-btn.playing .eq i { animation: eqBar .9s ease-in-out infinite; }
.listen-btn.playing .eq i:nth-child(2) { animation-delay: .15s; }
.listen-btn.playing .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eqBar { 0%, 100% { height: 5px; } 50% { height: 12px; } }
html:not(.js) .verse-translation .w, html:not(.js) .verse-translation cite { opacity: 1; transform: none; }
@keyframes wordIn { to { opacity: 1; transform: none; } }

/* floating stop button — depleting time ring while the verse plays */
.verse-fab {
  position: fixed; right: clamp(16px, 3vw, 30px); bottom: clamp(16px, 3vw, 30px);
  z-index: 1200; width: 60px; height: 60px; padding: 0; border: 0; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, oklch(0.30 0.05 166), var(--night-2));
  box-shadow: 0 14px 34px -12px oklch(0.18 0.03 167 / .85), 0 0 0 1px oklch(0.76 0.105 82 / .35) inset;
  opacity: 0; transform: scale(.7) translateY(10px); pointer-events: none;
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.verse-fab.show { opacity: 1; transform: none; pointer-events: auto; }
.verse-fab:hover { transform: scale(1.06); }
.verse-fab:hover .verse-fab-stop { background: #fff; }
.verse-fab-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.verse-fab-ring .track { fill: none; stroke: oklch(1 0 0 / .12); stroke-width: 3.5; }
.verse-fab-ring .prog {
  fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round;
  filter: drop-shadow(0 0 4px oklch(0.76 0.105 82 / .6));
  transition: stroke-dashoffset .25s linear;
}
.verse-fab-stop {
  position: absolute; width: 15px; height: 15px; border-radius: 3px;
  background: var(--gold-soft); transition: background .3s var(--ease);
  opacity: 0;
}
.verse-fab:hover .verse-fab-stop { opacity: 1; }
.verse-fab-time {
  font-family: 'Mulish', sans-serif; font-weight: 700; font-size: 12.5px;
  letter-spacing: .02em; color: var(--gold-soft); transition: opacity .3s var(--ease);
}
.verse-fab:hover .verse-fab-time { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .verse-fab, .verse-fab-ring .prog { transition: none; }
}

/* ============================================================
   MUSHAF (open Quran)
   ============================================================ */
.mushaf-stage {
  position: relative; z-index: 2; width: 100%;
  perspective: 2400px;
  flex: 1 1 0; min-height: 150px;
  display: flex; justify-content: center; align-items: center;
  padding: clamp(8px, 1.6vh, 22px) 0;
}
.mushaf {
  position: relative;
  height: 100%; max-height: clamp(360px, 58vh, 560px);
  aspect-ratio: 1.42 / 1;
  transform-style: preserve-3d;
  transform: translateX(var(--shift, 0%)) scale(var(--mscale, 1)) rotateX(var(--rx, 9deg)) rotateY(var(--ry, -1deg));
  filter: drop-shadow(0 50px 60px oklch(0.08 0.02 168 / .6));
  will-change: transform;
}
.js .mushaf { --shift: -25%; --board: 0; }
/* hard cover boards behind the open spread */
.mushaf::before {
  content: ""; position: absolute; inset: -14px -16px -20px -16px; z-index: 0;
  background: linear-gradient(180deg, var(--emerald-deep), oklch(0.26 0.045 165));
  border-radius: 7px;
  box-shadow: 0 2px 0 oklch(0.76 0.105 82 / .4) inset, 0 0 0 1.5px oklch(0.76 0.105 82 / .3) inset;
  opacity: var(--board, 1); transition: opacity .25s linear;
}

/* a page half — right inner page, and the leaf's back (left inner page) */
.page {
  position: absolute; top: 0; height: 100%; width: 50%;
  background: linear-gradient(180deg, oklch(0.975 0.012 84), oklch(0.95 0.016 82));
  padding: clamp(8px, 2vh, 16px) clamp(8px, 1.8vh, 15px);
  overflow: hidden; backface-visibility: hidden;
  container-type: size;
}
.page-r { right: 0; z-index: 1; border-radius: 2px 5px 5px 2px; box-shadow: -1px 0 14px oklch(0.1 0.02 168 / .2) inset; }
.page::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: linear-gradient(oklch(0.5 0.04 165 / .035) 1px, transparent 1px);
  background-size: 100% 2.1em; background-position: 0 1.4em;
}

/* the flipping leaf: front = closed cover, back = left inner page */
.leaf {
  position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  transform-style: preserve-3d; transform-origin: left center;
  transform: rotateY(var(--open, -180deg));
  z-index: 6;
}
.js .leaf { --open: 0deg; }
.leaf-face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; }
.leaf-front { transform: rotateY(0deg) translateZ(0.6px); }
.leaf-back { transform: rotateY(180deg) translateZ(0.5px); border-radius: 5px 2px 2px 5px; }
.leaf-back .page { position: static; width: 100%; height: 100%; box-shadow: 1px 0 14px oklch(0.1 0.02 168 / .26) inset; }

/* ============================================================
   CLOSED FRONT COVER — deep emerald leather + gilt ornament
   (modelled on a traditional gold-tooled mushaf)
   ============================================================ */
.leaf-front {
  background:
    radial-gradient(150% 110% at 50% -12%, oklch(0.40 0.068 166), transparent 52%),
    linear-gradient(158deg, oklch(0.31 0.056 166), oklch(0.215 0.038 167) 72%);
  border-radius: 3px 6px 6px 3px;
  box-shadow: -2px 0 12px oklch(0.05 0.02 168 / .5) inset, 0 0 0 1px oklch(0.27 0.05 165);
  padding: clamp(9px, 1.7vw, 16px);
  overflow: hidden;
}
/* fore-edge: stacked page block on the right of the closed book */
.leaf-front::after {
  content: ""; position: absolute; top: 3%; bottom: 3%; right: -7px; width: 7px;
  border-radius: 0 2px 2px 0;
  background: repeating-linear-gradient(180deg, oklch(0.93 0.012 84) 0 1.5px, oklch(0.82 0.02 82) 1.5px 3px);
  box-shadow: 1px 0 4px oklch(0.05 0.02 168 / .4);
}

/* the gilded frame — outer rule + patterned lattice band */
.cover-frame {
  position: relative; width: 100%; height: 100%;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold-deep);
  box-shadow:
    0 0 0 1px oklch(0.215 0.038 167),
    0 0 0 2.5px oklch(0.66 0.11 78 / .55);
  background:
    radial-gradient(150% 110% at 50% -12%, oklch(0.40 0.068 166), transparent 52%),
    linear-gradient(158deg, oklch(0.31 0.056 166), oklch(0.215 0.038 167) 72%);
}
/* ornate gold lattice border band (gradient-border mask trick) */
.cover-frame::before {
  content: ""; position: absolute; inset: 7px;
  border: clamp(8px, 1.7vw, 14px) solid transparent;
  background:
    repeating-linear-gradient(45deg,  oklch(0.72 0.11 80 / .95) 0 1.5px, transparent 1.5px 6px),
    repeating-linear-gradient(-45deg, oklch(0.72 0.11 80 / .95) 0 1.5px, transparent 1.5px 6px),
    linear-gradient(var(--gold-deep), oklch(0.60 0.10 78));
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  box-shadow: 0 0 0 1px oklch(0.66 0.11 78 / .7), 0 0 0 1px oklch(0.66 0.11 78 / .7) inset;
}
/* corner diamonds */
.cv-corner { position: absolute; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 7px oklch(0.76 0.105 82 / .7); z-index: 2; }
.cv-corner.tl { top: 2px; left: 2px; } .cv-corner.tr { top: 2px; right: 2px; }
.cv-corner.bl { bottom: 2px; left: 2px; } .cv-corner.br { bottom: 2px; right: 2px; }

/* central pointed mandorla (almond cartouche) */
.cover-mandorla {
  position: relative; z-index: 2;
  width: clamp(86px, 19vw, 132px);
  aspect-ratio: 0.64 / 1;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold-deep);
  border-radius: 50% 50% 50% 50% / 44% 44% 44% 44%;
  background:
    radial-gradient(circle at 50% 50%, oklch(0.28 0.05 165 / .6), transparent 62%),
    repeating-linear-gradient(38deg, oklch(0.66 0.11 78 / .16) 0 1px, transparent 1px 7px),
    linear-gradient(oklch(0.235 0.04 166), oklch(0.20 0.035 167));
  box-shadow:
    0 0 0 2.5px oklch(0.215 0.038 167),
    0 0 0 3.5px oklch(0.66 0.11 78 / .6),
    0 0 22px oklch(0.66 0.11 78 / .28) inset;
}
.cover-mandorla .finial {
  position: absolute; left: 50%; width: clamp(11px, 2vw, 15px); height: clamp(11px, 2vw, 15px);
  background: var(--gold-deep); transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 0 2.5px oklch(0.215 0.038 167), 0 0 0 3.5px oklch(0.66 0.11 78 / .55), 0 0 9px oklch(0.76 0.105 82 / .6);
}
.cover-mandorla .finial.top    { top: calc(-1 * clamp(20px, 4.4vw, 30px)); }
.cover-mandorla .finial.bottom { bottom: calc(-1 * clamp(20px, 4.4vw, 30px)); }

/* circular medallion with the calligraphy */
.cover-medallion {
  width: 66%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  border: 1.5px solid var(--gold-deep);
  background: radial-gradient(circle, oklch(0.225 0.04 166), oklch(0.18 0.03 167));
  box-shadow:
    0 0 0 2.5px oklch(0.215 0.038 167),
    0 0 0 3.5px oklch(0.66 0.11 78 / .55),
    0 0 16px oklch(0.66 0.11 78 / .35) inset;
}
.cover-ar {
  font-family: 'Amiri', serif; font-weight: 700;
  font-size: clamp(11px, 2.6vw, 18px); line-height: 1.22;
  color: var(--gold-soft); text-shadow: 0 1px 9px oklch(0.66 0.11 78 / .6);
}

/* gutter shadow (only when open) */
.mushaf .gutter {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 46px; transform: translateX(-50%);
  z-index: 3; pointer-events: none; opacity: var(--board, 1); transition: opacity .25s linear;
  background: linear-gradient(90deg, transparent, oklch(0.2 0.02 168 / .26) 44%, oklch(0.2 0.02 168 / .3) 50%, oklch(0.2 0.02 168 / .26) 56%, transparent);
}

/* ornamental gold frame inside each page — sized by the page itself */
.frame {
  position: relative; height: 100%;
  border: 1.5px solid var(--gold-deep);
  outline: 1px solid oklch(0.66 0.11 78 / .55); outline-offset: 4px;
  padding: 5cqh 5cqi;
  display: flex; flex-direction: column;
}
.frame .corner {
  position: absolute; width: 9px; height: 9px; background: var(--gold);
  transform: rotate(45deg); box-shadow: 0 0 6px oklch(0.76 0.105 82 / .6);
}
.frame .corner.tl { top: -5px; left: -5px; } .frame .corner.tr { top: -5px; right: -5px; }
.frame .corner.bl { bottom: -5px; left: -5px; } .frame .corner.br { bottom: -5px; right: -5px; }

/* surah header cartouche */
.surah-head {
  text-align: center; margin-bottom: 3.5cqh;
  position: relative;
}
.surah-head .band {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 1.2cqh 16px; border-radius: 3px;
  white-space: nowrap; max-width: 100%;
  background: linear-gradient(180deg, oklch(0.4 0.06 165), var(--emerald-deep));
  box-shadow: 0 0 0 1px var(--gold-deep), 0 0 0 3px oklch(0.97 0.012 84), 0 0 0 4px oklch(0.66 0.11 78 / .5);
}
.surah-head .band span {
  font-family: 'Amiri', serif; font-weight: 700; color: var(--gold-soft);
  font-size: 6.2cqi;
}
.surah-head .band .dot { width: 4px; height: 4px; background: var(--gold-soft); transform: rotate(45deg); flex: none; }
.surah-head .meta {
  font-family: 'Mulish'; font-size: 3.3cqi; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 2cqh; white-space: nowrap;
}

/* arabic verse body — plain text flow, scaled to the page */
.ayat {
  direction: rtl; text-align: justify; text-align-last: center;
  font-family: 'Amiri', serif; color: var(--ink);
  font-size: 7.0cqi; line-height: 1.95;
  flex: 1; min-height: 0; align-content: center;
}
.ayat.dim { color: oklch(0.43 0.02 165 / .85); font-size: 7.2cqi; }
.ayat .basmala { display: block; width: 100%; text-align: center; margin-bottom: .25em; color: var(--emerald-deep); font-size: .85em; white-space: nowrap; }
.ayah-no {
  display: inline-grid; place-items: center; vertical-align: middle;
  width: 1.45em; height: 1.45em; margin: 0 .12em;
  font-size: .6em; color: var(--gold-deep); font-weight: 700;
  background: radial-gradient(circle, oklch(0.84 0.072 85 / .35), transparent 70%);
}
.ayah-no::before { content: "۝"; position: absolute; font-size: 1.7em; color: var(--gold-deep); opacity: .55; }
.ayah-no i { font-style: normal; position: relative; }

/* the highlighted ayah */
.ayah-hl { position: relative; color: var(--emerald-deep); font-weight: 700; padding: 0 .12em; z-index: 1; }
.ayah-hl::before {
  content: ""; position: absolute; inset: -.18em -.18em; z-index: -1; border-radius: 5px;
  background: linear-gradient(180deg, oklch(0.86 0.09 85 / .85), oklch(0.8 0.1 82 / .65));
  box-shadow: 0 0 0 1px oklch(0.7 0.11 80 / .5), 0 0 22px oklch(0.78 0.11 82 / .5);
  transform-origin: right;
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.js .ayah-hl::before { opacity: 0; transform: scaleX(.6); }
.mushaf.lit .ayah-hl::before { opacity: 1; transform: scaleX(1); }
.ayah-hl::after {
  content: ""; position: absolute; inset: -.18em -.18em; z-index: -1; border-radius: 5px;
}
.mushaf.lit .ayah-hl::after { animation: hlBreath 3.4s ease-in-out 1.2s infinite; }
@keyframes hlBreath {
  0%,100% { box-shadow: 0 0 16px oklch(0.78 0.11 82 / .25); }
  50%     { box-shadow: 0 0 34px oklch(0.80 0.11 82 / .6); }
}

/* floating motes */
.motes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mote {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft), transparent 70%);
  opacity: 0; animation: floatMote linear infinite;
}
@keyframes floatMote {
  0% { opacity: 0; transform: translateY(20px) scale(.6); }
  15% { opacity: .8; }
  85% { opacity: .5; }
  100% { opacity: 0; transform: translateY(-120px) scale(1); }
}

.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--cream-on-dark-2); font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  transition: opacity .5s var(--ease);
}
.show-verse .scroll-cue { opacity: 0; pointer-events: none; }
.scroll-cue .dotline { width: 1px; height: 26px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.scroll-cue .dotline::after { content:""; position:absolute; left:-1px; width:3px; height:8px; border-radius:2px; background: var(--gold); animation: cueDrop 2.2s var(--ease) infinite; }
@keyframes cueDrop { 0%{ top:-8px; opacity:0;} 30%{opacity:1;} 100%{ top:26px; opacity:0; } }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .40s; }

/* ============================================================
   SECTION SHEETS — rounded layers that slide over each other
   ============================================================ */
.sheet {
  position: relative; z-index: 4;
  border-radius: clamp(28px, 4.5vw, 52px) clamp(28px, 4.5vw, 52px) 0 0;
  margin-top: calc(-1 * clamp(28px, 4.5vw, 52px));
  box-shadow: 0 -24px 60px -30px oklch(0.1 0.02 168 / .45);
}

/* generic gold divider — line with diamond finials */
.gold-divider { width: 56px; height: 1px; background: var(--gold-deep); margin: 0 auto; position: relative; }
.gold-divider::before, .gold-divider::after { content:""; position:absolute; top:-3px; width:7px; height:7px; background: var(--gold); transform: rotate(45deg); }
.gold-divider::before { left:-12px; } .gold-divider::after { right:-12px; }
.gold-divider.light { background: var(--gold-soft); }
.gold-divider.light::before, .gold-divider.light::after { background: var(--gold-soft); }

/* section header block */
.sec-head { max-width: 680px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-eyebrow { display:inline-flex; align-items:center; gap:12px; color: var(--gold-deep); margin-bottom: 20px; }
.sec-eyebrow .rule { width: 32px; height: 1px; background: var(--gold-deep); opacity:.6; }
.sec-eyebrow.center { justify-content: center; }
.sec-head h2 { font-size: clamp(36px, 5vw, 60px); color: var(--ink); margin-bottom: 18px; }
.sec-head p { font-size: 18px; color: var(--ink-soft); }

/* ============================================================
   MISSION
   ============================================================ */
.mission { background: var(--paper); text-align: center; padding-top: clamp(120px, 15vw, 210px); }
.mission .arabic-word {
  font-family: 'Amiri', serif;
  font-size: clamp(38px, 6vw, 78px);
  font-weight: 400;
  color: oklch(0.60 0.105 158);
  line-height: 1.3;
  margin-bottom: clamp(18px, 2.8vw, 32px);
}
.mission .translit { color: var(--gold-deep); letter-spacing: .3em; text-transform: uppercase; font-size: 12px; font-weight: 600; margin-bottom: 34px; }
.mission .lead {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.32; color: var(--ink); max-width: 880px; margin: 0 auto; font-weight: 400;
}
.mission .lead em { font-style: italic; color: var(--emerald); }
.mission .divider { width: 56px; height: 1px; background: var(--gold-deep); margin: 38px auto 0; position: relative; }
.mission .divider::before, .mission .divider::after { content:""; position:absolute; top:-3px; width:7px; height:7px; background: var(--gold); transform: rotate(45deg); }
.mission .divider::before { left:-12px; } .mission .divider::after { right:-12px; }

/* ============================================================
   PROGRAMS
   ============================================================ */
.programs {
  background:
    radial-gradient(42% 34% at 12% 14%, oklch(0.84 0.072 85 / .3), transparent 70%),
    radial-gradient(38% 32% at 88% 78%, oklch(0.47 0.072 165 / .14), transparent 70%),
    var(--paper-2);
}
.programs .top { display:flex; align-items:flex-end; justify-content:space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 56px; }
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prog-card {
  position: relative;
  background: linear-gradient(150deg, oklch(1 0 0 / .62), oklch(1 0 0 / .4));
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid oklch(1 0 0 / .7);
  border-radius: 22px; padding: 32px 30px 30px; overflow: hidden;
  box-shadow: 0 1px 0 oklch(1 0 0 / .85) inset, 0 18px 44px -28px oklch(0.27 0.03 165 / .3);
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease), border-color .55s var(--ease);
  cursor: pointer; min-height: 250px; display: flex; flex-direction: column;
}
.prog-card:hover { transform: translateY(-7px); box-shadow: 0 1px 0 oklch(1 0 0 / .85) inset, 0 30px 50px -28px oklch(0.27 0.03 165 / .42); border-color: oklch(0.76 0.105 82 / .6); }
.prog-num {
  font-family: 'Amiri', serif; font-size: 30px; color: var(--gold-deep);
  width: 62px; height: 62px; display: grid; place-items: center;
  background: oklch(0.84 0.072 85 / .28); margin-bottom: 22px;
  clip-path: polygon(100% 50%, 83.3% 63.8%, 85.4% 85.4%, 63.8% 83.3%, 50% 100%, 36.2% 83.3%, 14.6% 85.4%, 16.7% 63.8%, 0% 50%, 16.7% 36.2%, 14.6% 14.6%, 36.2% 16.7%, 50% 0%, 63.8% 16.7%, 85.4% 14.6%, 83.3% 36.2%);
  transition: background .5s var(--ease), color .5s var(--ease), transform .5s var(--ease-out);
}
.prog-card:hover .prog-num { background: var(--emerald-deep); color: var(--gold-soft); transform: rotate(22.5deg); }

.prog-card h3 { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 27px; color: var(--ink); margin-bottom: 9px; }
.prog-card .ar { font-family:'Amiri'; font-size: 15px; color: var(--emerald); margin-bottom: 12px; }
.prog-card p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }
.prog-card .go {
  margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--emerald-deep); font-weight: 600; font-size: 13.5px;
  opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease-out);
}
.prog-card:hover .go { opacity: 1; transform: none; }

/* ============================================================
   METHOD / steps
   ============================================================ */
.method {
  background:
    radial-gradient(46% 40% at 82% 8%, oklch(0.76 0.105 82 / .14), transparent 70%),
    radial-gradient(40% 36% at 10% 90%, oklch(0.47 0.072 165 / .3), transparent 70%),
    var(--night);
  color: var(--cream-on-dark);
}
.method .sec-head h2 { color: #fff; }
.method .sec-head p, .method .sec-eyebrow { color: var(--cream-on-dark-2); }
.method .sec-eyebrow { color: var(--gold); }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 60px; position: relative; }
.step {
  position: relative;
  background: linear-gradient(150deg, oklch(1 0 0 / .07), oklch(1 0 0 / .03));
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid oklch(1 0 0 / .12);
  border-radius: 22px; padding: 28px 26px;
  box-shadow: 0 1px 0 oklch(1 0 0 / .12) inset;
}
.step .dot {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: oklch(1 0 0 / .05); border: 1.5px solid var(--gold); color: var(--gold-soft);
  font-family: 'Cormorant Garamond', serif; font-size: 23px; font-weight: 600;
  margin-bottom: 22px; position: relative; z-index: 2;
}
.step h3 { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 24px; color: #fff; margin-bottom: 10px; }
.step p { font-size: 14.5px; color: var(--cream-on-dark-2); line-height: 1.6; }

/* ============================================================
   TEACHERS
   ============================================================ */
.teachers { background: var(--paper); }
.teach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 56px; }
.teacher { }
.teacher .photo {
  position: relative; aspect-ratio: 4/5.1; overflow: hidden;
  border-radius: 50% 50% 18px 18px / 38% 38% 18px 18px;
  border: 1px solid var(--paper-edge); margin: 8px 8px 20px; 
  outline: 1px solid oklch(0.66 0.11 78 / .45); outline-offset: 6px;
  background:
    repeating-linear-gradient(135deg, oklch(0.92 0.02 165) 0 9px, oklch(0.9 0.022 165) 9px 18px);
  display: grid; place-items: center;
}
.teacher .photo .ph-label {
  font-family: ui-monospace, 'SF Mono', monospace; font-size: 11px; letter-spacing: .05em;
  color: var(--ink-faint); background: oklch(0.97 0.012 84 / .8); padding: 5px 11px; border-radius: 100px;
}
.teacher .photo::after {
  content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 55%, oklch(0.27 0.03 165 / .5));
  opacity: 0; transition: opacity .5s var(--ease);
}
.teacher:hover .photo::after { opacity: 1; }
.teacher .photo .badge {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 2;
  white-space: nowrap;
  font-family: 'Mulish'; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--emerald-deep);
  background: oklch(1 0 0 / .5);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid oklch(1 0 0 / .6);
  box-shadow: 0 1px 0 oklch(1 0 0 / .6) inset;
  padding: 6px 13px; border-radius: 100px;
}
.teacher h3 { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 24px; color: var(--ink); }
.teacher .role { color: var(--gold-deep); font-size: 13px; font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; }
.teacher p { font-size: 14px; color: var(--ink-soft); }

/* ============================================================
   HADITH BAND
   ============================================================ */
.hadith {
  background: var(--paper-2);
  border-top: 1px solid var(--paper-edge);
  text-align: center;
  padding-top: clamp(70px, 9vw, 120px); padding-bottom: clamp(70px, 9vw, 120px);
}
.hadith .gold-divider { margin-bottom: 38px; }
.hadith .had-ar {
  font-size: clamp(28px, 4.6vw, 54px); line-height: 1.7; color: var(--emerald-deep);
  margin-bottom: 22px;
}
.hadith .had-en {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: clamp(19px, 2.4vw, 25px); color: var(--ink-soft); margin-bottom: 26px;
}
.hadith .had-src {
  font-family: 'Mulish'; font-size: 11.5px; font-weight: 600; letter-spacing: .26em;
  text-transform: uppercase; color: var(--gold-deep);
}

/* ============================================================
   TESTIMONIAL
   ============================================================ */
.stories {
  background:
    radial-gradient(50% 46% at 84% 10%, oklch(0.76 0.105 82 / .16), transparent 70%),
    radial-gradient(40% 40% at 8% 92%, oklch(0.28 0.05 165 / .8), transparent 70%),
    var(--emerald-deep);
  color: var(--cream-on-dark); position: relative; overflow: hidden;
}
.stories::before {
  content: "”"; position: absolute; font-family: 'Cormorant Garamond', serif;
  font-size: 460px; line-height: .7; color: oklch(0.76 0.105 82 / .1); top: -40px; right: 3%; z-index: 0;
}
.stories .wrap-narrow {
  position: relative; z-index: 2; text-align: center;
  background: linear-gradient(150deg, oklch(1 0 0 / .08), oklch(1 0 0 / .03));
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid oklch(1 0 0 / .14);
  border-radius: 34px;
  box-shadow: 0 1px 0 oklch(1 0 0 / .14) inset, 0 30px 70px -40px oklch(0.05 0.02 168 / .8);
  padding: clamp(36px, 5.5vw, 70px) clamp(24px, 5vw, 64px);
}
.stories .gold-divider { margin-bottom: 30px; }
.stories blockquote {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400;
  font-size: clamp(26px, 4vw, 44px); line-height: 1.34; color: #fff; margin-bottom: 34px;
}
.stories .by { display: flex; align-items: center; justify-content: center; gap: 14px; }
.stories .by .av {
  width: 46px; height: 46px; border-radius: 50%;
  background: repeating-linear-gradient(135deg, oklch(0.4 0.06 165) 0 6px, oklch(0.36 0.055 165) 6px 12px);
  border: 1px solid var(--gold);
}
.stories .by b { color: var(--gold-soft); font-family:'Mulish'; font-weight: 700; font-size: 15px; display:block; }
.stories .by span { font-size: 13px; color: var(--cream-on-dark-2); }
.dots { display:flex; gap: 9px; justify-content:center; margin-top: 40px; }
.dots i { width: 8px; height: 8px; border-radius:50%; background: oklch(0.93 0.018 84 / .25); transition: all .4s var(--ease); cursor:pointer; }
.dots i.on { background: var(--gold-soft); width: 26px; border-radius: 100px; }

/* ============================================================
   CTA
   ============================================================ */
.cta { background: var(--paper); text-align: center; }
.cta-card {
  position: relative; background: linear-gradient(160deg, var(--night), var(--night-2));
  border-radius: 36px; padding: clamp(50px, 8vw, 96px) var(--gut); overflow: hidden;
  box-shadow: 0 1px 0 oklch(1 0 0 / .12) inset, 0 0 0 1px oklch(1 0 0 / .07) inset, 0 40px 80px -40px oklch(0.2 0.03 168 / .6);
}
.cta-card::before {
  content:""; position:absolute; inset:0; pointer-events:none;
  background: radial-gradient(60% 80% at 50% 0%, oklch(0.76 0.105 82 / .18), transparent 60%);
}
.cta-card::after {
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23C9A86A' stroke-opacity='.12'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent 78%);
          mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent 78%);
}
.cta-card .inner { position: relative; z-index: 2; }
.cta-card .ar { font-family:'Amiri'; font-size: clamp(22px,3vw,30px); color: var(--gold-soft); margin-bottom: 18px; }
.cta-card h2 { font-family:'Cormorant Garamond'; font-weight: 500; font-size: clamp(38px, 6vw, 70px); color: #fff; line-height: 1.04; margin-bottom: 18px; }
.cta-card h2 em { font-style: italic; color: var(--gold-soft); }
.cta-card p { color: var(--cream-on-dark-2); font-size: 18px; max-width: 520px; margin: 0 auto 38px; }
.cta-card .actions { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--night-2); color: var(--cream-on-dark-2); padding: 80px var(--gut) 38px; }
.footer.sheet { padding-top: clamp(80px, 9vw, 110px); }
.foot-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand-name { color: #fff; }
.footer .foot-about { max-width: 300px; margin-top: 20px; font-size: 14px; line-height: 1.65; }
.foot-col h4 { color: var(--gold-soft); font-family: 'Mulish'; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px; font-weight: 700; }
.foot-col a { display: block; font-size: 14.5px; padding: 6px 0; color: var(--cream-on-dark-2); transition: color .3s, transform .3s var(--ease-out); }
.foot-col a:hover { color: var(--gold-soft); transform: translateX(3px); }
.foot-bottom { max-width: var(--maxw); margin: 56px auto 0; padding-top: 26px; border-top: 1px solid oklch(0.93 0.018 84 / .1); display:flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .prog-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 26px; }
  .method-grid::before { display: none; }
  .teach-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav { padding: 8px 10px 8px 16px; }
  .nav-links { display: none; }
  .nav .menu-btn {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 100px;
    background: oklch(1 0 0 / .08); border: 1px solid oklch(1 0 0 / .18); color: var(--cream-on-dark); cursor: pointer;
  }
  .nav-cta .btn { display: none; }
  .hero-trust { gap: 18px; }
  .prog-grid { grid-template-columns: 1fr; }
  .teach-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(28px, min(4.4vh, 7.8vw), 42px); }
  /* phone keeps the SAME pinned scroll-driven mushaf animation as desktop;
     the book is width-capped so it can never overflow horizontally */
  .mushaf-stage { flex: 1 1 0; min-height: 120px; padding: 4px 0 28px; }
  .mushaf { height: 100%; max-height: 58svh; max-width: 90vw; --rx: 7deg; --ry: -1deg; }
  .hero-grid { height: 100svh; min-height: 0; gap: clamp(4px, 1vh, 9px); padding-top: calc(62px + 1vh); padding-bottom: calc(16px + 1.8vh); }
  /* reduce-motion phones fall back to the calm static layout */
  .no-pin .hero-grid { height: auto; min-height: auto; gap: 16px; padding-top: calc(72px + 1vh); padding-bottom: 40px; }
  .no-pin .mushaf-stage { flex: 0 0 auto; padding: 8px 0 30px; }
  .no-pin .mushaf { height: auto; max-height: none; width: min(72%, 270px); max-width: none; --rx: 3deg; --ry: 0deg; --mscale: 1; }
  .hero-eyebrow { font-size: 10px; letter-spacing: .2em; margin-bottom: 6px; }
  .hero-eyebrow .rule { width: 22px; }
  .hero-lede { font-size: 14px; max-width: 340px; }
  .verse-translation { font-size: 15px; line-height: 1.4; }
  .verse-translation cite { margin-top: 8px; }
  .listen-btn { margin-top: 8px; }
  .hero-actions { gap: 10px; margin-top: 6px; }
  .hero-actions .btn { padding: 11px 18px; font-size: 13px; }
  /* gentler section overlap on small screens */
  .mission.sheet { margin-top: -20px !important; }
}

/* ============================================================
   CURSOR BACKLIGHT — a warm light that follows the pointer
   ============================================================ */
.cursor-light {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    oklch(0.86 0.12 85 / .22) 0%,
    oklch(0.78 0.11 85 / .10) 30%,
    oklch(0.7 0.1 85 / .04) 55%,
    transparent 72%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .6s var(--ease);
  will-change: transform;
}
body.cursor-on .cursor-light { opacity: 1; }
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 10000;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--gold, oklch(0.8 0.12 85));
  box-shadow: 0 0 12px 2px oklch(0.82 0.13 85 / .55);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s var(--ease), width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease);
  will-change: transform;
}
body.cursor-on .cursor-dot { opacity: .9; }
.cursor-dot.lit { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
@media (hover: none), (pointer: coarse) {
  .cursor-light, .cursor-dot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
}
