/* Design tokens - authoritative from DESIGN_SPEC_A section 2 */

:root {
  color-scheme: light;

  --bg: #fafafa;
  --bg-raised: #ffffff;
  --ink: #0e1013;
  --ink-muted: #585f68;
  --ink-faint: #8b929b;
  --line: rgba(14, 16, 19, 0.1);
  --line-strong: rgba(14, 16, 19, 0.2);
  --accent: #2a3bd6;
  --accent-soft: rgba(42, 59, 214, 0.1);

  --fam-1: #c97a2c;
  --fam-2: #2e8a80;
  --fam-3: #b44e68;
  --fam-4: #6f7f33;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo,
    monospace;

  --type-hero: clamp(2.5rem, 4.7vw, 4.25rem);
  --type-thesis: clamp(2rem, 3.9vw, 3.4rem);
  --type-section: clamp(1.6rem, 2.5vw, 2.3rem);
  --type-stage: clamp(1.35rem, 2.1vw, 2rem);
  --type-body: 1.25rem;
  --type-support: 1.125rem;
  --type-mono: 0.8125rem;
  --type-mono-value: 0.9375rem;
  --type-lede: 1.375rem;

  --lh-hero: 0.99;
  --lh-thesis: 1.05;
  --lh-section: 1.08;
  --lh-stage: 1.14;
  --lh-body: 1.6;
  --lh-support: 1.58;
  --lh-mono: 1.3;
  --lh-lede: 1.55;

  --track-hero: -0.038em;
  --track-thesis: -0.032em;
  --track-section: -0.024em;
  --track-stage: -0.02em;
  --track-mono: 0.09em;
  --track-mono-value: 0.04em;

  --radius-pill: 999px;
  --radius-panel: 12px;
  --radius-hairline: 0;

  --space: 8px;
  --section-y: clamp(72px, 7.5vw, 120px);
  --shell-max: 1240px;
  --shell-gutter: clamp(20px, 4vw, 40px);
  --nav-h: 64px;
  --ease-css: cubic-bezier(0.2, 0.8, 0.2, 1);
  --btn-shadow: 0 10px 28px rgba(42, 59, 214, 0.22);
  --nav-shadow: 0 8px 28px rgba(14, 16, 19, 0.06);

  --roadmap-reserve: 180px;
}

html.dark {
  color-scheme: dark;

  --bg: #0a0b0d;
  --bg-raised: #131417;
  --ink: #f2f3f5;
  --ink-muted: #a3a9b2;
  --ink-faint: #6f7680;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --accent: #7d8cff;
  --accent-soft: rgba(125, 140, 255, 0.16);

  --fam-1: #e0a05c;
  --fam-2: #52b3a7;
  --fam-3: #d97e93;
  --fam-4: #9bae55;

  --btn-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --nav-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
blockquote {
  margin: 0;
}

:focus {
  outline: none;
}

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

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