/*
 * Bayan: the landing page (getbayan.app).
 * Every interface colour is a token from src/constants/palette.ts (docs/DESIGN-SYSTEM.md), dark and light, same names.
 * Neue Montreal for the interface, KFGQPC Uthmanic Hafs for the Qur'an. No monospace.
 * Like the app: fills only. No outlines, no drop shadows. Every piece on a card is ported from the app's own component.
 * Kept in their own colours, as in the app: the phone (hardware), OBJ (the record player, the acrylic disc), text on a photo.
 */

@import url("tokens.css");

@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("../fonts/NeueMontreal-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "SuraNames"; src: url("../fonts/SuraNames.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "UthmanicHafs"; src: url("../fonts/UthmanicHafs.ttf") format("truetype"); font-display: swap; }

:root {
  --g: 24px;
  --gap: 88px;
  --max: 1200px;
  --r-card: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Neue Montreal", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --quran: "UthmanicHafs", serif;
}

/* ---------- Lenis smooth scroll (lenis@1.3.20/dist/lenis.css) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
html.lenis { scroll-behavior: auto; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--black); color: var(--ink);
  font: 400 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, figure, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--ink); color: var(--black); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--black); }
.skip:focus { top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(var(--max), 100% - 2 * var(--g)); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 2 * var(--g)); }
section { position: relative; }
[data-theme="dark"] img.l, [data-theme="light"] img.d { display: none; }

/* ---------- type ---------- */
h1 { font-weight: 500; font-size: clamp(44px, 7.4vw, 96px); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; }
h2 { font-weight: 500; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
h3 { font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
.quiet { color: var(--mute); }
.body { color: var(--soft); font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; text-wrap: pretty; }

/* ---------- buttons: solid fills, never outlined (Btn in the app) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 26px 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 19px; line-height: 1; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), opacity 0.25s;
}
.btn svg { width: 24px; height: 24px; }
.btn span { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.btn small { font-size: 12px; font-weight: 400; opacity: 0.8; }
.btn.solid { background: var(--ink); color: var(--black); }
.btn.quiet { background: var(--panel2); color: var(--ink); }
.btn.sm { height: 40px; padding: 0 16px 0 13px; font-size: 16px; gap: 7px; }
.btn.sm svg { width: 17px; height: 17px; margin-top: -2px; }
.btn.photo-solid { background: var(--on-photo); color: var(--on-photo-inv); }
.btn.photo-quiet { background: var(--on-photo-fill); color: var(--on-photo); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { opacity: 0.88; } }

/* glass: the app's back / share buttons on a photo (48 circle, frosted) */
.glass-btn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: var(--on-photo); background: rgba(var(--scrim-rgb), .35); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.glass-btn svg { width: 18px; height: 18px; }

/* ---------- nav: a floating pill ---------- */
.nav { position: fixed; z-index: 50; top: 16px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; padding: 0 12px; }
.pill {
  pointer-events: auto; display: flex; align-items: center; gap: 4px;
  height: 56px; padding: 0 8px 0 18px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 20px; letter-spacing: -0.02em; margin-right: 10px; }
.brand svg { width: 24px; height: 24px; }
.links { display: flex; }
.links a { padding: 8px 12px; border-radius: 999px; font-size: 16px; color: var(--soft); transition: color 0.2s, background-color 0.2s; }
@media (hover: hover) { .links a:hover { color: var(--ink); background: var(--fill); } }
.theme { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: var(--soft); margin: 0 4px; }
.theme svg { width: 19px; height: 19px; grid-area: 1 / 1; transition: transform 0.4s var(--ease), opacity 0.3s; }
[data-theme="dark"] .theme .sun, [data-theme="light"] .theme .moon { opacity: 0; transform: rotate(-60deg) scale(0.6); }
@media (hover: hover) { .theme:hover { color: var(--ink); background: var(--fill); } }

/* ---------- the phone: the app's real screens in an iPhone 16 Pro ---------- */
.phone {
  --w: 300px; position: relative; width: var(--w); aspect-ratio: 393 / 852;
  padding: calc(var(--w) * 0.03); border-radius: calc(var(--w) * 0.17); background: var(--web-phone-body);
  box-shadow: inset 0 0 0 calc(var(--w) * 0.006) var(--web-phone-edge-hi), inset 0 0 0 calc(var(--w) * 0.012) var(--web-phone-edge);
  flex: none;
}
.phone::before, .phone::after { content: ""; position: absolute; width: calc(var(--w) * 0.01); border-radius: 2px; background: var(--web-phone-edge); }
.phone::before { left: calc(var(--w) * -0.008); top: 22%; height: 9%; box-shadow: 0 calc(var(--w) * 0.24) 0 var(--web-phone-edge); }
.phone::after { right: calc(var(--w) * -0.008); top: 28%; height: 14%; }
.screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * 0.14); overflow: hidden; background: var(--black); isolation: isolate; }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- hero ---------- */
.hero { padding-top: 184px; text-align: center; overflow: hidden; }
/* the library's header light, exactly: its own photo (library/site/public/photos/gold.jpg) at .55 under the same fade;
   only the colour is turned from gold to blue */
.hero-photo { position: absolute; inset: 0 0 auto 0; height: 760px; pointer-events: none; overflow: hidden; z-index: -1; }
.hero-photo .img { position: absolute; inset: -60px; background: url("../photos/header.jpg") center 30% / cover no-repeat; opacity: var(--web-header-opacity);
  filter: hue-rotate(var(--web-header-hue)) saturate(var(--web-header-saturate)) brightness(var(--web-header-brightness)); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--ground-rgb), var(--web-header-fade-top)) 0%, rgba(var(--ground-rgb), var(--web-header-fade-mid)) 46%, var(--black) 86%); }
.hero-copy { position: relative; }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero h1 .quiet { display: block; }
.lede { max-width: 34em; margin: 28px auto 0; color: var(--soft); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; text-wrap: pretty; }
.ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.hero-stage { position: relative; height: clamp(460px, 50vw, 680px); margin-top: 72px; display: flex; justify-content: center; }
.hero-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(to bottom, rgba(var(--ground-rgb), 0), var(--black) 92%); z-index: 3; pointer-events: none; }
.hero-phone { --w: clamp(260px, 27vw, 370px); position: absolute; top: 0; z-index: 2; animation: phone-in 1.3s var(--ease) 0.25s both; }

/* ---------- statement ---------- */
.statement { padding: var(--gap) 0; }
/* one rhythm: every section ends with the same space before the next */
.feelings, .how, .ask, .features, .principles, .faq { padding: 0 0 var(--gap); }
.say { max-width: 22ch; margin-inline: auto; text-align: center; font-weight: 500; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.1; letter-spacing: -0.035em; text-wrap: balance; }
.say .w { color: var(--ink); transition: color 0.35s var(--ease), opacity 0.35s var(--ease); }
.say .w.off { opacity: .22; }

/* ---------- head rows ---------- */
.head-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.head-row .body { max-width: 30em; padding-bottom: 6px; }

/* ---------- feelings: the app's chips beside the real screen ---------- */
.split { display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: center; }
.feel-copy { max-width: 560px; }
.feel-copy .body { margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.chips button { height: 44px; padding: 0 18px; border-radius: 999px; background: var(--panel2); color: var(--ink); font-weight: 500; font-size: 18px; transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease); }
.chips button[aria-selected="true"] { background: var(--ink); color: var(--black); }
@media (hover: hover) { .chips button:not([aria-selected="true"]):hover { background: var(--raised); } }
.chips button:active { transform: scale(0.96); }
.hint { margin-top: 22px; color: var(--mute); font-size: 16px; }
.phone.big { --w: clamp(280px, 28vw, 380px); }
[data-feel-screens] img { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s var(--ease); }
[data-feel-screens] img.on { opacity: 1; }

/* ---------- cards (Phantom-style grid, the app's own fills) ---------- */
.pcards { display: grid; gap: 16px; }
.pcards.three, .pcards.grid { grid-template-columns: repeat(3, 1fr); }
.pcard { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-card); height: 500px; padding: 28px; display: flex; flex-direction: column; }
.pcard.tok { background: var(--fill); }
/* a photo card: the app's Photo, blurred, with its shade (12% → 28% → 60%) so white text passes on the lightest patch */
.pcard.on-ph { color: var(--on-photo); }
.pcard.on-ph::before { content: ""; position: absolute; inset: -60px; z-index: -2; background: var(--img) center / cover no-repeat; filter: blur(18px); }
.pcard.on-ph::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(var(--scrim-rgb), .12), rgba(var(--scrim-rgb), .28) 50%, rgba(var(--scrim-rgb), .6)); }
.pc-title { position: relative; z-index: 1; font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; display: flex; flex-direction: column; gap: 6px; }
.pc-title span { font-weight: 400; font-size: 17px; line-height: 1.4; color: var(--mute); letter-spacing: 0; }
.on-ph .pc-title span { color: var(--on-photo-mute); }
.pc-title .n { display: inline-grid; place-items: center; width: 36px; height: 28px; border-radius: 14px; background: var(--on-photo-fill); color: var(--on-photo); font-size: 15px; font-weight: 500; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.pc-stage { position: relative; flex: 1; display: grid; place-items: center; }

/* text set straight on the photo, as on the app's Ayah and Tafsir pages */
.on-photo-text { margin-top: auto; }
.on-photo-text .ar, .try-ayah .ar { font-family: var(--quran); font-size: 38px; line-height: 1.9; text-align: right; }
.on-photo-text .h, .try-taf .h { font-weight: 500; font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.ref { font-size: 15px; line-height: 1.3; margin-top: 10px; color: var(--mute); }
.on-ph .ref { color: var(--on-photo-mute); }

/* How it works, card 1: plays itself. Feelings drift in, are said into the mic, the orb listens (with what was heard
   beneath it), then it opens into a short ayah for that feeling. Everything starts hidden, so nothing flashes between loops. */
/* a night sky with the moon above a lit mosque: open space at the top, the mosque at the bottom (like Read the ayahs) */
[data-try]::before { background: var(--web-photo-base) url("../photos/night.webp") center / cover no-repeat !important; }
[data-try]::after { background: linear-gradient(180deg, rgba(var(--scrim-rgb), .2), rgba(var(--scrim-rgb), .3) 50%, rgba(var(--scrim-rgb), .62)) !important; }
.try-stage { position: relative; flex: 1; }
.try-chips { position: absolute; inset: 0; }
.try-chips .chip { position: absolute; left: 0; top: 0; height: 44px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center;
  background: rgba(var(--on-photo-rgb), .24); color: var(--on-photo); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-weight: 500; font-size: 18px; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.try-chips .chip.picked { background: var(--on-photo); color: var(--on-photo-inv); }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.try-mic, .try-orb, .try-glow { position: absolute; left: 50%; top: var(--my, 76%); border-radius: 999px; translate: -50% -50%; }
.try-mic { width: 72px; height: 72px; background: var(--on-photo); color: var(--on-photo-inv); display: grid; place-items: center; z-index: 2; opacity: 0; will-change: transform, opacity; }
.try-glow { width: 240px; height: 240px; background: radial-gradient(circle, rgba(var(--on-photo-rgb), .26), rgba(var(--on-photo-rgb), .08) 45%, rgba(var(--on-photo-rgb), 0) 70%); opacity: 0; pointer-events: none; }
.try-mic svg { width: 28px; height: 28px; }
.try-orb { top: var(--my, 56%); width: min(100%, 280px); aspect-ratio: 1; height: auto; border-radius: 0; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.try-said { position: absolute; left: 0; right: 0; top: calc(var(--my, 56%) + min(50%, 140px)); text-align: center; font-weight: 500; font-size: 20px; color: var(--on-photo); min-height: 28px; }
.try-said span { display: inline-block; opacity: 0; translate: 0 6px; filter: blur(4px); transition: opacity .35s var(--ease), translate .35s var(--ease), filter .35s var(--ease); }
.try-said span.in { opacity: 1; translate: 0 0; filter: none; }
.try-answer { position: absolute; inset: auto 0 0 0; }
.try-answer > * { opacity: 0; }
.try-feel { font-weight: 500; font-size: 15px; color: var(--on-photo-mute); }
.try-answer .ar { font-family: var(--quran); font-size: 40px; line-height: 1.8; text-align: right; color: var(--on-photo); margin-top: 6px; }
.try-answer .en { font-size: 19px; line-height: 1.4; font-weight: 500; color: var(--on-photo); }
.try-answer .ref { font-size: 15px; color: var(--on-photo-mute); }

/* ---------- Ask ---------- */
.ask-panel { position: relative; overflow: hidden; isolation: isolate; border-radius: 36px; padding: clamp(32px, 4vw, 56px); color: var(--on-photo); display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
/* the same blur as the How it works cards (.pcard.on-ph), so every photo panel reads alike */
.ask-bg { position: absolute; inset: -60px; z-index: -2; background: url("../photos/horizon.jpg") center / cover no-repeat; filter: blur(18px); }
/* the shade sits on the panel, outside the blurred photo: inside it, the blur would soften the shade at the edges and leave a pale rim */
.ask-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(var(--scrim-rgb), .16), rgba(var(--scrim-rgb), .32) 50%, rgba(var(--scrim-rgb), .58)); }
.ask h2 { font-size: clamp(34px, 3.6vw, 50px); max-width: 13em; }
.ask h2 .quiet { color: var(--on-photo-mute); }
.ask .body { color: var(--on-photo-soft); margin-top: 24px; max-width: 30em; }
.convo { display: flex; flex-direction: column; gap: 10px; min-height: 590px; justify-content: center; }
.convo > * { transition: opacity .6s var(--ease), translate .6s var(--ease), filter .6s var(--ease); }
.bubble { padding: 14px 20px; border-radius: 22px 22px 6px 22px; background: var(--on-photo); color: var(--on-photo-inv); font-weight: 500; font-size: 18px; max-width: 80%; opacity: 0; translate: 0 12px; }
.convo.q .bubble { opacity: 1; translate: 0 0; }
/* the orb, big, always there: it searches while Bayan looks, and the answer arrives beneath it */
.convo { align-items: center; text-align: left; }
.thinking { display: flex; flex-direction: column; align-items: center; align-self: center; }
.thinking canvas { width: clamp(220px, 26vw, 340px); height: clamp(220px, 26vw, 340px); transition: transform .8s var(--ease); }
.thinking span { font-weight: 500; font-size: 18px; color: var(--on-photo-soft); height: 24px; opacity: 0; transition: opacity .4s var(--ease); }
.convo.t .thinking span { opacity: 1; }
.convo.a .thinking span { opacity: 0; }
.convo.a .thinking canvas { transform: scale(.82); }
.convo .bubble { align-self: flex-end; }
.answer { width: 100%; max-width: 520px; min-height: 190px; opacity: 0; translate: 0 18px; filter: blur(6px); }
/* the orb shrinks a little and "Thinking…" fades when the answer comes, so the answer moves up into that space and the
   panel stays short (the orb keeps its full size) */
.answer { margin-top: -64px; }
.convo .bubble { margin-bottom: -24px; position: relative; z-index: 1; }
.convo.a .answer { opacity: 1; translate: 0 0; filter: none; }
.convo.out > * { opacity: 0; translate: 0 -10px; }
.found { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--on-photo-mute); }
.found svg { width: 18px; height: 18px; color: var(--on-photo); }
.answer .ar { font-family: var(--quran); font-size: 32px; line-height: 1.8; text-align: right; margin-top: 8px; }
.answer .en { font-size: 18px; line-height: 1.5; color: var(--on-photo-soft); margin-top: 6px; }

/* ---------- features ---------- */

/* a real photo */
.pcard.photo-card { grid-column: 1 / -1; height: 620px; color: var(--on-photo); justify-content: flex-end; align-items: flex-end; text-align: right; background: var(--web-photo-base) url("../photos/masjid.webp") 50% 62% / cover no-repeat; }
.pcard.photo-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(285deg, rgba(var(--scrim-rgb), .66) 0%, rgba(var(--scrim-rgb), .5) 26%, rgba(var(--scrim-rgb), 0) 52%); }
.photo-card .pc-title { max-width: 400px; font-size: 26px; }
.photo-card .pc-title span { color: var(--on-photo-soft); font-size: 18px; }

/* follow along: the app's AyahRow (number pill, Arabic, translation), word by word as it's recited */
.follow { margin-top: auto; margin-bottom: 72px; }
.arow .num { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--raised); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.arow .ar { font-family: var(--quran); font-size: 30px; line-height: 1.75; text-align: right; margin-top: 6px; }
.arow .ar .w { color: var(--dim); transition: color .3s var(--ease), background-color .3s var(--ease); border-radius: 6px; }
.arow .ar .w.said { color: var(--read); }
.arow .ar .w.on { color: var(--ink); background: var(--highlight); }
.arow .en { font-size: 16px; line-height: 1.5; color: var(--soft); margin-top: 6px; }
/* the acrylic disc: the app's mini player (MiniPlayer.tsx), a frosted see-through record with the photo as its label */
.acrylic { position: absolute; right: 24px; bottom: 24px; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; isolation: isolate;
  background: var(--obj-acrylic-android); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--obj-acrylic-side); border-top-color: var(--obj-acrylic-top); border-bottom-color: var(--obj-acrylic-bottom); }
.acrylic i { position: absolute; inset: 0; border-radius: 50%; animation: spin 6s linear infinite;
  background:
    radial-gradient(circle, var(--obj-centre) 0 2.6px, transparent 3px),
    radial-gradient(circle, transparent 0 12.4px, rgba(var(--on-photo-rgb), .08) 12.6px 13px, transparent 13.2px 14.6px, rgba(var(--on-photo-rgb), .08) 15px 15.4px, transparent 15.6px 20.6px, rgba(var(--on-photo-rgb), .08) 21px 21.4px, transparent 21.6px 26.6px, rgba(var(--on-photo-rgb), .08) 27px 27.4px, transparent 27.6px),
    conic-gradient(from 20deg, rgba(var(--on-photo-rgb), 0) 0deg, rgba(var(--on-photo-rgb), .22) 30deg, rgba(var(--on-photo-rgb), 0) 60deg, rgba(var(--on-photo-rgb), 0) 180deg, rgba(var(--on-photo-rgb), .14) 210deg, rgba(var(--on-photo-rgb), 0) 240deg); }
.acrylic b { position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 50%; background: url("../photos/gold.jpg") center / cover; }
.acrylic b::after { content: ""; position: absolute; left: 10.4px; top: 10.4px; width: 5.2px; height: 5.2px; border-radius: 50%; background: var(--obj-centre); }
.acrylic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--obj-progress) 0 38%, transparent 38%); -webkit-mask: radial-gradient(circle, transparent 30px, #000 30.5px); mask: radial-gradient(circle, transparent 30px, #000 30.5px); }

/* the record player: the app's Turntable, drawn the same way */
.deck { position: relative; overflow: hidden; translate: 0 -24px; }
.deck > div, .deck .vinyl > div { position: absolute; }
.deck .platter, .deck .vinyl, .deck .lbl, .deck .spindle, .deck .led { border-radius: 50%; }
.deck .vinyl svg { display: block; }
.deck .vinyl { animation: spin 1.8s linear infinite; animation-play-state: paused; }
.deck.playing .vinyl { animation-play-state: running; }
.deck .lbl { overflow: hidden; display: grid; place-items: center; }
.deck .lbl i { position: absolute; inset: -6px; background: url("../photos/gold.jpg") center / cover; filter: blur(6px); }
.deck .lbl span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.deck .lbl b { font-family: "SuraNames"; font-weight: 400; line-height: 1.25; }
.deck .lbl em { font-style: normal; font-weight: 500; font-size: 10px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.deck .spindle { width: 8px; height: 8px; }
.deck .grille { display: flex; flex-direction: column; justify-content: space-between; }
.deck .grille i { height: 2px; border-radius: 1px; }
.deck .led { width: 6px; height: 6px; }
.deck .arm svg { display: block; }
@keyframes spin { to { rotate: 360deg; } }
/* PlayDisc: the white play disc (learn/parts.tsx) */
.play-disc { position: absolute; bottom: 0; width: 64px; height: 64px; border-radius: 999px; background: var(--on-photo); color: var(--on-photo-inv); display: grid; place-items: center; transition: transform .2s var(--ease); }
.play-disc svg { width: 24px; height: 24px; }
.play-disc .i-play, .play-disc.still svg { margin-left: 3px; }
.play-disc .i-pause, .play-disc.on .i-play { display: none; }
.play-disc.on .i-pause { display: block; }
.play-disc:active { transform: scale(.94); }

/* word by word: the app's word rows, hairlines between */
/* each word is a small card, one shade up from the card it sits on (fills, not lines), as in the library */
.words { margin-top: auto; display: grid; gap: 8px; }
.words li { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-radius: 18px; background: var(--panel2); }
.words span { display: flex; flex-direction: column; font-size: 15px; color: var(--mute); }
.words b { font-weight: 500; font-size: 18px; color: var(--ink); }
.words i { font-style: normal; font-family: var(--quran); font-size: 30px; line-height: 1.4; }

/* recite to find: the thinking orb, listening (OrbStage in ReciteView) */
.recite { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 8px; }
.recite canvas { width: 200px; height: 200px; }
.recite .line { font-weight: 500; font-size: 22px; margin-top: 8px; transition: opacity .3s; }
.recite .sub { color: var(--mute); font-size: 16px; margin-top: 4px; max-width: 22em; transition: opacity .3s; }

/* share: the app's share card (ShareSheet.tsx): radius 28, the photo at blur 22 under a .3 scrim, padding 24 */
.share-card { position: relative; overflow: hidden; isolation: isolate; width: 250px; min-height: 300px; border-radius: 28px; padding: 24px 24px 22px; color: var(--card-ink); display: flex; flex-direction: column; }
/* its own photo (an orange sky over hills), so it doesn't repeat Read the ayahs */
.share-card .bg { position: absolute; inset: -60px; z-index: -1; background: url("../photos/hills-sky.jpg") center / cover; filter: blur(22px); }
.share-card .bg::after { content: ""; position: absolute; inset: 0; background: rgba(var(--scrim-rgb), .3); }
.share-card .ref { margin: 0; color: var(--card-soft); font-size: 15px; }
.share-card .en { font-weight: 500; font-size: 15.5px; line-height: 1.42; margin: auto 0; padding: 16px 0; }
.share-card .mk { display: flex; align-items: center; gap: 6px; font-size: 17px; letter-spacing: -0.01em; }
.share-card .mk svg { width: 18px; height: 18px; }

/* lessons: the app's lesson card (learn/parts.tsx): the photo at blur 18, dimmed to .5, the mark, the play disc */
.lesson-card { position: relative; overflow: hidden; isolation: isolate; width: 100%; height: 280px; border-radius: 24px; padding: 20px; color: var(--on-photo); display: flex; flex-direction: column; justify-content: flex-end; }
.lesson-card .bg { position: absolute; inset: -60px; z-index: -1; background: url("../photos/qurtubi.jpg") center / cover; filter: blur(18px) brightness(.5); }
.lesson-card .mk { position: absolute; left: 20px; top: 20px; width: 24px; height: 24px; color: var(--on-photo); }
.lesson-card .play-disc { left: 50%; top: 42%; bottom: auto; translate: -50% -50%; }
.lesson-card .meta { font-size: 14px; color: var(--on-photo-soft); }
.lesson-card .t { font-weight: 500; font-size: 22px; line-height: 1.2; margin-top: 2px; }
.lesson-card .by { font-size: 15px; color: var(--on-photo-mute); margin-top: 2px; }

/* ---------- principles: the title holds on the left; the four rules are cards on the right, like the feature cards ---------- */
.vows-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.vows-head { position: sticky; top: 140px; }
.vows-head .body { margin-top: 24px; max-width: 24em; }
.vows { display: grid; gap: 16px; }
.vows li { padding: 32px; border-radius: var(--r-card); background: var(--fill); }
/* as you scroll, each rule comes in: the one crossing the middle of the screen is lit, the others wait in the dark */
.js .vows li { opacity: .28; transform: scale(.98); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .vows li.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .vows li { opacity: 1; transform: none; transition: none; } }
/* the questions start well clear of the rules, so the two left-and-right sections never read as one */
.principles { padding-bottom: calc(var(--gap) * 2); }
.vnum { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--raised); font-weight: 500; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
/* each principle opens with its glass icon (rehal, khatam, kitab, lantern), in place of a number */
.vicon { display: block; width: 96px; height: 96px; margin: -10px 0 -6px -10px; }
.vicon img { width: 100%; height: 100%; }
.vows h3 { margin-top: 20px; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.vows p { color: var(--soft); font-size: 18px; line-height: 1.5; margin-top: 12px; max-width: 30em; text-wrap: balance; }

/* ---------- faq: the library's layout. Heading and one line on the left, the questions on the right ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.faq-head .body { margin-top: 20px; max-width: 22em; }
.faq-head .body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; font-weight: 500; font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .plus { position: relative; width: 36px; height: 36px; flex-shrink: 0; border-radius: 18px; background: var(--panel2); transition: transform .3s var(--ease), background-color .3s; }
.qa summary .plus::before, .qa summary .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 1px; background: var(--ink); transition: transform .3s var(--ease), background-color .3s; }
.qa summary .plus::after { transform: rotate(90deg); }
.qa details[open]:not(.closing) summary .plus { background: var(--ink); }
.qa details[open]:not(.closing) summary .plus::before, .qa details[open]:not(.closing) summary .plus::after { background: var(--black); }
.qa details[open]:not(.closing) summary .plus::after { transform: rotate(0deg); }
.qa .faq-answer { padding: 0 64px 28px 0; }
.qa .faq-answer p { color: var(--read); font-size: 19px; line-height: 29px; text-wrap: pretty; }
@media (max-width: 920px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 560px) { .qa .faq-answer { padding-right: 0; } .qa summary { font-size: 20px; line-height: 26px; } }

/* ---------- closing: a photo panel, as in the library ---------- */
.closing { padding: 0 0 var(--gap); }
.on-photo { position: relative; overflow: hidden; border-radius: 36px; color: var(--on-photo); isolation: isolate; }
/* the closing: first light on mountain peaks under a navy sky, blurred like the How it works cards (its own photo; no other panel uses it) */
.on-photo .photo { position: absolute; inset: -60px; z-index: -2; background: url("../photos/peaks.jpg") center 35% / cover no-repeat; filter: blur(18px); }
/* a light shade, as on the How it works cards, so the photo keeps its colour */
.on-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(var(--scrim-rgb), .16), rgba(var(--scrim-rgb), .32) 50%, rgba(var(--scrim-rgb), .58)); }
.closing-inner { display: grid; justify-items: center; text-align: center; gap: 28px; padding: 96px var(--g) 88px; }
.epigraph { display: grid; gap: 6px; justify-items: center; }
.epigraph .quran { font-family: var(--quran); font-size: clamp(40px, 6vw, 64px); line-height: 1.6; color: var(--on-photo); }
.epigraph .en { font-size: 18px; line-height: 24px; color: var(--on-photo-soft); }
.epigraph .ref { font-size: 15px; line-height: 20px; color: var(--on-photo-mute); margin: 0; }
.closing h2 { color: var(--on-photo); max-width: 820px; }
.closing .lead { color: var(--on-photo-soft); max-width: 640px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; }
.closing .ctas { margin-top: 4px; }
@media (hover: hover) { .btn.photo-quiet:hover { background: rgba(var(--on-photo-rgb), 0.26); opacity: 1; } }

/* ---------- footer: as in the library ---------- */
.footer { border-top: 1px solid var(--line); padding: 72px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr auto; gap: 40px; align-items: start; }
.lockup { display: block; height: 28px; aspect-ratio: 1538 / 404; background: var(--ink); -webkit-mask: url("../brand/lockup-horizontal.svg") left center / contain no-repeat; mask: url("../brand/lockup-horizontal.svg") left center / contain no-repeat; }
.small { color: var(--mute); font-size: 15px; line-height: 1.4; }
.foot-tag { font-weight: 500; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); margin-top: -4px; }
/* the Bayan lockup, full width, across the bottom of the footer */
.bigmark { display: block; width: 100%; aspect-ratio: 1538 / 404; margin-top: 72px; background: var(--ink);
  -webkit-mask: url("../brand/lockup-horizontal.svg") center / contain no-repeat; mask: url("../brand/lockup-horizontal.svg") center / contain no-repeat; }
.footer h4 { font-weight: 500; font-size: 16px; color: var(--mute); margin-bottom: 16px; }
.footer li { margin-bottom: 14px; font-size: 18px; }
.footer li a { color: var(--ink); }
@media (hover: hover) { .footer li a:hover { color: var(--soft); } }
.soon { color: var(--mute); }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-bottom p { max-width: 46em; }
.footer-bottom a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

/* ---------- motion ---------- */
.rise { animation: rise 1s var(--ease) both; }
.hero-copy .rise:nth-child(2) { animation-delay: 0.08s; }
.hero-copy .rise:nth-child(3) { animation-delay: 0.16s; }
.hero-copy .rise:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes phone-in { from { opacity: 0; translate: 0 80px; } }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.pcards .reveal:nth-child(3n+2) { transition-delay: 0.08s; }
.pcards .reveal:nth-child(3n) { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .hero-phone, .acrylic i, .deck .vinyl { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .say .w.off { opacity: 1; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1040px) {
  .links { display: none; }
  .split { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .feel-copy { max-width: 620px; }
  .chips { justify-content: center; }
  .head-row { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .ask-panel { grid-template-columns: 1fr; }
  .pcards.three, .pcards.grid { grid-template-columns: 1fr 1fr; }
  .vows-grid { grid-template-columns: 1fr; gap: 24px; }
  .vows-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer .about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --g: 16px; --gap: 56px; }
  body { font-size: 17px; }
  .pill { height: 52px; padding-left: 14px; }
  .brand span { display: none; }
  .brand { margin-right: 2px; }
  .hero { padding-top: 120px; }
  .lede { margin-top: 20px; }
  .btn { height: 56px; }
  .hero .ctas, .closing .ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; margin-inline: auto; }
  .hero .ctas .btn, .closing .ctas .btn { justify-content: center; }
  .hero-stage { height: min(150vw, 600px); margin-top: 48px; }
  .hero-phone { --w: min(84vw, 340px); }
  .chips button { height: 40px; padding: 0 16px; font-size: 17px; }
  .pcards.three, .pcards.grid { grid-template-columns: 1fr; }
  .pcard { height: 460px; padding: 24px; }
  .ask-panel { border-radius: 28px; padding: 32px 20px; }
  .bubble { max-width: 92%; }
  .pcard.photo-card { height: 520px; background-position: 40% 70%; justify-content: flex-start; align-items: flex-start; text-align: left; }
  .pcard.photo-card::after { background: linear-gradient(180deg, rgba(var(--scrim-rgb), .72), rgba(var(--scrim-rgb), .6) 34%, rgba(var(--scrim-rgb), 0) 62%); }
  .vows li { padding: 24px; border-radius: 28px; }
  .footer-bottom { flex-direction: column; }
  .closing-inner { padding: 64px 20px 56px; }
  .on-photo { border-radius: 28px; }
}



/* switching theme: the whole page cross-fades as one picture (View Transitions); without it, everything switches at once */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); mix-blend-mode: normal; }
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }


/* ---------- privacy and terms: a quiet reading page ---------- */
.doc { padding: 160px 0 var(--gap); }
.doc-kicker { color: var(--mute); font-weight: 500; font-size: 16px; }
.doc h1 { font-size: clamp(40px, 6vw, 72px); margin-top: 10px; }
.doc-date { color: var(--mute); font-size: 15px; margin-top: 14px; }
.doc-lede { font-size: clamp(20px, 2vw, 24px); line-height: 1.45; color: var(--read); margin-top: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); text-wrap: pretty; }
.doc h2 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.02em; margin-top: 48px; }
.doc main p, .doc .wrap > p, .doc li { color: var(--read); font-size: 18px; line-height: 1.6; text-wrap: pretty; }
.doc .wrap > p { margin-top: 14px; }
.doc ul { margin-top: 14px; display: grid; gap: 10px; }
.doc li { padding-left: 22px; position: relative; }
.doc li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--mute); }
.doc strong { color: var(--ink); font-weight: 500; }
/* details still to fill in */
mark.fill { background: var(--highlight); color: var(--ink); border-radius: 6px; padding: 0 5px; }

/* ---------- about: as quiet as Qaf's: a small title, plain paragraphs, then the people as a compact grid ---------- */
main.about { padding-top: 168px; }
main.about .about-title { font-size: 24px; letter-spacing: -0.015em; margin: 0 0 24px; }
main.about .wrap > p { margin-top: 18px; color: var(--read); font-size: 19px; line-height: 1.55; }
main.about .wrap > p strong { color: var(--ink); font-weight: 500; }
.doc .people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px 24px; margin-top: 40px !important; }
.doc .people li { padding: 0; }
.doc .people li::before { display: none; }
.people a { display: flex; align-items: center; gap: 14px; }
.people img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; filter: grayscale(1); background: var(--fill); }
.people span { display: flex; flex-direction: column; font-size: 15px; color: var(--mute); line-height: 1.35; }
.people b { font-weight: 500; font-size: 16px; color: var(--ink); }

/* ---------- wrapping: short blocks break into even lines (never one long line and a short stub) ---------- */
h1, h2, h3, .lede, .body, .lead, .say, .pc-title, .pc-title span, .hint, .vows p, .vows-head .body, .foot-tag,
.closing .lead, .epigraph .en, .ask .body, .found, .try-answer .en, .on-photo-text .en, .doc-lede, .small, .qa summary, .tr { text-wrap: balance; }
.doc .wrap > p, .doc li, main.about .wrap > p { text-wrap: pretty; }
.lede { max-width: 31em; }

/* Ask follows straight on from the How it works cards, at the same 16px the cards keep between them */
.how { padding-bottom: 16px; }

/* ---------- the quote card: how the site quotes the Qur'an ----------
   Built like the app's share card (ShareSheet.tsx): a photo blurred behind (22), a scrim so white text passes on its
   lightest patch, radius 28. The Arabic leads, in KFGQPC Uthmanic Hafs, then the translation, then the source. Text is
   always copied from the app's own data, never typed. Use it wherever the site quotes an ayah on its own. */
.qcard { position: relative; overflow: hidden; isolation: isolate; margin: 32px 0; padding: clamp(28px, 4vw, 44px); border-radius: 28px; color: var(--on-photo); }
.qcard .qbg { position: absolute; inset: -60px; z-index: -1; background: var(--qphoto, url("../photos/verse.jpg")) center / cover no-repeat; filter: blur(22px); }
.qcard .qbg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--scrim-rgb), .42), rgba(var(--scrim-rgb), .6)); }
.qcard .ar { font-family: var(--quran); font-size: clamp(28px, 3.2vw, 38px); line-height: 1.9; text-align: right; color: var(--on-photo); }
.qcard blockquote { margin: 14px 0 0; font-weight: 500; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.45; color: var(--on-photo); text-wrap: balance; }
.qcard figcaption { margin-top: 14px; font-size: 15px; color: var(--on-photo-mute); }


/* ---------- footer: the download codes. Rounded dots and eyes, the Bayan mark in the middle, on a white tile (codes
   only scan dark-on-light, so the tile stays white in both themes) ---------- */
.foot-qrs { display: flex; gap: 16px; }
/* anything marked hidden stays hidden, even where a rule gives it a display (the download links, until they exist) */
[hidden] { display: none !important; }
.qrtile { cursor: default; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.qrtile span { display: block; width: 120px; height: 120px; padding: 10px; border-radius: 20px; background: var(--web-qr-tile); margin-bottom: 10px; transition: transform .25s var(--ease); }
.qrtile span svg { display: block; width: 100%; height: 100%; }
.qrtile b { font-weight: 500; font-size: 16px; color: var(--ink); }
.qrtile small { font-size: 14px; color: var(--mute); }
@media (max-width: 1040px) { .footer-grid { grid-template-columns: 1fr 1fr; } .foot-get { grid-column: 1 / -1; } }

/* ---------- hero: one button and a quiet line ---------- */
.cta-note { margin-top: 14px; color: var(--mute); font-size: 15px; }
.hero .ctas .btn, .closing .ctas .btn { padding: 0 32px; }

/* ---------- the beta sheet, like the app's Sheet: the panel fill on a dim backdrop, a handle, radius 28 ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 80; background: var(--backdrop); opacity: 0; transition: opacity .35s var(--ease); }
.sheet-back.open { opacity: 1; }
.beta-sheet { position: fixed; z-index: 81; left: 50%; bottom: 0; width: min(520px, 100%); translate: -50% 100%; padding: 12px 28px calc(28px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--panel); transition: translate .5s var(--ease); }
.beta-sheet.open { translate: -50% 0; }
/* phones: the sheet sits on top of the keyboard, never under it (--kb, set from the visual viewport in site.js), and is
   never taller than the screen left above the keyboard (--vvh); with the keyboard up, the extra bottom padding goes */
@media (max-width: 640px) {
  .beta-sheet { bottom: var(--kb, 0px); max-height: calc(var(--vvh, 100dvh) - 8px); overflow-y: auto; overscroll-behavior: contain; transition: translate .5s var(--ease), bottom .25s var(--ease); }
  .beta-sheet.kb-open { padding-bottom: 16px; border-radius: 28px; }
  .beta-sheet.kb-open .beta-fine { display: none; }
}
@media (min-width: 641px) { .beta-sheet { bottom: 50%; translate: -50% calc(50% + 40px); opacity: 0; border-radius: 28px; transition: translate .5s var(--ease), opacity .35s var(--ease); } .beta-sheet.open { translate: -50% 50%; opacity: 1; } }
.handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 18px; }
.beta-sheet h2 { font-size: 30px; letter-spacing: -0.025em; }
.beta-sub { color: var(--soft); font-size: 17px; line-height: 1.45; margin-top: 8px; text-wrap: balance; }
.beta-sheet input[type=email] { width: 100%; height: 56px; margin-top: 22px; padding: 0 20px; border: 0; border-radius: 28px; background: var(--field); color: var(--ink); font: 400 18px var(--sans); }
.beta-sheet input[type=email]::placeholder { color: var(--mute); }
/* no white rings in the sheet: focus shows as a fill (the field lifts a shade), as everywhere else on the site; the done
   panel takes focus only so a screen reader reads it, and shows nothing */
.beta-sheet :focus, .beta-sheet :focus-visible { outline: none; }
.beta-sheet input[type=email]:focus { background: var(--raised); }
.beta-sheet .btn:focus-visible { filter: brightness(.88); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.beta-sheet .btn[type=submit] { width: 100%; justify-content: center; margin-top: 16px; height: 56px; }
.beta-sheet .btn[disabled] { opacity: .5; }
.beta-msg { min-height: 22px; margin-top: 10px; font-size: 15px; color: var(--soft); text-align: center; }
.beta-fine { font-size: 14px; color: var(--mute); text-align: center; }
.beta-fine a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.beta-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.beta-links .btn { justify-content: center; height: 52px; font-size: 17px; }
.beta-links .btn svg { width: 20px; height: 20px; }
/* after "Join the beta": the form melts away, the thinking orb sends it, then the Bayan mark rises in a gold light */
.beta-stage { position: relative; transition: min-height .45s var(--ease); }
.beta-stage > form, .beta-wait, .beta-done { transition: opacity .35s var(--ease), filter .35s var(--ease), translate .45s var(--ease); }
.beta-stage.leaving > form { opacity: 0; filter: blur(8px); translate: 0 -8px; }
.beta-wait, .beta-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.beta-wait { opacity: 0; }
.beta-wait.in { opacity: 1; }
/* big enough to read as the moment it is: the orb while it sends, the gold mark when it is done (a step smaller on phones) */
.beta-wait canvas { width: 240px; height: 240px; }
@media (max-width: 640px) { .beta-wait canvas { width: 200px; height: 200px; } }
.beta-wait p { font-weight: 500; font-size: 17px; color: var(--soft); margin-top: 4px; }
.beta-done { opacity: 0; }
.beta-done.in { opacity: 1; }
.beta-mark { width: 184px; height: 184px; margin-bottom: 14px; }
@media (max-width: 640px) { .beta-mark { width: 150px; height: 150px; } }
/* the 3D glass mark (rendered in the studio) arrives with a little turn and settles */
.beta-mark img { display: block; width: 100%; height: 100%; scale: .5; opacity: 0; rotate: -20deg; transition: scale .8s cubic-bezier(.2, 1.4, .4, 1), opacity .4s var(--ease), rotate .9s var(--ease); }
.beta-done.in .beta-mark img { scale: 1; opacity: 1; rotate: 0deg; }
/* the glass icons come twice: as set for the dark theme, and for light with the colour a step deeper */
/* (!important: other rules give these images a display of their own, e.g. the waitlist mark's img { display: block }) */
.t-light, [data-theme="light"] .t-dark { display: none !important; }
[data-theme="light"] .t-light { display: block !important; }
.beta-done h2, .beta-done .beta-sub, .beta-done .btn { opacity: 0; translate: 0 10px; transition: opacity .5s var(--ease), translate .6s var(--ease); }
.beta-done.in h2 { opacity: 1; translate: 0 0; transition-delay: .35s; }
.beta-done.in .beta-sub { opacity: 1; translate: 0 0; transition-delay: .5s; }
.beta-done.in .btn { opacity: 1; translate: 0 0; transition-delay: .65s; }
.beta-done .beta-sub b { font-weight: 500; color: var(--ink); }
.beta-done .btn { margin-top: 24px; height: 52px; padding: 0 32px; font-size: 17px; }
/* nothing on the done screen is ever squeezed: each part keeps its size, and the sheet grows to hold them (site.js) */
.beta-wait > *, .beta-done > * { flex-shrink: 0; }
.beta-done { justify-content: center; padding: 8px 0 12px; }
@media (prefers-reduced-motion: reduce) { .beta-sheet, .sheet-back, .beta-stage, .beta-stage > form, .beta-wait, .beta-done, .beta-done *, .beta-mark * { transition: none !important; } }

/* ---------- the header light moves: it drifts across the top and swells, slowly enough to feel calm ---------- */
.hero-photo .img { animation: header-light 14s ease-in-out infinite alternate; will-change: transform, opacity; }
@keyframes header-light {
  0%   { transform: translate3d(-7%, -3%, 0) scale(1.05); opacity: var(--web-header-opacity); }
  50%  { transform: translate3d(5%, 4%, 0) scale(1.22); opacity: calc(var(--web-header-opacity) + var(--web-header-swell)); }
  100% { transform: translate3d(8%, -2%, 0) scale(1.1); opacity: var(--web-header-opacity); }
}
@media (prefers-reduced-motion: reduce) { .hero-photo .img { animation: none; } }

/* ---------- How it works, cards 2 and 3: one story with card 1. The ayah is shown whole and its words light in turn, as
   the app's follow-along does; then what Ibn Kathir wrote about that same ayah rises in on card 3 ---------- */
[data-read] .ar .w { transition: color .35s var(--ease), background-color .35s var(--ease); border-radius: 8px; padding: 0 2px; }
.js [data-read] .ar .w { color: rgba(var(--on-photo-rgb), .42); }
.js [data-read] .ar .w.said { color: var(--on-photo); }
.js [data-read] .ar .w.on { color: var(--on-photo); background: rgba(var(--on-photo-rgb), .18); }
.js [data-read] .on-photo-text > *, .js [data-hear] .on-photo-text > * { transition: opacity .6s var(--ease), translate .6s var(--ease), filter .6s var(--ease); }
.js [data-read]:not(.show) .on-photo-text > *, .js [data-hear]:not(.show) .on-photo-text > * { opacity: 0; translate: 0 10px; filter: blur(4px); }
.js [data-read].show .en, .js [data-read].show .ref { transition-delay: 0s; }
.js [data-read].show:not(.translated) .en, .js [data-read].show:not(.translated) .ref { opacity: 0; translate: 0 8px; }
.js [data-hear].show .en { transition-delay: .15s; } .js [data-hear].show .ref { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-read] .on-photo-text > *, .js [data-hear] .on-photo-text > * { opacity: 1 !important; translate: none !important; filter: none !important; }
  .js [data-read] .ar .w { color: var(--on-photo); }
}

/* ---------- v2 (/v2): the "Say how you feel" story is the hero; the phone moves into How it works ---------- */
.hero-try { position: relative; display: flex; flex-direction: column; height: clamp(480px, 42vw, 600px); margin: 24px auto 0; text-align: left; }
.hero-try .try-orb { width: min(80%, 380px); }
.hero-try .try-said { font-size: 24px; top: calc(var(--my, 50%) + 140px); }
.hero-try .try-chips .chip { height: 48px; padding: 0 22px; font-size: 20px; }
.hero-try .try-mic { width: 150px; height: 150px; }
.hero-try .try-mic svg { width: 58px; height: 58px; }
.hero-try .try-glow { width: 340px; height: 340px; }
/* the ayah lands in the middle of the stage, where the orb was: no empty band above it */
/* the answer hangs from a fixed point a clear step below the button and grows downwards, so a long ayah never rides up
   into the button and the feeling's name reads as the start of the answer, not as part of the button */
.hero-try .try-answer { left: 50%; right: auto; top: 72px; bottom: auto; width: min(100%, 780px); translate: -50% 0; text-align: center; }
.hero-try .try-answer .ar { text-wrap: balance; }
.hero-try .try-feel { margin-bottom: 4px; }
.hero-try .try-answer .ar { font-size: clamp(36px, 4.2vw, 56px); text-align: center; }
.hero-try .try-answer .en { font-size: clamp(20px, 1.9vw, 26px); }
@media (max-width: 640px) { .hero-try { height: 520px; } .hero-try .try-chips .chip { height: 46px; font-size: 18px; padding: 0 18px; } .hero-try .try-mic { width: 80px; height: 80px; } }
.phone-card { justify-content: flex-start; }
.phone.in-card { --w: 300px; position: absolute; left: 50%; top: 112px; translate: -50% 0; }
@media (max-width: 380px) { .phone.in-card { --w: 260px; } }
@media (max-width: 640px) { .hero-try { height: 520px; padding: 24px; margin-top: 40px; } .hero-try .try-chips .chip { height: 42px; font-size: 17px; padding: 0 16px; } }

/* card 3 while card 2 reads: Bayan at work (the app's thinking orb and one line), then the scholar's words take its place */
.hear-wait { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: opacity .5s var(--ease), scale .5s var(--ease); }
.hear-wait canvas { width: 168px; height: 168px; }
.hear-wait p { font-weight: 500; font-size: 17px; color: var(--on-photo-soft); }
[data-hear].show .hear-wait { opacity: 0; scale: .9; }
html:not(.js) .hear-wait { display: none; }
@media (prefers-reduced-motion: reduce) { .hear-wait { display: none; } }

/* the footer's notes: care first (Bayan doesn't replace a doctor, a therapist or a scholar), then the sources */
.foot-notes { display: grid; gap: 10px; max-width: 46em; }
.foot-notes .care { color: var(--soft); }

/* about: a person lifts when you point at them; the photo tilts in, and an arrow says it opens their page */
.people img { transition: transform .45s cubic-bezier(.34,1.5,.64,1), border-radius .45s var(--ease); }
.people b { display: inline-flex; align-items: center; gap: 6px; }
.people .go { width: 14px; height: 14px; rotate: -45deg; opacity: 0; translate: -6px 0; transition: opacity .3s var(--ease), translate .3s var(--ease); }
@media (hover: hover) {
  .people a:hover img { transform: scale(1.08) rotate(-4deg); border-radius: 16px; }
  .people a:hover .go { opacity: 1; translate: 0 0; }
}
.people a:focus-visible .go { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .people img, .people .go { transition: none; } }

/* v2: the story plays on the hero's own background (no photo card), so it takes the page's colours in both themes */
.hero-try .try-chips .chip { background: rgba(var(--ink-rgb), .24); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.hero-try .try-chips .chip.picked { background: var(--ink); color: var(--black); }
.hero-try .try-mic { background: var(--ink); color: var(--black); }
.hero-try .try-glow { background: radial-gradient(circle, rgba(var(--ink-rgb), .16), rgba(var(--ink-rgb), .05) 45%, rgba(var(--ink-rgb), 0) 70%); }
.hero-try .try-said, .hero-try .try-answer .ar, .hero-try .try-answer .en { color: var(--ink); }
.hero-try .try-feel, .hero-try .try-answer .ref { color: var(--mute); }

/* v2: pulled up, so the story shows on the first screen without scrolling */
.hero-try { margin-top: 0; height: clamp(460px, 40vw, 560px); }

/* the feelings travel up to the mic and vanish at its edge */
.try-chips { pointer-events: none; }

/* v2/v3: a smaller heading, so the story below it shows in full on the first screen */

/* the moving pills: solid fills, no blur behind them and no transitions, so they glide without flickering
   (a backdrop blur re-renders every frame under a moving element, and a transition fights the per-frame motion) */
.try-chips .chip { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; transition: none !important; background: rgba(var(--on-photo-rgb), .26); backface-visibility: hidden; }
.hero-try .try-chips .chip { background: rgba(var(--ink-rgb), .24); }

/* ---------- v4 (/v4): only the orb, listening, then the answer. No pills, no mic ---------- */
[data-orb-only] .try-chips, [data-orb-only] .try-mic, [data-orb-only] .try-glow { display: none; }
[data-orb-only] .try-orb { width: min(80%, 420px); }
[data-orb-only] .try-said { top: calc(var(--my, 50%) + min(40vw, 420px) / 2 + 24px); }
/* v4: the whole hero (heading, button, orb, spoken line, ayah) fits in one view */
.hero-try[data-orb-only] { height: clamp(380px, 34vw, 460px); }
[data-orb-only] .try-orb { width: min(70%, 300px); }
[data-orb-only] .try-said { top: calc(var(--my, 50%) + min(70vw, 300px) / 2 + 12px); }
.hero-try[data-orb-only] { margin-top: 0; height: clamp(440px, 38vw, 520px); }
[data-orb-only] .try-orb { width: min(80%, 380px); }
[data-orb-only] .try-said { top: calc(var(--my, 50%) + min(80vw, 380px) / 2 - 28px); font-size: 22px; }

/* v2: the hero heading stays the biggest words on the page (above the 60px section headings) */

/* the hero heading, the same on every version: the largest text on the page, a step above the 60px section headings */
.hero h1, .hero:has(.hero-try) h1, .hero:has([data-orb-only]) h1 { font-size: clamp(42px, 5vw, 72px); }
.hero .lede, .hero:has(.hero-try) .lede { font-size: clamp(18px, 1.5vw, 20px); }

/* v2: the hero text keeps exactly the main page's spacing (consistency); the orb sits a clear step below the button.
   In light and dark, the orb's bloom into the ayah stays small, so no large ghost spreads across the page */
.hero-try[data-orb-only] { margin-top: 48px; }

/* the visual under the hero text sits a little higher, on both versions */
.hero-stage { margin-top: 40px; }
.hero-try[data-orb-only] { margin-top: 12px; }

/* the spacing tuner (?tune or Shift+T; a design tool) */
#tune { position: fixed; z-index: 200; right: 16px; bottom: 16px; width: 300px; padding: 16px; border-radius: 20px; background: var(--panel); color: var(--ink); font-size: 14px; }
#tune .tune-h { font-weight: 500; margin-bottom: 10px; }
#tune label { display: grid; grid-template-columns: 1fr 52px; align-items: center; gap: 4px 8px; margin-bottom: 10px; }
#tune label span { grid-column: 1 / -1; color: var(--soft); }
#tune input { width: 100%; accent-color: var(--ink); }
#tune b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
#tune .tune-b { display: flex; gap: 8px; margin-top: 6px; }
#tune button { flex: 1; height: 38px; border-radius: 19px; background: var(--panel2); font-weight: 500; }
#tune button[data-copy] { background: var(--ink); color: var(--black); }

/* hero spacing, set with the tuner (main, 28 Nov): the text spacing is shared by every version */
.hero { padding-top: 133px; }
.hero .lede { margin-top: 23px; }
.hero .ctas { margin-top: 29px; }
.hero-stage { margin-top: 35px; }
@media (max-width: 640px) { .hero { padding-top: 120px; } }

/* hero spacing, set with the tuner (v2, 28 Nov) */
.hero:has([data-orb-only]) { padding-top: 143px; }
.hero:has([data-orb-only]) .lede { margin-top: 27px; }
.hero:has([data-orb-only]) .ctas { margin-top: 35px; }
.hero-try[data-orb-only] { margin-top: -11px; }
@media (max-width: 640px) { .hero:has([data-orb-only]) { padding-top: 120px; } }

/* ---------- explore: a phone in the middle playing the app's real screens; the features open on either side.
   On the page's own ground, with the same type as the cards elsewhere (titles 22, lines 17) ---------- */
.explore { padding: 0 0 var(--gap); }
.ex-head { text-align: center; margin-bottom: 56px; }
.ex-head .body { margin-top: 16px; }
.ex-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 48px; align-items: center; }
.ex-col { display: grid; gap: 12px; }
.ex-item { border-radius: var(--r-card); background: var(--fill); transition: background-color .3s var(--ease); }
.ex-item button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; text-align: left; font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
.ex-item .plus { position: relative; width: 36px; height: 36px; flex: none; border-radius: 18px; background: var(--panel2); transition: background-color .3s; }
.ex-item .plus::before, .ex-item .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 1px; background: var(--ink); transition: transform .35s var(--ease), background-color .3s; }
.ex-item .plus::after { transform: rotate(90deg); }
.ex-item.open .plus { background: var(--ink); }
.ex-item.open .plus::before, .ex-item.open .plus::after { background: var(--black); }
.ex-item.open .plus::after { transform: rotate(0deg); }
.ex-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.ex-body > p { overflow: hidden; min-height: 0; padding: 0 24px; color: var(--mute); font-size: 17px; line-height: 1.45; text-wrap: balance; opacity: 0; transition: opacity .35s var(--ease); }
.ex-item.open .ex-body { grid-template-rows: 1fr; }
.ex-item.open .ex-body > p { opacity: 1; padding-bottom: 22px; margin-top: -10px; }
@media (hover: hover) { .ex-item:not(.open):hover { background: var(--raised); } }
.ex-phone { --w: 330px; }
/* one pixel of overscan on every side: the phone's width is fractional, and without it a sliver of the screen's ground shows at the edge */
.ex-phone .screen > * { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); object-fit: cover; object-position: top; opacity: 0; transition: opacity .45s var(--ease); }
.ex-phone .screen > .on { opacity: 1; }
[data-theme="dark"] .ex-phone .screen > .l, [data-theme="light"] .ex-phone .screen > .d { display: none; }
@media (max-width: 1040px) {
  .ex-grid { grid-template-columns: 1fr; gap: 12px; justify-items: center; }
  .ex-phone { order: -1; margin-bottom: 28px; }
  .ex-col { width: min(100%, 560px); }
}
@media (max-width: 640px) { .ex-phone { --w: min(78vw, 300px); } .ex-item button { font-size: 20px; padding: 18px 20px; } .ex-body > p { padding: 0 20px; } }
@media (prefers-reduced-motion: reduce) { .ex-body, .ex-body > p, .ex-phone .screen > * { transition: none; } }

/* explore: it plays itself. The open feature carries a thin progress bar; when it fills, the next one opens.
   On phones: a row of phones you can swipe, the neighbours peeking in, and the open feature's words below */
.ex-item { position: relative; }
.ex-item .ex-bar { position: absolute; right: 12px; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; background: var(--line); opacity: 0; transition: opacity .3s var(--ease); }
.ex-item .ex-bar i, .ex-caption .ex-bar i { position: absolute; left: 0; top: 0; width: 100%; height: 0; border-radius: inherit; background: var(--ink); }
.ex-item.open .ex-bar { opacity: 1; }
.ex-item.open button { padding-right: 32px; }
.ex-item.open .plus { opacity: 0; }
/* keyboard focus shows as the card's hover fill, not a white ring */
.ex-item button:focus-visible { outline: none; }
.ex-item:has(button:focus-visible) { background: var(--raised); }
.ex-track, .ex-caption { display: none; }
@media (max-width: 1040px) {
  .ex-grid { display: block; }
  .ex-col, .ex-grid > figure.ex-phone { display: none; }
  .ex-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px calc(50% - var(--w, 260px) / 2) 24px; margin: 0 calc(-1 * var(--g)); --w: min(68vw, 280px); }
  .ex-track::-webkit-scrollbar { display: none; }
  .ex-track .phone { --w: min(68vw, 280px); scroll-snap-align: center; flex: none; opacity: .45; transform: scale(.92); transition: opacity .4s var(--ease), transform .4s var(--ease); }
  .ex-track .phone.on { opacity: 1; transform: none; }
  .ex-caption { display: block; position: relative; text-align: center; max-width: 30em; margin: 0 auto; padding-bottom: 18px; }
  .ex-caption .t { font-weight: 500; font-size: 22px; line-height: 1.25; }
  .ex-caption .l { color: var(--mute); font-size: 17px; line-height: 1.45; margin-top: 6px; text-wrap: balance; }
  .ex-caption .ex-bar { position: absolute; left: 50%; bottom: 0; width: 64px; height: 3px; translate: -50% 0; border-radius: 2px; background: var(--line); overflow: hidden; }
  .ex-caption .ex-bar i { height: 100%; width: 0; }
}
@media (max-width: 1040px) { .ex-grid { display: block !important; } .ex-track { width: calc(100% + 2 * var(--g)); max-width: 100vw; box-sizing: border-box; } }
@media (max-width: 1040px) { .ex-track .ex-phone .screen > * { opacity: 1; } }

/* explore on phones: every phone shows its still frame at once; a clip sits over it and fades in when it plays */
@media (max-width: 1040px) {
  .ex-track { scroll-behavior: auto; }
  .ex-track .phone { transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .ex-track .ex-phone .screen { background: var(--black) var(--poster) top / cover no-repeat; }
}

/* the 404: a glass compass over the heading (made in the icon studio, studio/) */
.lost .nf { display: block; width: 160px; height: 160px; margin: 0 0 8px -12px; }
.lost .nf img { width: 100%; height: 100%; }
