/* =============================================================================
   TheOnlineYou — Design tokens (Phase 2)
   Small editorial vocabulary. Dark-first. No brand pink / neon / gradient identity.
   ============================================================================= */

:root {
  /* --- Color: surfaces & ink --- */
  --color-bg: #0b0b0a;
  --color-bg-elevated: #121211;
  --color-fg: #f1f0ec;
  --color-fg-soft: #d4d2cc;
  --color-muted: #8c8a84;
  --color-quiet: #d2cec5;
  --color-quiet-strong: #ebe6dc;
  --color-stone: #5c5a55;
  --color-stone-soft: #3a3935;
  --color-hairline: rgba(241, 240, 236, 0.12);
  --color-hairline-strong: rgba(241, 240, 236, 0.22);

  /* --- Color: system only (not brand decoration) --- */
  --color-focus: #e8e4dc;
  --color-focus-ring: rgba(232, 228, 220, 0.55);
  --color-error: #c45c4a;
  --color-error-soft: rgba(196, 92, 74, 0.16);

  /* --- Typography family (set after bake-off) --- */
  --font-sans: "Schibsted Grotesk", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;

  /* --- Type scale (clamp for recomposition) --- */
  --text-meta: 0.6875rem;      /* 11px */
  --text-xs: 0.75rem;          /* 12px */
  --text-sm: 0.875rem;         /* 14px */
  --text-body: 1.0625rem;      /* 17px */
  --text-body-lg: 1.25rem;     /* 20px */
  --text-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-h3: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  --text-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --text-h1: clamp(2.5rem, 1.4rem + 4.5vw, 4.5rem);
  --text-display: clamp(3.25rem, 1.2rem + 8vw, 7.5rem);
  --text-display-xl: clamp(4rem, 1rem + 12vw, 10rem);

  /* --- Tracking --- */
  --track-display: -0.04em;
  --track-tight: -0.02em;
  --track-normal: 0;
  --track-meta: 0.12em;
  --track-wide: 0.18em;

  /* --- Line heights --- */
  --leading-display: 0.92;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-body: 1.55;
  --leading-relaxed: 1.65;

  /* --- Measure --- */
  --measure-narrow: 28ch;
  --measure: 58ch;
  --measure-wide: 72ch;

  /* --- Spacing scale (4px base) --- */
  --space-3xs: 0.125rem; /* 2 */
  --space-2xs: 0.25rem;  /* 4 */
  --space-xs: 0.5rem;    /* 8 */
  --space-s: 0.75rem;    /* 12 */
  --space-m: 1rem;       /* 16 */
  --space-l: 1.5rem;     /* 24 */
  --space-xl: 2rem;      /* 32 */
  --space-2xl: 3rem;     /* 48 */
  --space-3xl: 4.5rem;   /* 72 */
  --space-4xl: 7rem;     /* 112 */
  --space-5xl: 10rem;    /* 160 */

  /* --- Section rhythm --- */
  --section-y: clamp(4.5rem, 8vw, 10rem);
  --section-y-tight: clamp(3rem, 5vw, 6rem);
  --section-y-loose: clamp(6rem, 12vw, 14rem);

  /* --- Layout / grid --- */
  --page-max: 90rem;           /* 1440 */
  --page-max-narrow: 68rem;    /* ~1088 */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --grid-cols: 12;
  --grid-gutter: clamp(0.75rem, 1.5vw, 1.5rem);
  --col: calc((100% - (var(--grid-cols) - 1) * var(--grid-gutter)) / var(--grid-cols));

  /* --- Radii (minimal; prefer sharp editorial edges) --- */
  --radius-none: 0;
  --radius-xs: 2px;
  --radius-s: 4px;
  --radius-m: 8px;

  /* --- Shadow vocabulary (almost unused; physical, not soft UI) --- */
  --shadow-none: none;
  --shadow-soft: 0 1px 0 rgba(0, 0, 0, 0.4);
  --shadow-media: 0 24px 48px rgba(0, 0, 0, 0.35);

  /* --- Motion --- */
  --duration-instant: 80ms;
  --duration-press: 140ms;
  --duration-ui: 180ms;
  --duration-fast: 200ms;
  --duration-reveal: 240ms;
  --duration-base: 480ms;
  --duration-slow: 860ms;
  --duration-glacial: 1400ms;

  /* UI ease: strong ease-out for repeated interaction */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.55, 0.05, 0.35, 1);
  /* Emergence / editorial crop — keep distinct from UI chrome */
  --ease-reveal: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-emphasis: cubic-bezier(0.3, 0.85, 0.35, 1);

  --reveal-distance: 0.45rem;

  /* Document scroll progress (0–1), driven by JS */
  --scroll-progress: 0;

  /* --- Z-index --- */
  --z-base: 0;
  --z-content: 1;
  --z-sticky: 20;
  --z-nav: 40;
  --z-overlay: 60;
  --z-modal: 80;
  --z-toast: 100;
}
