/* GB7 Garage — design tokens. Dark is the primary experience; light is fully supported. */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0b0b0c;
  --bg-elev: #111113;
  --surface: #151517;
  --surface-2: #1c1c1f;
  --surface-3: #242428;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Ink */
  --text: #f2efe9;
  --text-2: #c9c5bc;
  --muted: #8e8a82;
  --faint: #5c5a55;

  /* Signal colours — used sparingly */
  --accent: #e4462c;          /* GB7 signal red */
  --accent-2: #ff6a4d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(228, 70, 44, 0.14);
  --legacy: #c3a061;          /* patina brass */
  --legacy-soft: rgba(195, 160, 97, 0.14);
  --verified: #e4462c;
  --ok: #5fb38a;
  --warn: #e0a43b;
  --danger: #ef5b4b;

  /* Location tones (map + plates) */
  --tone-road: #d8cbb2;
  --tone-track: #e4462c;
  --tone-museum: #8fa7c4;
  --tone-event: #c3a061;

  /* Type */
  --font-sans: 'Inter Tight Variable', 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fs-xs: 0.6875rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --fs-2xl: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  --fs-hero: clamp(3rem, 1.2rem + 8vw, 8.5rem);
  --tracking-label: 0.16em;

  /* Shape & motion */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 24px 64px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --dur: 180ms;

  /* Layout */
  --gutter: 16px;
  --rail: 248px;
  --tabbar: 64px;
  --content: 680px;
  --wide: 1180px;
}

@media (min-width: 768px) {
  :root { --gutter: 28px; }
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f5f3ee;
    --bg-elev: #fbfaf7;
    --surface: #ffffff;
    --surface-2: #f0ede6;
    --surface-3: #e7e3da;
    --line: rgba(17, 17, 17, 0.09);
    --line-strong: rgba(17, 17, 17, 0.18);
    --text: #141414;
    --text-2: #3b3a37;
    --muted: #6d6a63;
    --faint: #a19d94;
    --accent-soft: rgba(228, 70, 44, 0.1);
    --legacy: #9a7a3d;
    --tone-road: #7b6c52;
    --tone-museum: #4f6c8f;
    --tone-event: #9a7a3d;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-2: 0 24px 64px rgba(0, 0, 0, 0.16);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3ee;
  --bg-elev: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --surface-3: #e7e3da;
  --line: rgba(17, 17, 17, 0.09);
  --line-strong: rgba(17, 17, 17, 0.18);
  --text: #141414;
  --text-2: #3b3a37;
  --muted: #6d6a63;
  --faint: #a19d94;
  --accent-soft: rgba(228, 70, 44, 0.1);
  --legacy: #9a7a3d;
  --tone-road: #7b6c52;
  --tone-museum: #4f6c8f;
  --tone-event: #9a7a3d;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 24px 64px rgba(0, 0, 0, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.5;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.label {
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.mono { font-family: var(--font-mono); font-feature-settings: 'zero'; }

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

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