/* ============================================================
   Design tokens: "Daylight".
   Light by default, dark automatically when the visitor's system
   is set to dark. System typeface (SF on Apple, Segoe UI Variable
   on Windows), one blue for anything you can click.
   ============================================================ */

:root {
  /* raw channels, so translucent colours follow the theme: rgb(var(--fg) / 0.08) */
  --fg: 29 29 31;
  --bg-rgb: 251 251 253;
  --accent-rgb: 0 102 204;

  --bg: rgb(var(--bg-rgb));
  --surface: #ffffff;        /* cards, panels */
  --surface-2: #f5f5f7;      /* tiles, quiet fills */
  --text: rgb(var(--fg));
  --text-2: #6e6e73;         /* secondary text */
  --text-3: #86868b;         /* captions */
  --line: rgb(var(--fg) / 0.1);
  --accent: rgb(var(--accent-rgb));
  --accent-strong: #0058b0;
  --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 28px -12px rgb(0 0 0 / 0.12);
  --shadow-panel: 0 30px 80px -24px rgb(0 0 0 / 0.28);

  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: var(--font-body); /* no monospace labels in this design */
  --font-code: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  /* type scale */
  --fs-hero: clamp(3rem, 7vw + 0.5rem, 6rem);
  --fs-h1: clamp(2.4rem, 4vw + 0.6rem, 4rem);
  --fs-h2: clamp(1.7rem, 2vw + 0.8rem, 2.5rem);
  --fs-h3: clamp(1.15rem, 0.6vw + 1rem, 1.35rem);
  --fs-body-lg: clamp(1.1rem, 0.4vw + 1rem, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-micro: 0.8125rem;

  /* spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;
  --space-7: 9rem;

  /* motion (Emil Kowalski's curves) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-smooth: var(--ease-out);
  --ease-soft: var(--ease-out);
  --dur-fast: 0.16s;
  --dur-base: 0.24s;
  --dur-slow: 0.5s;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --max-width: 1080px;

  /* ---- aliases for page styles written against the previous tokens ---- */
  --color-dark-bg: var(--bg);
  --color-dark-surface: var(--surface);
  --color-dark-text: var(--text);
  --color-dark-text-muted: var(--text-2);
  --color-dark-border: var(--line);
  --color-indigo: var(--accent);
  --color-indigo-light: var(--accent);
  --color-indigo-deep: var(--accent-strong);
  --color-indigo-tint: rgb(var(--accent-rgb) / 0.1);
  --color-stone-500: var(--text-3);
  --color-stone-800: var(--surface-2);
  --color-stone-900: var(--text);
  --color-text: var(--text);
  --color-text-muted: var(--text-2);
  --color-border: var(--line);

  color-scheme: light;
}

/* dark: automatically when the system is dark (unless "set light" in the
   terminal), or always after "set dark" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg: 245 245 247;
    --bg-rgb: 0 0 0;
    --accent-rgb: 41 151 255;
    --surface: #161617;
    --surface-2: #1d1d1f;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --accent-strong: #60b0ff;
    --shadow-soft: 0 0 0 1px rgb(255 255 255 / 0.06);
    --shadow-panel: 0 30px 90px -20px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 255 255 / 0.08);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --fg: 245 245 247;
  --bg-rgb: 0 0 0;
  --accent-rgb: 41 151 255;
  --surface: #161617;
  --surface-2: #1d1d1f;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --accent-strong: #60b0ff;
  --shadow-soft: 0 0 0 1px rgb(255 255 255 / 0.06);
  --shadow-panel: 0 30px 90px -20px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 255 255 / 0.08);
  color-scheme: dark;
}
