/* askmeryam.com home — "Dusk to Dawn".
   The page walks through one night the way the app's theme follows the
   prayer clock: ʿIshāʾ → the last third → moonlit sleep → Fajr → Ḍuḥā.
   Palette from lib/theme/app_theme.dart (Forest Night, Mystic Pine,
   Garden Day). No purple. */

:root {
  --night: #1b2a1e;
  --night-deep: #111a13;
  --night-card: #2b3a2e;
  --night-text: #dad7c9;
  --night-hi: #e9f4ea;
  --night-soft: #a3b18a;
  --candle: #ebc49a;
  --candle-deep: #c47a4a;
  --pine: #1e2b33;
  --pine-deep: #131c22;
  --pine-text: #b7c9cc;
  --pine-hi: #e3edef;
  --pine-accent: #7fa1a8;
  --cream: #f7f3ea;
  --paper: #fffbec;
  --ink: #2a3b31;
  --ink-soft: #54685c;
  --sage: #3f7a57;
  --gold: #e9b457;
  --gold-text: #85590f;
  --serif: "Lora", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Amiri", "Geeza Pro", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night-deep); color: var(--night-text); font: 17px/1.7 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--candle); outline-offset: 4px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--cream); color: var(--ink); padding: 8px 14px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 32px); } }

/* ── crisis line: always first, never dismissable ─────────────────────── */
.crisis {
  position: relative; z-index: 5;
  background: rgba(17, 26, 19, 0.92);
  color: var(--candle);
  font-size: 0.86rem; text-align: center;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(235, 196, 154, 0.18);
}
.crisis a { color: var(--candle); font-weight: 800; text-underline-offset: 3px; }

/* ── header ───────────────────────────────────────────────────────────── */
.top {
  position: absolute; z-index: 4; left: 0; right: 0; top: 0;
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--night-hi); font-family: var(--serif); font-size: 1.3rem; letter-spacing: 0.01em; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.top nav { display: flex; gap: 26px; font-size: 0.95rem; font-weight: 700; }
.top nav a { color: var(--night-text); text-decoration: none; opacity: 0.85; transition: opacity .3s, color .3s; }
.top nav a:hover { opacity: 1; color: var(--candle); }
@media (max-width: 640px) { .top nav a:not(.keep) { display: none; } }

/* ── the prayer clock: where you are in the night ─────────────────────── */
.clock {
  position: fixed; z-index: 6; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; align-items: flex-end;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  pointer-events: none;
}
.clock span { display: flex; align-items: center; gap: 10px; color: rgba(233, 244, 234, 0.35); transition: color .6s var(--ease); }
.clock span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; transition: transform .6s var(--ease), background .6s; }
.clock span.on { color: var(--candle); }
.clock span.on::after { transform: scale(1.6); box-shadow: 0 0 12px var(--candle); }
.clock.day span { color: rgba(42, 59, 49, 0.3); }
.clock.day span.on { color: var(--gold-text); }
.clock.day span.on::after { box-shadow: 0 0 10px var(--gold); }
.clock span b { font-weight: 800; opacity: 0; transform: translateX(6px); transition: opacity .5s, transform .5s var(--ease); }
.clock span.on b { opacity: 1; transform: none; }
@media (max-width: 900px) { .clock { display: none; } }

/* ── shared section bits ──────────────────────────────────────────────── */
.chapter { position: relative; padding: clamp(96px, 14vw, 180px) 0; overflow: hidden; }
.time {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--candle); margin: 0 0 22px;
}
.time::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.6; }
.time i { font-family: var(--arabic); font-style: normal; font-size: 1.15rem; letter-spacing: 0; text-transform: none; opacity: 0.85; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); line-height: 1.08; margin-bottom: 26px; }
h2 em, h1 em { font-style: italic; font-weight: 400; color: var(--candle); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 34em; margin: 0 0 18px; }
.fine { font-size: 0.86rem; opacity: 0.75; max-width: 36em; }

.two { display: grid; gap: clamp(48px, 7vw, 110px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two { grid-template-columns: 1.05fr 0.95fr; } .two.flip > :first-child { order: 2; } }

/* reveal on scroll (JS adds .in; without JS everything is simply visible) */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .12s; } .js .reveal.d2 { transition-delay: .24s; } .js .reveal.d3 { transition-delay: .36s; }

/* ── phone ────────────────────────────────────────────────────────────── */
.phone {
  position: relative; width: min(320px, 78vw); margin-inline: auto;
  aspect-ratio: 640 / 1391;
  border-radius: 48px; padding: 11px;
  background: linear-gradient(145deg, #2a2f2b, #0b0f0c 60%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 40px 80px -20px rgba(0,0,0,0.7), 0 18px 36px -18px rgba(0,0,0,0.6);
}
.phone > img, .phone > .screen { width: 100%; height: 100%; border-radius: 38px; object-fit: cover; object-position: top; }
.phone.glow::before {
  content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(235, 196, 154, 0.28), transparent 70%);
  filter: blur(10px);
}

/* ═════ 1. ʿIshāʾ — the lantern forest ═══════════════════════════════════ */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: end;
  padding: 130px 0 clamp(72px, 12vh, 130px);
  isolation: isolate; overflow: hidden;
}
.hero .bg {
  position: absolute; inset: -4%; z-index: -2;
  background: url("img/worlds/isha-wide.webp") 70% 50% / cover no-repeat;
  animation: drift 38s var(--ease) infinite alternate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,16,12,0.5) 0%, rgba(10,16,12,0) 22%, rgba(10,16,12,0) 62%, var(--night-deep) 92%),
    linear-gradient(90deg, rgba(10,16,12,0.78) 0%, rgba(10,16,12,0.45) 42%, rgba(10,16,12,0) 70%);
}
@keyframes drift { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
.hero .bismillah { text-align: left; font-family: var(--arabic); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--candle); opacity: 0.9; margin: 0 0 18px; line-height: 2; }
.hero h1 { font-size: clamp(3rem, 9vw, 7.2rem); line-height: 0.98; color: var(--night-hi); max-width: 11ch; margin-bottom: 28px; }
.hero .lede { color: var(--night-text); max-width: 31em; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; align-items: center; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 56px; padding: 9px 22px; border-radius: 16px;
  background: rgba(233, 244, 234, 0.08); border: 1px solid rgba(235, 196, 154, 0.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--night-hi); text-decoration: none; line-height: 1.2;
}
.store small { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--candle); }
.store strong { font-size: 1.08rem; }
.promise { font-size: 0.92rem; color: var(--night-soft); margin: 0; padding-left: 6px; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 1px; height: 54px; background: linear-gradient(var(--candle), transparent); opacity: 0.7; animation: cue 2.6s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: translate(-50%, 0); opacity: .2; } 50% { transform: translate(-50%, 10px); opacity: .8; } }

/* ═════ 2. Meet Meryam — candlelight ═════════════════════════════════════ */
.meryam {
  background:
    radial-gradient(60% 50% at 78% 45%, rgba(235, 196, 154, 0.12), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
}
.meryam h2 { color: var(--night-hi); }
.chat-screen {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  padding: 64px 16px 22px;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(235,196,154,0.10), transparent 70%),
    linear-gradient(180deg, #223126, #1b2a1e);
  font-size: 0.86rem; line-height: 1.55;
}
.chat-head { position: absolute; top: 34px; left: 0; right: 0; text-align: center; font-family: var(--serif); color: var(--night-hi); font-size: 1rem; }
.chat-head small { display: block; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--night-soft); }
.bubble { max-width: 88%; padding: 11px 13px; border-radius: 16px; margin: 0; }
.bubble.me { align-self: flex-end; background: #2f3e2f; border: 1px solid rgba(122,143,79,0.45); border-bottom-right-radius: 4px; color: var(--night-hi); }
.bubble.her { align-self: flex-start; background: var(--night-card); border: 1px solid rgba(122,143,79,0.25); border-bottom-left-radius: 4px; color: var(--night-text); }
.bubble.her em { color: var(--candle); }
.bubble .ref { display: block; margin-top: 6px; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--candle); font-style: normal; }
.js .bubble { opacity: 0; transform: translateY(12px) scale(0.98); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .in .bubble { opacity: 1; transform: none; }
.js .in .bubble:nth-child(3) { transition-delay: .9s; }
.js .in .bubble:nth-child(4) { transition-delay: 2.1s; }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 12px 14px; background: var(--night-card); border-radius: 16px; border-bottom-left-radius: 4px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--night-soft); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.typing[hidden] { display: none; }
.caption { text-align: center; font-size: 0.78rem; color: var(--night-soft); margin-top: 18px; letter-spacing: 0.04em; }

.promises { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.promises li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; }
.promises li::before { content: ""; width: 9px; height: 9px; margin: 9px 0 0 6px; border-radius: 50%; background: var(--candle); box-shadow: 0 0 14px var(--candle); }
.promises strong { color: var(--night-hi); font-weight: 700; }

/* ═════ 3. The last third — SOS and a breath ═════════════════════════════ */
.sos { background: var(--night-deep); }
.sos h2 { color: var(--night-hi); }
.breath { position: relative; display: grid; place-items: center; width: min(460px, 86vw); aspect-ratio: 1; margin-inline: auto; }
.breath .ring {
  position: absolute; inset: 12%; border-radius: 50%;
  border: 1.5px solid rgba(235,196,154,0.8);
  background: radial-gradient(circle, rgba(235,196,154,0.22), rgba(235,196,154,0.04) 70%);
  box-shadow: 0 0 60px rgba(235,196,154,0.25), inset 0 0 40px rgba(235,196,154,0.12);
  animation: breathe 16s cubic-bezier(.45,0,.55,1) infinite;
}
.breath .word { position: relative; text-align: center; font-family: var(--serif); color: var(--night-hi); font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.breath .word small { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--candle); margin-bottom: 6px; }
/* in 4 · hold 4 · out 8 — the same cycle as the app's SOS screen */
@keyframes breathe { 0% { transform: scale(0.62); } 25% { transform: scale(1); } 50% { transform: scale(1); } 100% { transform: scale(0.62); } }
.sos-shot { width: min(300px, 70vw); margin: 42px auto 0; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); border: 1px solid rgba(235,196,154,0.15); }
.lines { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.line { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--candle); color: var(--night); font-weight: 800; text-decoration: none; }
.line.ghost { background: transparent; color: var(--candle); border: 1px solid rgba(235,196,154,0.45); }

/* ═════ 4. Moonlit — sleep ═══════════════════════════════════════════════ */
.moon { background: var(--pine-deep); color: var(--pine-text); isolation: isolate; }

.moon .time, .moon h2 em { color: var(--pine-accent); }
.moon h2 { color: var(--pine-hi); }
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 46% 22%, #fff, transparent), radial-gradient(1px 1px at 64% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 82% 20%, #fff, transparent), radial-gradient(1px 1px at 92% 6%, #fff, transparent),
    radial-gradient(1px 1px at 6% 34%, #fff, transparent), radial-gradient(1px 1px at 55% 30%, #fff, transparent);
  animation: twinkle 7s ease-in-out infinite alternate; opacity: .5; }
@keyframes twinkle { to { opacity: .9; } }
.sleep-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.sleep-list li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(39, 53, 64, 0.55); border: 1px solid rgba(127,161,168,0.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sleep-list b { color: var(--pine-hi); font-weight: 700; }
.sleep-list span { font-size: 0.86rem; color: var(--pine-text); }
.sleep-list i { font-style: normal; width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--pine-accent); color: var(--pine-deep); font-size: 0.8rem; }

/* ═════ 5. Fajr — first light, the tools on paper ════════════════════════ */
.fajr {
  color: var(--ink);
  background: linear-gradient(180deg, var(--pine) 0%, #5d6b5e 7%, #cbbfa4 15%, #efe4cc 22%, var(--paper) 30%, var(--paper) 100%);
  padding-top: clamp(170px, 22vw, 280px);
}
.fajr .time { color: var(--gold-text); }
.fajr h2 { color: var(--ink); }
.fajr h2 em { color: var(--sage); }
.fajr .lede { color: var(--ink-soft); }
.tools { list-style: none; padding: 0; margin: clamp(48px, 7vw, 84px) 0 0; display: grid; gap: clamp(28px, 4vw, 48px) clamp(18px, 3vw, 36px); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tools li { text-align: center; }
.tools img { width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 50%; filter: drop-shadow(0 10px 14px rgba(42,59,49,0.22)) drop-shadow(0 2px 3px rgba(42,59,49,0.18)); transition: transform .6s var(--ease); }
.tools li:nth-child(odd) img { transform: translateY(10px); }
.tools li:hover img { transform: translateY(-6px) rotate(-3deg); }
.tools b { display: block; font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
.tools span { display: block; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.5; max-width: 16em; margin: 4px auto 0; }
.free-note { margin-top: 56px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); }

/* ═════ 6. Ḍuḥā — ease ═══════════════════════════════════════════════════ */
.duha { color: var(--ink); isolation: isolate; background: var(--cream); }

.duha .time { color: var(--gold-text); }
.verse { text-align: center; }
.verse .ar { font-family: var(--arabic); font-size: clamp(2.6rem, 8vw, 5.6rem); line-height: 1.7; color: var(--ink); margin: 0; text-shadow: 0 0 40px rgba(255,251,236,0.9); }
.verse .tr { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.6rem); color: var(--ink); margin: 6px 0 0; }
.verse .tr small { display: block; font-style: normal; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--gold-text); margin-top: 10px; }
.pair { display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 3vw, 36px); margin-top: clamp(64px, 9vw, 110px); }
.pair .phone { width: min(280px, 42vw); margin: 0; }
.pair .phone:first-child { transform: translateY(40px) rotate(-3deg); }
.pair .phone:last-child { transform: rotate(3deg); }
.pair-caption { text-align: center; margin: 56px auto 0; max-width: 34em; color: var(--ink-soft); }
.pair-caption b { color: var(--ink); }

/* ═════ 7. How it is built ═══════════════════════════════════════════════ */
.built { background: var(--cream); color: var(--ink); }
.built h2 { color: var(--ink); text-align: center; }
.built h2 em { color: var(--sage); }
.filigree { display: block; width: 160px; height: 18px; margin: 0 auto 30px; background:
  radial-gradient(circle at 50% 50%, var(--gold) 2.5px, transparent 3px),
  linear-gradient(90deg, transparent, var(--gold) 30%, transparent 46%, transparent 54%, var(--gold) 70%, transparent) center / 100% 1px no-repeat; opacity: .8; }
.rules { display: grid; gap: 0; grid-template-columns: 1fr; margin-top: 50px; border-top: 1px solid #e3dccb; }
@media (min-width: 800px) { .rules { grid-template-columns: 1fr 1fr; } .rules > div:nth-child(odd) { border-right: 1px solid #e3dccb; } }
.rules > div { padding: 30px clamp(8px, 3vw, 40px); border-bottom: 1px solid #e3dccb; }
.rules b { display: block; font-family: var(--serif); font-size: 1.25rem; margin-bottom: 6px; }
.rules p { margin: 0; color: var(--ink-soft); }

/* ═════ 8. Privacy + questions ═══════════════════════════════════════════ */
.quiet { background: var(--paper); color: var(--ink); }
.quiet h2 { color: var(--ink); font-size: clamp(1.9rem, 4vw, 3rem); }
.quiet h2 em { color: var(--sage); }
.quiet .lede { color: var(--ink-soft); }
.privacy-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.privacy-points li { padding-left: 28px; position: relative; color: var(--ink-soft); }
.privacy-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--sage); font-weight: 800; }
.privacy-points b { color: var(--ink); }
.quiet a { color: var(--sage); font-weight: 700; }
details { border-bottom: 1px solid #e3dccb; padding: 18px 0; }
summary { cursor: pointer; font-family: var(--serif); font-size: 1.12rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--sage); font-family: var(--sans); font-weight: 800; transition: transform .3s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--ink-soft); }

/* ── why it began: a candlelit letter before the footer ───────────────── */
/* Dusk returns: the paper of the section above darkens into night. */
.story { background: linear-gradient(180deg, var(--paper) 0, var(--night) clamp(160px, 22vw, 280px)), var(--night); color: var(--night-text); }
.story .time { color: var(--candle); }
.story h2 { color: var(--night-hi); text-align: center; max-width: 16em; margin-inline: auto; }
.letter { max-width: 36em; margin: 40px auto 0; font-family: var(--serif); font-size: clamp(1.08rem, 1.7vw, 1.25rem); line-height: 1.85; }
.letter p { margin: 0 0 1.3em; }
.letter em { color: var(--night-soft); }
.letter .turn { color: var(--night-hi); font-style: italic; text-align: center; margin-block: 1.8em; }
.letter strong { color: var(--candle); font-weight: 600; }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot { background: var(--night-deep); color: var(--night-soft); padding: 54px 0 60px; font-size: 0.92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot a { color: var(--night-text); text-decoration: none; }
.foot a:hover { color: var(--candle); }
.credit { color: var(--candle); font-weight: 700; letter-spacing: 0.03em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .bubble { opacity: 1; transform: none; }
  .typing { display: none; }
  .breath .ring { transform: scale(0.85); }
}
.time.centered { display: flex; justify-content: center; }

@media (max-width: 640px) {
  .hero { min-height: calc(100svh - 58px); padding: 104px 0 64px; align-items: center; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); margin-bottom: 20px; }
  .hero .bismillah { margin-bottom: 8px; }
  .stores { margin-top: 24px; }
}

/* The first screen must not make anyone wait for its words. */
.js .hero .reveal { transition-duration: .7s; }
.js .hero .reveal.d1 { transition-delay: .06s; } .js .hero .reveal.d2 { transition-delay: .12s; } .js .hero .reveal.d3 { transition-delay: .18s; }


/* ═════ Worlds: every chapter is a full-screen place (docs/design/worlds) ═ */
.world { position: relative; isolation: isolate; min-height: 100svh; display: grid; align-items: center; }
.world > .bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-repeat: no-repeat; }
.world::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--shade); }
.world.text-left  { --shade: linear-gradient(90deg, rgba(10,16,12,0.82) 0%, rgba(10,16,12,0.5) 40%, rgba(10,16,12,0.05) 68%), linear-gradient(180deg, var(--night-deep) 0%, rgba(10,16,12,0) 16%, rgba(10,16,12,0) 84%, var(--night-deep) 100%); }
.world.text-right { --shade: linear-gradient(270deg, rgba(8,20,22,0.8) 0%, rgba(8,20,22,0.45) 40%, rgba(8,20,22,0.05) 68%), linear-gradient(180deg, var(--night-deep) 0%, rgba(8,20,22,0) 16%, rgba(8,20,22,0) 84%, var(--pine-deep) 100%); }
.meryam > .bg { background-image: url("img/worlds/meryam-wide.webp"); background-position: 75% 50%; }
.sos > .bg    { background-image: url("img/worlds/sos-wide.webp"); background-position: 25% 50%; }
.moon > .bg   { background-image: url("img/worlds/moon-wide.webp"); background-position: 70% 40%; opacity: 1; }
.fajr-world > .bg { background-image: url("img/worlds/fajr-wide.webp"); background-position: 100% 60%; }
.fajr-world { --shade: linear-gradient(90deg, rgba(255,251,236,0.9) 0%, rgba(255,251,236,0.6) 34%, rgba(255,251,236,0) 58%), linear-gradient(180deg, var(--pine-deep) 0%, rgba(255,251,236,0) 22%, rgba(255,251,236,0) 82%, var(--paper) 100%); color: var(--ink); }
.fajr-world .time { color: var(--gold-text); }
.fajr-world h2 { color: var(--ink); max-width: 11ch; }
.fajr-world .lede { max-width: 26em; } .fajr-world h2 em { color: var(--sage); } .fajr-world .lede { color: var(--ink-soft); }
.duha > .bg { background-image: url("img/worlds/duha-wide.webp"); background-position: center 55%; }
.duha::before { background: linear-gradient(180deg, var(--paper) 0%, rgba(247,243,234,0.2) 20%, rgba(247,243,234,0.15) 55%, rgba(247,243,234,0.92) 100%); }
.moon::before { background: var(--shade); }
.tools-paper { background: var(--paper); color: var(--ink); padding: clamp(64px, 9vw, 120px) 0; }

/* Seams: each world's picture feathers out at top and bottom onto a base
   colour its neighbours share, so one place dissolves into the next instead
   of meeting it at a hard line — whatever the shade does at that aspect. */
.world { background: var(--night-deep); }
.world > .bg, .world::before {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
}
.fajr-world { background: linear-gradient(180deg, var(--night-deep) 0%, var(--paper) 100%); }
.duha { background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%); }

/* Tall screens get the portrait composition of the same world. */
@media (max-aspect-ratio: 1/1) {
  .hero .bg { background-image: url("img/worlds/isha-tall.webp"); background-position: center 30%; }
  .meryam > .bg { background-image: url("img/worlds/meryam-tall.webp"); background-position: center top; }
  .sos > .bg    { background-image: url("img/worlds/sos-tall.webp"); background-position: center top; }
  .moon > .bg   { background-image: url("img/worlds/moon-tall.webp"); background-position: center top; }
  .fajr-world > .bg { background-image: url("img/worlds/fajr-tall.webp"); background-position: center top; }
  .duha > .bg   { background-image: url("img/worlds/duha-tall.webp"); background-position: center top; }
  .world.text-left, .world.text-right { --shade: linear-gradient(180deg, rgba(10,16,12,0.55) 0%, rgba(10,16,12,0.2) 30%, rgba(10,16,12,0.7) 62%, rgba(10,16,12,0.92) 100%); }
  .fajr-world { --shade: linear-gradient(180deg, rgba(255,251,236,0.3) 0%, rgba(255,251,236,0.15) 30%, rgba(255,251,236,0.85) 62%, var(--paper) 100%); }
  .world { align-items: end; }
}
