/* -----------------------------------------------------------------------------
   Self-hosted fonts (latin subset). Files live in /public/fonts/.
   DM Sans is a variable font — one file covers weights 400–700.
   IBM Plex Mono ships as static instances; one file per weight.
-------------------------------------------------------------------------------*/

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dm-sans-variable.woff2') format('woff2-variations'),
       url('/fonts/dm-sans-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -----------------------------------------------------------------------------
   Design tokens — single source of truth for every page.
   Dark is default; light overrides via prefers-color-scheme and [data-theme].
-------------------------------------------------------------------------------*/

:root {
  /* Mode-agnostic brand */
  --brand-purple: #2E1332;
  --brand-orange: #DB4F1A;      /* signal only — live dot, focus ring */
  --brand-orange-cta: #B53C14;  /* CTA fill; AA against white label */
  --brand-gray: #E8E6ED;

  /* Mode-aware — dark default */
  --canvas: #0F0612;
  --surface: #1C0F20;
  --raised: #261432;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);

  --text-primary: #F5F2F8;
  --text-secondary: #C6BDCB;
  --text-tertiary: #948A99;
  --text-quaternary: #6B5E71;

  --success: #4ECB86;
  --caution: #E0B94A;
  --danger: #F58478;
  --info: #BC8FE0;

  /* Transit mode palette (dark) — per brand doc §2.5 */
  --mode-bus: #B892B0;
  --mode-tram: #DB84A4;
  --mode-metro: #A37FA8;
  --mode-trolley: #D088B8;
  --mode-train: #82ABFF;
  --mode-ferry: #3DC8BD;
  --mode-walking: #AEB49A;
  --mode-cycling: #B8D05B;

  /* Cancelled mode tokens (dark) — derived per brand doc §2.6:
     saturation × 0.55, lightness + 0.12, rounded to sRGB.
     Pre-computed; components reference the token directly. */
  --mode-bus-cancelled: #CABDC8;
  --mode-tram-cancelled: #DDBFCA;
  --mode-metro-cancelled: #B8AABA;
  --mode-trolley-cancelled: #D7BECF;
  --mode-train-cancelled: #CED9F1;
  --mode-ferry-cancelled: #84BEB9;
  --mode-walking-cancelled: #C8CAC1;
  --mode-cycling-cancelled: #C2CB9D;

  /* Fallback for cancelled rows without an explicit mode. */
  --mode-cancelled: #6B5E71;

  /* Shadows — dark (pure black, per brand doc §6.3) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.56), 0 4px 8px rgba(0, 0, 0, 0.32);

  --bg-gradient: radial-gradient(ellipse 120% 60% at 50% -10%, #2E1332 0%, var(--canvas) 60%);

  /* Radii per brand doc §5 */
  --radius-chip: 12px;
  --radius-card: 16px;
  --radius-panel: 24px;
  --radius-pill: 9999px;

  /* Spacing scale per brand doc §4 — 6 tokens, nothing above 24 px.
     Larger values are composed as multiples at layout time. */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;

  --container-max: 1200px;
  --container-pad: clamp(20px, 4vw, 48px);

  /* Type scale */
  --font-display: 600 40px/44px 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-h1: 600 30px/36px 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-h2: 600 24px/30px 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-h3: 600 20px/26px 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body: 400 17px/22px 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body-sm: 400 15px/20px 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-caption: 400 13px/18px 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-overline: 500 11px/14px 'IBM Plex Mono', ui-monospace, monospace;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #F4F3F7;
    --surface: #EAEAF1;
    --raised: #D9D4E0;
    --hairline: rgba(26, 10, 30, 0.10);
    --hairline-strong: rgba(26, 10, 30, 0.18);

    --text-primary: #1A0A1E;
    --text-secondary: #4A3B4E;
    --text-tertiary: #716376;
    --text-quaternary: #ADA3B1;

    --success: #0E7A42;
    --caution: #8A660D;
    --danger: #B02E22;
    --info: #632F93;

    --mode-bus: #4A2540;
    --mode-tram: #6B1F3E;
    --mode-metro: #382848;
    --mode-trolley: #7A2E5A;
    --mode-train: #002F8E;
    --mode-ferry: #0A7570;
    --mode-walking: #595F44;
    --mode-cycling: #557218;

    /* Cancelled (light) — derived per §2.6: saturation × 0.55, lightness delta 0. */
    --mode-bus-cancelled: #422D3C;
    --mode-tram-cancelled: #5A3041;
    --mode-metro-cancelled: #382F41;
    --mode-trolley-cancelled: #693F57;
    --mode-train-cancelled: #203A6E;
    --mode-ferry-cancelled: #225D5A;
    --mode-walking-cancelled: #56594A;
    --mode-cycling-cancelled: #4E5E2C;

    --mode-cancelled: #ADA3B1;

    --shadow-xs: 0 1px 2px rgba(46, 19, 50, 0.05);
    --shadow-sm: 0 2px 8px rgba(46, 19, 50, 0.06), 0 1px 2px rgba(46, 19, 50, 0.04);
    --shadow-md: 0 4px 16px rgba(46, 19, 50, 0.08), 0 2px 4px rgba(46, 19, 50, 0.05);
    --shadow-lg: 0 12px 32px rgba(46, 19, 50, 0.12), 0 4px 8px rgba(46, 19, 50, 0.06);

    --bg-gradient: radial-gradient(ellipse 120% 60% at 50% -10%, rgba(46, 19, 50, 0.06) 0%, var(--canvas) 60%);

    color-scheme: light;
  }
}

/* Manual override hooks (reserved for /brand toggle). Mirror the media query. */
[data-theme='light'] {
  --canvas: #F4F3F7;
  --surface: #EAEAF1;
  --raised: #D9D4E0;
  --hairline: rgba(26, 10, 30, 0.10);
  --hairline-strong: rgba(26, 10, 30, 0.18);
  --text-primary: #1A0A1E;
  --text-secondary: #4A3B4E;
  --text-tertiary: #716376;
  --text-quaternary: #ADA3B1;
  --success: #0E7A42;
  --caution: #8A660D;
  --danger: #B02E22;
  --info: #632F93;
  --mode-bus: #4A2540;
  --mode-tram: #6B1F3E;
  --mode-metro: #382848;
  --mode-trolley: #7A2E5A;
  --mode-train: #002F8E;
  --mode-ferry: #0A7570;
  --mode-walking: #595F44;
  --mode-cycling: #557218;
  --mode-bus-cancelled: #422D3C;
  --mode-tram-cancelled: #5A3041;
  --mode-metro-cancelled: #382F41;
  --mode-trolley-cancelled: #693F57;
  --mode-train-cancelled: #203A6E;
  --mode-ferry-cancelled: #225D5A;
  --mode-walking-cancelled: #56594A;
  --mode-cycling-cancelled: #4E5E2C;
  --mode-cancelled: #ADA3B1;
  --shadow-xs: 0 1px 2px rgba(46, 19, 50, 0.05);
  --shadow-sm: 0 2px 8px rgba(46, 19, 50, 0.06), 0 1px 2px rgba(46, 19, 50, 0.04);
  --shadow-md: 0 4px 16px rgba(46, 19, 50, 0.08), 0 2px 4px rgba(46, 19, 50, 0.05);
  --shadow-lg: 0 12px 32px rgba(46, 19, 50, 0.12), 0 4px 8px rgba(46, 19, 50, 0.06);
  --bg-gradient: radial-gradient(ellipse 120% 60% at 50% -10%, rgba(46, 19, 50, 0.06) 0%, var(--canvas) 60%);
  color-scheme: light;
}

[data-theme='dark'] {
  --canvas: #0F0612;
  --surface: #1C0F20;
  --raised: #261432;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --text-primary: #F5F2F8;
  --text-secondary: #C6BDCB;
  --text-tertiary: #948A99;
  --text-quaternary: #6B5E71;
  --success: #4ECB86;
  --caution: #E0B94A;
  --danger: #F58478;
  --info: #BC8FE0;
  --mode-bus: #B892B0;
  --mode-tram: #DB84A4;
  --mode-metro: #A37FA8;
  --mode-trolley: #D088B8;
  --mode-train: #82ABFF;
  --mode-ferry: #3DC8BD;
  --mode-walking: #AEB49A;
  --mode-cycling: #B8D05B;
  --mode-bus-cancelled: #CABDC8;
  --mode-tram-cancelled: #DDBFCA;
  --mode-metro-cancelled: #B8AABA;
  --mode-trolley-cancelled: #D7BECF;
  --mode-train-cancelled: #CED9F1;
  --mode-ferry-cancelled: #84BEB9;
  --mode-walking-cancelled: #C8CAC1;
  --mode-cycling-cancelled: #C2CB9D;
  --mode-cancelled: #6B5E71;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.56), 0 4px 8px rgba(0, 0, 0, 0.32);
  --bg-gradient: radial-gradient(ellipse 120% 60% at 50% -10%, #2E1332 0%, var(--canvas) 60%);
  color-scheme: dark;
}

/* -----------------------------------------------------------------------------
   Reset + baseline
-------------------------------------------------------------------------------*/

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

html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Scroll-margin so sticky-nav height doesn't clip the target overline/heading. */
:target,
section[id],
[id="waitlist"] {
  scroll-margin-top: 96px;
}

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

body {
  min-height: 100vh;
  background: var(--canvas);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font: var(--font-body);
  font-feature-settings: 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Safety net against any child escaping the viewport horizontally on narrow
     screens — long URLs, wide tables, etc. `clip` preserves sticky positioning
     in a way `hidden` doesn't. */
  overflow-x: clip;
}

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

button, input, textarea { font: inherit; color: inherit; }

a {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover { color: var(--brand-orange); }

::selection { background: var(--brand-orange); color: #fff; }

/* -----------------------------------------------------------------------------
   Typography helpers
-------------------------------------------------------------------------------*/

.display { font: var(--font-display); letter-spacing: -0.025em; }
.h1 { font: var(--font-h1); letter-spacing: -0.02em; }
.h2 { font: var(--font-h2); letter-spacing: -0.015em; }
.h3 { font: var(--font-h3); letter-spacing: -0.01em; }
.body { font: var(--font-body); }
.body-sm { font: var(--font-body-sm); }
.caption { font: var(--font-caption); color: var(--text-tertiary); }
.overline {
  font: var(--font-overline);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum','lnum','zero'; }

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

@media (min-width: 768px) {
  .display { font-size: 48px; line-height: 52px; }
}
@media (min-width: 1024px) {
  .display { font-size: 56px; line-height: 60px; }
}

/* -----------------------------------------------------------------------------
   Container
-------------------------------------------------------------------------------*/

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

section { padding: 48px 0; }
section.pivot { padding: 64px 0; }

@media (min-width: 768px) {
  section { padding: 64px 0; }
  section.pivot { padding: 96px 0; }
}
@media (min-width: 1024px) {
  section { padding: 80px 0; }
}

/* -----------------------------------------------------------------------------
   Surfaces — .glass, .card
-------------------------------------------------------------------------------*/

.glass {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-2xl);
}

/* -----------------------------------------------------------------------------
   Chips
-------------------------------------------------------------------------------*/

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-chip);
  font: 500 12px/16px 'DM Sans', system-ui, sans-serif;
  letter-spacing: 0.02em;
  background: var(--raised);
  color: var(--text-secondary);
  border: 1px solid var(--hairline);
}
.chip--success { background: color-mix(in srgb, var(--success) 20%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.chip--info    { background: color-mix(in srgb, var(--info) 20%, transparent);    color: var(--info);    border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.chip--outline { background: transparent; color: var(--text-tertiary); border-color: var(--hairline-strong); }
.chip--danger  { background: color-mix(in srgb, var(--danger) 20%, transparent);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 30%, transparent); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0 var(--space-xl);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: 500 15px/20px 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--brand-orange-cta);
  color: #fff;
  border-color: var(--brand-orange-cta);
}
.btn--primary:hover { background: color-mix(in srgb, var(--brand-orange-cta) 88%, black); color: #fff; }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--hairline-strong);
}
.btn--ghost:hover { border-color: var(--text-tertiary); color: var(--text-primary); }

.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }

/* -----------------------------------------------------------------------------
   Focus ring
-------------------------------------------------------------------------------*/

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

/* -----------------------------------------------------------------------------
   Nav
-------------------------------------------------------------------------------*/

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  background: color-mix(in srgb, var(--canvas) 72%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--hairline); }

@media (min-width: 768px) {
  .nav {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
}

.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav__wordmark img { height: 36px; width: auto; }
@media (min-width: 768px) {
  .nav__wordmark img { height: 42px; width: auto; }
}

/* Wordmark theming — honours both prefers-color-scheme and [data-theme] overrides.
   Uses two <img> tags because <picture><source media> ignores [data-theme] attrs. */
.wordmark { display: inline-block; line-height: 0; }
.wordmark__light { display: inline-block; }
.wordmark__dark  { display: none; }
@media (prefers-color-scheme: light) {
  .wordmark__light { display: none; }
  .wordmark__dark  { display: inline-block; }
}
[data-theme='light'] .wordmark__light { display: none; }
[data-theme='light'] .wordmark__dark  { display: inline-block; }
[data-theme='dark']  .wordmark__light { display: inline-block; }
[data-theme='dark']  .wordmark__dark  { display: none; }

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-2xl);
}
.nav__links a {
  color: var(--text-secondary);
  font: 500 14px/20px 'DM Sans', system-ui, sans-serif;
}
.nav__links a:hover { color: var(--text-primary); }

@media (min-width: 768px) {
  .nav__links { display: inline-flex; }
}

.nav__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}
@media (min-width: 768px) {
  .nav__actions { gap: var(--space-md); }
}

/* -----------------------------------------------------------------------------
   Mobile nav — hamburger toggle + dropdown panel.
   Hidden on >=768px; desktop uses the inline layout as before.
-------------------------------------------------------------------------------*/

.nav__mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.nav__mobile-toggle:hover { border-color: var(--text-tertiary); }
.nav__mobile-toggle svg { width: 18px; height: 18px; }
.nav__mobile-toggle .nav__mobile-toggle__close { display: none; }
.nav__mobile-toggle[aria-expanded='true'] .nav__mobile-toggle__open { display: none; }
.nav__mobile-toggle[aria-expanded='true'] .nav__mobile-toggle__close { display: inline-flex; }

.nav__mobile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  max-width: min(320px, calc(100vw - var(--container-pad) * 2));
  padding: var(--space-sm);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 2px;
  z-index: 60;
}
.nav__mobile-panel[hidden] { display: none; }

.nav__mobile-panel__group {
  display: grid;
  gap: 2px;
}
.nav__mobile-panel__group + .nav__mobile-panel__group {
  margin-top: var(--space-xs);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--hairline);
}

.nav__mobile-panel__label {
  display: block;
  padding: var(--space-xs) var(--space-md) 2px;
  font: var(--font-overline);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.nav__mobile-panel a,
.nav__mobile-panel button.nav__mobile-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 40px;
  padding: var(--space-sm) var(--space-md);
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: 500 15px/20px 'DM Sans', system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: color 120ms ease, background 120ms ease;
}
.nav__mobile-panel a:hover,
.nav__mobile-panel button.nav__mobile-link:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--raised) 60%, transparent);
}
.nav__mobile-panel a[aria-current='page'],
.nav__mobile-panel a[aria-current='location'] {
  color: var(--text-primary);
}
.nav__mobile-panel .btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

.nav__mobile-panel__theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font: 500 15px/20px 'DM Sans', system-ui, sans-serif;
  color: var(--text-secondary);
}

/* Visibility helpers — mobile/desktop splits for nav children.
   `.nav__desktop-only` is hidden below 768px and keeps its natural display
   (inline-flex for buttons) at >=768px. */
@media (max-width: 767px) {
  .nav__desktop-only { display: none !important; }
}
@media (min-width: 768px) {
  .nav__mobile-toggle { display: none; }
  .nav__mobile-panel { display: none !important; }
}

/* Icon-only Home button on mobile (used by /privacy-policy and /brand).
   The label text still reads for SRs but collapses visually on narrow screens. */
.btn--icon-on-mobile {
  padding-left: 0;
  padding-right: 0;
  width: 40px;
  min-height: 40px;
}
.btn--icon-on-mobile > span { display: none; }
@media (min-width: 768px) {
  .btn--icon-on-mobile {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
    width: auto;
    min-height: 44px;
  }
  .btn--icon-on-mobile > span { display: inline; }
}

/* Landing page — surface "Join waitlist" pill next to the hamburger only
   after the hero scrolls out of view. On desktop the element falls back to
   `.btn`'s inline-flex display. See inline script in index.html. */
@media (max-width: 767px) {
  .nav__cta-surface { display: none; }
  .nav.is-scrolled-past-hero .nav__cta-surface { display: inline-flex; }
}

/* -----------------------------------------------------------------------------
   Theme toggle — pill with sun + moon, sliding thumb highlights the active side.
   Semantics: role=switch, aria-checked='true' means light, 'false' means dark.
-------------------------------------------------------------------------------*/

.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  line-height: 0;
  border-radius: var(--radius-pill);
}

.theme-toggle__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  transition: background 160ms ease, border-color 160ms ease;
}

.theme-toggle__icon {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  transition: color 160ms ease;
}
.theme-toggle__icon svg { width: 14px; height: 14px; }

/* Highlight the icon on the side the thumb is under. */
.theme-toggle[aria-checked='true']  .theme-toggle__icon--sun  { color: #fff; }
.theme-toggle[aria-checked='false'] .theme-toggle__icon--moon { color: #fff; }

.theme-toggle__thumb {
  position: absolute;
  z-index: 1;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--brand-orange-cta);
  transition: transform 200ms cubic-bezier(.4, 0, .2, 1), background 160ms ease;
}
.theme-toggle[aria-checked='true'] .theme-toggle__thumb { transform: translateX(30px); }

.theme-toggle:hover .theme-toggle__track { border-color: var(--text-tertiary); }
.theme-toggle:focus-visible { outline: none; }
.theme-toggle:focus-visible .theme-toggle__track {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle__thumb { transition: transform 0.01ms; }
}

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

.footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 0 40px;
  color: var(--text-tertiary);
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: flex-start;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .footer__top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2xl);
  }
}

.footer__contact {
  margin: 0;
  font: var(--font-body-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}
.footer__contact a { color: var(--text-primary); }
.footer__contact a:hover { color: var(--brand-orange); }

.footer__social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  color: var(--text-tertiary);
  border: 1px solid var(--hairline);
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.footer__social a:hover {
  color: var(--text-primary);
  border-color: var(--hairline-strong);
  background: color-mix(in srgb, var(--raised) 60%, transparent);
}

.footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-xl);
  font: var(--font-body-sm);
}
.footer__legal a { color: var(--text-secondary); }
.footer__legal a:hover { color: var(--text-primary); }

.footer__bottom {
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-2xl);
  font: var(--font-caption);
  color: var(--text-tertiary);
}
.footer__bottom p { margin: 0 0 var(--space-sm); }

/* -----------------------------------------------------------------------------
   Accessibility hooks
-------------------------------------------------------------------------------*/

@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;
  }
}

@media (prefers-contrast: more) {
  :root {
    --hairline: var(--text-tertiary);
    --hairline-strong: var(--text-secondary);
  }
  .glass, .card { box-shadow: none; border-color: var(--text-tertiary); }
}

.sr-only {
  position: absolute;
  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: 8px;
  top: 8px;
  padding: 10px 14px;
  background: var(--action-orange, #B53C14);
  color: #fff;
  font: 600 var(--font-body-sm, 15px/1.3) 'DM Sans', system-ui, sans-serif;
  text-decoration: none;
  border-radius: 10px;
  z-index: 1000;
  transform: translateY(-200%);
  transition: transform 120ms ease-out;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
