/* ==========================================================================
   TOKENS - the one file you edit to re-brand the whole site.
   Every colour, font, size and rhythm value used anywhere else in the CSS
   resolves back to a custom property declared here. Nothing below this file
   hard-codes a hex value, a font stack or a pixel size.
   ========================================================================== */

:root {
  /* ---------------------------------------------------------------- BRAND */
   --brand: #1174E8;
   --brand-strong: #0E5CB9;
   --brand-soft: rgba(17, 116, 232, 0.12);
  --accent: #0b1220;
  --accent-soft: #111827;

  /* ------------------------------------------------------------- NEUTRALS */
  --paper: #050b12;
  --paper-2: #0a1119;
  --paper-3: #0d1721;
  --ink: #f8fafc;
  --ink-2: #d8e1ee;
  --ink-3: #9aa9b9;
  --line: rgba(148, 163, 184, 0.18);
  --white: #ffffff;

  /* ----------------------------------------------------------------- STATE */
  --success: #45d28a;
  --success-soft: rgba(69, 210, 138, 0.12);
  --error: #ff7a7a;
  --error-soft: rgba(255, 122, 122, 0.12);

  /* -------------------------------------------------------- SEMANTIC ROLES */
  --bg: var(--paper);
  --bg-alt: var(--paper-2);
  --bg-sunk: var(--paper-3);
  --surface: rgba(10, 17, 25, 0.9);
  --text: var(--ink);
  --text-muted: var(--ink-2);
  --text-subtle: var(--ink-3);
  --border: var(--line);
  --border-strong: rgba(255, 255, 255, 0.22);
  --link: var(--brand);
  --link-hover: var(--brand-strong);
  --focus-ring: var(--brand);
   --on-brand: #ffffff;
   --on-brand-hover: #ffffff;
  --on-accent: var(--white);

  /* ------------------------------------------------------------ TYPOGRAPHY */
  --font-display: "Zalando Sans Expanded", "Segoe UI", sans-serif;
  --font-body: "Special Gothic", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid type scale - 380px viewport → 1280px viewport, no media queries. */
  --step--2: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --step--1: clamp(0.84rem, 0.81rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.12rem);
  --step-1:  clamp(1.20rem, 1.13rem + 0.35vw, 1.42rem);
  --step-2:  clamp(1.44rem, 1.32rem + 0.60vw, 1.80rem);
  --step-3:  clamp(1.73rem, 1.53rem + 1.00vw, 2.29rem);
  --step-4:  clamp(2.07rem, 1.76rem + 1.55vw, 2.91rem);
  --step-5:  clamp(2.49rem, 2.02rem + 2.35vw, 3.70rem);
  --step-6:  clamp(2.99rem, 2.29rem + 3.50vw, 4.70rem);
  --step-7:  clamp(3.40rem, 2.42rem + 4.90vw, 5.60rem);

  --leading-tight: 1.04;
  --leading-snug: 1.22;
  --leading-body: 1.65;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.08em;
  --tracking-label: 0.16em;

  /* ---------------------------------------------------------------- SPACE
     A single fluid scale. Use these instead of arbitrary values so vertical
     rhythm stays consistent when you add new sections. */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   clamp(2rem, 1.6rem + 1.6vw, 3rem);
  --space-xl:  clamp(3rem, 2.2rem + 3.2vw, 5rem);
  --space-2xl: clamp(4rem, 2.8rem + 4.8vw, 7rem);
  --space-3xl: clamp(6rem, 4.0rem + 8.0vw, 10rem);

  --section-y: var(--space-2xl);
  --gutter: clamp(1.25rem, 0.9rem + 1.8vw, 2.5rem);
  --container: 76rem;      /* 1216px */
  --container-narrow: 46rem;
  --container-wide: 90rem;

  /* --------------------------------------------------------------- SHAPE */
  --radius-xs: 4px;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --radius-arch: 18px;
  --border-width: 1px;

  /* -------------------------------------------------------------- DEPTH */
  --shadow-xs: none;
  --shadow-s: none;
  --shadow-m: none;
  --shadow-l: none;
  --shadow-brand: none;

  /* --------------------------------------------------------------- MOTION */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 140ms;
  --dur: 260ms;
  --dur-slow: 620ms;

  /* --------------------------------------------------------------- LAYERS */
  --z-base: 1;
  --z-sticky: 100;
  --z-backdrop: 150;
  --z-header: 200;
  --z-overlay: 400;

  --header-h: 4.5rem;

  /* ---------------------------------------------------------------- TEXTURE
     Paper grain used on dark/brand panels. Purely decorative. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* ==========================================================================
   OPTIONAL DARK THEME
   Only the semantic roles are re-mapped - no component CSS knows about it.
   Enable by adding data-theme="dark" to <html>, or uncomment the media query
   at the bottom to follow the operating system.
   ========================================================================== */
[data-theme="dark"] {
  --bg: #14110e;
  --bg-alt: #1c1815;
  --bg-sunk: #241f1a;
  --surface: #1c1815;
  --text: #f4ece2;
  --text-muted: #c3b7a9;
  --text-subtle: #93867a;
  --border: #322b25;
  --brand-soft: #33201a;
  --accent-soft: #1e2a28;
  --success-soft: #16261e;
  --error-soft: #2c1512;
  --on-brand: #fffcf7;
  color-scheme: dark;
}

/*
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { ...copy the block above... }
}
*/
