/* Veritas et Aequitas — web theme tokens
   Derived from Brand_Guide.md, production edition 2.0 (Oct 7, 2026).
   Load Cinzel from Google Fonts for display type; everything else is system fonts. */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&display=swap');

:root {
  /* Fixed brand palette (flat values from the guide) */
  --va-crimson:   #8C1824;  /* principal heraldry, badge fields, primary buttons */
  --va-charcoal:  #111216;  /* page background anchor */
  --va-iron:      #62646A;  /* borders, dividers, quiet secondary detail */
  --va-gold:      #B08A4B;  /* headings on dark, thin accents, large labels */
  --va-ivory:     #E5D9BE;  /* primary readable text */
  --va-highlight: #CDAC70;  /* bevel/highlight only — hover on gold, never body text */

  /* Derived surfaces (tints of charcoal; not in the guide, chosen for depth on screen) */
  --va-surface-1: #17181D;  /* cards */
  --va-surface-2: #1E2026;  /* raised cards, table headers */
  --va-surface-3: #262830;  /* hover rows, inputs */
  --va-crimson-deep: #6E121C; /* pressed/hover crimson */
  --va-ivory-muted: #B7AC94; /* secondary text — ivory at ~75% toward charcoal, still AA on charcoal */
  --va-scrim: rgba(17, 18, 22, 0.78); /* over scenic art before placing text */
  /* Ember: crimson lifted toward ivory so it can carry text. Deep crimson stays a fill
     (buttons, diamonds, active states) and never sets text; ember sets links and
     interactive text. 5.1:1 or better on charcoal and surfaces 1-2, 4.6:1 on surface 3. */
  --va-ember: #D4766B;

  /* WoW item quality, lightened one step so each passes 4.5:1 on every surface.
     Used only on item names. Common items stay ivory. */
  --q-common:   var(--va-ivory);
  --q-uncommon: #1EFF00;
  --q-rare:     #3B97FF;
  --q-epic:     #B873F0;

  /* Semantic roles */
  --bg:            var(--va-charcoal);
  --fg:            var(--va-ivory);
  --fg-muted:      var(--va-ivory-muted);
  --heading:       var(--va-gold);
  --accent:        var(--va-crimson);
  --accent-fg:     var(--va-ivory);   /* text on crimson */
  --border:        var(--va-iron);
  --border-subtle: #2E3038;
  --link:          var(--va-ember);
  --link-hover:    var(--va-ivory);
  --focus:         var(--va-gold);

  /* Type */
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;   /* wordmark, page titles, section heads */
  --font-serif:   Georgia, 'Times New Roman', serif;             /* motto, pull quotes */
  --font-body:    Arial, Helvetica, system-ui, sans-serif;        /* body, labels, tables, UI */
  --font-mono:    ui-monospace, Menlo, Consolas, monospace;       /* item IDs, stat lines */

  --tracking-display: 0.08em;  /* ~3px at 36px, matches the guide's 2–3px */
  --tracking-label:   0.06em;

  /* Spacing unit B ≈ blade width; 8px grid */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  --radius: 4px;           /* angular identity — keep corners tight */
  --radius-badge: 2px;
  --shadow: 0 2px 12px rgba(0,0,0,0.45);
}

/* The site is dark by brand definition. A light mode would invert the 65/20/10/5
   allocation, so it is deliberately not provided; honor the guide's "charcoal on ivory"
   pairing only inside print stylesheets. */
html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;          /* guide: 16–18px body */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .va-display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
  color: var(--heading);
  line-height: 1.15;
}
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; font-weight: 500; }
h4, h5 { font-family: var(--font-body); color: var(--fg); text-transform: uppercase; letter-spacing: var(--tracking-label); font-size: 13px; }

.va-motto {              /* exact sentence case: "Truth and Justice Forever." */
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--fg-muted);
  text-transform: none;
  letter-spacing: 0;
}

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); }
a:hover { color: var(--link-hover); text-decoration-color: var(--va-gold); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Crimson is a filled surface, never a text color on charcoal */
.va-btn-primary {
  background: var(--accent); color: var(--accent-fg);
  border: 1px solid var(--va-crimson-deep);
  font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-label); font-size: 13px;
  padding: 10px 18px; border-radius: var(--radius);
}
.va-btn-primary:hover { background: var(--va-crimson-deep); }
.va-btn-secondary { background: transparent; color: var(--va-gold); border: 1px solid var(--va-gold); }
.va-btn-secondary:hover { color: var(--va-highlight); border-color: var(--va-highlight); }

.va-card { background: var(--va-surface-1); border: 1px solid var(--border-subtle); border-radius: var(--radius); box-shadow: var(--shadow); }
.va-rule { border: 0; border-top: 1px solid var(--va-gold); opacity: 0.6; }   /* gold only as a thin line */

.va-badge { background: var(--accent); color: var(--accent-fg); border: 1px solid var(--va-gold); border-radius: var(--radius-badge); font-size: 12px; text-transform: uppercase; letter-spacing: var(--tracking-label); padding: 2px 8px; }

/* Scenic headers: scrim before text, keep the Horde flags on the flanks and the crest in the middle */
.va-hero { position: relative; background: var(--va-charcoal) center/cover no-repeat; }
.va-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(17,18,22,0.35), var(--va-scrim)); }
.va-hero > * { position: relative; }

/* Crest sizing floors from the guide */
.va-crest { height: auto; min-height: 160px; }
.va-wordmark { min-width: 300px; }
@media (max-width: 400px) { .va-wordmark { min-width: 0; width: 100%; } }
