/**
 * Design tokens: colors for both themes, type, motion and sizes.
 * Palette: white and carbon black. The accent is the ink color itself.
 */

:root {
  --font-display: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-glide: cubic-bezier(0.65, 0, 0.35, 1);

  --nav-h: 64px;
  --side-w: 272px;
  --radius: 16px;
  --glyph: 40px;
  --stroke: 1.75;
  --icon-color: var(--ink);
  --brand: #f0521d; /* Icon Stack orange, used only for the logo symbol */
  --container: 1184px;
  --gutter: 24px;

  /* Spacing: an 8pt grid, with 4px for fine detail inside small components */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-24: 24px;
  --s-32: 32px;
  --s-40: 40px;
  --s-48: 48px;
  --s-64: 64px;
  --s-80: 80px;
  --s-96: 96px;
  --s-128: 128px;

  /* Type scale, largest to smallest. Each heading level has one size site-wide. */
  --fs-display: clamp(40px, 7.2vw, 80px); /* hero */
  --fs-h1: clamp(36px, 5.4vw, 56px);      /* page titles, closing call to action */
  --fs-h2: clamp(28px, 3.8vw, 40px);      /* section titles */
  --fs-h3: 24px;                          /* prose headings */
  --fs-h4: 18px;                          /* card and plan titles */
  --fs-lede: clamp(16px, 1.6vw, 18px);    /* intro paragraph under a title */
  --fs-body: 15px;
  --fs-sm: 14px;
  --fs-xs: 13px;
  --fs-micro: 12px;

  /* Section rhythm */
  --section-y: clamp(80px, 10vw, 128px);
  --head-gap: var(--s-48); /* section heading to its content */
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-dot: rgba(10, 10, 10, 0.08);
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --surface-3: #f0f0f0;
  --line: #ebebeb;
  --line-strong: #d9d9d9;
  --ink: #0a0a0a;
  --ink-2: #2b2b2b;
  --muted: #6b6b6b;
  --faint: #a1a1a1;
  --accent: #0a0a0a;
  --accent-soft: rgba(10, 10, 10, 0.06);
  --accent-glow: rgba(10, 10, 10, 0.2);
  --on-accent: #ffffff;
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.1);
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.05);
  --shadow-md: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px -12px rgba(10, 10, 10, 0.12);
  --shadow-lg: 0 24px 48px -24px rgba(10, 10, 10, 0.25), 0 2px 6px rgba(10, 10, 10, 0.04);
  --nav-bg: rgba(255, 255, 255, 0.75);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-dot: rgba(255, 255, 255, 0.07);
  --surface: #111111;
  --surface-2: #161616;
  --surface-3: #1c1c1c;
  --line: #222222;
  --line-strong: #333333;
  --ink: #fafafa;
  --ink-2: #e0e0e0;
  --muted: #8f8f8f;
  --faint: #5a5a5a;
  --accent: #fafafa;
  --accent-soft: rgba(250, 250, 250, 0.08);
  --accent-glow: rgba(250, 250, 250, 0.16);
  --on-accent: #0a0a0a;
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --nav-bg: rgba(10, 10, 10, 0.72);
}
