/* Design tokens — the only place raw values live. See DESIGN_SYSTEM.md. */
:root {
  color-scheme: dark;

  /* Color — neutrals */
  --color-bg: #0b0d10;
  --color-surface: #12151a;
  --color-surface-raised: #181c22;
  --color-border: #232831;
  --color-border-strong: #343b47;
  --color-text: #e6e8eb;
  --color-text-muted: #8b93a1;

  /* Color — accents */
  --color-accent: #5eead4;
  --color-accent-strong: #99f6e4;
  --color-accent-soft: rgba(94, 234, 212, 0.1);
  --color-accent-ink: #04201c; /* text on accent fills */
  --color-accent-2: #a78bfa;
  --color-accent-2-soft: rgba(167, 139, 250, 0.1);

  /* Color — window controls (terminal / viewer chrome) */
  --color-dot-close: #ff5f57;
  --color-dot-minimize: #febc2e;
  --color-dot-expand: #28c840;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --text-3xl: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --leading-tight: 1.1;
  --leading-snug: 1.35;
  --leading-normal: 1.65;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.08em;

  /* Spacing — 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 72rem;
  --gutter: 1rem;
  --nav-height: 4rem;

  /* Radius & borders */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --border-width: 1px;

  /* Elevation */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px var(--color-accent-soft), 0 16px 40px -20px rgba(94, 234, 212, 0.35);

  /* Motion */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 600ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Focus */
  --focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent);
}

@media (min-width: 720px) {
  :root { --gutter: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
  }
}
