/* ANODE BL-1 — design tokens.
   Strictly achromatic: every colour is an exact grey (R = G = B) or black / white with alpha.
   State is carried by brightness, shape and inversion — never by hue.

   Layer order for every stylesheet of the app. */
@layer reset, tokens, base, layout, components, states;

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

    /* ── primitives: the grey scale (anodised graphite → brushed aluminium → lamp white) ── */
    --grey-0: #000000;
    --grey-1: #070707;
    --grey-2: #0b0b0b;
    --grey-3: #0f0f0f;
    --grey-4: #141414;
    --grey-5: #191919;
    --grey-6: #1e1e1e;
    --grey-7: #242424;
    --grey-8: #2c2c2c;
    --grey-9: #363636;
    --grey-10: #444444;
    --grey-11: #575757;
    --grey-12: #6e6e6e;
    --grey-13: #8f8f8f;
    --grey-14: #a6a6a6;
    --grey-15: #bdbdbd;
    --grey-16: #d2d2d2;
    --grey-17: #e4e4e4;
    --grey-18: #f2f2f2;
    --grey-19: #ffffff;
    --shade-hi: rgb(255 255 255 / 0.1);
    --shade-hi-2: rgb(255 255 255 / 0.18);
    --shade-lo: rgb(0 0 0 / 0.55);
    --shade-lo-2: rgb(0 0 0 / 0.8);

    /* ── semantic ── */
    --c-page: var(--grey-1);
    --c-chassis: var(--grey-5);
    --c-chassis-edge: var(--grey-9);
    --c-module: var(--grey-6);
    --c-module-edge: var(--grey-8);
    --c-well: var(--grey-2);
    --c-rule: var(--grey-10);
    --c-text: var(--grey-17);
    --c-text-strong: var(--grey-19);
    --c-text-dim: var(--grey-14);      /* ≥ 7 : 1 on the module grey */
    --c-text-faint: var(--grey-13);    /* ≥ 4.9 : 1 on the module grey */
    --c-lit: var(--grey-17);
    --c-lit-hot: var(--grey-19);
    --c-unlit: var(--grey-8);
    --c-focus: var(--grey-18);
    --c-selection: var(--grey-11);

    /* controls */
    --c-btn: var(--grey-8);
    --c-btn-top: var(--grey-9);
    --c-btn-edge: var(--grey-10);
    --c-btn-text: var(--grey-16);
    --c-btn-on: var(--grey-17);
    --c-btn-on-text: var(--grey-2);
    --c-knob-track: var(--grey-9);
    --c-knob-track-hover: var(--grey-11);
    --c-knob-arc: var(--grey-17);
    --c-knob-pointer: var(--grey-19);
    --c-knob-tick: var(--grey-12);

    /* sequencer cells */
    --c-cell: var(--grey-8);
    --c-cell-black: var(--grey-6);
    --c-cell-offbeat: var(--grey-9);
    --c-cell-black-offbeat: var(--grey-7);
    --c-cell-hover: var(--grey-11);
    --c-cell-ghost: var(--grey-13);
    --c-cell-on: var(--grey-17);
    --c-cell-on-soft: var(--grey-15);
    --c-beat-line: var(--grey-10);
    --c-bar-line: var(--grey-13);
    --c-key-white: var(--grey-15);
    --c-key-white-text: var(--grey-3);
    --c-key-black: var(--grey-4);
    --c-key-black-text: var(--grey-15);

    /* ── type ── */
    --font-ui: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --fs-label: 10px;
    --fs-small: 10.5px;
    --fs-ui: 11px;
    --fs-text: 12px;
    --fs-title: 11px;
    --fs-brand: 21px;
    --track-label: 0.08em;
    --track-title: 0.18em;

    /* ── space, radius, depth ── */
    --sp-1: 2px;
    --sp-2: 4px;
    --sp-3: 6px;
    --sp-4: 8px;
    --sp-5: 12px;
    --sp-6: 16px;
    --sp-7: 24px;
    --r-1: 2px;
    --r-2: 3px;
    --r-3: 6px;
    --r-4: 10px;
    --shadow-raised: 0 1px 0 var(--shade-hi) inset, 0 1px 2px var(--shade-lo);
    --shadow-pressed: 0 1px 3px var(--shade-lo-2) inset;
    --shadow-well: 0 2px 8px var(--shade-lo-2) inset, 0 1px 0 var(--shade-hi);

    /* ── sizes ── */
    --page-pad: 10px;
    --knob-lg: 50px;
    --knob-md: 44px;
    --knob-sm: 36px;
    --col-lg: 66px;
    --col-md: 54px;
    --col-sm: 52px;
    --ctl-h: 26px;
    --keys-w: 52px;
    --num-h: 15px;
    --cell-h: 20px;
    --cell-gap: 2px;
    --section-gap: 5px;

    /* ── motion ── */
    --dur-fast: 90ms;
    --dur-base: 160ms;
    --ease: cubic-bezier(0.2, 0, 0, 1);
  }
}
