/* My Qalam: landing page
   Colours are the app's own (Sources/Views/Theme.swift); the art is the app's
   torn-paper set. One stylesheet, no build step. */

@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("../fonts/NotoNaskhArabic.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+25CC;
}

:root {
  --paper: #FAF5EA;
  --card: #FFFCF5;
  --ink: #1A3D38;
  --ink-soft: #4F6A65;
  --gold: #C29A4F;
  --gold-ink: #86652A;
  --green: #2A7861;
  --green-wash: #E3EBE1;
  --on-green: #FFFFFF;
  --green-text: #22654F;
  --focus: var(--ink);
  --pen: #22698C;
  --clay: #B4653F;
  --line: rgba(26, 61, 56, .14);
  --deep: #14352D;
  --deep-2: #0F2620;
  --on-deep: #F6F0E2;
  --on-deep-soft: rgba(246, 240, 226, .74);
  --shadow: 0 1px 2px rgba(26, 61, 56, .06), 0 18px 40px -24px rgba(26, 61, 56, .38);
  --shadow-lift: 0 2px 4px rgba(26, 61, 56, .08), 0 30px 60px -30px rgba(26, 61, 56, .5);

  --display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --arabic: "Noto Naskh Arabic", "Geeza Pro", "Damascus", serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1C1A17;
    --card: #2B2823;
    --ink: #F2ECE0;
    --ink-soft: #B8AF9F;
    --gold: #E0BC7C;
    --gold-ink: #E0BC7C;
    --green: #6FC7A6;
    --green-wash: #26332C;
    --on-green: #0F2620;
    --green-text: #6FC7A6;
    --focus: var(--gold);
    --pen: #86CFEC;
    --clay: #D9926B;
    --line: rgba(242, 236, 224, .14);
    --deep: #102A23;
    --deep-2: #0B1E19;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -24px rgba(0, 0, 0, .8);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 60px -30px rgba(0, 0, 0, .9);
  }
}
:root[data-theme="dark"] {
  --paper: #1C1A17; --card: #2B2823; --ink: #F2ECE0; --ink-soft: #B8AF9F;
  --gold: #E0BC7C; --gold-ink: #E0BC7C; --green: #6FC7A6; --green-wash: #26332C; --on-green: #0F2620; --green-text: #6FC7A6; --focus: var(--gold);
  --pen: #86CFEC; --clay: #D9926B; --line: rgba(242, 236, 224, .14);
  --deep: #102A23; --deep-2: #0B1E19;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -24px rgba(0, 0, 0, .8);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 60px -30px rgba(0, 0, 0, .9);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
  font-variation-settings: "SOFT" 60, "opsz" 96;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.2; }
.ar { font-family: var(--arabic); direction: rtl; font-weight: 400; letter-spacing: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--ink-soft); max-width: 36em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--green);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .8em 1.4em;
  border-radius: 999px; border: 0;
  background: var(--b); color: var(--on-green);
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 10px 24px -14px rgba(20, 53, 45, .8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 16px 30px -14px rgba(20, 53, 45, .8); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, button:focus-visible, .reel:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.storybook, .story, .site-foot, .plan.premium { --focus: var(--gold); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn.gold { --b: var(--gold); color: #2A1E08; }
.btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; }
.store-badge { gap: .7em; padding-inline: 1.2em 1.5em; background: #111; color: #fff; }
.store-badge svg { width: 22px; height: 22px; }
.store-badge small { display: block; font-size: .66rem; font-weight: 600; opacity: .8; letter-spacing: .02em; }
.store-badge span { text-align: left; line-height: 1.1; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-head.scrolled { border-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 4px 10px -4px rgba(20, 53, 45, .6); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 12px; border-radius: 10px; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); background: var(--green-wash); }
.nav .btn { min-height: 42px; padding: .6em 1.1em; font-size: .92rem; color: var(--on-green); margin-left: 6px; }
.nav .btn:hover { background: var(--green); color: var(--on-green); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.motion-toggle { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); display: grid; place-items: center; cursor: pointer; margin-left: 4px; }
.motion-toggle:hover { color: var(--ink); }
.motion-toggle[hidden] { display: none; }
.motion-toggle svg { width: 16px; height: 16px; grid-area: 1 / 1; }
.motion-toggle .i-play, .still .motion-toggle .i-pause { display: none; }
.still .motion-toggle .i-play { display: block; }
/* paused by the visitor: everything holds where it is */
.still *, .still *::before, .still *::after { animation-play-state: paused !important; }
.still .nun-mark .stroke, .still .hero h1 em path { animation: none !important; stroke-dashoffset: 0; }
.still .nun-mark .diamond { animation: none !important; transform: scale(1) rotate(45deg); }
.still .nun-mark .tip { display: none; }
.still .hero .bubble { animation: none !important; opacity: 1; translate: 0 0; }
.still .w.heard::after { animation: none !important; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 0; overflow: hidden; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { margin: .35em 0 .3em; }
.hero h1 em { font-style: normal; color: var(--green); position: relative; white-space: nowrap; }
.hero h1 em svg { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .32em; overflow: visible; }
.hero h1 em path { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 1.4s .9s var(--ease) forwards; }
.hero .lede { margin-bottom: 1.6em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }
.trio { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; list-style: none; font-weight: 700; }
.trio li { display: flex; align-items: center; gap: 8px; }
.trio i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--green-wash); color: var(--green); font-style: normal; }
.trio svg { width: 17px; height: 17px; }

.hero-stage { position: relative; min-height: 640px; display: grid; place-items: center; }
/* the phone sits in the cup of the icon's nūn */
.nun-mark { position: absolute; left: 50%; bottom: -64px; translate: -50% 0; width: min(640px, 150%); max-width: none; pointer-events: none; z-index: 0; }
.nun-mark .stroke { fill: none; stroke: color-mix(in srgb, var(--green) 20%, var(--paper)); stroke-width: 74; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s .2s var(--ease) forwards; }
.nun-mark .diamond { fill: color-mix(in srgb, var(--green) 20%, var(--paper)); transform-box: fill-box; transform-origin: center; transform: scale(0) rotate(45deg); animation: pop .6s 2.5s var(--ease) forwards; }
/* gold marks where the pen begins, as in the app; a green pen tip writes the stroke */
.nun-mark .start { fill: var(--gold); transform-box: fill-box; transform-origin: center; animation: pulse-dot 2.4s ease-in-out 3s infinite; }
.nun-mark .tip { fill: var(--green); offset-path: path("M 712 380 C 742 520 748 610 724 680 C 690 772 600 800 505 800 C 400 800 318 768 300 650 C 290 570 308 500 334 432"); offset-rotate: 0deg; animation: travel 2.6s .2s var(--ease) forwards, fade .4s 2.8s forwards; }
@keyframes pulse-dot { 50% { transform: scale(1.18); } }
@keyframes fade { to { opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 60% { transform: scale(1.15) rotate(45deg); } to { transform: scale(1) rotate(45deg); } }
@keyframes travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* phone */
.phone {
  position: relative; z-index: 2;
  width: min(300px, 72vw); aspect-ratio: 1206 / 2622;
  border-radius: 46px; padding: 11px;
  background: linear-gradient(145deg, #2b2b2b, #0c0c0c);
  box-shadow: 0 0 0 1.5px #3a3a3a inset, var(--shadow-lift), 0 50px 80px -40px rgba(20, 53, 45, .55);
}
.phone::after { content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 30%; height: 22px; border-radius: 20px; background: #000; z-index: 2; }
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; background: var(--paper); }
.phone.tilt { transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); transition: transform .8s var(--ease); }
.phone.tilt:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }

.paper-pic { position: absolute; z-index: 3; margin: 0; width: clamp(70px, 9vw, 112px); filter: drop-shadow(0 10px 14px rgba(60, 40, 10, .28)); will-change: transform; }
.paper-pic img { width: 100%; animation: bob 6s ease-in-out infinite; }
.paper-pic.p1 { left: -6%; top: 4%; } .paper-pic.p1 img { animation-delay: -1s; }
.paper-pic.p2 { right: -9%; top: 30%; } .paper-pic.p2 img { animation-delay: -3s; }
.paper-pic.p3 { right: -4%; bottom: 8%; } .paper-pic.p3 img { animation-delay: -4.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }

/* the bird, built from the app's own layers */
.bird { position: absolute; width: var(--s, 120px); aspect-ratio: 252 / 250; z-index: 4; }
.bird .l { position: absolute; inset: 0; width: 100%; height: 100%; }
.bird .wing { transform-origin: 18% 51.85%; rotate: -34deg; animation: flap 3.6s ease-in-out infinite; }
.bird .wing.r { scale: -1 1; }
.bird .wing-wrap.r { scale: -1 1; }
.bird .tail { transform-origin: 22% 67%; animation: wag 2.4s ease-in-out infinite; }
.bird .eyes { transform-origin: 50% 46.92%; animation: blink 5s infinite; }
.bird .whole { position: absolute; inset: 0; animation: perch 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.bird .beak-open { opacity: 0; }
.bird.cheer .beak-open { opacity: 1; } .bird.cheer .beak { opacity: 0; }
.bird.cheer .whole { animation: hop .5s ease-in-out 3; }
@keyframes flap { 0%, 70%, 100% { rotate: -34deg; } 76% { rotate: 0deg; } 82% { rotate: -30deg; } 88% { rotate: 0deg; } 94% { rotate: -34deg; } }
@keyframes wag { 0%, 100% { rotate: -6deg; } 50% { rotate: 8deg; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes perch { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@keyframes hop { 50% { translate: 0 -16%; scale: .96 1.06; } }
.bubble {
  position: absolute; z-index: 5; padding: .55em .95em; border-radius: 16px;
  background: var(--card); color: var(--ink); font-weight: 700; font-size: .92rem; white-space: nowrap;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero .bird { --s: clamp(92px, 11vw, 130px); left: -12%; bottom: 14%; }
.hero .bubble { left: -16%; bottom: calc(14% + clamp(92px, 11vw, 130px) + 6px); animation: bubble 7s 3.2s ease-in-out infinite both; }
.hero .bubble::after { content: ""; position: absolute; left: 34px; bottom: -7px; width: 14px; height: 14px; background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); rotate: 45deg; }
@keyframes bubble { 0% { opacity: 0; translate: 0 8px; } 8%, 70% { opacity: 1; translate: 0 0; } 80%, 100% { opacity: 0; translate: 0 -6px; } }

/* torn-paper land bands */
.band { position: relative; height: clamp(150px, 22vw, 300px); margin-top: -2px; overflow: hidden; }
/* the land paintings don't tile, so the band pans slowly across one copy */
.band .land {
  position: absolute; inset: 0 -8%;
  background-size: cover; background-repeat: no-repeat; background-position: 50% 50%;
  animation: drift 40s ease-in-out infinite alternate;
}
.band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 26px; z-index: 2;
  background: var(--paper);
  -webkit-mask: url("../img/tear.svg") repeat-x 0 0 / 420px 26px;
  mask: url("../img/tear.svg") repeat-x 0 0 / 420px 26px;
}
.band.bottom-tear::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px; z-index: 2;
  background: var(--after, var(--paper));
  -webkit-mask: url("../img/tear.svg") repeat-x 0 0 / 420px 26px;
  mask: url("../img/tear.svg") repeat-x 0 0 / 420px 26px;
  transform: scaleY(-1);
}
@keyframes drift { from { translate: -6% 0; } to { translate: 6% 0; } }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { margin: .3em 0 .35em; }
.center { text-align: center; margin-inline: auto; }
.center .lede { margin-inline: auto; }

/* three pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.pillar .ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--green-wash); color: var(--green); margin-bottom: 18px; }
.pillar .ic svg { width: 26px; height: 26px; }
.pillar h3 { margin-bottom: .4em; }
.pillar p { color: var(--ink-soft); margin: 0; }
.pillar .mini { height: 92px; margin: 18px -6px 0; display: grid; place-items: center; }

/* feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature + .feature { margin-top: clamp(80px, 11vw, 150px); }
.feature.flip .feature-media { order: 2; }
.feature-media { position: relative; display: grid; place-items: center; min-height: 560px; }
.feature-media .blob { position: absolute; inset: 8% 6%; border-radius: 42% 58% 55% 45% / 48% 40% 60% 52%; background: var(--green-wash); animation: morph 16s ease-in-out infinite; }
.feature-media .blob.gold { background: color-mix(in srgb, var(--gold) 24%, var(--paper)); }
@keyframes morph { 50% { border-radius: 58% 42% 45% 55% / 40% 56% 44% 60%; rotate: 8deg; } }
.feature-copy h2 { margin: .3em 0 .45em; font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
.ticks { list-style: none; padding: 0; margin: 1.4em 0 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 36px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .18em; width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232A7861' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.ticks b { display: block; }
.ticks span { color: var(--ink-soft); font-size: .97rem; }
.phone-cap { position: absolute; z-index: 4; bottom: 4%; right: 2%; max-width: 210px; font-size: .88rem; font-weight: 600; background: var(--card); border: 1px solid var(--line); padding: 10px 14px; border-radius: 14px; box-shadow: var(--shadow); }
.phone-cap b { color: var(--green); }

/* memorise demo (drawn, not recorded: the recogniser needs a voice) */
.ayah-demo {
  position: relative; z-index: 2; width: min(420px, 100%);
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
  padding: 22px 22px 18px; box-shadow: var(--shadow-lift);
}
.ayah-demo .top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .85rem; color: var(--gold-ink); }
.ayah-demo .modes { display: flex; background: var(--paper); border-radius: 999px; padding: 4px; font-size: .85rem; font-weight: 700; }
.ayah-demo .modes span { padding: 6px 12px; border-radius: 999px; color: var(--ink-soft); }
.ayah-demo .modes .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.ayah-words { display: flex; flex-wrap: wrap; direction: rtl; gap: 10px 12px; justify-content: flex-start; margin: 22px 0 18px; min-height: 120px; align-content: center; }
.w { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 10px 6px; border-radius: 14px; transition: background .4s, color .4s; }
.w .a { font-family: var(--arabic); font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1.5; color: var(--ink); transition: filter .5s, opacity .5s, color .4s; }
.w .t { font-size: .74rem; color: var(--ink-soft); direction: ltr; transition: filter .5s, opacity .5s; }
.w.fog .a, .w.fog .t { filter: blur(9px); opacity: .5; }
.w.fog { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.w.heard { background: color-mix(in srgb, var(--green) 16%, transparent); }
.w.heard .a { color: var(--green); }
.w.heard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--green); opacity: 0; animation: ring .7s ease-out; }
@keyframes ring { from { opacity: .9; transform: scale(.9); } to { opacity: 0; transform: scale(1.12); } }
.mic-row { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; font-size: .95rem; }
.mic { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--on-green); flex: none; }
.mic svg { width: 20px; height: 20px; }
.mic::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; }
.listening .mic::before { animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { from { opacity: .7; transform: scale(.85); } to { opacity: 0; transform: scale(1.35); } }
.mic-row .status { color: var(--ink-soft); }
.legend { display: flex; gap: 14px; margin-top: 12px; font-size: .82rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.revision { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 1.4em; }
.revision div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; text-align: center; font-size: .85rem; color: var(--ink-soft); }
.revision b { display: block; font-family: var(--display); font-size: 1.35rem; color: var(--ink); }

/* storybook strip */
.storybook { background: var(--deep); color: var(--on-deep); overflow: hidden; }
.storybook .section-head .lede { color: var(--on-deep-soft); }
.storybook .eyebrow { color: var(--gold); }
.reel { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 30px; scrollbar-width: none; }
.reel::-webkit-scrollbar { display: none; }
.reel figure { flex: 0 0 min(440px, 78vw); margin: 0; scroll-snap-align: center; }
.reel .clip { position: relative; aspect-ratio: 960 / 520; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); transform: rotate(var(--r, 0deg)); transition: transform .5s var(--ease); }
.reel figure:hover .clip { transform: rotate(0) scale(1.02); }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel figcaption { margin-top: 14px; font-size: .98rem; color: var(--on-deep-soft); }
.reel figcaption b { display: block; color: var(--on-deep); font-family: var(--display); font-size: 1.15rem; }
.reel-hint { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.reel-hint button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(246,240,226,.3); background: transparent; color: var(--on-deep); cursor: pointer; font-size: 1.1rem; }
.reel-hint button:hover { background: rgba(246,240,226,.1); }

/* the story */
.story { background: linear-gradient(180deg, #221a4a 0%, #2a2160 55%, #1d1840 100%); color: #F3EEFF; }
.story .sky { overflow: hidden; }
.story .eyebrow { color: #F1D489; }
.story .sky { position: absolute; inset: 0; pointer-events: none; }
.story .star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #FCE9A8; box-shadow: 0 0 8px #FCE9A8; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; } }
.story-grid { position: relative; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.moon-col { position: sticky; top: 110px; display: grid; justify-items: center; gap: 18px; }
.moon { width: clamp(160px, 22vw, 260px); aspect-ratio: 1; position: relative; }
.moon svg { width: 100%; height: 100%; overflow: visible; }
.moon-label { font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #F1D489; text-align: center; }
.story-text { font-size: clamp(1.08rem, 1.5vw, 1.22rem); line-height: 1.75; max-width: 34em; }
.story-text h2 { margin: .3em 0 .8em; color: #fff; }
.story-text p { color: rgba(243, 238, 255, .86); }
.story-text .pull { font-family: var(--display); font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.3; color: #fff; margin: 1.4em 0; padding-left: 22px; border-left: 3px solid #F1D489; font-variation-settings: "SOFT" 100, "opsz" 72; }
.story-text .sign { margin-top: 2em; font-family: var(--display); font-style: italic; font-size: 1.2rem; color: #F1D489; }
.draft-note { margin-top: 18px; font-size: .85rem; padding: 10px 14px; border-radius: 12px; background: rgba(241, 212, 137, .14); border: 1px dashed rgba(241, 212, 137, .6); color: #F1D489; }

/* plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 920px; margin-inline: auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.plan.premium { background: var(--deep); color: var(--on-deep); border-color: transparent; position: relative; overflow: hidden; }
.plan.premium .price small, .plan.premium li { color: var(--on-deep-soft); }
.plan h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan .tag { font: 700 .75rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: var(--green-wash); color: var(--green-text); }
.plan.premium .tag { background: rgba(194, 154, 79, .2); color: #E0BC7C; }
.price { font-family: var(--display); font-size: 2.6rem; font-weight: 600; margin: .3em 0 .2em; }
.price small { font-family: var(--body); font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.plan ul { padding: 0; margin: 1.2em 0 0; list-style: none; display: grid; gap: 10px; }
.plan li { padding-left: 26px; position: relative; color: var(--ink-soft); font-size: .98rem; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.fine { font-size: .86rem; color: var(--ink-soft); margin-top: 18px; text-align: center; }

/* support */
.support { background: linear-gradient(180deg, var(--paper), color-mix(in srgb, var(--gold) 14%, var(--paper))); }
.support-card {
  position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 60px); align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 32px; padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow-lift);
}
.support-card h2 { margin: .3em 0 .45em; }
.uses { list-style: none; padding: 0; margin: 1.2em 0 0; display: grid; gap: 12px; }
.uses li { display: flex; gap: 12px; align-items: flex-start; }
.uses i { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-wash); color: var(--green); font-style: normal; }
.uses svg { width: 18px; height: 18px; }
.give { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 24px; }
.give-label { font-weight: 700; margin-bottom: 12px; }
.freq { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.freq button { flex: 1; min-height: 42px; border: 0; background: transparent; border-radius: 999px; font: 700 .92rem var(--body); color: var(--ink-soft); cursor: pointer; }
.freq button[aria-pressed="true"] { background: var(--green); color: var(--on-green); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.chip { min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font: 700 1.05rem var(--body); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s; }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { border-color: var(--green); background: var(--green-wash); color: var(--green-text); }
.give .btn { width: 100%; }
.give .small:empty { display: none; }
.give .gift-terms { margin: 0 0 14px; text-align: left; }
.give .small { margin-top: 12px; font-size: .82rem; color: var(--ink-soft); text-align: center; }
.coins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.coins span { position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); opacity: 0; animation: rise 1.6s ease-out forwards; }
@keyframes rise { 15% { opacity: 1; } to { transform: translateY(-260px) translateX(var(--dx)); opacity: 0; } }

/* faq */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; translate: 0 -50%; font: 400 1.8rem/1 var(--body); color: var(--green); transition: rotate .3s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: var(--ink-soft); padding-right: 30px; }

/* footer */
.site-foot { background: var(--deep-2); color: var(--on-deep-soft); padding: 64px 0 40px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.site-foot .brand { color: var(--on-deep); }
.site-foot h2 { color: var(--on-deep); font: 700 .8rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 14px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--on-deep); text-decoration: underline; }
.credits { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(246, 240, 226, .12); font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot-verse { font-family: var(--arabic); font-size: 1.6rem; color: var(--on-deep); direction: rtl; margin: 16px 0 4px; }

/* reveal on scroll */
.reveal { transition: opacity .9s var(--ease), translate .9s var(--ease); }
.js .reveal { opacity: 0; translate: 0 28px; }
.reveal.in { opacity: 1; translate: 0 0; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .feature, .story-grid, .support-card { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
  .hero-stage { min-height: 560px; }
  .moon-col { position: relative; top: 0; }
  .paper-pic.p1 { left: max(0px, calc(50% - 250px)); }
  .paper-pic.p2 { right: max(0px, calc(50% - 250px)); }
  .paper-pic.p3 { right: max(0px, calc(50% - 230px)); }
  .hero .bird { left: max(0px, calc(50% - 230px)); }
  .hero .bubble { left: max(0px, calc(50% - 250px)); }
  .feature-media { min-height: 520px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .pillars, .plans { grid-template-columns: 1fr; }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .revision { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .revision div { padding: 10px 4px; font-size: .78rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .phone-cap { right: 0; bottom: 0; }
}

/* motion off: everything is still there, nothing moves */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .reveal { opacity: 1; translate: 0 0; }
  .nun-mark .stroke { stroke-dashoffset: 0; }
  .nun-mark .diamond { transform: scale(1) rotate(45deg); }
  .nun-mark .tip { display: none; }
  .hero h1 em path { stroke-dashoffset: 0; }
  .hero .bubble { opacity: 1; }
}
