/* MileWiz website — one stylesheet.
   Light first, follows the system appearance, no web fonts, no external assets.
   Brand colours come from the app icon: a navy map, a sky-to-cobalt route.
   Sizes are in rem so the Accessibility text-size control scales everything. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-2: #edf1f7;
  --surface: #ffffff;
  --ink: #0b1222;
  --ink-2: #263042;
  --muted: #566176;
  --faint: #5f6a7e;
  --accent: #1a5fe0;
  --accent-soft: rgba(26, 95, 224, .1);
  --line: rgba(11, 18, 34, .09);
  --line-2: rgba(11, 18, 34, .16);
  --btn: #0b1222;
  --btn-ink: #ffffff;
  --btn-hover: #1f2a40;
  --chip: rgba(11, 18, 34, .05);
  --pos: #12804f;
  --neg: #c63a31;
  --focus: #1a5fe0;
  --shadow-sm: 0 1px 2px rgba(11, 18, 34, .05), 0 2px 10px rgba(11, 18, 34, .04);
  --shadow-md: 0 2px 6px rgba(11, 18, 34, .04), 0 14px 36px rgba(11, 18, 34, .08);
  --shadow-lg: 0 6px 16px rgba(11, 18, 34, .06), 0 32px 80px rgba(11, 18, 34, .14);

  /* The map: always night-time navy, in both appearances, like the icon. */
  --map: #0a1226;
  --map-ink: #eef4ff;
  --map-muted: #a9b7d0;
  --map-line: rgba(255, 255, 255, .1);
  --route-1: #5bc0f8;
  --route-2: #2e86ee;
  --route-3: #1e5ed8;
  --route: linear-gradient(120deg, var(--route-1), var(--route-2) 55%, var(--route-3));
  /* Darker versions where the gradient is text on a light page or sits under white text (WCAG). */
  --route-text: linear-gradient(120deg, #1f6fe0, var(--route-3) 55%, #1a4fc4);
  --route-fill: linear-gradient(120deg, #1f6fe0, var(--route-3) 55%, #1a4fc4);

  /* Hardware finishes */
  --ti: #c9cbd1;
  --ti-edge: #a7aab2;
  --alu: #c9cacf;
  --alu-edge: #aeb0b6;
  --device-shadow: rgba(8, 14, 30, .3);

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --route-text: var(--route);
  --bg: #070b14;
  --bg-2: #0d1322;
  --surface: #111a2c;
  --ink: #eef3fb;
  --ink-2: #d2dae8;
  --muted: #9eaac0;
  --faint: #8d99b0;
  --accent: #6cb6ff;
  --accent-soft: rgba(108, 182, 255, .12);
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .16);
  --btn: #eef3fb;
  --btn-ink: #070b14;
  --btn-hover: #ffffff;
  --chip: rgba(255, 255, 255, .07);
  --pos: #44d394;
  --neg: #ff7a6e;
  --focus: #6cb6ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .35);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, .4), 0 36px 90px rgba(0, 0, 0, .5);
  --map: #0b1530;
  --ti: #4f535b;
  --ti-edge: #6a6e77;
  --alu: #54565c;
  --alu-edge: #6b6d74;
  --device-shadow: rgba(0, 0, 0, .6);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --route-text: var(--route);
    --bg: #070b14; --bg-2: #0d1322; --surface: #111a2c;
    --ink: #eef3fb; --ink-2: #d2dae8; --muted: #9eaac0; --faint: #8d99b0; --accent: #6cb6ff; --accent-soft: rgba(108, 182, 255, .12);
    --line: rgba(255, 255, 255, .085); --line-2: rgba(255, 255, 255, .16);
    --btn: #eef3fb; --btn-ink: #070b14; --btn-hover: #fff; --chip: rgba(255, 255, 255, .07);
    --pos: #44d394; --neg: #ff7a6e; --focus: #6cb6ff; --map: #0b1530;
    --ti: #4f535b; --ti-edge: #6a6e77; --alu: #54565c; --alu-edge: #6b6d74; --device-shadow: rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
p, li { text-wrap: pretty; }
main { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(91, 192, 248, .35); }
.sr-only { 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; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 600; text-decoration: none; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
h1 { font-size: clamp(2.6rem, 1.5rem + 4.2vw, 4.75rem); line-height: 1.03; letter-spacing: -.034em; font-weight: 750; }
h2 { font-size: clamp(2rem, 1.35rem + 2.5vw, 3.35rem); line-height: 1.07; letter-spacing: -.03em; font-weight: 720; }
h3 { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -.016em; font-weight: 650; }
h1 em, h2 em { font-style: normal; background: var(--route-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-a11y-contrast="true"] :is(h1 em, h2 em) { background: none; color: var(--ink); }
.lede { font-size: clamp(1.125rem, 1.02rem + .45vw, 1.3125rem); line-height: 1.5; color: var(--muted); letter-spacing: -.01em; }
.eyebrow { margin-bottom: 14px; font-size: .9375rem; font-weight: 650; letter-spacing: -.005em; color: var(--accent); }
.muted { color: var(--muted); }
.fine-print { font-size: .8125rem; line-height: 1.5; color: var(--faint); }
.text-link { display: inline-flex; align-items: center; gap: 6px; padding-block: 10px; margin-block: -10px; font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link span[aria-hidden] { transition: transform .2s var(--ease); }
.text-link:hover span[aria-hidden] { transform: translateX(2px); }

/* ---------- Layout ---------- */
.section { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: clamp(56px, 8vw, 104px); }
.narrow { max-width: 760px; }
.section.narrow { width: min(760px, 100% - 2 * var(--gutter)); }
.band { background: var(--bg-2); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head > p, .section-head > div > p:not(.eyebrow) { color: var(--muted); font-size: 1.0625rem; max-width: 460px; }
.section-head > .text-link { justify-self: end; }
.section-head--center { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.section-head--center p { margin-inline: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--btn); color: var(--btn-ink);
  font-size: 1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.button:hover { background: var(--btn-hover); }
.button:active { transform: scale(.98); }
.button.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 34%, transparent); }
.button.secondary:hover { background: var(--chip); }
.button-arrow { font-size: .95em; transition: transform .2s var(--ease); }
.button:hover .button-arrow { transform: translateX(2px); }
.on-map .button { background: #ffffff; color: #0a1226; }
.on-map .button:hover { background: #e6efff; }
.on-map .button.secondary { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.on-map .button.secondary:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; gap: 24px; width: min(var(--max), 100% - 2 * var(--gutter)); height: 64px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font-family: var(--font-display); font-size: 1.1875rem; font-weight: 720; letter-spacing: -.022em; color: var(--ink); text-decoration: none; }
.brand-icon { display: block; flex: none; width: 32px; height: 32px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(11, 18, 34, .1), 0 1px 3px rgba(11, 18, 34, .18); }
.brand-icon img { width: 100%; height: 100%; }
#main-nav { display: flex; align-items: center; gap: 6px; }
#main-nav > a { padding: 8px 12px; border-radius: 999px; font-size: .9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
#main-nav > a:hover, #main-nav > a[aria-current="page"] { color: var(--ink); }
#main-nav > a:hover { background: var(--chip); }
#main-nav > a[aria-current="page"] { font-weight: 650; }
#main-nav > .nav-download { min-height: 38px; margin-left: 10px; padding: 0 16px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
#main-nav > .nav-download:hover { background: var(--btn-hover); color: var(--btn-ink); }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 72px); align-items: center; width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 96px); }
.hero h1 { margin-top: 4px; }
.hero .lede { max-width: 540px; margin-top: 22px; }
.hero .actions { margin-top: 32px; }
.platform-line { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 22px; font-size: .875rem; color: var(--faint); }
.platform-line span { display: inline-flex; align-items: center; gap: 6px; }
.platform-line span + span::before { content: ""; width: 4px; height: 4px; margin-right: 10px; border-radius: 50%; background: currentColor; opacity: .55; }
.rating-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .875rem; color: var(--faint); }
.stars { color: #f5a524; letter-spacing: 1px; }

/* The map card: decorative SVG city with the brand route, devices on top. */
.map-card { position: relative; isolation: isolate; overflow: hidden; border-radius: clamp(24px, 3vw, 36px); background: var(--map); box-shadow: var(--shadow-lg); }
.map-art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.map-art .route-glow { filter: blur(10px); opacity: .55; }
.map-art .route-line, .map-art .route-glow { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-route 2.6s .3s var(--ease) forwards; }
@keyframes draw-route { to { stroke-dashoffset: 0; } }
.map-art .pin { opacity: 0; animation: pin-in .5s 2.6s var(--ease) forwards; }
.map-art .pin--start { animation-delay: .2s; }
@keyframes pin-in { to { opacity: 1; } }
.hero-stage { container-type: inline-size; position: relative; aspect-ratio: 1 / 1.06; }
.hero-stage > .map-card { position: absolute; inset: 7% 0 0 0; }
.hero-stage > .dev { position: absolute; }
.hero-stage .stage-back { width: 38cqw; left: 9cqw; top: 0; transform: rotate(-4deg); }
.hero-stage .stage-front { width: 43cqw; right: 9cqw; top: 9cqw; }
.stage-caption { margin-top: 18px; font-size: .8125rem; color: var(--faint); text-align: center; }

/* ---------- Devices ----------
   Hardware is drawn around the untouched capture. Each screen is clipped only by that
   device's own display-corner radius. --ar is the capture's own aspect ratio. */
.dev {
  position: relative; display: block; width: 100%; container-type: inline-size;
  padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; text-align: initial;
  cursor: zoom-in; -webkit-tap-highlight-color: transparent; isolation: isolate;
}
.dev:focus-visible { outline: none; }
.dev picture, .dev img { display: block; width: 100%; height: 100%; }
.dev img { object-fit: cover; }
.dev-screen { display: block; position: relative; overflow: hidden; aspect-ratio: var(--ar); background: #000; isolation: isolate; }
.dev-enlarge {
  position: absolute; z-index: 5; right: 6%; bottom: 5%;
  display: grid; place-items: center; width: clamp(22px, 9cqw, 40px); height: clamp(22px, 9cqw, 40px);
  border-radius: 50%; background: rgba(11, 18, 34, .72); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transform: scale(.9); transition: opacity .2s var(--ease), transform .2s var(--ease);
  pointer-events: none;
}
.dev--ipad .dev-enlarge { width: clamp(22px, 4cqw, 40px); height: clamp(22px, 4cqw, 40px); right: 4%; bottom: 6%; }
.dev-enlarge svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dev:hover .dev-enlarge, .dev:focus-visible .dev-enlarge { opacity: 1; transform: none; }
@media (hover: none) { .dev-enlarge { opacity: .9; transform: none; } }
.dev:focus-visible .dev-body { outline: 3px solid var(--focus); outline-offset: 6px; }

/* iPhone Pro Max class: ~440pt display, ~62pt corners, Dynamic Island on the status bar. */
.dev--iphone .dev-body {
  display: block; position: relative; padding: 3.6cqw; border-radius: 16.8cqw; background: #050506;
  box-shadow: 0 0 0 .9cqw var(--ti), 0 0 0 1.3cqw var(--ti-edge),
    0 3cqw 7cqw -1.5cqw var(--device-shadow), 0 1cqw 2.4cqw rgba(8, 14, 30, .12);
}
.dev--iphone .dev-body::before, .dev--iphone .dev-body::after { content: ""; position: absolute; width: 1cqw; border-radius: .6cqw; background: var(--ti-edge); }
.dev--iphone .dev-body::before { right: -2.2cqw; top: 25%; height: 12%; }
.dev--iphone .dev-body::after { left: -2.2cqw; top: 23%; height: 6%; box-shadow: 0 15cqw 0 var(--ti-edge); }
.dev--iphone .dev-screen { border-radius: 13.2cqw; }
.dev-island { position: absolute; z-index: 2; top: 3.3cqw; left: 50%; width: 27cqw; height: 8cqw; transform: translateX(-50%); border-radius: 99px; background: #000; }

/* iPad Pro 13-inch, landscape: thin even bezel, 18pt display corners. */
.dev--ipad .dev-body {
  display: block; position: relative; padding: 2.6cqw; border-radius: 3.9cqw; background: #0a0a0c;
  box-shadow: 0 0 0 .3cqw var(--alu), 0 0 0 .42cqw var(--alu-edge),
    0 2.6cqw 6cqw -1.5cqw var(--device-shadow), 0 .8cqw 2cqw rgba(8, 14, 30, .1);
}
.dev--ipad .dev-screen { border-radius: 1.4cqw; }
.dev-cam { position: absolute; top: 1.05cqw; left: 50%; width: .5cqw; height: .5cqw; margin-left: -.25cqw; border-radius: 50%; background: #1b1d22; box-shadow: inset 0 0 0 .1cqw #2c2f38; }

/* A capture that has not been made yet: an honest, labelled gap, never a fake screen. */
.dev-missing { display: grid; place-items: center; height: 100%; padding: 12%; background: repeating-linear-gradient(135deg, #111a2c 0 10px, #0d1424 10px 20px); color: #9eaac0; font-size: max(10px, 4cqw); text-align: center; }

/* ---------- How it works ---------- */
.how-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); counter-reset: step; }
.how-step { display: flex; flex-direction: column; gap: 14px; }
.how-step .dev { width: min(260px, 72%); margin: 0 auto 18px; }
.how-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--route-fill); color: #fff; font-size: .9375rem; font-weight: 700; }
.how-step h3 { font-size: 1.5rem; }
.how-step p { color: var(--muted); }
.how-line { position: relative; height: 2px; margin: 0 0 28px; background: repeating-linear-gradient(90deg, var(--line-2) 0 10px, transparent 10px 18px); }

/* ---------- Product tour ---------- */
.tour-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: clamp(28px, 4vw, 44px); border-radius: 999px; background: var(--chip); }
.tour-tabs button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: .9375rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tour-tabs button:hover { color: var(--ink); }
.tour-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tour-panel { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.tour-panel[hidden] { display: none; }
.tour-copy h3 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.1; letter-spacing: -.026em; }
.tour-copy p { margin: 16px 0 22px; color: var(--muted); font-size: 1.0625rem; max-width: 480px; }
.tour-copy ul { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.tour-copy li { position: relative; padding-left: 28px; color: var(--ink-2); }
.tour-copy li::before { content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 4px var(--accent); }
.tour-index { display: block; margin-bottom: 12px; font-size: .8125rem; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.tour-device { position: relative; isolation: isolate; display: grid; place-items: center; padding: clamp(28px, 4vw, 48px) 0; }
.tour-device::before { content: ""; position: absolute; z-index: -1; inset: 8% 6%; border-radius: var(--radius-lg); background: var(--map); }
.tour-device .map-art { position: absolute; z-index: -1; inset: 8% 6%; width: 88%; height: 84%; border-radius: var(--radius-lg); }
.tour-device .dev--iphone { width: min(300px, 62%); }
.tour-device .dev--ipad { width: 100%; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: clamp(24px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .feature { box-shadow: inset 0 0 0 1px var(--line); }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.1875rem; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 1rem; }

/* Long-form feature stories on /features */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.story + .story { padding-top: 0; }
.story--flip .story-art { order: -1; }
.story-copy h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem); }
.story-copy > p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 1.0625rem; max-width: 520px; }
.story-copy ul { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.story-copy li { position: relative; padding-left: 28px; color: var(--ink-2); }
.story-copy li::before { content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 4px var(--accent); }
.story-art { position: relative; isolation: isolate; display: grid; place-items: center; padding: clamp(28px, 4vw, 52px) 0; }
.story-art .map-art { position: absolute; z-index: -1; inset: 0 4%; width: 92%; height: 100%; border-radius: var(--radius-lg); background: var(--map); }
.story-art .dev--iphone { width: min(300px, 64%); }
.story-art .dev--ipad { width: 100%; }
.story-art figcaption, .gallery figcaption { margin-top: 14px; font-size: .8125rem; color: var(--faint); text-align: center; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 240px); gap: 28px; overflow-x: auto; padding: 18px var(--gutter) 28px; margin-inline: calc(var(--gutter) * -1); scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin; }
.gallery figure { scroll-snap-align: start; }
.gallery figure.wide { grid-column: span 3; }
.gallery figcaption strong { display: block; color: var(--ink); font-size: .9375rem; }

/* ---------- Calculator ---------- */
.on-map { position: relative; isolation: isolate; overflow: hidden; color: var(--map-ink); background: var(--map); }
.on-map h2, .on-map h3 { color: var(--map-ink); }
.on-map .eyebrow { color: var(--route-1); }
.on-map .muted, .on-map p { color: var(--map-muted); }
.on-map .map-art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; opacity: .45; }
.calc-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.calc-section h2 + p { margin-top: 18px; font-size: 1.0625rem; max-width: 480px; }
.calc-card { padding: clamp(24px, 3.4vw, 40px); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.calc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.calc-total span { color: var(--map-muted); font-size: .9375rem; }
.calc-total output { font-family: var(--font-display); font-size: clamp(2.6rem, 2rem + 2.4vw, 3.6rem); font-weight: 750; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.calc-sub { margin-top: 2px; text-align: right; color: var(--map-muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.calc-route { width: 100%; height: 44px; margin: 22px 0 18px; overflow: visible; }
.calc-route path { fill: none; stroke-width: 6; stroke-linecap: round; }
.calc-route path:first-child { stroke: rgba(255, 255, 255, .14); stroke-dasharray: 2 12; stroke-width: 4; }
.calc-route path:last-child { stroke: url(#calc-gradient); stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--progress, .3)); transition: stroke-dashoffset .25s var(--ease); }
.calc-card label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; color: #fff; }
.calc-card label output { color: var(--route-1); font-variant-numeric: tabular-nums; }
.calc-card input[type="range"] { width: 100%; margin: 14px 0 6px; accent-color: var(--route-1); }
.range-labels { display: flex; justify-content: space-between; color: var(--map-muted); font-size: .8125rem; }
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); }
.rate-field { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); color: #fff; }
.rate-field input { width: 5.5em; min-height: 42px; border: 0; background: transparent; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.rate-field input:focus { outline: none; }
.rate-field:focus-within { box-shadow: inset 0 0 0 2px var(--route-1); }
.calc-card .fine-print { margin-top: 18px; color: var(--map-muted); }

/* ---------- Privacy band ---------- */
.privacy-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.privacy-section > div > p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 1.0625rem; }
.privacy-section .text-link { margin-top: 26px; }
.promise-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.promise-list li { padding: 24px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .promise-list li { box-shadow: inset 0 0 0 1px var(--line); }
.promise-list strong { display: block; margin-bottom: 6px; font-size: 1.0625rem; letter-spacing: -.01em; }
.promise-list span { color: var(--muted); font-size: .9688rem; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 3.6vw, 44px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .price-card { box-shadow: inset 0 0 0 1px var(--line); }
.price-card.featured { box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.plan-badge { position: absolute; top: -13px; left: clamp(28px, 3.6vw, 44px); padding: 4px 12px; border-radius: 999px; background: var(--route-fill); color: #fff; font-size: .8125rem; font-weight: 650; }
.price-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.price-card h2 { margin-top: 6px; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.price-card > p:not(.eyebrow):not(.price-note) { margin-top: 10px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 6px; margin-top: 26px; font-family: var(--font-display); font-size: 3rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price span:last-child { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.price-note { margin: 4px 0 24px; font-size: .8125rem; color: var(--faint); }
.price-card .button { align-self: flex-start; }
.price-card ul { display: grid; gap: 12px; margin: 28px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); list-style: none; }
.price-card li { position: relative; padding-left: 28px; color: var(--ink-2); }
.price-card li::before { content: ""; position: absolute; left: 2px; top: .32em; width: 15px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.billing-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--chip); }
.billing-toggle button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-size: .875rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.billing-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.pricing-disclaimer { max-width: 760px; margin-top: 28px; font-size: .8125rem; color: var(--faint); }

/* ---------- FAQ ---------- */
.faq-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-section > div > p:not(.eyebrow) { margin-top: 16px; color: var(--muted); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 2px; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.012em; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary > span { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); font-size: 0; color: transparent; transition: background .2s; }
.faq-list summary > span::before, .faq-list summary > span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; margin: -.8px 0 0 -5.5px; border-radius: 1px; background: var(--ink); transition: transform .25s var(--ease); }
.faq-list summary > span::after { transform: rotate(90deg); }
.faq-list details[open] summary > span::after { transform: rotate(0deg); }
.faq-list summary:hover > span { background: var(--line-2); }
.faq-list details > p { padding: 0 48px 24px 2px; color: var(--muted); }

/* ---------- Closing CTA ---------- */
.closing-cta { padding: clamp(80px, 11vw, 140px) var(--gutter); text-align: center; }
.closing-cta > div { max-width: 760px; margin-inline: auto; display: grid; justify-items: center; }
.cta-icon { display: block; width: 84px; height: 84px; margin-bottom: 26px; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 16px 40px rgba(0, 0, 0, .4); }
.closing-cta p:not(.eyebrow) { margin: 16px 0 30px; font-size: 1.125rem; }
.closing-cta .actions { justify-content: center; }

/* ---------- Footer ---------- */
footer { padding: 64px var(--gutter) 96px; background: var(--bg); border-top: 1px solid var(--line); font-size: .875rem; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; width: min(var(--max), 100%); margin-inline: auto; }
.footer-top > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.footer-top > div > a:not(.brand) { padding-block: 6px; }
.footer-top .brand { margin: 0 0 8px; font-size: 1.0625rem; }
.footer-top p { color: var(--muted); }
.footer-top h2 { margin-bottom: 4px; font-family: var(--font); font-size: .875rem; font-weight: 600; letter-spacing: 0; }
.footer-top a:not(.brand) { color: var(--muted); text-decoration: none; }
.footer-top a:not(.brand):hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; width: min(var(--max), 100%); margin: 48px auto 0; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: .8125rem; }
.footer-bottom div { display: flex; gap: 20px; }
.footer-bottom a { padding-block: 10px; margin-block: -10px; color: var(--faint); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Inner pages ---------- */
.page-hero { padding-bottom: clamp(32px, 4vw, 48px); }
.page-hero h1 { max-width: 900px; margin-top: 4px; font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4.1rem); }
.page-hero .lede { max-width: 640px; margin-top: 20px; }
.page-hero .actions { margin-top: 30px; }
.page-hero .fine-print { margin-top: 16px; }
.prose h2 { margin: 48px 0 14px; font-size: clamp(1.5rem, 1.25rem + .8vw, 1.9rem); letter-spacing: -.022em; }
.prose h3 { margin: 30px 0 10px; font-size: 1.1875rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 16px; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose a:not(.button):not(.text-link) { color: var(--accent); }
.prose > :first-child { margin-top: 0; }
.legal-copy h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.4rem); margin-bottom: 18px; }
.legal-copy .draft-label { display: inline-block; margin-bottom: 18px; padding: 8px 14px; border-radius: var(--radius-sm); background: rgba(245, 165, 36, .14); color: var(--ink); font-size: .875rem; }
.legal-copy .updated { color: var(--faint); font-size: .9375rem; }
.legal-copy table { width: 100%; margin: 8px 0 24px; border-collapse: collapse; font-size: .9375rem; }
.legal-copy th, .legal-copy td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-copy th { font-weight: 650; }
.legal-toc { margin: 8px 0 32px; padding: 18px 22px; border-radius: var(--radius); background: var(--bg-2); }
.legal-toc summary { font-weight: 650; cursor: pointer; }
.legal-toc ol { margin: 14px 0 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.legal-toc li { break-inside: avoid; margin: 0 0 6px; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--accent); text-decoration: underline; }
.summary-box { margin: 0 0 32px; padding: 24px 26px; border-radius: var(--radius); background: var(--accent-soft); }
.summary-box h2 { margin: 0 0 10px !important; font-size: 1.25rem !important; }
.summary-box ul { margin: 0; }
.notice { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); background: var(--bg-2); }
.notice h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); }
.notice p { margin: 10px 0 18px; color: var(--muted); max-width: 620px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; padding: clamp(24px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
html[data-theme="dark"] .card { box-shadow: inset 0 0 0 1px var(--line); }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card > span { margin-bottom: 18px; font-size: .8125rem; font-weight: 650; color: var(--accent); font-variant-numeric: tabular-nums; }
.card h2, .card h3 { font-size: 1.3125rem; letter-spacing: -.016em; }
.card p { margin-top: 10px; color: var(--muted); }
.card ol, .card ul { margin: 14px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.card li + li { margin-top: 6px; }
.card b { margin-top: auto; padding-top: 20px; font-weight: 600; }
.split-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); }
.split-section p { margin-top: 12px; color: var(--muted); }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.related-links a { padding: 10px 16px; border-radius: 999px; background: var(--chip); font-weight: 600; font-size: .9375rem; text-decoration: none; }
.related-links a:hover { background: var(--line-2); }

/* ---------- Screenshot viewer ---------- */
body.shot-open { overflow: hidden; }
.shot-dialog {
  width: min(1480px, 100vw - 32px); max-width: none; height: min(94svh, 100svh - 24px); max-height: none;
  margin: auto; padding: 0; border: 0; border-radius: 22px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 120px rgba(0, 0, 0, .45); overflow: hidden;
}
.shot-dialog[open] { display: flex; flex-direction: column; }
.shot-dialog::backdrop { background: rgba(6, 10, 20, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.shot-dialog h2 { flex: 0 0 auto; padding: 18px 72px 14px 24px; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.shot-dialog [data-close-shot] { position: absolute; top: 8px; right: 10px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--chip); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.shot-dialog [data-close-shot]:hover { background: var(--line-2); }
.shot-dialog-hint { display: none; margin: -6px 24px 10px; font-size: .8125rem; color: var(--muted); }
@media (max-width: 600px) and (orientation: portrait) { .shot-dialog:has(img:not([data-portrait])) .shot-dialog-hint { display: block; } }
.shot-dialog-image { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 20px 20px; overflow: hidden; }
.shot-dialog-image img { flex: none; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.shot-dialog-image img[data-kind="iphone"] { border-radius: 13% / 6%; }
.shot-dialog-image img[data-kind="ipad"] { border-radius: 1.4% / 1.9%; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-wrap { height: 58px; gap: 12px; }
  .menu-toggle {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; margin-left: auto; margin-right: -10px;
    padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 20px; height: 1.6px; border-radius: 1px; background: var(--ink); transition: transform .25s var(--ease); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
  .brand { margin-right: 0; }
  #main-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100dvh - 58px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  #main-nav.is-open { display: flex; }
  #main-nav > a { padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.1875rem; font-weight: 600; color: var(--ink); }
  #main-nav > a:hover { background: none; }
  #main-nav > .nav-download { justify-content: center; min-height: 50px; margin: 18px 0 0; border-radius: 999px; border-bottom: 0; font-size: 1rem; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero .actions, .platform-line, .rating-line { justify-content: center; }
  .hero-stage { width: min(560px, 100%); margin-inline: auto; }
  .section-head { grid-template-columns: 1fr; }
  .section-head > .text-link { justify-self: start; }
  .how-steps { grid-template-columns: 1fr; gap: 48px; }
  .how-line { display: none; }
  .how-step { text-align: center; align-items: center; }
  .how-step p { max-width: 460px; }
  .tour-panel, .story, .calc-section, .privacy-section, .faq-section, .split-section { grid-template-columns: 1fr; }
  .story--flip .story-art { order: 0; }
  .story-art { order: -1; }
  .tour-copy { max-width: 560px; }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-top > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .hero { padding-top: 32px; }
  .hero .actions { flex-direction: column; align-items: stretch; width: min(340px, 100%); margin-inline: auto; }
  .platform-line { flex-direction: column; align-items: center; gap: 4px; }
  .platform-line span + span::before { display: none; }
  .feature-grid, .card-grid, .promise-list, .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid { gap: 28px; }
  .tour-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); border-radius: 0; background: none; gap: 6px; scrollbar-width: none; }
  .tour-tabs button { background: var(--chip); }
  .tour-tabs button[aria-selected="true"] { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
  .tour-copy { text-align: center; margin-inline: auto; }
  .tour-copy ul { justify-items: start; text-align: left; max-width: 400px; margin-inline: auto; }
  .tour-index { display: none; }
  .gallery { grid-auto-columns: minmax(180px, 62vw); }
  .gallery figure.wide { grid-column: span 2; }
  .legal-toc ol { columns: 1; }
  .faq-list details > p { padding-right: 8px; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 400px) {
  .footer-top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html[data-a11y-motion="true"] .map-art :is(.route-line, .route-glow) { animation: none; stroke-dashoffset: 0; }
html[data-a11y-motion="true"] .map-art .pin { animation: none; opacity: 1; }
