/*
 * Live Stutter Engine — design tokens (overrides the neutral defaults in kit.css).
 *
 * Concept: a performance pad sampler / beat-repeat box on a slate studio desk. A matte warm-graphite
 * body with screen-printed off-white legends, eight saturated silicone-rubber pads (one colour per
 * repeat recipe, always paired with a printed label), one big grey rubber trigger, and a pale
 * backlit grey-green LCD that shows the capture buffer. The LCD works in inverse video: the locked,
 * repeating slice is drawn as light waveform on dark ink.
 *
 *   colour      warm graphite body, slate desk, pale LCD glass; amber LED for "on" states;
 *               the eight pad hues are the only saturated colours on the faceplate
 *   type        system fonts only: a condensed grotesque for printed legends, monospace numerals
 *   shape       soft 8–14 px radii on rubber parts, hairline borders on the body, recessed LCD
 *
 * Contrast (WCAG 2.x, computed from the OKLCH values below via linear sRGB luminance):
 *   text 0.95 on body 0.215 15.2:1 · on section 0.245 14.0:1 · on desk 0.31 11.4:1
 *   muted legends 0.80 on section 8.7:1 · on desk 7.0:1 · on wells 10.3:1
 *   amber LED on section 7.3:1 · ink on amber 8.3:1 · focus ring on section 13.3:1 · on desk 10.7:1
 *   control borders 0.57 on section 3.6:1 · on body 3.9:1 · on wells 4.3:1
 *   LCD ink on glass 10.5:1 (inverse video 10.5:1) · dim LCD ink (beat lines, old pass) 3.8:1
 *   pad legends on unlit rubber 6.2–7.7:1 · ink on lit pads 7.0–13.0:1 · pad rims on the pad well 4.9–6.2:1
 *   slice tab: pad colour on LCD ink 5.6–10.5:1 · trigger legend 10.8:1 · trigger rim on well 4.9:1
 * --color-text-faint (3.5:1) and --lcd-ink-faint (1.9:1) are used for tick marks only, never for text.
 */

@layer tokens {
  :root {
    color-scheme: dark;

    /* — primitives — */
    --graphite-950: oklch(0.165 0.008 65);
    --graphite-900: oklch(0.215 0.008 65);
    --graphite-850: oklch(0.245 0.009 65);
    --graphite-750: oklch(0.34 0.01 65);
    --graphite-700: oklch(0.36 0.01 65);
    --graphite-500: oklch(0.57 0.012 65);
    --graphite-400: oklch(0.60 0.012 65);
    --slate-600: oklch(0.31 0.014 250);
    --slate-650: oklch(0.275 0.013 250);
    --print-100: oklch(0.95 0.012 85);
    --print-050: oklch(0.97 0.01 85);
    --print-300: oklch(0.80 0.014 80);
    --print-500: oklch(0.56 0.01 80);
    --amber-led: oklch(0.76 0.15 55);
    --ink-900: oklch(0.19 0.02 60);
    --focus-yellow: oklch(0.93 0.11 95);
    --lcd-glass-200: oklch(0.88 0.05 120);
    --lcd-ink-800: oklch(0.27 0.035 145);
    --lcd-ink-500: oklch(0.52 0.04 140);
    --lcd-ink-300: oklch(0.70 0.045 130);
    --level-ok: oklch(0.80 0.17 150);
    --level-warn: oklch(0.86 0.16 92);
    --level-clip: oklch(0.66 0.21 27);

    /* pad rubber (unlit), rim and backlight (lit), one hue per pad */
    --pad-1-rubber: oklch(0.44 0.11 30);
    --pad-1-rim: oklch(0.63 0.12 30);
    --pad-1-lit: oklch(0.72 0.17 32);
    --pad-2-rubber: oklch(0.46 0.10 62);
    --pad-2-rim: oklch(0.65 0.11 62);
    --pad-2-lit: oklch(0.80 0.14 65);
    --pad-3-rubber: oklch(0.47 0.09 98);
    --pad-3-rim: oklch(0.66 0.10 98);
    --pad-3-lit: oklch(0.88 0.16 100);
    --pad-4-rubber: oklch(0.46 0.10 138);
    --pad-4-rim: oklch(0.65 0.11 138);
    --pad-4-lit: oklch(0.85 0.18 138);
    --pad-5-rubber: oklch(0.45 0.08 182);
    --pad-5-rim: oklch(0.64 0.08 182);
    --pad-5-lit: oklch(0.82 0.12 182);
    --pad-6-rubber: oklch(0.45 0.08 238);
    --pad-6-rim: oklch(0.63 0.09 238);
    --pad-6-lit: oklch(0.78 0.12 238);
    --pad-7-rubber: oklch(0.44 0.12 292);
    --pad-7-rim: oklch(0.62 0.12 292);
    --pad-7-lit: oklch(0.74 0.135 292);
    --pad-8-rubber: oklch(0.44 0.13 348);
    --pad-8-rim: oklch(0.62 0.14 348);
    --pad-8-lit: oklch(0.74 0.18 348);

    /* — semantic — */
    --color-chassis: var(--slate-600);
    --color-panel: var(--graphite-900);
    --color-panel-raised: var(--graphite-850);
    --color-inset: var(--graphite-950);
    --color-bench: var(--graphite-900);
    --color-border: var(--graphite-700);
    --color-border-strong: var(--graphite-500);
    --color-text: var(--print-100);
    --color-text-muted: var(--print-300);
    --color-text-faint: var(--print-500);
    --color-accent: var(--amber-led);
    --color-accent-2: var(--pad-6-lit);
    --color-on-accent: var(--ink-900);
    --color-focus: var(--focus-yellow);
    --color-danger: var(--level-clip);
    --color-meter-ok: var(--level-ok);
    --color-meter-warn: var(--level-warn);
    --color-meter-clip: var(--level-clip);

    --font-ui: "Helvetica Neue", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-display: "DIN Condensed", "Avenir Next Condensed", "Bahnschrift SemiCondensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.875rem;

    --shadow-panel: 0 1px 0 oklch(1 0 0 / 0.05) inset, 0 -2px 0 oklch(0 0 0 / 0.25) inset, 0 22px 48px oklch(0 0 0 / 0.38);
    --shadow-inset: 0 2px 8px oklch(0 0 0 / 0.55) inset;

    /* — component — */
    --knob-cap: var(--graphite-750);
    --knob-cap-edge: var(--graphite-500);
    --knob-track: var(--graphite-950);
    --knob-arc: var(--amber-led);
    --knob-pointer: var(--print-100);
    --button-bg: var(--graphite-850);
    --button-bg-hover: var(--graphite-700);
    --button-border: var(--graphite-500);
    --button-bg-on: var(--amber-led);
    --button-fg-on: var(--ink-900);

    --body-sheen: color-mix(in oklch, var(--graphite-900) 90%, var(--print-100));
    --body-shade: color-mix(in oklch, var(--graphite-900) 85%, black);
    --print-stripe: var(--print-500);

    --lcd-glass: var(--lcd-glass-200);
    --lcd-ink: var(--lcd-ink-800);
    --lcd-ink-dim: var(--lcd-ink-500);
    --lcd-ink-faint: var(--lcd-ink-300);
    --lcd-bezel: var(--graphite-950);
    --lcd-shine: color-mix(in oklch, var(--lcd-glass-200) 70%, white);

    --pad-well: var(--graphite-950);
    --pad-legend: var(--print-050);
    --pad-ink: var(--ink-900);
    --pad-shadow: oklch(0 0 0 / 0.45);

    --trigger-rubber: var(--graphite-750);
    --trigger-rim: var(--graphite-400);
    --trigger-lit: var(--amber-led);
    --trigger-legend: var(--print-050);
    --trigger-ink: var(--ink-900);

    --step-off: var(--graphite-950);
    --step-beat: var(--graphite-700);
    --step-on: var(--amber-led);
    --step-slice: var(--print-300);
  }
}
