/* ATLAS · tokens/brand.css — AuditHunt v3.2
 * Provenance: Phase 0 · amended v3.2 2026-04-24
 * Spec: DESIGN-BIBLE-v3 §C.2, §D.1 + amendments v3.1 + v3.2 (VERSIONS.md)
 *
 * Amendment v3.2 — the gold thread + gentler drift:
 *   « A contract left in a vault overnight. Near-total darkness.
 *     The whole palette lives inside one breath of a room. »
 *
 *   --shield #12275A → #0B1A3E  (barely a hue against black)
 *   --ember  #7F1D1D → #5C1515  (deepest oxblood)
 *   --hunt   → aliased to new --bronze #6B4A18  (warm, not orange)
 *   --gold   NEW #B08848  (signature — §D.25 strict legal uses)
 *   grounds, --verify, spacing, radii unchanged.
 *
 *   Transition policy: accent arc swing halved again (× 0.25).
 *   Grounds do not shift. Only accent hue drifts, very gently.
 *
 * Naming contract unchanged: v3 canonical names source of truth;
 * v1/v2 names remain aliases pointing at canonical values.
 */

:root {
  /* ══════════════════════════════════════════════════════════════
     v3 CANONICAL — the source of truth.
     ══════════════════════════════════════════════════════════════ */

  /* ── Grounds (v3.1 amendment — pure black, no navy tint) ──── */
  --ink:        #000000;   /* the deepest floor — absolute black */
  --night:      #050505;   /* default body backdrop */
  --steel:      #0A0A0C;   /* cards, nested chrome */
  --steel-2:    #12121A;   /* hovered / elevated chrome */

  /* ── Inks ─────────────────────────────────────────────────── */
  --bone:       #EAEEF5;   /* primary text */
  --ash:        #8590A4;   /* secondary copy */
  --mute:       #5B6479;   /* captions, eyebrows, mono labels */
  --faint:      #2A3042;   /* hairlines, separators */

  /* ── Shield — deep navy, barely a hue  v3.2 ─────────────── */
  --shield:     #0B1A3E;   /* [AMENDMENT v3.2] even deeper — was #12275A */
  --shield-hi:  #2A4472;   /* readable for links/focus; not luminous */
  --shield-dim: #060F24;

  /* ── Bronze — warm Act III accent, replaces orange  v3.2 ─ */
  --bronze:     #6B4A18;   /* [AMENDMENT v3.2] dark amber/bronze — replaces --hunt */
  --bronze-hi:  #8A6020;
  --bronze-dim: #3E2A0E;

  /* ── Hunt aliases kept pointing at bronze for back-compat ── */
  --hunt:       var(--bronze);
  --hunt-hi:    var(--bronze-hi);
  --hunt-dim:   var(--bronze-dim);

  /* ── Ember — deepest oxblood  v3.2 ────────────────────── */
  --ember:      #5C1515;   /* [AMENDMENT v3.2] deeper oxblood — was #7F1D1D */
  --ember-hi:   #7A1F1F;

  /* ── Gold — the signature touch (v3.2 NEW, see §D.25 rules) ─ */
  --gold:       #B08848;   /* muted antique gold, not yellow */
  --gold-hi:    #D4A85C;   /* only used inside gold elements on hover */

  /* ── Verify — system green  v3.2 unchanged ────────────── */
  --verify:     #4A8F6B;

  /* ── Severity lattice (findings, Act IV)  v3.2 ────────────── */
  --sev-crit:   #5C1515;   /* ember oxblood (badge gets --gold border — §D.25) */
  --sev-high:   #6B4A18;   /* bronze */
  --sev-med:    #6B5A1F;   /* muted dark amber */
  --sev-low:    #2A4472;   /* shield-hi */
  --sev-info:   #4A8F6B;   /* verify (legal use per amendment v3.2) */

  /* ── Lines & hairlines ────────────────────────────────────── */
  --line:         rgba(234, 238, 245, 0.04);
  --line-strong:  rgba(234, 238, 245, 0.08);
  --line-accent:  rgba(42, 68, 114, 0.38);    /* tracks --shield-hi (v3.2) */
  --line-gold:    rgba(176, 136, 72, 0.24);   /* hairline for gold elements only */

  /* ── Default accent (depth.css swaps it across acts) ─────── */
  --accent:     var(--shield);
  --accent-hi:  var(--shield-hi);

  /* ══════════════════════════════════════════════════════════════
     v1 / v2 ALIASES — preserve every existing binding.
     Do not remove. Do not retune independently. Point-only.
     ══════════════════════════════════════════════════════════════ */

  /* Surfaces */
  --bg:         var(--ink);       /* was #06080e */
  --bg-2:       var(--night);     /* was #0a0e17 */
  --surface:    var(--steel);     /* was #0f1420 */
  --surface-2:  var(--steel-2);   /* was #141a28 */

  /* Inks */
  --text:       var(--bone);      /* was #e6ebf5 */
  --text-dim:   var(--ash);       /* was #9aa3b8 */
  --muted:      var(--mute);      /* was #5a6478 */
  /* --faint kept as canonical; was already named --faint in v1 */

  /* Severity legacy names */
  --critical:     var(--ember);
  --critical-hi:  var(--ember-hi);
  --sev-critical: var(--sev-crit);
  --sev-medium:   var(--sev-med);
  /* --sev-high, --sev-low, --sev-info already canonical-named */

  /* Status semantics */
  --success:    var(--verify);
  --warning:    color-mix(in oklab, var(--bronze-hi) 60%, var(--bone) 40%); /* amber — derived */
  --info:       var(--shield);

  /* ── Type stack (fixed per CLAUDE.md rule 4) ──────────────── */
  --f-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --f-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Radii (D.3) ──────────────────────────────────────────── */
  --r-sm: 4px;    /* cards, contract-card, finding-card */
  --r-md: 6px;    /* buttons */
  --r-lg: 6px;    /* historical alias — shouldn't be used for new work */
  --r-xl: 999px;  /* status chips (the only pills, D.3) */

  /* ── Spacing scale (D.4) ──────────────────────────────────── */
  --s-0:  0;
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;
  --s-11: 192px;

  /* ── Layout ───────────────────────────────────────────────── */
  --maxw: 1240px;
  --pad:  28px;
}

/* ── Base document ──────────────────────────────────────────── */
html, body {
  background: var(--night);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { margin: 0; min-height: 100vh; }

::selection {
  background: color-mix(in oklab, var(--accent) 35%, black);
  color: var(--bone);
}

/* ── Utilities ──────────────────────────────────────────────── */
.mono { font-family: var(--f-mono); }

.eyebrow {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Canonical anchor — uses --ash so it reads against --ink without fail */
a { color: var(--ash); text-decoration: none; }
a:hover { color: var(--bone); }

/* ── Skip-to-content link (accessibility, CHECKLIST §Accessibility) ── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--t-sm) var(--ease-out-expo);
}
.skip-link:focus { top: 0; }

/* ── Representative-data annotation (D.17) ─────────────────── */
[data-representative] {
  border-bottom: 1px dotted var(--line-strong);
  cursor: help;
}

/* ── Universal focus ring (D.9) ────────────────────────────── */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: inherit;
}
