/* Design tokens: the only place colors, type and spacing are defined. */

:root {
  color-scheme: light dark;

  /* Color */
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece5;
  --ink: #15171c;
  --muted: #5d6270;
  --line: #e3dfd6;
  --accent: #3355e0;
  --accent-ink: #ffffff;
  --success: #1f8a5b;
  --warning: #b86a00;

  /* Per-app accent; app pages and cards override it */
  --app: var(--accent);

  /* Type */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --text-2xl: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem);
  --text-3xl: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  /* Shape */
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --icon-radius: 22%;
  --shadow: 0 1px 2px rgb(20 20 30 / 0.04), 0 8px 24px rgb(20 20 30 / 0.06);
  --shadow-lift: 0 2px 4px rgb(20 20 30 / 0.05), 0 18px 40px rgb(20 20 30 / 0.1);

  /* Layout */
  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --surface: #171a20;
    --surface-2: #1e222a;
    --ink: #eceef2;
    --muted: #9ba1b0;
    --line: #2a2f39;
    --accent: #7d97ff;
    --accent-ink: #0e1014;
    --success: #4cc28a;
    --warning: #f0a947;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.3), 0 18px 40px rgb(0 0 0 / 0.4);
  }
}
