/*
 * ruwh.net — scenes
 *
 * Colour comes from the app (ghidaa/src/theme/tokens.ts): brand green #2A7B54,
 * deep green #1E5940, supporting green #45A87A, the icon's warm ivory, and the
 * app's muted gold #8A6A2A for annotation marks only. Most of the page is
 * neutral; green is used for emphasis and one full scene.
 *
 * Type: each platform's Arabic system face (SF Arabic on Apple devices). The
 * app's Thmanyah licence forbids web embedding. Hierarchy comes from scale and
 * weight; Arabic is never letter-spaced.
 *
 * Motion is CSS only and scroll-driven where supported; every effect has a
 * static state, and prefers-reduced-motion removes all movement. src/site.js
 * adds the journey's screen changes and the mobile menu.
 */

:root {
  color-scheme: light dark;

  --page: #fbfaf6;
  --paper: #ffffff;
  --mist: #f1f0ea;
  --warm: #f4efe3;
  --ink: #111814;
  --ink-2: #5a625c;
  --green: #22704b;
  --brand: #2a7b54;
  --deep: #1e5940;
  --support: #45a87a;
  --gold: #8a6a2a;
  --night: #0a0f0c;
  --on-dark: #f6f3ea;
  --on-dark-2: rgba(246, 243, 234, 0.76);
  --on-dark-accent: #9fddbb;
  --rule: rgba(17, 24, 20, 0.12);
  --screen-bg: #f3f6f4;
  --shadow: 0 1px 1px rgba(17, 24, 20, 0.05), 0 28px 60px -32px rgba(17, 24, 20, 0.45);
  --focus: #22704b;

  --font:
    system-ui, -apple-system, 'SF Arabic', 'Segoe UI', 'Noto Sans Arabic', 'Noto Kufi Arabic',
    Tahoma, 'Geeza Pro', sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 52px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b110e;
    --paper: #0f1612;
    --mist: #131b16;
    --warm: #151d17;
    --ink: #eef2ee;
    --ink-2: #a4afa8;
    --green: #86d3a9;
    --brand: #2a7b54;
    --deep: #0f2e20;
    --gold: #c9a24e;
    --night: #020403;
    --rule: rgba(238, 242, 238, 0.14);
    --screen-bg: #e9eeea;
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.4), 0 28px 60px -30px rgba(0, 0, 0, 0.9);
    --focus: #86d3a9;
  }
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
.scene__lead,
.hero__subtitle,
.journey__text {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.line {
  display: block;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

.screen {
  width: 100%;
  border-radius: 9% / 4.2%;
  background: var(--screen-bg);
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--green);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  font-weight: 700;
}

.soon,
.store-text {
  color: var(--ink-2);
  font-size: 0.92rem;
}

.download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
}

/* Apple's badge, unmodified; clear space kept around it. */
.badge {
  display: inline-block;
  margin: 6px;
  border-radius: 9px;
}

.badge__img {
  width: auto;
  height: 50px;
}

@media (prefers-reduced-motion: no-preference) {
  .badge,
  .localnav__cta {
    transition: transform 160ms var(--ease-out);
  }

  .badge:active,
  .localnav__cta:active {
    transform: scale(0.97);
  }
}

/* Bright app screens on a dark page: take the glare off without changing them. */
@media (prefers-color-scheme: dark) {
  .screen,
  .journey__screens {
    filter: brightness(0.96);
  }
}

/* ── Scene 1: local navigation ─────────────────────────────────────────── */

.localnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--page);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .localnav {
    background: color-mix(in srgb, var(--page) 78%, transparent);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    backdrop-filter: saturate(1.8) blur(20px);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .localnav {
    background: var(--page);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.localnav.is-scrolled,
.localnav.is-open {
  border-bottom-color: var(--rule);
}

.localnav__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1080px;
  min-height: var(--nav-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.localnav__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.localnav__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.localnav__menu {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline-start: auto;
}

.localnav__links {
  display: flex;
  gap: 24px;
}

.localnav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
  opacity: 0.82;
}

.localnav__link:hover {
  opacity: 1;
}

.localnav__soon {
  display: none;
}

/* A 44px target around a 32px pill. */
.localnav__cta {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 16px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.localnav__cta::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 6px 0;
  border-radius: 999px;
  background: var(--brand);
}

.localnav__cta:hover {
  color: #fff;
}

.localnav__cta:hover::before {
  background: var(--deep);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.menu-toggle__close,
.menu-toggle[aria-expanded='true'] .menu-toggle__open {
  display: none;
}

.menu-toggle[aria-expanded='true'] .menu-toggle__close {
  display: inline;
}

@media (max-width: 959px) {
  .localnav__bar {
    gap: 4px;
  }

  .localnav__cta {
    margin-inline-start: auto;
  }

  .js .menu-toggle {
    display: inline-flex;
  }

  html:not(.js) .localnav__bar {
    flex-wrap: wrap;
  }

  html:not(.js) .localnav__menu {
    order: 5;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
  }

  html:not(.js) .localnav__links {
    flex-wrap: wrap;
  }

  .js .localnav__menu {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    min-height: calc(100svh - var(--nav-h));
    padding: 8px var(--gutter) 28px;
    background: var(--page);
    border-bottom: 1px solid var(--rule);
  }

  .js .localnav__menu.is-open {
    display: flex;
  }

  .js .localnav__links {
    flex-direction: column;
    gap: 0;
  }

  .js .localnav__link {
    min-height: 56px;
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 1;
  }

  .js .localnav__soon {
    display: block;
    padding-top: 12px;
  }

  .js .localnav__soon .soon {
    font-size: 0.95rem;
  }
}

/* ── Scene 2–3: the journey (hero + tour around one screen) ───────────── */

.journey {
  position: relative;
  background: var(--page);
}

.journey__hero {
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 96px);
  text-align: center;
}

.hero__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  font-weight: 700;
}

.hero__icon {
  width: clamp(40px, 3.6vw, 52px);
  height: auto;
  border-radius: 23%;
  box-shadow: 0 6px 18px -8px rgba(17, 24, 20, 0.4);
}

.hero__title {
  margin-top: clamp(14px, 1.6vw, 22px);
  font-size: clamp(3.1rem, 0.6rem + 5vw, 5.6rem);
  font-weight: 800;
  line-height: 1.08;
}

/* Each authored line stays whole; on phones the size follows the width so
   «مصحفك وذكرك.» always fits on one line. */
.hero__title .line {
  white-space: nowrap;
}

@media (max-width: 699px) {
  .hero__title {
    font-size: 11.2vw;
  }
}

.hero__subtitle {
  max-width: 24em;
  margin: clamp(18px, 2vw, 26px) auto 0;
  color: var(--ink-2);
  font-size: clamp(1.15rem, 0.95rem + 0.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1.55;
}

.journey__hero .download {
  margin-top: clamp(28px, 3vw, 40px);
}

.hero__trust {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.journey__stage {
  display: none;
}

.journey__steps {
  display: grid;
  gap: clamp(88px, 11vw, 140px);
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(96px, 12vw, 160px);
  text-align: center;
}

.journey__verb {
  font-size: clamp(4rem, 1.6rem + 8vw, 9.5rem);
  font-weight: 800;
  line-height: 1.05;
}

.journey__text {
  max-width: 19em;
  margin: 16px auto 0;
  color: var(--ink-2);
  font-size: clamp(1.15rem, 0.98rem + 0.6vw, 1.5rem);
  line-height: 1.65;
}

.journey__inline {
  width: min(72vw, 340px);
  margin: 44px auto 0;
}

/* Static layout on wide screens: each step beside its own screenshot. */
@media (min-width: 960px) {
  html:not(.motion) .journey .journey__hero,
  html:not(.motion) .journey .journey__step {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
    max-width: 1120px;
    margin-inline: auto;
    text-align: start;
  }

  html:not(.motion) .journey .journey__steps {
    padding-inline: var(--gutter);
  }

  html:not(.motion) .journey .journey__hero {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 48px;
  }

  html:not(.motion) .journey .journey__step {
    grid-template-areas:
      'verb shot'
      'text shot';
    row-gap: 0;
  }

  html:not(.motion) .journey .journey__verb {
    grid-area: verb;
    align-self: end;
  }

  html:not(.motion) .journey .journey__text {
    grid-area: text;
    align-self: start;
  }

  html:not(.motion) .journey .journey__step .journey__inline {
    grid-area: shot;
  }

  html:not(.motion) .journey .journey__inline {
    margin: 0;
    justify-self: center;
  }

  html:not(.motion) .journey .hero__subtitle,
  html:not(.motion) .journey .journey__text {
    margin-inline: 0;
  }

  html:not(.motion) .journey .download {
    justify-content: flex-start;
  }
}

/* Live: one sticky screen; the hero and the verbs pass beside (or under) it. */
.motion .journey .journey__stage {
  display: block;
  position: sticky;
  z-index: 2;
}

.motion .journey .journey__inline {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Inactive verbs wait at half strength (still ≥3:1 as large text); their
   sentence appears only when the step reaches the reading line. */
.motion .journey .journey__verb,
.motion .journey .journey__text {
  transition: opacity 420ms var(--ease-out);
}

.motion .journey .journey__step:not(.is-active) .journey__verb {
  opacity: 0.5;
}

.motion .journey .journey__step:not(.is-active) .journey__text {
  opacity: 0;
}

.journey__screens {
  position: relative;
  width: var(--stage-w);
  aspect-ratio: 1320 / 2868;
  margin-inline: auto;
  border-radius: 9% / 4.2%;
  background: var(--screen-bg);
  box-shadow: var(--shadow);
}

.journey__screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  transform: scale(1.025);
  transition:
    opacity 520ms var(--ease-out),
    transform 760ms var(--ease-out);
}

.journey__screen.is-active {
  opacity: 1;
  transform: none;
}

.journey__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: none;
  border-radius: 0;
}

@media (max-width: 959px) {
  .motion .journey {
    --stage-w: min(52vw, calc((48svh - 24px) / 2.17));
  }

  .motion .journey .journey__hero {
    padding-bottom: 28px;
  }

  .motion .journey .journey__stage {
    top: var(--nav-h);
    padding-block: 10px 8px;
    background: var(--page);
  }

  /* Verbs slide under the screen; fade them out instead of cutting them. */
  .motion .journey .journey__stage::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 100%;
    height: 40px;
    background: linear-gradient(var(--page), color-mix(in srgb, var(--page) 0%, transparent));
    pointer-events: none;
  }

  .motion .journey .journey__steps {
    gap: 0;
    padding-top: 8px;
  }

  .motion .journey .journey__step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 26svh;
  }
}

@media (min-width: 960px) {
  .motion .journey {
    --stage-w: min(380px, calc((100vh - var(--nav-h) - 80px) / 2.17));
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    column-gap: clamp(48px, 6vw, 96px);
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .motion .journey::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 calc(50% - 50vw);
    background: var(--page);
  }

  .motion .journey .journey__hero,
  .motion .journey .journey__steps {
    grid-column: 1;
    padding-inline: 0;
    text-align: start;
  }

  .motion .journey .journey__hero {
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - var(--nav-h));
    padding-block: 32px;
  }

  .motion .journey .hero__subtitle,
  .motion .journey .journey__text {
    margin-inline: 0;
  }

  .motion .journey .download {
    justify-content: flex-start;
  }

  .motion .journey .journey__steps {
    grid-row: 2;
    gap: 0;
    padding-block: 0 20vh;
  }

  .motion .journey .journey__step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 86vh;
  }

  .motion .journey .journey__stage {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    top: calc(var(--nav-h) + (100vh - var(--nav-h) - var(--stage-w) * 2.17) / 2);
    margin-top: calc((100vh - var(--nav-h) - var(--stage-w) * 2.17) / 2);
  }
}

/* ── Scenes 4: shared ──────────────────────────────────────────────────── */

.scene {
  padding-block: clamp(96px, 12vw, 176px);
  padding-inline: var(--gutter);
}

.scene__head {
  max-width: 980px;
  margin-inline: auto;
  text-align: center;
}

.scene__title {
  font-size: clamp(2.6rem, 1rem + 5.6vw, 6rem);
  font-weight: 800;
  line-height: 1.12;
}

.scene__lead {
  max-width: 32em;
  margin: clamp(20px, 2.4vw, 32px) auto 0;
  color: var(--ink-2);
  font-size: clamp(1.1rem, 0.96rem + 0.55vw, 1.42rem);
  line-height: 1.7;
}

.scene__lead strong {
  color: var(--ink);
  font-weight: 700;
}

/* Story A — the Mushaf: bright, one large page at full contrast. */
.scene--mushaf {
  background: var(--mist);
}

.mushaf__art {
  width: min(76vw, 420px);
  margin: clamp(56px, 7vw, 96px) auto 0;
}

/* Story B — listening: deep green, the player beside the words. */
.scene--listen {
  background: var(--deep);
  color: var(--on-dark);
  --focus: var(--on-dark);
}

.scene--listen .eyebrow {
  color: var(--on-dark-accent);
}

.scene--listen .scene__lead {
  max-width: 24em;
  color: var(--on-dark-2);
}

.scene__source {
  margin-top: 28px;
  color: var(--on-dark-2);
  font-size: 0.88rem;
}

.listen__grid {
  display: grid;
  gap: clamp(56px, 6vw, 80px);
  max-width: 1120px;
  margin-inline: auto;
  text-align: center;
}

.listen__copy .scene__title {
  margin-top: 12px;
}

.listen__art {
  justify-self: center;
  width: min(72vw, 360px);
}

@media (min-width: 960px) {
  .listen__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: center;
    text-align: start;
  }

  .listen__copy .scene__title .line {
    white-space: nowrap;
  }

  .scene--listen .scene__lead {
    margin-inline: 0;
  }

  .listen__art {
    justify-self: end;
  }
}

/* Story C — the day: the statistics screen, its notes drawn to what they
   describe, and the reminder sheet set beside it. */
.scene--day {
  background: var(--warm);
}

.day__art {
  display: grid;
  gap: 40px;
  max-width: 1120px;
  margin: clamp(56px, 7vw, 96px) auto 0;
}

.day__screen {
  width: min(100%, 520px);
  justify-self: center;
}

.day__screen .screen {
  border-radius: 34px;
}

.day__notes {
  display: grid;
  gap: 28px;
  max-width: 520px;
  justify-self: center;
}

.day__detail {
  display: grid;
  gap: 24px;
  justify-items: center;
  max-width: 520px;
  justify-self: center;
}

.screen--sheet {
  width: min(70vw, 260px);
  border-radius: 30px;
}

.note {
  position: relative;
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.65;
}

.note strong {
  display: block;
  color: var(--ink);
}

@media (min-width: 1000px) {
  .day__art {
    grid-template-columns: minmax(0, 1fr) 520px minmax(0, 1fr);
    align-items: start;
    gap: 0 10px;
  }

  .day__screen {
    grid-column: 2;
    grid-row: 1;
  }

  /* Notes about the screen sit level with the parts they describe: the
     period tabs near the top, the day's status card near the bottom. */
  .day__notes--screen {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    max-width: none;
    padding-block: 9% 17%;
  }

  .day__notes--screen .note {
    max-width: calc(15em + 60px);
    padding-inline-end: 60px;
    text-align: end;
  }

  /* A hairline from the note to the screen's edge, inside the note's box. */
  .day__notes--screen .note::after {
    content: '';
    position: absolute;
    top: 0.85em;
    inset-inline-end: 0;
    width: 48px;
    height: 1px;
    background: var(--gold);
  }

  .day__detail {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-items: start;
    margin-inline-start: 48px;
  }

  .day__detail .note {
    max-width: 16em;
  }
}

/* Story D — privacy: the loudest statement on the page, in the quietest room. */
.scene--privacy {
  padding-block: clamp(120px, 15vw, 220px) clamp(96px, 11vw, 160px);
  background: var(--night);
  color: var(--on-dark);
  --focus: var(--on-dark);
}

.privacy__inner {
  max-width: 1080px;
  margin-inline: auto;
}

.scene--privacy .eyebrow {
  color: var(--on-dark-accent);
}

.statement {
  margin-top: 20px;
  font-size: clamp(3.4rem, 0.8rem + 10.6vw, 10rem);
  font-weight: 800;
  line-height: 1.04;
}

.statement__line {
  display: block;
}

.privacy__body {
  max-width: 24em;
  margin-top: clamp(32px, 4vw, 56px);
  color: var(--on-dark-2);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.65;
}

.privacy__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  color: var(--on-dark);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--on-dark-accent);
}

/* Scene 5 — gallery: one leading screen, then a quieter strip. */
.scene--gallery {
  padding-inline: 0;
  padding-bottom: clamp(56px, 6vw, 88px);
  background: var(--page);
}

.scene__title--gallery {
  padding-inline: var(--gutter);
  text-align: center;
}

.gallery__scroller {
  margin-top: clamp(48px, 6vw, 80px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.gallery__scroller::-webkit-scrollbar {
  display: none;
}

.gallery__scroller:focus-visible {
  outline-offset: -4px;
}

.gallery__list {
  display: flex;
  align-items: flex-end;
  gap: clamp(20px, 2.4vw, 32px);
  width: max-content;
  margin-inline: auto;
  padding: 8px var(--gutter) 28px;
}

.gallery__item {
  width: clamp(170px, 15vw, 210px);
  scroll-snap-align: start;
}

.gallery__item--lead {
  width: clamp(240px, 26vw, 360px);
}

.gallery__item:nth-child(odd):not(.gallery__item--lead) {
  margin-bottom: 64px;
}

.gallery__caption {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 0.92rem;
  text-align: center;
}

/* Scene 6 — closing: the heart from the icon, at scale, on the white it was
   drawn on; the last line set from the Arabic reading edge. The scene stays
   light in dark mode too: the page ends in daylight. */
.scene--closing {
  display: grid;
  align-content: center;
  min-height: min(92svh, 860px);
  overflow: clip;
  background: #ffffff;
  color: #111814;
  --focus: #22704b;
}

.closing__grid {
  display: grid;
  gap: 24px;
  align-items: center;
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}

.closing__title {
  font-size: clamp(2.2rem, 10vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.closing__title .line {
  white-space: nowrap;
}

.scene--closing .download {
  margin-top: clamp(32px, 4vw, 48px);
}

.scene--closing .soon {
  color: #5a625c;
}

.closing__art {
  order: -1;
  justify-self: center;
  width: min(56vw, 300px);
  margin-bottom: -12px;
}

.closing__art img {
  width: 100%;
}

@media (min-width: 960px) {
  .closing__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 48px;
  }

  .closing__title {
    font-size: clamp(3rem, 0.6rem + 4vw, 4.6rem);
    text-align: start;
  }

  .scene--closing .download {
    justify-content: flex-start;
  }

  .closing__art {
    order: 0;
    justify-self: end;
    width: min(46vw, 660px);
    margin-bottom: 0;
    margin-inline-end: 0;
  }
}

/* ── Scene 7: FAQ and footer ───────────────────────────────────────────── */

.faq {
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
}

.faq__title {
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.faq__list {
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--rule);
}

.faq__item {
  border-bottom: 1px solid var(--rule);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding-block: 16px;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__chevron {
  width: 10px;
  height: 10px;
  flex: none;
  translate: 0 -3px;
  /* Physical sides on purpose: a down-pointing chevron does not mirror. */
  border-right: 1.8px solid var(--ink-2);
  border-bottom: 1.8px solid var(--ink-2);
  rotate: 45deg;
}

.faq__item[open] .faq__chevron {
  translate: 0 3px;
  rotate: 225deg;
}

.faq__a {
  max-width: 40em;
  padding-bottom: 24px;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.footer {
  padding: 28px var(--gutter) 36px;
  background: var(--mist);
  color: var(--ink-2);
  font-size: 0.84rem;
}

.footer__inner {
  display: grid;
  gap: 8px;
  max-width: 980px;
  margin-inline: auto;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer__sources,
.footer__legal {
  max-width: 38em;
}

.not-found__icon {
  width: 96px;
  height: auto;
  border-radius: 23%;
}

.not-found__main {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 20px;
  min-height: 72vh;
  padding: 72px var(--gutter);
  text-align: center;
}

/* ── Motion ────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  /* Page load: the copy settles, then the screens rise into place. */
  .journey__intro > * {
    animation: settle 700ms var(--ease-out) both;
  }

  .journey__intro > :nth-child(2) {
    animation-delay: 60ms;
  }

  .journey__intro > :nth-child(3) {
    animation-delay: 120ms;
  }

  .journey__intro > :nth-child(n + 4) {
    animation-delay: 180ms;
  }

  .journey__stage {
    animation: rise 1000ms var(--ease-out) 200ms both;
  }

  .faq__chevron {
    transition:
      rotate 240ms var(--ease-out),
      translate 240ms var(--ease-out);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(64px);
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 32%;
    }

    /* Each refusal lights up as it reaches the middle of the screen. */
    .statement__line {
      animation: light linear both;
      animation-timeline: view();
      animation-range: entry 70% cover 48%;
    }
  }
}

/* Movement only: product imagery is never shown faded. */
@keyframes reveal {
  from {
    transform: translateY(64px);
  }
}

/* Starts at half strength so every line stays readable (≥3:1) throughout. */
@keyframes light {
  from {
    opacity: 0.5;
  }
}

@media (forced-colors: active) {
  .localnav__cta::before {
    background: ButtonFace;
    border: 1px solid ButtonText;
  }

  .localnav__cta {
    color: ButtonText;
  }
}
