/* ==========================================================================
   KRYO design tokens
   Single source of truth for color, type, space, radius, elevation, motion.
   Contrast ratios noted below are WCAG 2.x, verified against the ink ramp.
   ========================================================================== */

:root {
  /* --- Ink surface ramp (page base #0A0F1E) ------------------------------ */
  --ink-950: #060a14; /* footer / deepest wells */
  --ink-900: #0a0f1e; /* page base */
  --ink-850: #0e1526; /* alternating section base */
  --ink-800: #141c33; /* raised cards */
  --ink-700: #1c2745; /* hover surfaces, strong borders */
  --ink-600: #29365c; /* dividers */

  /* --- Ice-cyan accent ramp ---------------------------------------------- */
  --cyan-300: #a7eeff; /* gradient hot stop, fine highlights */
  --cyan-400: #6ae3ff; /* primary accent */
  --cyan-500: #38cbf2; /* hover */
  --cyan-600: #1fa8d6; /* active / pressed */
  --blue-500: #3e7bff; /* cool depth stop, gradients only */

  /* --- Text (contrast on ink-900 / ink-800) ------------------------------ */
  --text-hi:  #eaf2ff; /* 16.95:1 / 14.99:1 */
  --text-mid: #b9c7e2; /* ~11:1 */
  --text-low: #9db0ce; /* 8.67:1 / 7.67:1 — safe for small print */
  --text-on-accent: #061321; /* 12.51:1 on cyan-400 — the ONLY text color on cyan */

  /* --- Semantic ----------------------------------------------------------- */
  --ok:     #7ee8a2; /* 12.68:1 on ink-900 */
  --warn:   #ffb86b; /* 11.20:1 */
  --danger: #ff7a8a; /*  7.64:1 — form errors */

  /* --- Glass -------------------------------------------------------------- */
  --glass-bg:            rgba(20, 28, 51, 0.55);
  --glass-bg-strong:     rgba(14, 21, 38, 0.72);
  --glass-border:        rgba(106, 227, 255, 0.14);
  --glass-border-hover:  rgba(106, 227, 255, 0.32);
  --glass-blur: 14px;

  /* --- Glow + shadow (glows live on ::after; transition opacity only) ---- */
  --glow-sm: 0 0 12px rgba(106, 227, 255, 0.25);
  --glow-md: 0 0 28px rgba(106, 227, 255, 0.30);
  --shadow-1: 0 1px 2px rgba(3, 6, 12, 0.5);
  --shadow-2: 0 8px 24px rgba(3, 6, 12, 0.45);
  --shadow-3: 0 24px 64px rgba(3, 6, 12, 0.5);
  --grad-accent: linear-gradient(135deg, #a7eeff 0%, #6ae3ff 45%, #3e7bff 100%);

  /* --- Background grid ---------------------------------------------------- */
  --grid-line: rgba(106, 227, 255, 0.05);
  --grid-size: 56px;

  /* --- Aurora (glacial hero atmosphere) ----------------------------------- */
  --aurora-cyan:   rgba(106, 227, 255, 0.36);
  --aurora-blue:   rgba(62, 123, 255, 0.40);
  --aurora-violet: rgba(139, 108, 255, 0.34);
  --aurora-deep:   rgba(24, 33, 82, 0.85);

  /* --- Type --------------------------------------------------------------- */
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif; /* italic accent words */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid type scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.94rem);   /* citations, footnotes */
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.125rem);     /* body */
  --step-1:  clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem); /* lead / subhead */
  --step-2:  clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);   /* h3 / card titles */
  --step-3:  clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);     /* h2 */
  --step-4:  clamp(2.25rem, 1.7rem + 2.8vw, 3.5rem);     /* stat numbers */
  --step-5:  clamp(3rem, 1.9rem + 5vw, 5.5rem);          /* hero h1 */
  --step-6:  clamp(3.25rem, 2rem + 6.5vw, 7rem);         /* chapter headlines */

  --leading-tight: 1.08;
  --leading-heading: 1.22;
  --leading-body: 1.6;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.08em; /* uppercase mono eyebrows */

  /* --- 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: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --section-pad: clamp(4rem, 10vw, 7.5rem);

  /* --- Radius ------------------------------------------------------------- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* --- Motion ------------------------------------------------------------- */
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 450ms;
  --dur-reveal: 700ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* --- Layout ------------------------------------------------------------- */
  /* Breakpoints (canonical literals for media queries): 480 / 720 / 960 / 1200 */
  --container: 1160px;
  --container-wide: 1320px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --nav-h: 64px;
  --hud-h: 44px;
  /* Height of the cookie bar while it is on screen. Set from js/consent.js,
     which measures it — the bar wraps to two rows at narrow widths, so a
     literal here would be wrong on exactly the viewports that matter. */
  --consent-h: 0px;
}
