/* =============================================================
   brand-tokens.css — Statura canonical brand tokens
   Source of truth: xx-MASTER FOLDER/brand-assets/STATURA-BRAND-KIT.md
   Imported BEFORE every other stylesheet so other token files
   (ds-tokens.css, editorial.css) can consume these via var().
   ============================================================= */
:root {
  /* --- core (locked) --- */
  --statura-navy:  #14233E;
  --statura-cream: #F5F1E8;
  --statura-gold:  #C9954A;

  /* rgb triplets for rgba() in JS modal overlays */
  --statura-navy-rgb:  20, 35, 62;
  --statura-cream-rgb: 245, 241, 232;
  --statura-gold-rgb:  201, 149, 74;

  /* --- extended palette (use sparingly) --- */
  --statura-navy-90:  #1F2D49;
  --statura-navy-70:  #41506C;
  --statura-cream-90: #EEE9DC;
  --statura-cream-70: #D4CDB8;
  --statura-gold-80:  #B7853F;
  --statura-gold-60:  #E8C485;

  /* --- semantic colors (editorial register) --- */
  --semantic-success:    #3F7D52;
  --semantic-success-bg: rgba(63, 125, 82, 0.12);
  --semantic-warning:    #C9954A;
  --semantic-warning-bg: rgba(201, 149, 74, 0.12);
  --semantic-danger:     #A8423D;
  --semantic-danger-bg:  rgba(168, 66, 61, 0.12);
  --semantic-info:       #41506C;
  --semantic-info-bg:    rgba(65, 80, 108, 0.12);

  /* --- surface hierarchy on cream (light mode default) --- */
  --surface-base:    #F5F1E8;
  --surface-lifted:  #FFFFFF;
  --surface-hover:   #EEE9DC;
  --surface-pressed: #D4CDB8;
  --surface-overlay: rgba(20, 35, 62, 0.55);

  /* --- text hierarchy on cream --- */
  --text-primary:    #14233E;
  --text-secondary:  #41506C;
  --text-tertiary:   #6B7A94;
  --text-disabled:   #A8B1C2;
  --text-on-accent:  #14233E;  /* navy text on gold accents */
  --text-on-navy:    #F5F1E8;  /* cream text on navy */

  /* --- borders + dividers --- */
  --border-subtle: rgba(20, 35, 62, 0.06);
  --border-default: rgba(20, 35, 62, 0.12);
  --border-strong: rgba(20, 35, 62, 0.20);
  --border-accent: #C9954A;

  /* --- inverted palette (for navy-bg surfaces / dark mode) --- */
  --surface-base-inv:    #14233E;
  --surface-lifted-inv:  #1F2D49;
  --surface-hover-inv:   #41506C;
  --text-primary-inv:    #F5F1E8;
  --text-secondary-inv:  #D4CDB8;
  --text-tertiary-inv:   #A8B1C2;
  --border-default-inv:  rgba(245, 241, 232, 0.12);
  --border-strong-inv:   rgba(245, 241, 232, 0.20);

  /* --- 12-industry palette per brand-kit §2 --- */
  --industry-energy:         #C9954A;
  --industry-healthcare:     #A8423D;
  --industry-realestate:     #7C5A3F;
  --industry-finance:        #41506C;
  --industry-technology:     #3F6D7D;
  --industry-transportation: #5A6E3F;
  --industry-education:      #7D3F6D;
  --industry-agriculture:    #6D9352;
  --industry-construction:   #8C6A2A;
  --industry-legal:          #3F7D52;
  --industry-government:     #14233E;
  --industry-other:          #5A5A5A;

  /* --- focus ring --- */
  --focus-ring: 0 0 0 3px rgba(201, 149, 74, 0.35);
}

/* Dark mode flips paper→navy + ink→cream. Per Tristan 2026-05-25:
   the locked gold (#C9954A) reads too orange against navy, so dark
   mode swaps to a creamier gold sampled from the column body in the
   logo. Light mode keeps the locked brand gold. */
html[data-theme="dark"] {
  --statura-gold:    #E8D49E;   /* column-body cream (was #C9954A) */
  --statura-gold-rgb: 232, 212, 158;
  --statura-gold-80: #D4BD7E;   /* hover/active */
  --statura-gold-60: #F2E5BA;   /* lighter accent */

  --semantic-warning:    #E8D49E;
  --semantic-warning-bg: rgba(232, 212, 158, 0.12);
  --border-accent:       #E8D49E;

  --surface-base:    #14233E;
  --surface-lifted:  #1F2D49;
  --surface-hover:   #41506C;
  --surface-pressed: #0F1A2E;
  --surface-overlay: rgba(20, 35, 62, 0.85);

  --text-primary:    #F5F1E8;
  --text-secondary:  #D4CDB8;
  --text-tertiary:   #A8B1C2;
  --text-disabled:   #6B7A94;

  --border-subtle:  rgba(245, 241, 232, 0.06);
  --border-default: rgba(245, 241, 232, 0.12);
  --border-strong:  rgba(245, 241, 232, 0.20);

  --focus-ring: 0 0 0 3px rgba(232, 212, 158, 0.35);
}
