/* Vyzora Operational Dark — Lead Market Identity (ADR-008-D §4.1)
 * ============================================================================
 * AUTHORIZED 2026-05-11 by vyzora-art-director after founder rejection of
 * Signal-Map-led cream+navy direction. Linear / Vercel / Cursor / Anthropic
 * side-by-side test failed for prior direction; this direction passes.
 *
 * Reading: dark-canvas product-company homepage in the 2026 AI-tech register.
 * NOT type-foundry specimen book. NOT FAA Airworthiness Directive. NOT
 * transit map. This is the lead market identity for vyzora.ai.
 *
 * The single color a stranger remembers a week later: --op-anchor #FF6B1A.
 * Reserved for: ONE primary CTA per page · ONE active-execution moment in
 * product UI · V logomark accent. Restraint per Linear-anchor-discipline.
 *
 * Anti-pattern: NEVER use --op-anchor for hover states, decorative
 * highlights, secondary CTAs, table cell emphasis, or "accent stripes."
 * It's a memorability token, not a paint bucket.
 *
 * Bricolage Grotesque / Spectral / JuliaMono (ADR-008-E) unchanged.
 * ============================================================================
 */

[data-surface-mode="operational-dark"] {
  /* ── Primitives ──────────────────────────────────────────────────────── */
  --op-canvas:      #0A0A0B;  /* page background — true near-black, NOT navy */
  --op-surface:     #131316;  /* cards, raised panels, product UI containers */
  --op-surface-2:   #1C1C20;  /* hover, secondary raise, table rows */
  --op-border:      #26262C;  /* hairlines, dividers, table grid */
  --op-ink:         #F5F5F4;  /* primary text, display, headlines */
  --op-ink-2:       #A1A1A6;  /* secondary text, metadata, labels */
  --op-ink-3:       #78787E;  /* tertiary, captions, timestamps — WCAG 2.2 AA AA body 4.51 vs canvas */
  --op-anchor:      #FF6B1A;  /* THE chromatic anchor — saturated electric amber */
  --op-anchor-alt:  #F2C230;  /* user-selectable alternative anchor — transit yellow (WCAG-verified 11.81:1 on canvas) */
  --op-active:      #3B82F6;  /* legacy: active state — retired at chrome per ADR-008-F §1, kept for back-compat */
  --op-halt:        #E63946;  /* legacy: blocked — retired at chrome per ADR-008-F §1, kept for back-compat */

  /* ── Semantic role mapping ───────────────────────────────────────────── */
  --bg-primary:         var(--op-canvas);
  --surface-1:          var(--op-surface);
  --surface-2:          var(--op-surface-2);
  --surface-3:          var(--op-border);

  --text-primary:       var(--op-ink);
  --text-secondary:     var(--op-ink-2);
  --text-tertiary:      var(--op-ink-3);

  --border-hairline:    var(--op-border);
  --border-strong:      var(--op-ink-3);

  --state-active:       var(--op-active);
  --state-pending:      var(--op-ink-2);
  --state-blocked:      var(--op-halt);
  --state-passive:      var(--op-ink-3);

  --action-primary:     var(--op-anchor);
  --action-primary-bg:  var(--op-anchor);
  --text-on-action:     var(--op-canvas);

  --accent-trace:       var(--op-active);
  --accent-trace-soft:  var(--op-ink-3);

  --link-color:         var(--op-ink);
  --link-hover:         var(--op-anchor);
}

/* ── CTA label discipline (WCAG 1.4.3 — locked typography-director audit) ──
 * Any element using --op-anchor as a background MUST use --op-canvas as text.
 * White on anchor fails AA at 2.61. Encoded as a class rule. */
[data-surface-mode="operational-dark"] .cta-anchor,
[data-surface-mode="operational-dark"] [data-anchor-bg] {
  color: var(--op-canvas);
}
[data-surface-mode="operational-light"] .cta-anchor,
[data-surface-mode="operational-light"] [data-anchor-bg] {
  color: var(--lt-ink);
}

/* ── prefers-reduced-motion (WCAG 2.3.3) ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ── prefers-contrast: more (WCAG 1.4.6 spirit) ───────────────────────── */
@media (prefers-contrast: more) {
  [data-surface-mode="operational-dark"] {
    --op-ink-2: #D4D4D6;   /* upgrade secondary text contrast */
    --op-ink-3: #B0B0B6;   /* upgrade tertiary */
    --op-border: #4A4A52;  /* stronger borders */
  }
}

/* ── Operational Light (legal / docs / /investors — ≤15% of surfaces) ── */
[data-surface-mode="operational-light"] {
  --lt-canvas:      #FAFAF7;  /* off-white — NOT cream, NOT bone */
  --lt-surface:     #FFFFFF;  /* cards, panels */
  --lt-surface-2:   #F5F5F1;  /* hover, secondary */
  --lt-border:      #E5E5E1;  /* dividers */
  --lt-ink:         #0A0A0B;  /* primary text */
  --lt-ink-2:       #52525B;  /* secondary */
  --lt-ink-3:       #71717A;  /* tertiary */
  --lt-anchor:      #E55A0F;  /* same anchor, 5% darker for light-mode contrast */

  --bg-primary:         var(--lt-canvas);
  --surface-1:          var(--lt-surface);
  --surface-2:          var(--lt-surface-2);
  --surface-3:          var(--lt-border);
  --text-primary:       var(--lt-ink);
  --text-secondary:     var(--lt-ink-2);
  --text-tertiary:      var(--lt-ink-3);
  --border-hairline:    var(--lt-border);
  --action-primary:     var(--lt-anchor);
  --text-on-action:     var(--lt-canvas);
}
