/* ---------------------------------------------------------------------
   Design tokens — color, type, space, motion. Both themes live here so
   every other stylesheet only ever reads custom properties, never a
   literal color or magic number.
   ------------------------------------------------------------------- */

:root {
  /* Color — light (default) */
  --bg: #ffffff;
  --bg-elevated: #f5f6f8;
  --bg-sunken: #eef0f3;
  --text: #14161a;
  --text-muted: #50545c;
  --text-faint: #8a8e96;
  --border: #e2e4e9;
  --border-strong: #c8cbd2;
  --accent: #2347d1;
  --accent-hover: #1c3aad;
  --accent-contrast: #ffffff;
  --accent-soft: #eaf0ff;
  color-scheme: light;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-md: 1.25rem;
  --text-lg: 1.625rem;
  --text-xl: 2rem;
  --text-2xl: clamp(2.25rem, 5vw, 3.25rem);

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

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-wide: 0.06em;

  /* Space */
  --space-0: 0.25rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  --container-max: 72rem;
  --container-narrow: 42rem;
  --container-gutter: clamp(1.25rem, 5vw, 3rem);

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  /* Shape */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;
}

:root[data-theme="dark"] {
  --bg: #0b0c0f;
  --bg-elevated: #16181c;
  --bg-sunken: #0e0f12;
  --text: #f2f3f5;
  --text-muted: #aeb2ba;
  --text-faint: #6e7280;
  --border: #262a31;
  --border-strong: #383d46;
  --accent: #6e8fff;
  --accent-hover: #8aa3ff;
  --accent-contrast: #0b0c0f;
  --accent-soft: #1a2240;
  color-scheme: dark;
}
