/* ============================================================
   DeepSpeed Design System — Tokens
   NTU DeepSpeed F1Tenth Autonomous Racing Team
   ------------------------------------------------------------
   VENDORED VERBATIM from the DeepSpeed design system,
   `colors_and_type.css` (Claude Design project
   4229d643-2d9f-455b-ace0-1401aade4dcc).

   Do not hand-edit. To update, re-export that file over this one.
   Docs-specific styling lives in docs.css, which only reads these
   custom properties.
   ============================================================ */

/* Web fonts — substituted via Google Fonts (see README "Type substitutions") */
@import url("https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Anton&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

/* ----- Color palette (raw) ----- */
:root {
  /* Monochrome — the foundation. The logo is pure b/w. */
  --ink-0:   #000000;       /* pure black — track / void */
  --ink-900: #0A0A0B;       /* near-black backgrounds (dark mode bg) */
  --ink-800: #141416;
  --ink-700: #1F1F22;
  --ink-600: #2A2A2E;
  --ink-500: #3D3D42;
  --ink-400: #6B6B72;
  --ink-300: #9A9AA1;
  --ink-200: #C8C8CD;
  --ink-100: #E7E7EA;
  --ink-50:  #F4F4F5;       /* off-white (light mode bg) */
  --ink-0w:  #FFFFFF;       /* pure white — chalk / line */

  /* Accents — used sparingly. The brand is monochrome; these are flags. */
  --race-red:      #E2342B;  /* race / record / live / brake light */
  --race-red-deep: #B81F18;
  --race-red-hot:  #FF4B41;  /* press / glow */
  --flag-yellow:   #F5C518;  /* caution flag / engineering signal */
  --flag-green:    #1F9D55;  /* go / pass / online */
  --grid-cyan:     #28C7E5;  /* telemetry / data / link */

  /* Tire-mark gradients (rare; for hero moments) */
  --gradient-skid: linear-gradient(180deg, #000 0%, #1F1F22 60%, #2A2A2E 100%);
  --gradient-burn: linear-gradient(90deg, var(--race-red-deep) 0%, var(--race-red) 50%, var(--flag-yellow) 100%);
}

/* ----- Semantic colors — DARK is default (the brand lives on black) ----- */
:root,
[data-theme="dark"] {
  --bg:          var(--ink-900);
  --bg-elev-1:   var(--ink-800);
  --bg-elev-2:   var(--ink-700);
  --bg-inset:    var(--ink-0);

  --fg:          var(--ink-0w);
  --fg-muted:    var(--ink-300);
  --fg-subtle:   var(--ink-400);
  --fg-inverse:  var(--ink-900);

  --line:        var(--ink-600);
  --line-strong: var(--ink-400);
  --line-faint:  var(--ink-700);

  --accent:      var(--race-red);
  --accent-fg:   var(--ink-0w);
  --warn:        var(--flag-yellow);
  --ok:          var(--flag-green);
  --info:        var(--grid-cyan);

  --logo-fg:     var(--ink-0w);  /* white logo on black */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px rgba(0,0,0,0.5);
  --shadow-pop:  0 2px 0 rgba(255,255,255,0.06) inset, 0 20px 60px rgba(226,52,43,0.18);
}

/* Light theme — inverted; logo also inverts (per brief) */
[data-theme="light"] {
  --bg:          var(--ink-50);
  --bg-elev-1:   #FFFFFF;
  --bg-elev-2:   #FFFFFF;
  --bg-inset:    var(--ink-100);

  --fg:          var(--ink-900);
  --fg-muted:    var(--ink-500);
  --fg-subtle:   var(--ink-400);
  --fg-inverse:  var(--ink-0w);

  --line:        var(--ink-200);
  --line-strong: var(--ink-500);
  --line-faint:  var(--ink-100);

  --accent:      var(--race-red);
  --accent-fg:   var(--ink-0w);
  --warn:        var(--flag-yellow);
  --ok:          var(--flag-green);
  --info:        var(--grid-cyan);

  --logo-fg:     var(--ink-900);  /* black logo on light */
  --shadow-card: 0 1px 0 rgba(0,0,0,0.04) inset, 0 6px 24px rgba(0,0,0,0.08);
  --shadow-pop:  0 2px 0 rgba(0,0,0,0.06) inset, 0 16px 48px rgba(226,52,43,0.16);
}

/* ----- Typography ----- */
:root {
  /* Families */
  --font-display: "Permanent Marker", "Caveat Brush", "Comic Sans MS", cursive;
  --font-headline: "Anton", "Oswald", "Impact", sans-serif;
  --font-body:    "Space Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Scale — body 16, headline 1.25 ratio */
  --t-xs:   12px;
  --t-sm:   14px;
  --t-md:   16px;   /* body default */
  --t-lg:   18px;
  --t-xl:   22px;
  --t-2xl:  28px;
  --t-3xl:  36px;
  --t-4xl:  48px;
  --t-5xl:  64px;
  --t-6xl:  88px;
  --t-7xl: 128px;

  /* Line heights */
  --lh-tight: 1.0;
  --lh-snug:  1.15;
  --lh-body:  1.5;
  --lh-loose: 1.7;

  /* Weights — Space Grotesk: 400/500/600/700 */
  --w-reg:  400;
  --w-med:  500;
  --w-semi: 600;
  --w-bold: 700;

  /* Letter spacing */
  --ls-tight: -0.02em;
  --ls-snug:  -0.01em;
  --ls-normal: 0;
  --ls-wide:  0.04em;
  --ls-wider: 0.12em;   /* labels, eyebrows */
  --ls-track: 0.24em;   /* race-number style */
}

/* ----- Spacing scale (4-based) ----- */
:root {
  --s-0:  0;
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
}

/* ----- Radii — mostly sharp (motorsport panels) ----- */
:root {
  --r-0:    0;
  --r-1:    2px;
  --r-2:    4px;     /* default — panels, inputs */
  --r-3:    8px;     /* cards */
  --r-pill: 999px;
  /* Clip-paths for race-panel shape (notched corner) */
  --clip-notch: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

/* ----- Borders ----- */
:root {
  --b-hair:   1px solid var(--line);
  --b-strong: 2px solid var(--fg);
  --b-accent: 2px solid var(--accent);
}

/* ----- Motion (sharp, mechanical — not bouncy) ----- */
:root {
  --ease-mech:  cubic-bezier(0.2, 0.7, 0.1, 1);   /* default — flick to stop */
  --ease-snap:  cubic-bezier(0.6, 0, 0.4, 1);     /* press-like */
  --ease-glide: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   360ms;
}

/* ============================================================
   Semantic element styles — apply to plain tags
   ============================================================ */
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display — for the "DEEPSPEED"-style brushy hero only */
.display, .ds-display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-snug);
  font-size: var(--t-6xl);
  text-transform: uppercase;
}

/* Headlines — Anton, condensed + tight */
h1, .h1 {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: var(--t-5xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-snug);
  text-transform: uppercase;
  margin: 0 0 var(--s-4);
}
h2, .h2 {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: var(--t-3xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  text-transform: uppercase;
  margin: 0 0 var(--s-3);
}
h3, .h3 {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: var(--lh-snug);
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 var(--s-3);
}
h4, .h4 {
  font-family: var(--font-body);
  font-weight: var(--w-bold);
  font-size: var(--t-lg);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  margin: 0 0 var(--s-2);
}

p {
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
  max-width: 65ch;
}

/* Eyebrow / label — used a LOT */
.eyebrow, .ds-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: var(--w-med);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Stat / number — race number feel */
.stat, .ds-stat {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: var(--t-5xl);
  line-height: 0.9;
  letter-spacing: var(--ls-snug);
  font-variant-numeric: tabular-nums;
}

/* Mono / telemetry */
.mono, code, kbd {
  font-family: var(--font-mono);
  font-size: 0.95em;
  font-variant-numeric: tabular-nums;
}

/* Links */
a {
  color: var(--fg);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  transition: color var(--dur-fast) var(--ease-mech);
}
a:hover { color: var(--accent); }

/* HR — a starting line */
hr {
  border: 0;
  height: 2px;
  background: var(--fg);
  margin: var(--s-8) 0;
}

/* Selection */
::selection { background: var(--accent); color: var(--accent-fg); }
