/* ==========================================================================
   AI LABZ — Brand Foundation Design Tokens
   Dark-first, cool-neutral, single hue-shifting accent (blue → violet),
   restrained materiality. Every page in /foundation reads from this file —
   change a value here to re-tune the whole system.
   ========================================================================== */

/* Font loading: each page links the Google Fonts stylesheet directly in its
   <helmet> (see any foundation/*.dc.html) — a guessed woff2 URL is not safe
   to hardcode here, so this file only declares the font-family stacks. */

:root {
  /* ---- Color: surfaces (cool near-black, low chroma) ---- */
  --surface-0: oklch(13% 0.008 262);   /* page background */
  --surface-1: oklch(17% 0.010 262);   /* raised panel */
  --surface-2: oklch(21% 0.012 262);   /* card / glass base */
  --surface-3: oklch(26% 0.014 262);   /* hover / active raised */
  --surface-inverse: oklch(97% 0.004 262);

  --border-subtle: oklch(38% 0.014 262 / 0.35);
  --border-default: oklch(45% 0.016 262 / 0.55);
  --border-strong: oklch(55% 0.02 262 / 0.7);

  /* ---- Color: text (cool near-white, chroma kept low) ---- */
  --text-primary: oklch(96% 0.004 262);
  --text-secondary: oklch(74% 0.012 262);
  --text-tertiary: oklch(64% 0.014 262);
  --text-on-accent: oklch(12% 0.02 262);

  /* ---- Color: accent — one hue-shift, blue → violet, matched L/C ---- */
  --accent-blue: oklch(68% 0.19 255);
  --accent-violet: oklch(68% 0.19 302);
  --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));
  --accent-solid: var(--accent-blue);

  /* ---- Color: semantic state (minimal set, matched weight to accent) ---- */
  --state-success: oklch(72% 0.16 152);
  --state-warning: oklch(80% 0.15 82);
  --state-danger: oklch(66% 0.19 22);

  /* ---- Color: energy / glow material — reserved for the core object only ---- */
  --energy-hot: oklch(90% 0.05 262);
  --energy-mid: var(--accent-blue);
  --energy-edge: var(--accent-violet);

  /* ---- Typography ---- */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --fs-display: clamp(40px, 4vw + 12px, 72px);
  --fs-h1: clamp(32px, 2.4vw + 16px, 48px);
  --fs-h2: clamp(26px, 1.6vw + 14px, 36px);
  --fs-h3: 24px;
  --fs-h4: 19px;
  --fs-body-lg: 18px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-micro: 12px;

  --lh-tight: 1.1;
  --lh-heading: 1.25;
  --lh-body: 1.6;
  --ls-tight: -0.02em;
  --ls-wide: 0.08em;

  /* ---- Spacing (8px base) ---- */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* ---- Grid ---- */
  --grid-max: 1280px;
  --grid-margin: clamp(24px, 5vw, 96px);
  --grid-gutter: 24px;
  --grid-columns: 12;

  /* ---- Radius (restrained; not pill-everything) ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* ---- Elevation (dark surfaces: light + translucency, not black shadow) ---- */
  --elevation-1: 0 1px 0 0 oklch(100% 0 0 / 0.04) inset,
                 0 2px 8px 0 oklch(0% 0 0 / 0.30);
  --elevation-2: 0 1px 0 0 oklch(100% 0 0 / 0.05) inset,
                 0 8px 24px -4px oklch(0% 0 0 / 0.40);
  --elevation-3: 0 1px 0 0 oklch(100% 0 0 / 0.06) inset,
                 0 16px 48px -8px oklch(0% 0 0 / 0.50),
                 0 0 0 1px var(--border-subtle);
  --elevation-glow: 0 0 40px -8px oklch(68% 0.19 275 / 0.35);

  /* ---- Motion ---- */
  --duration-instant: 100ms;
  --duration-fast: 160ms;
  --duration-base: 240ms;
  --duration-slow: 400ms;
  --duration-cinematic: 800ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent-violet); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-heading);
  margin: 0;
  font-weight: 600;
}
code, .mono { font-family: var(--font-mono); }
::selection { background: var(--accent-blue); color: var(--text-on-accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.glass {
  background: oklch(30% 0.014 262 / 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
