/* Hallmark · tokens · theme: Midnight · genre: atmospheric · anchor hue: 40 (warm)
 *
 * Portable token contract. Every colour, font, space, size, easing and duration
 * used by this project resolves through a name declared here. Swapping the
 * values under `THEME` re-skins the whole site; nothing else needs to change.
 */

:root {
  /* ---- THEME · colour ------------------------------------------------
     Dark-mode recipe: paper L 12-18%, ink L 92-96%, elevation by lightness
     (higher surface = lighter), accent lifted +7% L and -0.03 C vs its
     light-mode value. Anchor hue 40 tints every neutral warm. */
  --color-paper:      oklch(14% 0.008 40);   /* page ground              */
  --color-paper-2:    oklch(18% 0.010 40);   /* rail, raised panels      */
  --color-paper-3:    oklch(22% 0.012 40);   /* hover / pressed surfaces */
  --color-rule:       oklch(30% 0.008 40);   /* decorative hairlines     */
  --color-rule-ctl:   oklch(50% 0.008 40);   /* control borders - needs 3:1 */
  --color-neutral:    oklch(62% 0.008 40);   /* de-emphasised metadata   */
  --color-muted:      oklch(72% 0.006 40);   /* secondary prose          */
  --color-ink:        oklch(94% 0.006 80);   /* primary text             */

  /* Two accents, no more. Orange = needs attention now. Green = shipped. */
  --color-accent:     oklch(70% 0.19 42);
  --color-accent-ink: oklch(16% 0.02 42);    /* text on an accent fill   */
  --color-signal:     oklch(78% 0.14 150);
  --color-focus:      oklch(75% 0.19 55);

  /* ---- THEME · type --------------------------------------------------- */
  --font-display: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-outlier: 'JetBrains Mono', ui-monospace, monospace;

  /* ---- Scale · type · major third (1.25) from a 16px body ------------- */
  --text-xs:      0.75rem;
  --text-sm:      0.8125rem;
  --text-base:    1rem;
  --text-md:      1.125rem;
  --text-lg:      1.5625rem;
  --text-xl:      1.9531rem;
  --text-display: clamp(1.75rem, 2.4vw + 1rem, 2.75rem);

  /* ---- Scale · space · 4pt base, named by role ------------------------ */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --page-gutter: clamp(var(--space-md), 4vw, var(--space-2xl));
  --page-max:    94rem;   /* stops the index stretching on ultrawide */
  --measure:     68ch;

  /* ---- Motion --------------------------------------------------------- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro:   120ms;
  --dur-short:   220ms;

  /* ---- Shape ---------------------------------------------------------- */
  --radius-input: 3px;
  --radius-pill:  999px;
  --rule-hair:    1px;
  --control-h:    2.75rem;   /* 44px touch-target floor, shared by every
                                input, select and button on the same form */

  /* ---- Depth · six named levels, never freestyle ---------------------- */
  --z-base:     1;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
}
