/* Design tokens: the ONLY place colors and scales are defined.
   Palette "Violet nocturne" (approved 2026-10-28). Dark theme only in v1. */

:root {
  color-scheme: dark; /* dark scrollbars and form controls */

  /* Color — palette */
  --color-bg: #07060D;
  --color-violet: #6D28D9;
  --color-blue: #3B82F6;
  --color-pink: #EC4899;
  --color-indigo: #1E1B4B;

  /* Color — roles */
  --color-accent: #A78BFA;     /* 7.4:1 on bg */
  --color-text: #F5F3FF;       /* 18.4:1 on bg */
  --color-text-muted: #9690B5; /* 6.7:1 on bg */
  --color-surface: #100E1C;    /* cards, panels */
  --color-line: #2A2640;       /* hairlines, borders */
  --color-selection: var(--color-violet);
  --color-accent-deep: var(--color-violet); /* the curtain between pages (text on it: 6.5:1) */

  /* Typography */
  --font-sans: "Inter Tight", "Inter Tight Fallback", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;

  /* Fluid type scale: phone (375px) → desktop (1440px) */
  --step--1: clamp(0.875rem, 0.853rem + 0.0939vw, 0.9375rem);
  --step-0: clamp(1rem, 0.956rem + 0.1878vw, 1.125rem);
  --step-1: clamp(1.188rem, 1.11rem + 0.3286vw, 1.406rem);
  --step-2: clamp(1.406rem, 1.241rem + 0.7042vw, 1.875rem);
  --step-3: clamp(1.688rem, 1.401rem + 1.221vw, 2.5rem);
  --step-4: clamp(2rem, 1.472rem + 2.254vw, 3.5rem);
  --step-5: clamp(2.5rem, 1.62rem + 3.756vw, 5rem);
  --step-6: clamp(3rem, 1.239rem + 7.512vw, 8rem);

  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-body: 1.6;
  --tracking-tight: -0.03em;

  /* Spacing */
  --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: 4.5rem;
  --space-9: 7rem;
  --gutter: clamp(1rem, 0.6rem + 1.7vw, 2.5rem); /* page side padding: 16px on phones */

  /* Shape */
  --radius-s: 0.5rem;
  --radius-m: 1rem;
  --radius-l: 2rem;
  --radius-pill: 999px;

  /* Layers */
  --z-ambient: 0;
  --z-content: 1;
  --z-webgl: 0;
  --z-header: 10;
  --z-grain: 80;
  --z-cursor: 90;
  --z-curtain: 95;
  --z-skip: 100;
}
