@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ElmsSans';
  src: url('fonts/ElmsSans.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrainsMono';
  src: url('fonts/JetBrainsMono.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ── Raw palette (theme-independent, mirrors GkColors) ────────── */
  --horizon-50:  #F0F6FF;
  --horizon-100: #DCEAFF;
  --horizon-200: #B6D3FF;
  --horizon-300: #84B3FF;
  --horizon-400: #4F8CF7;
  --horizon-500: #2A6FDB;
  --horizon-600: #1F57B8;
  --horizon-700: #1C4791;
  --horizon-800: #1B3A73;
  --horizon-900: #18305C;

  --slate-0:   #FFFFFF;
  --slate-50:  #F7F9FC;
  --slate-100: #EEF2F7;
  --slate-150: #E3E9F1;
  --slate-200: #D4DBE5;
  --slate-300: #B6BFCC;
  --slate-400: #8A94A4;
  --slate-500: #5F6878;
  --slate-600: #434C5C;
  --slate-700: #2F3744;
  --slate-800: #1F2632;
  --slate-900: #131822;

  --sectional-100: #F5EFE1;
  --sectional-300: #D8C79C;
  --sectional-500: #8C7849;
  --amber-300:  #F7B94A;
  --amber-500:  #B8770D;
  --violet-300: #9B7DF5;
  --violet-500: #5A3BBF;
  --green-500:  #1F8A51;
  --red-300:    #F47878;
  --red-500:    #B62525;
  --burnt-300:  #E8845C;
  --burnt-500:  #8F2F12;

  /* ── Semantic tokens — light (mirrors GkTokens.light) ─────────── */
  --bg: var(--slate-50);
  --bg-elevated: var(--slate-0);
  --bg-sunken: var(--slate-100);
  --bg-chart: #FBF8F1;
  --fg1: var(--slate-900);
  --fg2: var(--slate-600);
  --fg3: var(--slate-400);
  --fg-on-accent: var(--slate-0);
  --border: var(--slate-200);
  --border-strong: var(--slate-300);
  --accent: var(--horizon-500);
  --accent-hover: var(--horizon-600);
  --accent-soft: var(--horizon-50);
  --header-bg: rgba(247, 249, 252, 0.82);

  /* Field<T> source colors (mirror GkTokens source dots + tints) */
  --src-user: var(--slate-700);         --src-user-tint: var(--slate-100);
  --src-datapack: var(--sectional-500); --src-datapack-tint: var(--sectional-100);
  --src-computed: var(--horizon-500);   --src-computed-tint: var(--horizon-50);
  --src-override: var(--violet-500);    --src-override-tint: #F4F0FF;
  --src-missing: var(--red-500);        --src-missing-tint: #FFF1F1;
  --src-invalid: var(--burnt-500);      --src-invalid-tint: #FFF4EF;
  --src-stale: var(--amber-500);        --src-stale-tint: #FFF7E6;

  --shadow-sm: 0 1px 2px rgba(19, 24, 34, 0.06);
  --shadow: 0 6px 18px rgba(19, 24, 34, 0.08);
  --shadow-lg: 0 12px 28px rgba(19, 24, 34, 0.10);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --content-max: 1120px;
}

/* ── Semantic tokens — dark (mirrors GkTokens.dark) ───────────────
   Declared twice on purpose: the @media block themes OS-dark visitors
   before/without JS, and the [data-theme="dark"] block themes the
   explicit toggle. Keep the two value lists in sync. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: var(--slate-900);
    --bg-elevated: var(--slate-800);
    --bg-sunken: #0D1119;
    --bg-chart: #1A1610;
    --fg1: var(--slate-50);
    --fg2: var(--slate-300);
    --fg3: var(--slate-500);
    --fg-on-accent: var(--slate-0);
    --border: var(--slate-700);
    --border-strong: var(--slate-600);
    --accent: var(--horizon-400);
    --accent-hover: var(--horizon-300);
    --accent-soft: var(--horizon-900);
    --header-bg: rgba(19, 24, 34, 0.82);

    --src-user: var(--slate-300);        --src-user-tint: var(--slate-800);
    --src-datapack: var(--sectional-300);--src-datapack-tint: #1F1A10;
    --src-computed: var(--horizon-400);  --src-computed-tint: var(--horizon-900);
    --src-override: var(--violet-300);   --src-override-tint: #1A1430;
    --src-missing: var(--red-300);       --src-missing-tint: #2A0A0A;
    --src-invalid: var(--burnt-300);     --src-invalid-tint: #2F1209;
    --src-stale: var(--amber-300);       --src-stale-tint: #2A1A00;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.40);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--slate-900);
  --bg-elevated: var(--slate-800);
  --bg-sunken: #0D1119;
  --bg-chart: #1A1610;
  --fg1: var(--slate-50);
  --fg2: var(--slate-300);
  --fg3: var(--slate-500);
  --fg-on-accent: var(--slate-0);
  --border: var(--slate-700);
  --border-strong: var(--slate-600);
  --accent: var(--horizon-400);
  --accent-hover: var(--horizon-300);
  --accent-soft: var(--horizon-900);
  --header-bg: rgba(19, 24, 34, 0.82);

  --src-user: var(--slate-300);         --src-user-tint: var(--slate-800);
  --src-datapack: var(--sectional-300); --src-datapack-tint: #1F1A10;
  --src-computed: var(--horizon-400);   --src-computed-tint: var(--horizon-900);
  --src-override: var(--violet-300);    --src-override-tint: #1A1430;
  --src-missing: var(--red-300);        --src-missing-tint: #2A0A0A;
  --src-invalid: var(--burnt-300);      --src-invalid-tint: #2F1209;
  --src-stale: var(--amber-300);        --src-stale-tint: #2A1A00;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.40);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg1);
  font-family: 'ElmsSans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--fg1);
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}
h1 { font-weight: 800; font-size: 48px; line-height: 1.15; }
h2 { font-weight: 700; font-size: 30px; line-height: 1.2; }
h3 { font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: 0; }
h4 {
  font-family: 'ElmsSans', system-ui, sans-serif;
  font-weight: 600; font-size: 17px; letter-spacing: 0;
}

p { margin: 0 0 1em; color: var(--fg2); }

.mono {
  font-family: 'JetBrainsMono', ui-monospace, monospace;
  font-feature-settings: 'tnum' 1, 'zero' 1;
}

.label {
  font-family: 'ElmsSans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg2);
}

/* Layout ─────────────────────────────────────────────────────── */

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg1);
}
.brand:hover { text-decoration: none; color: var(--fg1); }
/* Mask the monochrome mark so it paints with a themed color (the source SVG
   stays the single source of truth, owned by `gk assets branding`). The faint
   graticule keeps its own alpha; only the ink color follows the theme. */
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  background: var(--accent);
  -webkit-mask: url(img/logo-mark.svg) center / contain no-repeat;
          mask: url(img/logo-mark.svg) center / contain no-repeat;
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.brand:hover .brand-mark { transform: rotate(-8deg); }
.brand-word {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg1);
}

nav.site-nav { display: flex; gap: 24px; align-items: center; }
nav.site-nav a {
  color: var(--fg2);
  font-weight: 500;
}
nav.site-nav a:hover { color: var(--fg1); text-decoration: none; }
nav.site-nav a.btn-primary {
  color: var(--fg-on-accent);
}
nav.site-nav a.btn-primary:hover {
  color: var(--fg-on-accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'ElmsSans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease,
    color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.btn-primary { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--fg-on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--fg-on-accent);
  text-decoration: none;
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--fg1);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-sunken);
  text-decoration: none;
  color: var(--fg1);
}
.btn-lg { padding: 14px 24px; font-size: 16px; }

/* Theme toggle — cycles auto → light → dark, mirroring the app's
   AppThemeMode. The button holds all three icons; CSS shows the one
   matching the persisted preference on <html data-theme-pref>. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg2);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.theme-toggle:hover { color: var(--fg1); border-color: var(--border-strong); }
.theme-toggle:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Visible keyboard focus for every other interactive element. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .ti { display: none; }
:root[data-theme-pref="auto"]  .theme-toggle .ti-auto,
:root[data-theme-pref="light"] .theme-toggle .ti-light,
:root[data-theme-pref="dark"]  .theme-toggle .ti-dark,
:root:not([data-theme-pref])   .theme-toggle .ti-auto { display: block; }

/* Smooth cross-fade when the theme flips (buttons handle their own). */
body, .site-header, .site-footer, .eyebrow {
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 72px;
  text-align: center;
  background:
    radial-gradient(62% 52% at 50% -4%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, var(--bg-elevated), var(--bg) 62%);
}
.hero .container {
  position: relative;
  z-index: 1;
}

/* Cropped globe motif: faint graticule + one animated great-circle route. */
.hero-arc {
  display: block;
  position: relative;
  left: 50%;
  width: calc(100vw - 1px);
  height: max(240px, 11vw);
  margin: 6px 0 18px;
  transform: translateX(-50%);
  color: var(--accent);
  opacity: 0.46;
  pointer-events: none;
}
.hero-arc-path,
.globe-rim,
.globe-latitude,
.globe-meridian {
  fill: none;
  stroke-linecap: round;
}
.hero-arc-path {
  stroke-width: 2;
  stroke-dasharray: 5 11;
  stroke-dashoffset: 0;
}
.globe-rim,
.globe-latitude,
.globe-meridian {
  stroke: currentColor;
}
.globe-rim {
  opacity: 0.20;
  stroke-width: 1.6;
}
.globe-latitude {
  opacity: 0.16;
  stroke-width: 1.2;
}
.globe-latitude-far {
  opacity: 0.10;
}
.globe-meridian {
  opacity: 0.12;
  stroke-width: 1;
}
.globe-meridian-edge { opacity: 0.08; }
.globe-meridian-center { opacity: 0.16; }
:root[data-theme="dark"] .globe-rim { opacity: 0.22; }
:root[data-theme="dark"] .globe-latitude { opacity: 0.18; }
:root[data-theme="dark"] .globe-latitude-far { opacity: 0.12; }
:root[data-theme="dark"] .globe-meridian { opacity: 0.14; }
:root[data-theme="dark"] .globe-meridian-edge { opacity: 0.10; }
:root[data-theme="dark"] .globe-meridian-center { opacity: 0.18; }
@media (prefers-reduced-motion: no-preference) {
  .hero-arc-path { animation: arc-draw 50s linear infinite; }
}
@keyframes arc-draw { to { stroke-dashoffset: -320; } }

.hero h1 { font-size: clamp(40px, 6vw, 64px); }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent), var(--horizon-300));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}
.hero p.lead {
  font-size: 19px;
  color: var(--fg2);
  max-width: 640px;
  margin: 0 auto;
}
.hero .ctas {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.eyebrow {
  display: inline-block;
  font-family: 'JetBrainsMono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

/* Section base */
section { padding: 72px 0; }
section.alt { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p { font-size: 17px; }

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms ease, border-color 220ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.card h3 { margin-top: 8px; }
.card p { color: var(--fg2); margin-bottom: 0; }
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
/* Icon tile gets a subtle gradient + ring so it reads as a chip, not a box. */
.card .icon {
  background: linear-gradient(140deg, var(--accent-soft), transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Field-card-style sample to echo the app aesthetic */
.field-sample {
  display: inline-flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  min-width: 186px;
}
.field-sample .field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.field-sample .field-label {
  font-family: 'ElmsSans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg2);
}
/* Source-tinted backgrounds, exactly like GkFieldCard. */
.field-sample.src-user { background: var(--src-user-tint); }
.field-sample.src-datapack { background: var(--src-datapack-tint); }
.field-sample.src-computed { background: var(--src-computed-tint); }
.field-sample.src-override { background: var(--src-override-tint); }
.field-sample.src-stale { background: var(--src-stale-tint); }
.field-sample .field-value {
  font-family: 'JetBrainsMono', monospace;
  font-feature-settings: 'tnum' 1, 'zero' 1;
  font-weight: 600;
  font-size: 24px;
  color: var(--fg1);
  line-height: 1;
}
.field-sample .field-id {
  font-family: 'JetBrainsMono', monospace;
  font-size: 10px;
  color: var(--fg3);
  margin-top: 6px;
}
.field-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

/* Prose pages (privacy / imprint) */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 0;
}
.prose h1 { font-size: 36px; }
.prose h2 { margin-top: 2em; font-size: 24px; }
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose li { color: var(--fg2); }
.prose strong { color: var(--fg1); }
.prose ul { padding-left: 1.25em; }

/* Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.site-footer .legal {
  color: var(--fg3);
  font-size: 13px;
}
.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer nav a { color: var(--fg2); }

/* ── Source badge (mirrors GkSourceBadge: dot + uppercase label) ──── */
.gk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'ElmsSans', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--badge-c, var(--fg2));
}
.gk-badge i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--badge-c, var(--fg3));
  flex: none;
}
.src-user { --badge-c: var(--src-user); }
.src-datapack { --badge-c: var(--src-datapack); }
.src-computed { --badge-c: var(--src-computed); }
.src-override { --badge-c: var(--src-override); }
.src-missing { --badge-c: var(--src-missing); }
.src-invalid { --badge-c: var(--src-invalid); }
.src-stale { --badge-c: var(--src-stale); }

/* Source legend — the whole Field<T> source vocabulary at a glance. */
.source-legend {
  list-style: none;
  margin: -20px 0 44px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.source-legend li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  background: var(--bg);
}
.source-legend li:has(.src-user) { background: var(--src-user-tint); }
.source-legend li:has(.src-datapack) { background: var(--src-datapack-tint); }
.source-legend li:has(.src-computed) { background: var(--src-computed-tint); }
.source-legend li:has(.src-override) { background: var(--src-override-tint); }
.source-legend li:has(.src-missing) { background: var(--src-missing-tint); }
.source-legend li:has(.src-invalid) { background: var(--src-invalid-tint); }
.source-legend li:has(.src-stale) { background: var(--src-stale-tint); }

/* Unit suffix on a mono value (mirrors GkTextStyles.unit). */
.field-value .unit {
  font-family: 'JetBrainsMono', monospace;
  font-size: 12px;
  font-weight: 500;
  margin-left: 4px;
  color: var(--fg3);
}

/* Gradient accent under each section heading. */
.section-head::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--horizon-300));
}

/* ── Reveal on scroll — progressive enhancement (see main.js) ─────── */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.js .features .card:nth-child(2) { transition-delay: 0.05s; }
.js .features .card:nth-child(3) { transition-delay: 0.10s; }
.js .features .card:nth-child(4) { transition-delay: 0.15s; }
.js .features .card:nth-child(5) { transition-delay: 0.20s; }
.js .features .card:nth-child(6) { transition-delay: 0.25s; }

/* Hero field samples drift up on load (decorative, aria-hidden). */
@media (prefers-reduced-motion: no-preference) {
  .field-row .field-sample {
    animation: rise 0.6s both;
  }
  .field-row .field-sample:nth-child(1) { animation-delay: 0.10s; }
  .field-row .field-sample:nth-child(2) { animation-delay: 0.18s; }
  .field-row .field-sample:nth-child(3) { animation-delay: 0.26s; }
  .field-row .field-sample:nth-child(4) { animation-delay: 0.34s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ── Gradient call-to-action band ─────────────────────────────────── */
.cta-band { padding: 8px 0 24px; }
.cta-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 64px 32px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(80% 120% at 85% -10%, var(--horizon-500), transparent 60%),
    linear-gradient(135deg, var(--horizon-600), var(--horizon-800));
  box-shadow: var(--shadow-lg);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 { color: #fff; }
.cta-card p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
}
.cta-arc {
  display: block;
  position: relative;
  left: 50%;
  width: calc(100% + 64px);
  height: 110px;
  margin: 10px 0 18px;
  transform: translateX(-50%);
  color: #fff;
  opacity: 0.52;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .cta-arc .hero-arc-path { animation: arc-draw 40s linear infinite; }
}
.btn-on-accent { background: #fff; color: var(--horizon-700); box-shadow: var(--shadow); }
.btn-on-accent:hover { background: var(--slate-100); color: var(--horizon-700); }

/* ── Screenshot / video gallery ───────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gallery .shot { margin: 0; }
.gallery .shot-wide { grid-column: 1 / -1; }
.shot figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--fg2);
}
.shot-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-sunken);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms ease, border-color 220ms ease;
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot:hover .shot-frame {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
/* Phone-shaped shots sit narrower and rounder, centered in their cell. */
.shot-frame.phone {
  max-width: 248px;
  margin-inline: auto;
  border-radius: var(--radius-xl);
}
/* Video poster: a play badge + a "coming soon" tag so it reads as a clip. */
.shot-frame.is-video .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(19, 24, 34, 0.55);
  color: #fff;
  box-shadow: var(--shadow);
}
.shot-frame.is-video .play svg { width: 26px; height: 26px; margin-left: 3px; }
.shot-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  font-family: 'JetBrainsMono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg2);
  background: var(--header-bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  -webkit-backdrop-filter: saturate(180%) blur(8px);
          backdrop-filter: saturate(180%) blur(8px);
}
.js .gallery .shot:nth-child(2) { transition-delay: 0.05s; }
.js .gallery .shot:nth-child(3) { transition-delay: 0.10s; }
.js .gallery .shot:nth-child(4) { transition-delay: 0.15s; }

/* Theme-aware screenshots — show the asset matching the active theme.
   Mirrors the dual token blocks: [data-theme] covers the JS / manual
   toggle; the media query covers OS-dark without JS. Scoped under
   .shot-frame so these out-rank `.shot-frame img { display: block }`. */
.shot-frame .shot-dark { display: none; }
:root[data-theme="dark"] .shot-frame .shot-light { display: none; }
:root[data-theme="dark"] .shot-frame .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .shot-frame .shot-light { display: none; }
  :root:not([data-theme]) .shot-frame .shot-dark { display: block; }
}

/* ── Get the app (Android, pre-launch) ────────────────────────────── */
#get-app { text-align: center; }
/* Native-vs-web perks: compact icon + copy, left-aligned within a centered
   section. Lighter than the feature cards so it stays secondary to them. */
.native-perks {
  list-style: none;
  margin: 4px auto 40px;
  padding: 0;
  max-width: 880px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px 30px;
  text-align: left;
}
/* Fixed basis (not 1fr) so every perk keeps the same width and a partial
   last row stays centered rather than left-hanging. */
.native-perks li { flex: 0 1 250px; display: flex; gap: 13px; }
.native-perks .perk-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: linear-gradient(140deg, var(--accent-soft), transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.native-perks .perk-icon svg { width: 19px; height: 19px; }
.native-perks h3 { font-size: 16px; margin: 1px 0 4px; }
.native-perks p { font-size: 13.5px; margin: 0; }
.get-app-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
/* Two-line store badge — sized to read as the primary action. */
.store-badge {
  gap: 12px;
  padding: 12px 22px;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.12;
}
.store-badge-text small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.store-badge-text strong {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Disabled CTA — present and clearly styled, but not yet actionable. */
.btn.is-disabled,
.btn.is-disabled:hover {
  background: var(--bg-sunken);
  color: var(--fg3);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  text-decoration: none;
}
/* "Join the beta" reads as a text link, greyed until the program opens. */
.beta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  background: none;
  border: 0;
  font-family: 'ElmsSans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--fg3);
  cursor: not-allowed;
}
.beta-link svg { width: 18px; height: 18px; }

/* Single-column gallery once three phones no longer fit comfortably. */
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding: 64px 0 40px; }
  section { padding: 48px 0; }
  nav.site-nav { gap: 12px; }
  nav.site-nav a.label-only { display: none; }
  .hero-arc {
    height: 94px;
    margin: 4px 0 14px;
    opacity: 0.42;
  }
  .cta-card { padding: 44px 22px; }
  .cta-arc {
    width: calc(100% + 44px);
    height: 88px;
    margin: 8px 0 16px;
    opacity: 0.46;
  }
  .source-legend { margin-top: -8px; }
  .native-perks li { flex-basis: 100%; }
}
