/* Gold Diary website. Plain CSS, no build step.
   Colours are the app's own (Theme in ContentView.swift): paper and graphite neutrals, one gold, semantic colours only
   where they mean something. Every moving part uses transform or opacity only, so pages stay light on the graphics
   card, and all motion sits inside (prefers-reduced-motion: no-preference). */

:root {
  --paper: #F5F5F2;
  --card: #FFFFFF;
  --sunken: #EDEDE9;
  --ink: #121316;
  --body: #464950;
  --muted: #6E727A;
  --line: rgba(18, 19, 22, 0.09);
  --gold: #AA852D;          /* brandGold, large text */
  --gold-accent: #86641A;   /* goldAccent, links and small text */
  --gold-fill: #C9A24B;     /* primaryGold, marks and charts */
  --gold-soft: rgba(201, 162, 75, 0.14);
  --gain: #12805C;
  --loss: #C0392B;
  --warn: #B4570F;
  --header-bg: rgba(245, 245, 242, 0.78);
  --shadow: 0 1px 2px rgba(18, 19, 22, 0.04), 0 8px 24px -12px rgba(18, 19, 22, 0.12);
  /* The dark bands (hero, privacy): graphite in the light theme, as the app's summary card. */
  --band: #0C0D0F;
  --band-2: #121316;
  --band-ink: #F2F2EF;
  --band-body: #C3C5CA;
  --band-muted: #8D9199;
  --band-gold: #E3C987;
  --band-line: rgba(255, 255, 255, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C0D0F;
    --card: #16171A;
    --sunken: #1F2024;
    --ink: #F2F2EF;
    --body: #C3C5CA;
    --muted: #8D9199;
    --line: rgba(255, 255, 255, 0.08);
    --gold: #D9B65C;
    --gold-accent: #DDB65A;
    --gold-soft: rgba(217, 182, 92, 0.12);
    --gain: #3DBE8B;
    --loss: #F0706A;
    --warn: #F2913F;
    --header-bg: rgba(12, 13, 15, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
    /* Warm bronze in the dark theme, as the app's dark summary card. */
    --band-2: #1C1810;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0C0D0F;
  --card: #16171A;
  --sunken: #1F2024;
  --ink: #F2F2EF;
  --body: #C3C5CA;
  --muted: #8D9199;
  --line: rgba(255, 255, 255, 0.08);
  --gold: #D9B65C;
  --gold-accent: #DDB65A;
  --gold-soft: rgba(217, 182, 92, 0.12);
  --gain: #3DBE8B;
  --loss: #F0706A;
  --warn: #F2913F;
  --header-bg: rgba(12, 13, 15, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  --band-2: #1C1810;
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold-fill); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; letter-spacing: -0.025em; }
h1 { font-weight: 800; }
h2 { font-weight: 800; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.06; }
h3 { font-weight: 700; font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.gold { color: var(--gold); }
@media (min-width: 480px) { .nowrap { white-space: nowrap; } }
.num { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-accent);
}
.sub { font-size: 1.15rem; color: var(--body); max-width: 40rem; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}
.site-header[data-tone="dark"] {
  --ink: var(--band-ink);
  --body: var(--band-body);
  --gold: var(--band-gold);
  --line: var(--band-line);
  background: rgba(12, 13, 15, 0.55);
}
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 32px; height: 32px; }
.wordmark { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; line-height: 1; }
.wm-gold { color: var(--gold); }
.wm-ink { color: var(--ink); }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--body); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.badge-link { display: inline-block; flex: none; border-radius: 9px; }
.badge-link img { height: 48px; width: auto; }
.badge-link.small img { height: 38px; }
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .nav { display: none; }
}

/* ---------- Devices ---------- */

.device {
  position: relative;
  background: linear-gradient(150deg, #4a4b50 0%, #1a1b1e 22%, #0f1012 60%, #34353a 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 40px 80px -36px rgba(0, 0, 0, 0.55);
}
.device-phone { padding: 3.2%; border-radius: 15.5% / 7.2%; }
.device-ipad { padding: 2.4%; border-radius: 5.2% / 3.9%; }
.screen { position: relative; overflow: hidden; background: #F5F5F2; display: grid; }
.device-phone .screen { border-radius: 12.8% / 5.9%; aspect-ratio: 660 / 1434; }
.device-ipad .screen { border-radius: 3.2% / 2.4%; aspect-ratio: 1032 / 1376; }
.screen > img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
/* The Dynamic Island: screenshots leave its place blank. */
.device-phone .screen::after {
  content: ""; position: absolute; z-index: 2;
  top: 1.25%; left: 35.6%; width: 28.8%; height: 3.75%;
  background: #000; border-radius: 999px;
}

/* ---------- Bands (dark sections) ---------- */

.band {
  --ink: var(--band-ink);
  --body: var(--band-body);
  --muted: var(--band-muted);
  --gold: var(--band-gold);
  --gold-accent: var(--band-gold);
  --line: var(--band-line);
  background: var(--band);
  color: var(--body);
  position: relative;
  isolation: isolate;
  overflow: clip;
}

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

/* The hero runs up under the sticky header, so the header's glass shows the dark band. */
.hero {
  margin-top: calc(-1 * (var(--header-h) + env(safe-area-inset-top, 0px)));
  padding-block: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(32px, 6vw, 88px)) clamp(64px, 9vw, 120px);
}
.hero-glow {
  position: absolute; z-index: -1; inset: -20% -10% auto auto;
  width: min(1100px, 120vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(201, 162, 75, 0.34), rgba(201, 162, 75, 0.08) 55%, transparent 72%);
}
.hero-glow.two {
  inset: auto auto -45% -25%;
  width: min(900px, 110vw);
  background: radial-gradient(closest-side, rgba(170, 133, 45, 0.20), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { display: grid; gap: 22px; max-width: 37rem; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 0.98; letter-spacing: -0.035em; }
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--body); max-width: 31rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.cta-note { font-size: 0.95rem; color: var(--muted); }
.cta-note b { color: var(--ink); font-weight: 600; }

.hero-stage { position: relative; aspect-ratio: 1 / 1.02; max-width: 640px; width: 100%; justify-self: center; }
.hero-stage .phone { position: absolute; top: 0; }
.hero-stage .p-center { left: 27%; width: 46%; z-index: 3; }
.hero-stage .p-left { left: 1%; top: 9%; width: 38%; z-index: 2; }
.hero-stage .p-right { right: 1%; top: 9%; width: 38%; z-index: 1; }
.hero-stage .p-left .device { transform: rotate(-7deg); }
.hero-stage .p-right .device { transform: rotate(7deg); }
.hero-stage .p-left .screen > img, .hero-stage .p-right .screen > img { opacity: 0.9; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 40rem; }
  .hero-stage { max-width: 520px; margin-top: 12px; }
}

/* ---------- Currency ribbon ---------- */

.ribbon { padding-block: 34px 38px; border-bottom: 1px solid var(--line); background: var(--card); }
.ribbon-title { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; padding-inline: var(--gutter); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; gap: 14px; padding-right: 14px; }
.m-item {
  display: grid; gap: 2px; padding: 14px 20px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line); min-width: 180px;
}
.m-item b { color: var(--ink); font-size: 1.35rem; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-item span { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(72px, 10vw, 140px); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 46rem; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Story (sticky phone) ---------- */

.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); }
.story-steps { position: relative; display: grid; }
.step { min-height: 78vh; display: grid; align-content: center; gap: 14px; padding-block: 40px; padding-left: 28px; position: relative; }
.step::before {
  content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: 3px; height: 88px; border-radius: 3px; background: var(--line);
  transition: background-color 0.4s ease;
}
.step.is-active::before { background: var(--gold-fill); }
.step-num { font-size: 0.85rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.step.is-active .step-num { color: var(--gold-accent); }
.step h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.025em; }
.step p { max-width: 30rem; }
.step .tag { font-size: 0.78rem; font-weight: 700; color: var(--gold-accent); background: var(--gold-soft); border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: 3px; letter-spacing: 0; }
.chips { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 0.85rem; font-weight: 500; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.step-phone { display: none; }
.story-stage { position: relative; }
.story-sticky { position: sticky; top: max(84px, calc(50vh - 350px)); display: grid; justify-items: center; gap: 20px; }
.story-sticky .phone { width: min(320px, 26vw, calc((100vh - 180px) / 2.2)); }
.story-sticky .screen > img { opacity: 0; transform: scale(1.035); transition: opacity 0.55s ease, transform 0.8s var(--ease); }
.story-sticky .screen > img.is-active { opacity: 1; transform: none; }
.dots { display: flex; gap: 8px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background-color 0.3s ease, transform 0.3s ease; }
.dots span.is-active { background: var(--gold-fill); transform: scale(1.3); }

@media (max-width: 860px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story-stage { display: none; }
  .step { min-height: 0; padding-left: 0; padding-block: 28px 48px; }
  .step::before { display: none; }
  .step-phone { display: block; width: min(280px, 72vw); margin: 0 auto 18px; }
}

/* ---------- Price check ---------- */

.price { background: var(--card); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.flip > :first-child { order: 2; }
.copy { display: grid; gap: 18px; }
.copy p { max-width: 32rem; }
.ticks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.ticks li::before {
  content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23AA852D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.ladder { margin-top: 8px; max-width: 30rem; }
.ladder-bar { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.ladder-bar i { height: 10px; border-radius: 5px; background: var(--sunken); }
.ladder-bar i:nth-child(1) { background: color-mix(in srgb, var(--loss) 75%, transparent); }
.ladder-bar i:nth-child(2) { background: color-mix(in srgb, var(--warn) 70%, transparent); }
.ladder-bar i:nth-child(3) { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.ladder-bar i:nth-child(4) { background: color-mix(in srgb, var(--gain) 70%, transparent); }
.ladder-bar i:nth-child(5) { background: var(--gain); }
.ladder-mark {
  position: absolute; top: 50%; left: 70%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; background: var(--card); border: 3px solid var(--ink); box-shadow: var(--shadow);
}
.ladder-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; font-size: 0.78rem; color: var(--muted); text-align: center; }
.ladder-labels span:nth-child(4) { color: var(--gain); font-weight: 700; }

.duo { position: relative; aspect-ratio: 1 / 1.05; width: 100%; max-width: 560px; justify-self: center; }
.duo .phone { position: absolute; width: 52%; }
.duo .front { left: 4%; top: 0; z-index: 2; }
.duo .back { right: 4%; top: 9%; z-index: 1; }

/* ---------- Rates ---------- */

.rates-card { position: relative; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.rate-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
.rate-label { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.rate-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-fill); }
.rate-value { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rate-value small { font-size: 0.45em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.rate-change { font-size: 0.9rem; font-weight: 600; color: var(--gain); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: url(#goldFade); }
.chart .line { fill: none; stroke: var(--gold-fill); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--gold-fill); stroke: var(--card); stroke-width: 3; }
.chart text { fill: var(--muted); font: 500 12px var(--font); }
.periods { display: flex; gap: 6px; background: var(--sunken); border-radius: 12px; padding: 4px; width: max-content; max-width: 100%; }
.periods span { font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 9px; }
.periods span.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.rates-stage { position: relative; }

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

.privacy { background: var(--band-2); }
.privacy .hero-glow { inset: auto -20% -50% auto; opacity: 0.7; }
.big-line { font-size: clamp(2.2rem, 5.4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; color: var(--ink); max-width: 13ch; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin-top: 8px; }
.point { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.point b { color: var(--ink); font-weight: 650; }
.point span { font-size: 0.95rem; }
.privacy .phone { width: min(320px, 70%); justify-self: center; }
@media (max-width: 560px) { .points { grid-template-columns: minmax(0, 1fr); } }

/* ---------- iPad ---------- */

.ipad-stage { perspective: 1800px; display: grid; justify-items: center; margin-top: clamp(32px, 5vw, 56px); }
.ipad-stage .tablet { width: min(760px, 100%); transform-origin: 50% 0; }

/* ---------- Feature grid ---------- */

.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { display: grid; align-content: start; gap: 8px; padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.tile svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--sunken); color: var(--ink); margin-bottom: 6px; }
.tile b { color: var(--ink); font-weight: 650; font-size: 1.02rem; }
.tile span { font-size: 0.93rem; line-height: 1.5; }
.tile em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--gold-accent); background: var(--gold-soft); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px; }
@media (max-width: 980px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Free and Pro ---------- */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 920px; margin-inline: auto; }
.plan { display: grid; align-content: start; gap: 16px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.plan.pro { background: var(--band-2); border-color: transparent; --ink: var(--band-ink); --body: var(--band-body); --muted: var(--band-muted); --gold-soft: rgba(227, 201, 135, 0.14); color: var(--body); position: relative; overflow: hidden; isolation: isolate; }
.plan.pro::after { content: ""; position: absolute; z-index: -1; inset: -40% -40% auto auto; width: 80%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(201, 162, 75, 0.28), transparent 70%); }
.plan h3 { font-size: 1.6rem; }
.plan .price-line { color: var(--muted); font-size: 0.95rem; }
.plan .ticks li::before { background-color: var(--gold-soft); }
.plan.pro .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%23E3C987' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.plans-note { text-align: center; color: var(--muted); font-size: 0.95rem; margin-top: 22px; }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; position: relative;
  color: var(--ink); font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq .answer { padding: 0 22px 20px; display: grid; gap: 10px; }

/* ---------- Final call ---------- */

.final { text-align: center; }
.final .wrap { display: grid; justify-items: center; gap: 22px; }
.final img.icon { width: 96px; height: 96px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35)); }
.final h2 { max-width: 16ch; }

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

.site-footer { border-top: 1px solid var(--line); padding-block: 44px calc(44px + env(safe-area-inset-bottom, 0px)); font-size: 0.9rem; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.foot-brand { display: grid; gap: 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot-links a { color: var(--body); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.legal-note { margin-top: 28px; font-size: 0.78rem; line-height: 1.5; max-width: 60rem; }

/* ---------- Document pages (Privacy, Terms, Support) ---------- */

.doc-hero { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.04; }
.doc-hero p { margin-top: 12px; color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-block: 40px 96px; }
.toc { position: sticky; top: 88px; align-self: start; display: grid; gap: 2px; font-size: 0.9rem; }
.toc p { font-weight: 700; color: var(--ink); margin-bottom: 8px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.toc a { color: var(--muted); text-decoration: none; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); border-left-color: var(--gold-fill); }
.doc { max-width: 44rem; }
.doc h2 { font-size: 1.45rem; letter-spacing: -0.015em; margin: 44px 0 12px; scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { line-height: 1.7; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin: 12px 0; display: grid; gap: 8px; }
.doc li::marker { color: var(--gold-fill); }
.note { margin-top: 40px; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 0.95rem; }
.note b { color: var(--ink); }
@media (max-width: 860px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}

.contact-card { display: grid; gap: 14px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 44rem; }
.contact-card .mail { font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 700; color: var(--ink); word-break: break-all; user-select: all; }
.copy-btn { justify-self: start; font: 600 0.95rem var(--font); color: var(--paper); background: var(--ink); border: 0; border-radius: 12px; padding: 10px 16px; cursor: pointer; }
.copy-btn:hover { opacity: 0.9; }

/* ---------- Layout breakpoints for split sections ---------- */

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.flip > :first-child { order: 0; }
}

/* =====================================================================
   Motion. Only for people who have not asked their device to reduce it.
   ===================================================================== */

@media (prefers-reduced-motion: no-preference) {
  /* Reveal on scroll (script adds .is-in). Without the script nothing is hidden. */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }

  /* Hero: phones rise in, then float; as the hero leaves they part and the copy lifts away. --p is 0 to 1. */
  .hero-stage .phone { animation: rise 1.2s var(--ease) both; }
  .hero-stage .p-left { animation-delay: 0.25s; }
  .hero-stage .p-right { animation-delay: 0.4s; }
  .float { animation: float 7s ease-in-out infinite; }
  .p-left .float { animation-delay: -2.3s; }
  .p-right .float { animation-delay: -4.6s; }
  .hero .scroller { will-change: transform; }
  .hero .p-center .scroller { transform: translateY(calc(var(--p, 0) * -8%)) scale(calc(1 + var(--p, 0) * 0.08)); }
  .hero .p-left .scroller { transform: translate(calc(var(--p, 0) * -30%), calc(var(--p, 0) * 10%)) rotate(calc(var(--p, 0) * -6deg)); }
  .hero .p-right .scroller { transform: translate(calc(var(--p, 0) * 30%), calc(var(--p, 0) * 10%)) rotate(calc(var(--p, 0) * 6deg)); }
  .hero .hero-copy { transform: translateY(calc(var(--p, 0) * -60px)); opacity: calc(1 - var(--p, 0) * 1.4); }
  .hero-glow { animation: drift 18s ease-in-out infinite alternate; }

  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  /* Price check: the two phones part as the section passes; the verdict mark slides to Good. */
  .duo .front .scroller { transform: translate(calc((var(--p, 0.5) - 0.5) * -14%), calc((var(--p, 0.5) - 0.5) * 10%)) rotate(calc((var(--p, 0.5) - 0.5) * -6deg)); }
  .duo .back .scroller { transform: translate(calc((var(--p, 0.5) - 0.5) * 18%), calc((var(--p, 0.5) - 0.5) * -12%)) rotate(calc((var(--p, 0.5) - 0.5) * 6deg)); }
  .js .ladder .ladder-mark { left: 2%; transition: left 1.6s var(--ease) 0.3s; }
  .js .ladder.is-in .ladder-mark { left: 70%; }

  /* Rates: the line draws itself as the card comes in. */
  .js .chart .line { stroke-dasharray: 1; stroke-dashoffset: max(0, calc(1 - var(--p, 0) * 2.2)); }
  .js .chart .area { opacity: clamp(0, calc(var(--p, 0) * 3 - 1.1), 1); }
  .js .chart .dot { opacity: clamp(0, calc(var(--p, 0) * 6 - 2.6), 1); }

  /* iPad: tilts up and comes forward as it scrolls into view. */
  .ipad-stage .tablet { transform: rotateX(calc((1 - min(1, var(--p, 1) * 2)) * 22deg)) scale(calc(0.84 + min(1, var(--p, 1) * 2) * 0.16)); }

  /* Privacy: the phone rises a little more slowly than the page. */
  .privacy .phone .scroller { transform: translateY(calc((0.5 - var(--p, 0.5)) * 18%)); }
}

@keyframes rise { from { opacity: 0; transform: translateY(70px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-6%, 5%); } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { overflow-x: auto; }
}
