/* مدارج — the public website. Tokens mirror app/lib/core/theme/tokens.dart;
   the page walks through a day as the app does: ivory morning, emerald
   daytime, navy night. */

@font-face { font-family: 'Thmanyah'; src: url('../fonts/thmanyah-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah'; src: url('../fonts/thmanyah-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Thmanyah'; src: url('../fonts/thmanyah-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'SakkalSaad'; src: url('../fonts/sakkal-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'SakkalSaad'; src: url('../fonts/sakkal-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'UthmanTaha'; src: url('../fonts/uthman-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --emerald: #0e3b33;
  --emerald-bright: #1b5245;
  --emerald-deep: #0b1a28;
  --ivory: #f6f1e6;
  --card: #fffcf5;
  --ink: #1d2b28;
  --ink-muted: #6f6a59;
  --hairline: #e9dfc9;
  --amber: #e9c88d;
  --warn-text: #9a6a1e;
  --night: #0d1a31;
  --night-deep: #070d1a;
  --night-top: #16294a;
  --text-night: #f3ebdc;
  --text-night-muted: #a9afb8;
  --gold: #d9b66f;
  --gold-light: #e2c27e;
  --gold-pale: #f3e3bd;

  --font-ui: 'Thmanyah', 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'SakkalSaad', 'Thmanyah', serif;
  --font-quran: 'UthmanTaha', 'SakkalSaad', serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --step: clamp(28px, 5vw, 56px);
  --ease: 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.skip { position: absolute; inset-inline-start: 16px; top: -80px; background: var(--gold); color: var(--emerald); padding: 8px 16px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }

.display { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }

/* ---- Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 18px; border: 1px solid transparent;
  font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), background var(--ease);
}
.btn-gold {
  background: linear-gradient(90deg, #c79b4b, #f0d497);
  color: var(--emerald-deep);
  box-shadow: 0 10px 28px rgb(199 155 75 / 0.28);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgb(199 155 75 / 0.38); }
.btn-line { border-color: rgb(226 194 126 / 0.45); color: var(--gold-light); }
.btn-line:hover { border-color: var(--gold-light); }
.btn-emerald { background: var(--emerald); color: var(--card); }
.btn-emerald:hover { background: var(--emerald-bright); }
.btn[aria-disabled='true'], .btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.btn small { font-weight: 500; font-size: 0.86rem; opacity: 0.8; }

/* ---- Night surfaces ----------------------------------------------------------- */

.night {
  color: var(--text-night);
  background:
    url('../img/stars.svg') 0 0 / 420px 420px,
    linear-gradient(180deg, var(--night-top) 0%, var(--night) 45%, var(--night-deep) 100%);
}

/* ---- Top bar ------------------------------------------------------------------ */

.top { display: flex; align-items: center; gap: 28px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold-light); }
.brand svg { width: 38px; height: 38px; }
.brand b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.top nav { margin-inline-start: auto; }
.top nav ul { display: flex; gap: 4px; align-items: center; }
.top nav a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 14px; text-decoration: none; opacity: 0.84; transition: opacity var(--ease), background var(--ease); }
.top nav a:hover { opacity: 1; background: rgb(255 255 255 / 0.06); }
.top nav a.pill { border: 1px solid rgb(226 194 126 / 0.45); color: var(--gold-light); opacity: 1; margin-inline-start: 8px; }
.top-light nav a:hover { background: rgb(14 59 51 / 0.06); }
.top-light .brand { color: var(--emerald); }
.top-light nav a.pill { border-color: var(--emerald); color: var(--emerald); }

/* ---- Hero --------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding-bottom: calc(var(--step) * 4 + 40px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 6vw, 80px); align-items: center; padding-top: clamp(16px, 4vw, 48px); }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 15vw, 10.5rem); line-height: 0.95; color: var(--gold-light); margin-block: 6px 22px; }
.hero .lead { font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.9; max-width: 30ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .facts { margin-top: 22px; color: var(--text-night-muted); font-size: 0.98rem; }

.verse { font-family: var(--font-quran); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 2; color: var(--text-night); }
.verse-ref { display: block; font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-night-muted); line-height: 1.6; }

.hero-phone { position: relative; display: grid; place-items: center; padding-block: 24px; }
.arches { position: absolute; inset: -6% -18% -30%; width: auto; height: 136%; color: var(--gold); pointer-events: none; }
.arches path { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1800ms cubic-bezier(0.3, 0.6, 0.2, 1) forwards; }
.arches path:nth-child(1) { opacity: 0.42; animation-delay: 150ms; }
.arches path:nth-child(2) { opacity: 0.26; animation-delay: 350ms; }
.arches path:nth-child(3) { opacity: 0.14; animation-delay: 550ms; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.phone {
  position: relative; width: min(100%, 300px); aspect-ratio: 540 / 1169;
  border-radius: 46px; padding: 9px; background: #0a0f18;
  box-shadow: 0 0 0 1px rgb(226 194 126 / 0.22), 0 40px 80px rgb(0 0 0 / 0.45);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 38px; }
@keyframes rise { from { opacity: 0; transform: translateY(36px) scale(0.97); } }

/* ---- The day: three stations, each band entered by a flight of steps --------- */

.band { position: relative; padding-block: clamp(56px, 9vw, 112px); }
/* The top edge of a band is a staircase (مدارج) climbing over the one before.
   The outer points sit outside the box, so its own straight edges do the
   cutting and no hairline shows where two colours meet. */
.band-steps::before {
  content: ''; position: absolute; inset-inline: 0; bottom: calc(100% - 1px); height: calc(var(--step) * 4);
  clip-path: polygon(-5% 105%, -5% 75%, 25% 75%, 25% 50%, 50% 50%, 50% 25%, 75% 25%, 75% 0, 105% 0, 105% 105%);
}
.band-morning { background: var(--ivory); }
.band-morning.band-steps::before { background: var(--ivory); }
.band-day { background: var(--emerald); color: var(--text-night); }
.band-day.band-steps::before { background: var(--emerald); }
.band-evening { background: var(--night); color: var(--text-night); }
.band-evening.band-steps::before { background: var(--night); }
/* Room at the foot of a band for the next one's steps. */
.band-morning, .band-day { padding-bottom: calc(clamp(56px, 9vw, 112px) + var(--step) * 4); }
.band-day, .band-evening { padding-top: clamp(24px, 4vw, 48px); }

.intro { max-width: 46ch; margin-bottom: clamp(40px, 6vw, 72px); }
.intro h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--emerald); line-height: 1.25; margin-bottom: 10px; }
.night .intro h2, .band-evening .intro h2 { color: var(--gold-light); }
.intro p { color: var(--ink-muted); }
.night .intro p { color: var(--text-night-muted); }

.station { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 7vw, 96px); align-items: center; max-width: 940px; margin-inline: auto; }
.station-flip { grid-template-columns: auto minmax(0, 1fr); }
.station-flip .station-text { order: 2; }
.station .when { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: 1; color: var(--gold); }
.band-morning .when { color: #b98e3f; }
.station h3 { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.4; margin-block: 14px 12px; }
.station p { max-width: 46ch; }
.station p + p { margin-top: 12px; }
.band-day .station p, .band-evening .station p { color: rgb(243 235 220 / 0.86); }
.station .phone { width: min(62vw, 270px); }

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

.more { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 9vw, 120px); }
/* Continues the evening band without a seam. */
.more.night { background: url('../img/stars.svg') 0 0 / 420px 420px, linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%); }
.more-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 7vw, 96px); align-items: center; }
.pair { position: relative; width: min(78vw, 400px); aspect-ratio: 400 / 600; }
.pair .phone { position: absolute; width: 58%; }
.pair .phone:first-child { inset-inline-start: 0; top: 0; }
.pair .phone:last-child { inset-inline-end: 0; bottom: 0; }
.features > div { padding-block: 22px; border-top: 1px solid rgb(226 194 126 / 0.2); }
.features > div:last-child { border-bottom: 1px solid rgb(226 194 126 / 0.2); }
.features dt { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--gold-light); line-height: 1.5; }
.features dd { color: rgb(243 235 220 / 0.84); max-width: 54ch; }

/* ---- Privacy ------------------------------------------------------------------ */

.privacy { background: var(--night-deep); color: var(--text-night); padding-block: clamp(64px, 9vw, 120px); position: relative; overflow: hidden; }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.privacy h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.3; color: var(--gold-light); }
.privacy .note { margin-top: 16px; color: var(--text-night-muted); max-width: 36ch; }
.crescent { width: 76px; height: 76px; margin-bottom: 22px; color: var(--gold-pale); filter: drop-shadow(0 0 26px rgb(243 227 189 / 0.35)); }
.promises li { position: relative; padding: 16px 0; padding-inline-start: 34px; border-bottom: 1px solid rgb(243 235 220 / 0.1); }
.promises li:first-child { padding-top: 0; }
.promises li:first-child::before { top: 13px; }
.promises li::before {
  content: ''; position: absolute; inset-inline-start: 4px; top: 29px; width: 10px; height: 10px;
  background: var(--gold); transform: rotate(45deg); border-radius: 2px;
}

/* ---- Download ----------------------------------------------------------------- */

.download { padding-block: clamp(64px, 9vw, 120px); }
.download-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 72px); align-items: start; }
.release {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 22px;
  padding: clamp(22px, 4vw, 36px); box-shadow: 0 18px 44px rgb(11 26 40 / 0.07);
}
.release-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.release-head img { width: 76px; height: 76px; border-radius: 18px; }
.release-head h3 { font-family: var(--font-display); font-size: 2rem; color: var(--emerald); line-height: 1.3; }
.release-head p { color: var(--ink-muted); font-size: 0.95rem; line-height: 1.6; }
.release .btn { width: 100%; }
.release .alt { margin-top: 14px; font-size: 0.95rem; color: var(--ink-muted); }
.release .alt a { color: var(--emerald); font-weight: 500; }
.news { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.news h4 { margin: 0 0 8px; font-size: 1.02rem; color: var(--emerald); }
.news li { position: relative; padding-inline-start: 22px; }
.news li::before { content: ''; position: absolute; inset-inline-start: 2px; top: 0.85em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.release details { margin-top: 20px; font-size: 0.9rem; color: var(--ink-muted); }
.release summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.sum { direction: ltr; text-align: left; font-family: Consolas, 'Courier New', monospace; font-size: 0.8rem; overflow-wrap: anywhere; line-height: 1.6; background: var(--ivory); border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.status { color: var(--warn-text); }

.install h3 { font-family: var(--font-display); font-size: 1.9rem; color: var(--emerald); margin-bottom: 8px; }
.install ol { counter-reset: n; }
.install li { counter-increment: n; position: relative; padding: 14px 0; padding-inline-start: 58px; border-bottom: 1px solid var(--hairline); }
.install li::before {
  content: counter(n); position: absolute; inset-inline-start: 0; top: 14px;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--emerald); color: var(--gold-light); font-weight: 700; line-height: 1;
}
.install .aside { margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: rgb(233 200 141 / 0.26); color: #6b4c14; font-size: 0.98rem; }

/* ---- Feedback ----------------------------------------------------------------- */

.feedback { padding-block: 0 clamp(64px, 9vw, 120px); }
.feedback-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 72px); align-items: start; }
.form { display: grid; gap: 18px; background: var(--card); border: 1px solid var(--hairline); border-radius: 22px; padding: clamp(22px, 4vw, 36px); }
.form label, .form legend { font-weight: 500; color: var(--emerald); padding: 0; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.kinds label { position: relative; cursor: pointer; }
.kinds input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kinds span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--ink); font-weight: 400; transition: background var(--ease), border-color var(--ease), color var(--ease); }
.kinds input:checked + span { background: var(--emerald); border-color: var(--emerald); color: var(--card); }
.kinds input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }
.form textarea, .form input[type='text'] {
  width: 100%; margin-top: 8px; padding: 12px 16px; min-height: 52px;
  background: #fff; border: 1px solid var(--hairline); border-radius: 16px; line-height: 1.9;
}
.form textarea { min-height: 168px; resize: vertical; }
.form textarea:focus, .form input[type='text']:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgb(14 59 51 / 0.12); }
.form .hint { font-size: 0.9rem; color: var(--ink-muted); font-weight: 400; }
.form .trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .result { min-height: 1.9em; }
.form .result.ok { color: var(--emerald); font-weight: 500; }
.form .result.bad { color: var(--warn-text); }

/* ---- Footer ------------------------------------------------------------------- */

.foot { background: var(--emerald); color: var(--text-night); padding-block: 44px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; }
.foot .brand b { font-size: 1.6rem; }
.foot p { opacity: 0.8; font-size: 0.96rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-inline-start: auto; }
.foot ul a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; text-decoration: none; opacity: 0.86; }
.foot ul a:hover { opacity: 1; text-decoration: underline; }

/* ---- Guide -------------------------------------------------------------------- */

.guide-head { background: linear-gradient(225deg, #174a3e, var(--emerald-deep)); color: var(--text-night); padding-bottom: clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.guide-head h1, .guide-head h1 + p { animation: settle 1000ms var(--soft) 150ms both; }
.guide-head h1 + p { animation-delay: 320ms; }
.guide-head h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 7vw, 4.6rem); line-height: 1.25; color: var(--gold-light); margin-top: clamp(16px, 4vw, 40px); }
.guide-head p { max-width: 52ch; opacity: 0.86; margin-top: 8px; }
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-block: clamp(36px, 6vw, 72px) clamp(64px, 9vw, 120px); align-items: start; }
.toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-inline-start: 2px solid var(--hairline); text-decoration: none; color: var(--ink-muted); transition: color var(--ease), border-color var(--ease); }
.toc a:hover { color: var(--emerald); }
.toc a.here { color: var(--emerald); border-color: var(--gold); font-weight: 700; }
.chapter { padding-bottom: clamp(36px, 5vw, 56px); margin-bottom: clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--hairline); max-width: 68ch; }
.chapter:last-child { border-bottom: 0; margin-bottom: 0; }
.chapter h2 { font-family: var(--font-display); font-size: clamp(2rem, 4.4vw, 2.7rem); color: var(--emerald); line-height: 1.35; margin-bottom: 10px; }
.chapter h3 { font-size: 1.12rem; color: var(--emerald); margin-top: 26px; margin-bottom: 4px; }
.chapter p + p { margin-top: 10px; }
.chapter ol { counter-reset: n; margin-top: 12px; }
.chapter ol li { counter-increment: n; position: relative; padding: 8px 0; padding-inline-start: 46px; }
.chapter ol li::before {
  content: counter(n); position: absolute; inset-inline-start: 0; top: 10px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--emerald); color: var(--gold-light); font-size: 0.9rem; font-weight: 700; line-height: 1;
}
.chapter ul { margin-top: 10px; }
.chapter ul li { position: relative; padding: 5px 0; padding-inline-start: 24px; }
.chapter ul li::before { content: ''; position: absolute; inset-inline-start: 4px; top: 1.05em; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); border-radius: 1px; }
.chapter b { color: var(--emerald); }
.chapter .tip { margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: rgb(14 59 51 / 0.06); }
.chapter .care { margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: rgb(233 200 141 / 0.26); color: #6b4c14; }
.chapter .care b { color: inherit; }
.chapter-fig { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 48px); align-items: start; }
.chapter-fig .phone { width: 200px; border-radius: 34px; padding: 7px; }
.chapter-fig .phone img { border-radius: 28px; }
.faq dt { font-weight: 700; color: var(--emerald); margin-top: 20px; }
.faq dd { margin-top: 2px; }

/* ---- Motion -------------------------------------------------------------------
   One entrance for the hero, steps that climb as a band arrives, and a quiet
   rise for what scrolls into view. All of it is off under reduced motion, and
   without JavaScript everything is simply there. */

:root { --soft: cubic-bezier(0.22, 0.61, 0.21, 1); }

.hero-copy > * { animation: settle 1000ms var(--soft) both; }
.hero-copy > :nth-child(1) { animation-delay: 120ms; }
.hero-copy > :nth-child(2) { animation-delay: 300ms; animation-duration: 1300ms; }
.hero-copy > :nth-child(3) { animation-delay: 560ms; }
.hero-copy > :nth-child(4) { animation-delay: 740ms; }
.hero-copy > :nth-child(5) { animation-delay: 900ms; }
.top { animation: fade 900ms var(--soft) both; }
@keyframes settle { from { opacity: 0; transform: translateY(22px); } }
@keyframes fade { from { opacity: 0; } }

.hero-phone .phone { animation: rise 1300ms var(--soft) 250ms both, float 8s ease-in-out 1600ms infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

.sky { position: absolute; inset: 0; pointer-events: none; }
.sky i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--gold-pale); opacity: 0.15; animation: twinkle 4.6s ease-in-out infinite alternate; }
.sky i:nth-child(1) { top: 14%; left: 8%; }
.sky i:nth-child(2) { top: 26%; left: 46%; animation-delay: -1.2s; animation-duration: 5.4s; }
.sky i:nth-child(3) { top: 9%; left: 63%; width: 2px; height: 2px; animation-delay: -2.6s; }
.sky i:nth-child(4) { top: 58%; left: 52%; animation-delay: -0.6s; animation-duration: 6.2s; }
.sky i:nth-child(5) { top: 71%; left: 6%; width: 2px; height: 2px; animation-delay: -3.3s; }
.sky i:nth-child(6) { top: 38%; left: 91%; animation-delay: -1.9s; animation-duration: 5s; }
.sky i:nth-child(7) { top: 66%; left: 80%; width: 2px; height: 2px; animation-delay: -4s; }
.sky i:nth-child(8) { top: 45%; left: 24%; animation-delay: -2.2s; animation-duration: 7s; }
@keyframes twinkle { to { opacity: 0.85; transform: scale(1.35); } }

.crescent { animation: glow 5.5s ease-in-out infinite alternate; }
@keyframes glow { to { filter: drop-shadow(0 0 42px rgb(243 227 189 / 0.6)); } }

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1000ms var(--soft), transform 1000ms var(--soft); }
.js .reveal.in { opacity: 1; transform: none; }
.js .phone.reveal { transform: translateY(44px) scale(0.96); transition-duration: 1200ms; }
.js .phone.reveal.in { transform: none; }
/* The word for the time of day is written in, right to left. */
.js .station-text .when { clip-path: inset(-40% -10% -40% 110%); transition: clip-path 1300ms var(--soft); }
.js .station-text.in .when { clip-path: inset(-40% -10% -40% -10%); }
.js .station-text .reveal:nth-child(2) { transition-delay: 220ms; }
.js .station-text .reveal:nth-child(3) { transition-delay: 340ms; }
.js .station-text .reveal:nth-child(4) { transition-delay: 460ms; }
.js .features > .reveal:nth-child(2), .js .promises > .reveal:nth-child(2) { transition-delay: 90ms; }
.js .features > .reveal:nth-child(3), .js .promises > .reveal:nth-child(3) { transition-delay: 180ms; }
.js .features > .reveal:nth-child(4), .js .promises > .reveal:nth-child(4) { transition-delay: 270ms; }
.js .features > .reveal:nth-child(5), .js .promises > .reveal:nth-child(5) { transition-delay: 360ms; }
.js .promises > .reveal:nth-child(6) { transition-delay: 450ms; }
.js .promises > .reveal:nth-child(7) { transition-delay: 540ms; }
.js .pair .phone.reveal:last-child { transition-delay: 200ms; }
.js .install.reveal { transition-delay: 160ms; }

/* The steps of a band rise one after another: the whole flight comes up one
   riser, then all but the first step another, and so on to the top. */
.js .band-steps::before { clip-path: polygon(-5% 105%, -5% 100%, 25% 100%, 25% 100%, 50% 100%, 50% 100%, 75% 100%, 75% 100%, 105% 100%, 105% 105%); }
.js .band-steps.in::before { animation: climb 1500ms var(--soft) forwards; }
@keyframes climb {
  25% { clip-path: polygon(-5% 105%, -5% 75%, 25% 75%, 25% 75%, 50% 75%, 50% 75%, 75% 75%, 75% 75%, 105% 75%, 105% 105%); }
  50% { clip-path: polygon(-5% 105%, -5% 75%, 25% 75%, 25% 50%, 50% 50%, 50% 50%, 75% 50%, 75% 50%, 105% 50%, 105% 105%); }
  75% { clip-path: polygon(-5% 105%, -5% 75%, 25% 75%, 25% 50%, 50% 50%, 50% 25%, 75% 25%, 75% 25%, 105% 25%, 105% 105%); }
  100% { clip-path: polygon(-5% 105%, -5% 75%, 25% 75%, 25% 50%, 50% 50%, 50% 25%, 75% 25%, 75% 0, 105% 0, 105% 105%); }
}

/* ---- Narrow screens ----------------------------------------------------------- */

@media (max-width: 860px) {
  .top nav li:not(.keep) { display: none; }
  .top { gap: 12px; }
  .top nav a { padding: 0 10px; font-size: 0.95rem; }
  .brand b { font-size: 1.6rem; }
  .brand svg { width: 32px; height: 32px; }
  .hero-grid, .more-grid, .privacy-grid, .download-grid, .feedback-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .hero-phone { margin-top: 12px; }
  .station, .station-flip { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .station-text { justify-self: stretch; }
  .station-flip .station-text { order: 0; }
  .pair { margin-inline: auto; }
  .guide { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 1px solid var(--hairline); border-radius: 999px; }
  .toc a.here { border-color: var(--gold); }
  .chapter-fig { grid-template-columns: minmax(0, 1fr); }
  .chapter-fig .phone { margin-inline: auto; }
  .foot ul { margin-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .arches path { stroke-dashoffset: 0; }
  .js .reveal, .js .station-text .when { opacity: 1; transform: none; clip-path: none; }
  .js .band-steps::before { clip-path: polygon(-5% 105%, -5% 75%, 25% 75%, 25% 50%, 50% 50%, 50% 25%, 75% 25%, 75% 0, 105% 0, 105% 105%); }
}

@media print {
  .top nav, .toc, .foot ul, .hero-phone { display: none; }
  .guide { grid-template-columns: 1fr; }
  .guide-head { background: none; color: var(--ink); }
  .guide-head h1 { color: var(--emerald); }
}

.linklike { background: none; border: 0; padding: 0; color: var(--emerald); font-weight: 700; text-decoration: underline; cursor: pointer; }
