/* boas.dev — Dark Register Design Tokens (v3.0.0)
 * Procedural-signal aesthetic — instrument-grade, hand-built.
 * Generated from boas-dev.json v3.0.0.
 *
 * v3 supersedes the green phosphor "terminal" identity (v2 / C-final).
 * Identity is now: all-blue · procedural feTurbulence edge · ordered halftone
 * fill · dithered (never smooth) tone · Bricolage Grotesque display + JetBrains
 * Mono data. Scanlines / phosphor-glow / RGB-chroma are RETIRED (now drift
 * signatures — see brand-guide.md §12). Dual-mode mechanic + scaffolding
 * (spacing/elevation/tempo/interaction) carried forward unchanged.
 *
 * Components consume ONLY the --c-* role cascade so a mode flip is paint-only
 * (2026-04-27 functional contract). Literal hues live here, never in a component.
 */

:root,
:root[data-mode="dark"],
.boas-dark {
  /* ─── Surfaces (blue-black void → raised) ─── */
  --c-bg:           #06090b;   /* void — base canvas */
  --c-bg-raised:    #0b1013;   /* panel — primary container fill */
  --c-bg-raised-2:  #0e141a;   /* panel-2 — nested / context surface */

  /* ─── Satellite background component — "R, G, B" triplet (boas-satellite.js / SatelliteBackground.tsx) ─── */
  --sat-color:      255, 255, 255;  /* deployed default — white particles on the void */

  /* ─── Borders (cool steel hairlines → deep-blue frames) ─── */
  --c-border:       #16242a;   /* rule — hairline divider */
  --c-border-2:     #1d2f37;   /* rule-2 — container edge */
  --c-primary-deep: #0e7490;   /* deep — active frame border */
  --c-primary-abyss:#0c4a6e;   /* abyss — deepest accent border */

  /* ─── Blue accent ramp — the STRUCTURE pole (frames, linework, dots-on-red) ─── */
  --c-primary:        #38bdf8; /* azure — primary interactive blue */
  --c-primary-bright: #7dd3fc; /* ice — live / brightest */
  --c-accent:         #22d3ee; /* arc — secondary accent / cyan */
  --c-primary-glow:   rgba(56,189,248,0.22);

  /* ─── Red ramp — the ATTENTION pole (soft, NEVER aggressive; danger energizes by
        MOTION not hue). Contrast rule: edge one pole → fill the opposite pole. ─── */
  --c-red:        #c98480; /* clay — soft interactive red (the calm default) */
  --c-red-bright: #e4aba6; /* rose — brightest red on dark */
  --c-red-deep:   #8c4a47; /* deep — red frame border */
  --c-red-abyss:  #5a2e2c; /* abyss — deepest red accent border */
  --c-red-glow:   rgba(201,132,128,0.20);

  /* ─── Contrast fill bases — plain fills BANNED on screen; a fill is a tinted ground
        + opposite-pole halftone. Blue edge → red ground; red edge → blue ground. ─── */
  --c-fill-red:   #160d0e; /* dark warm ground (under blue-pole frames) */
  --c-fill-blue:  #0b1013; /* dark cool ground (under red-pole frames) = bg-raised */
  --c-fill-red-2: #1d1112; /* raised red ground (button block) */

  /* ─── Text (cool off-whites — NO grey-on-dark; #4a4a4a banned for text) ─── */
  --c-text-bright:    #f0f7f9; /* headings peak */
  --c-text-primary:   #dce7ea; /* body */
  --c-text-secondary: #aebcc2; /* secondary prose / labels */
  --c-text-muted:     #8197a0; /* muted meta (chrome only, never body) */

  /* ─── Status (semantic, reserved — never decorative) ─── */
  --c-warning: #E8B36A; /* alert  — amber */
  --c-danger:  var(--c-red); /* fault — SAME soft red as structure; reads danger by the
                                energized #edgeDanger warp + red/orange double-stroke, NOT a louder hue */
  --c-danger-double: #E8B36A; /* the orange second line in the danger double-stroke */
  --c-info:    #6A7AB0; /* dormant */
  --c-accent-status: #22d3ee; /* arc — informational accent */

  /* ─── Typography — TWO faces (v3 escapes single-mono) ─── */
  --font-disp: "Bricolage Grotesque", system-ui, -apple-system, sans-serif; /* display / human voice */
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; /* data / chrome */
  --tracking-disp: -0.015em; /* display sits slightly tight */
  --tracking-body: 0em;
  --tracking-label: 0.08em;
  --tracking-caps: 0.18em;
  --max-line-length: 74ch;

  /* ─── PROCEDURAL EDGE — the 5-knob contract (see boas-filters.svg) ───
     baseFrequency / octaves / seed / displacement-scale are baked into the
     filter <defs>; the CSS-addressable knob is which filter a surface binds.
     House edge = #edgeLive (live tween scale 2.6↔4.4). Animate SCALE ONLY. */
  /* NOTE: same-document fragment refs — Chromium does NOT resolve external
     SVG filter files for CSS `filter:`. Every page MUST inline the
     boas-filters.svg <defs> (or build-inline it). */
  --edge:        url(#edgeLive);   /* house live edge */
  --edge-static: url(#edgeStatic); /* reduced-motion / print */
  --edge-past:   url(#edgePast);   /* recessed / de-emphasised */
  --edge-avatar: url(#edgeAvatar); /* small elements */
  --edge-hot:    url(#edgeHot);    /* HOVER/FOCUS energize — the interaction grammar */
  --edge-danger: url(#edgeDanger); /* danger CALLOUT warp (.inp.err field only) */
  /* v3.5 edge CHARACTER → ROLE map (operator ruling 2026-07-09) — one engine, many characters */
  --edge-live-roll:      url(#edgeLiveRoll);     /* LIVE / now — heavy rolling audio-viz */
  --edge-live-roll-calm: url(#edgeLiveRollCalm); /* hover STABILIZES the roll, still shimmers */
  --edge-hero:           url(#edgeHero);         /* HERO / dossier — deckle torn edge */
  --edge-aged:           url(#edgeAged);         /* PAST / aged — particle dissolve (decay) */
  --edge-whisper:        url(#edgeWhisper);      /* available — role-unassigned */
  --edge-ridge:          url(#edgeRidge);        /* available — role-unassigned */
  --edge-strong:         url(#edgeStrong);       /* available — role-unassigned */
  --warp-dur:    5.2s;    /* breathing cycle */
  --warp-min:    2.6;     /* documented; lives in SVG <animate> */
  --warp-max:    4.4;

  /* ─── ORDERED HALFTONE — the house fill (plain fills banned; cards ALWAYS carry it).
        Each pole's fill carries the OPPOSITE pole's dots → contrast is built into texture.
        Default surface = blue frame on red ground → BLUE dots (= --ht-blue). ─── */
  --ht-blue:  #1d4a60;    /* blue dot ink — sits on a red ground */
  --ht-red:   #5e302e;    /* red dot ink (soft) — sits on a blue ground */
  --ht-dot:   var(--ht-blue); /* default; .edge--inv repoints to --ht-red */
  --ht-size:  4px;        /* tile period */
  --ht-fill:  46%;        /* dot radius within tile */

  /* ─── DITHER — tonal transitions are stepped, never smooth ───
     posterize via #dither in boas-filters.svg; bands as fallback */
  --dither:  url(#dither);
  --steps:   5;           /* default posterize step count */

  /* ─── Spacing (8px base) — carried forward ─── */
  --sp-0:0; --sp-0-5:4px; --sp-1:8px; --sp-1-5:12px; --sp-2:16px;
  --sp-3:24px; --sp-4:32px; --sp-6:48px; --sp-8:64px; --sp-12:96px; --sp-16:128px;

  /* ─── Geometry ─── */
  --radius: 3px;
  --radius-max: 5px;
  --border-width: 1px;
  --caret-color: var(--c-primary);

  /* ─── Z-layers ─── */
  --z-ground:0; --z-surface:10; --z-content:100; --z-overlay:300; --z-system:900;

  /* ─── Elevation — radiographic, first offset always 0 ─── */
  --elev-0: none;
  --elev-1: 0 1px 2px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.2);
  --elev-2: 0 2px 6px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  --elev-3: 0 4px 12px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);

  /* ─── Tempo (parity across modes — no functional variation, 2026-04-27) ─── */
  --tempo-scale:1.0; --t-fast:120ms; --t-med:240ms; --t-slow:480ms;
  --stagger-initial:400ms; --loop-interval-scale:1.0;

  /* ─── Interaction ─── */
  --focus-ring: 2px solid var(--c-primary);
  --focus-ring-offset: 2px;
  --disabled-opacity: 0.45;

  /* ─── Grain (atmosphere only — opt-in, never page default) ─── */
  --grain-opacity: 0;
  --grain-blend: overlay;
  --grain-sprite: url(#grain-dark);

  /* ─── Viz ladder — blue-led ─── */
  --viz-1: var(--c-primary);
  --viz-2: var(--c-accent);
  --viz-3: var(--c-primary-bright);
  --viz-4: var(--c-warning);
  --viz-max-series: 4;
}
