/* ============================================================================
   WFEMA — "Heritage Sovereign" Design System
   Single source of truth for the WFEMA website and all print materials.

   Concept: the queen chess piece — unrestricted, strategic, decisive.
   Members are "Queens of King's." Tagline: "Become the woman who moves markets."
   Voice: warm, exacting, never condescending.

   Palette balance: Green 60% · Parchment 25% · Gold 10% · Ink 5%.
   Type: Cormorant Garamond (display) · Hanken Grotesk (text) · IBM Plex Mono (data).

   Used by: the WFEMA website and every print document in wfema/documents and wfema/package.
   Print rules live in print.css (loaded after this file for print materials).
   ============================================================================ */

/* Fonts are loaded via <link> in each document's <head> (NOT @import) — an @import
   here silently breaks :root custom-property resolution in Chrome --print-to-pdf.
   Required <link> (place in <head> before this stylesheet):
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Hanken+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap"> */

/* ----------------------------------------------------------------------------
   1. TOKENS
   ---------------------------------------------------------------------------- */
:root {
  /* — Core palette (canonical) — */
  --green:        #004236;  /* Sovereign Green — dominant */
  --gold:         #C9A24A;  /* Regal Gold — accent only, never large fields */
  --parchment:    #F4F0E6;  /* Parchment — light background */
  --ink:          #06241B;  /* Forest Ink — darkest neutral / alt dark bg */
  --stone:        #6D6E71;  /* Stone — quiet neutral */

  /* — Derived neutrals & supports — */
  --green-board:  #06382c;  /* checkerboard tile on green */
  --green-deep:   #0a2a21;  /* deepest green (placeholders) */
  --cream:        #ECE6D6;  /* alt light section, deeper than parchment */
  --headline-ink: #14201A;  /* large Cormorant headlines on light */
  --text-strong:  #1f2a23;  /* <strong> on light */
  --text:         #4f5750;  /* body text on light */
  --text-muted:   #6a716a;  /* secondary/muted on light */
  --label-muted:  #6e6450;  /* warm taupe mono labels on light — darkened for WCAG AA (≥4.5:1 on parchment) */
  --label-faint:  #9a8f76;  /* original warm tan — DECORATIVE only, never body/label text (fails AA) */
  --on-green:     #d8e4dc;  /* primary text on green */
  --on-green-soft:#a8bcb0;  /* body text on green */
  --on-green-mute:#7d998c;  /* muted sage on green */
  --affirm:       #5b8f6e;  /* affirmative / "we say" / in-kind */
  --warn:         #b5462f;  /* misuse marks / "not" labels */

  /* — Borders & rules — */
  --border-light: #ddd4bf;  /* on parchment */
  --border-card:  #e6dfcd;  /* white cards */
  --border-hair:  #eee4cf;  /* thin dividers in cards */
  --rule-gold:    rgba(201,162,74,.55);
  --rule-gold-soft: rgba(201,162,74,.22);
  --gold-on-dark: rgba(201,162,74,.30);
  --hair-on-dark: rgba(255,255,255,.07);

  /* — Type families — */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* — Type scale (fluid for web; print.css pins fixed sizes) — */
  --fs-display: clamp(3.4rem, 8vw, 8rem);     /* 54–128px cover/display */
  --fs-h1:      clamp(2.4rem, 5vw, 4rem);     /* 38–64px */
  --fs-h2:      clamp(1.9rem, 3.6vw, 2.9rem); /* 30–46px */
  --fs-h3:      clamp(1.3rem, 2vw, 1.6rem);   /* 21–26px */
  --fs-subhead: 1.25rem;                       /* 20px Hanken 600 */
  --fs-lead:    1.18rem;                        /* 19px lead body */
  --fs-body:    1.0625rem;                      /* 17px body */
  --fs-small:   0.9375rem;                      /* 15px */
  --fs-eyebrow: 0.75rem;                         /* 12px uppercase label */
  --fs-mono:    0.78rem;                         /* fine print / codes */
  --lh-body:    1.68;
  --lh-tight:   1.05;

  /* — Tracking (letter-spacing) — */
  --track-wordmark: .02em;
  --track-signature: .42em;   /* the extreme "Women in" eyebrow */
  --track-eyebrow:  .22em;
  --track-label:    .16em;
  --track-pill:     .05em;
  --track-headline: -0.01em;

  /* — Spacing scale — */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --container: 1120px;
  --container-narrow: 760px;
  --pad-side: clamp(1.5rem, 5vw, 3.75rem);
  --pad-section: clamp(3.5rem, 8vw, 6.5rem);

  /* — Radius — */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-pill: 999px;

  /* — Elevation (used sparingly; brand forbids glows on the mark) — */
  --shadow-card: 0 1px 2px rgba(6,36,27,.04), 0 8px 30px rgba(6,36,27,.06);
  --shadow-lift: 0 18px 50px rgba(6,36,27,.14);

  /* — Effects — */
  --glow-gold: radial-gradient(ellipse at 30% 20%, rgba(201,162,74,.16), transparent 58%);
}

/* ----------------------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ----------------------------------------------------------------------------
   3. TYPOGRAPHY
   ---------------------------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--headline-ink); font-weight: 500; }

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-headline);
  color: var(--headline-ink);
  margin: 0;
}
.h1 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-h1); line-height: 1.08; letter-spacing: var(--track-headline); color: var(--headline-ink); margin: 0 0 .4em; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-h2); line-height: 1.1;  letter-spacing: var(--track-headline); color: var(--headline-ink); margin: 0 0 .5em; }
.h3 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-h3); line-height: 1.2;  color: var(--headline-ink); margin: 0 0 .5em; }
.subhead { font-family: var(--sans); font-weight: 600; font-size: var(--fs-subhead); line-height: 1.35; color: var(--text-strong); margin: 0 0 .5em; }

.serif  { font-family: var(--serif); }
.sans   { font-family: var(--sans); }
.mono   { font-family: var(--mono); font-size: var(--fs-mono); letter-spacing: .02em; color: var(--label-muted); }
.italic { font-style: italic; }

.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text); }
p { margin: 0 0 1em; }
.small { font-size: var(--fs-small); }
strong, b { color: var(--text-strong); font-weight: 600; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  margin: 0 0 1rem;
}
.eyebrow--dark { color: var(--green); }

/* The signature super-tracked label that sits above the FEMA wordmark */
.signature-label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--track-signature);
  text-transform: uppercase;
  color: var(--gold);
}

blockquote, .pullquote {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3;
  color: var(--headline-ink);
  margin: 1.5rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--gold);
}

/* ----------------------------------------------------------------------------
   4. LAYOUT
   ---------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-side); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--pad-section); position: relative; }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* Section background colourways (text colours flip automatically) */
.section--green     { background: var(--green); color: var(--on-green-soft); }
.section--ink       { background: var(--ink);   color: var(--on-green-soft); }
.section--parchment { background: var(--parchment); }
.section--cream     { background: var(--cream); }

.section--green  h1, .section--green  h2, .section--green  h3, .section--green  .h1, .section--green  .h2, .section--green  .h3, .section--green  .display,
.section--ink    h1, .section--ink    h2, .section--ink    h3, .section--ink    .h1, .section--ink    .h2, .section--ink    .h3, .section--ink    .display { color: #fff; }
.section--green strong, .section--ink strong { color: #fff; }
.section--green .lead, .section--ink .lead { color: var(--on-green); }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.stack > * + * { margin-top: var(--space-3); }
.flow > * + * { margin-top: 1em; }
.center { text-align: center; }
.measure { max-width: 62ch; }
.mx-auto { margin-inline: auto; }

/* ----------------------------------------------------------------------------
   5. COMPONENTS
   ---------------------------------------------------------------------------- */

/* — Buttons — */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: .01em;
  padding: .85em 1.6em;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--gold); color: var(--ink); }
.btn--primary:hover { background: #d8b566; }
.btn--ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn--ghost:hover { background: var(--green); color: var(--parchment); }
.btn--on-green { background: var(--gold); color: var(--ink); }
.btn--ghost-light { background: transparent; color: var(--parchment); border-color: var(--gold-on-dark); }
.btn--ghost-light:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* — Cards — */
.card {
  background: #fff; border: 1px solid var(--border-card);
  border-radius: var(--r-md); padding: clamp(1.5rem, 3vw, 2rem);
  position: relative;
}
.card--parchment { background: var(--parchment); border-color: var(--border-light); }
.card--green { background: var(--green); border-color: var(--gold-on-dark); color: var(--on-green-soft); }
.card--ink { background: var(--ink); border-color: var(--gold-on-dark); color: var(--on-green-soft); }
.card--green h3, .card--ink h3 { color: #fff; }
.card--outline-gold { background: transparent; border: 1px solid var(--rule-gold); }
.card__label { font-family: var(--sans); font-weight: 600; font-size: .72rem; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted); }

/* — Pills / tags — */
.pill {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--sans); font-weight: 600; font-size: .7rem;
  letter-spacing: var(--track-pill); text-transform: uppercase;
  padding: .42em .9em; border-radius: var(--r-pill);
  border: 1px solid var(--rule-gold); color: var(--green);
}
.pill--gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.pill--on-dark { color: var(--gold); border-color: var(--gold-on-dark); }
.tag-mono { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--label-muted); }

/* — Gold rules / dividers — */
.rule { border: 0; height: 1px; background: var(--gold); opacity: .55; margin: var(--space-4) 0; }
.rule--full { opacity: 1; }
.rule--hair { background: var(--border-light); opacity: 1; }
.rule--on-dark { background: var(--gold); opacity: .3; }
.rule--short { width: 64px; height: 2px; opacity: 1; margin-inline: 0; }
.section--green .rule, .section--ink .rule { background: var(--gold); opacity: .3; }

/* — The Crown mark — recolours via `color` (CSS mask + currentColor fill) — */
.crown {
  display: inline-block; width: 44px; aspect-ratio: 56 / 52;
  color: var(--gold); background-color: currentColor;
  -webkit-mask: url(crown.svg) no-repeat center / contain;
  mask: url(crown.svg) no-repeat center / contain;
}
.crown--sm { width: 26px; }
.crown--lg { width: 72px; }
.crown--xl { width: 110px; }
.crown--green { color: var(--green); }
.crown--cream { color: var(--parchment); }
.crown--gold { color: var(--gold); }

/* — Eyebrow + heading cluster — */
.section-head { margin-bottom: var(--space-5); }
.section-head .h2 { margin-bottom: .3em; }

/* — Stats / oversized numerals — */
.stat { font-family: var(--serif); font-weight: 500; font-size: clamp(3rem, 7vw, 6rem); line-height: 1; color: var(--gold); }
.stat__label { font-family: var(--sans); font-weight: 500; font-size: .9rem; color: var(--text-muted); }
.section--green .stat__label, .section--ink .stat__label { color: var(--on-green-mute); }

/* — Numeral markers (Roman / zero-padded) — */
.numeral { font-family: var(--serif); font-weight: 500; font-size: 2.4rem; line-height: 1; color: var(--gold); }

/* — Feature row (hairline-divided list) — */
.feature-row { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; padding: 1.1rem 0; border-top: 1px solid var(--border-hair); }
.feature-row:first-child { border-top: 0; }
.section--green .feature-row, .section--ink .feature-row { border-color: var(--hair-on-dark); }

/* — Tables (data-heavy charter content) — */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.table th { font-family: var(--sans); font-weight: 600; font-size: .72rem; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--green); background: var(--cream); }
.table tr:last-child td { border-bottom: 0; }
.table--zebra tbody tr:nth-child(even) { background: rgba(244,240,230,.6); }

/* — Callout boxes — */
.callout { border-left: 3px solid var(--gold); background: rgba(201,162,74,.07); padding: 1rem 1.25rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.callout--warn { border-left-color: var(--warn); background: rgba(181,70,47,.06); }
.callout--green { border-left-color: var(--green); background: rgba(0,66,54,.05); }
.callout__title { font-family: var(--sans); font-weight: 600; font-size: .75rem; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--green); margin-bottom: .35rem; }
.callout--warn .callout__title { color: var(--warn); }

/* — Draft banner (for materials pending King's Legal/EDI) — */
.draft-banner {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--warn); background: rgba(181,70,47,.06);
  border: 1px solid rgba(181,70,47,.3); border-radius: var(--r-xs);
  padding: .5em .9em; display: inline-flex; align-items: center; gap: .5em;
}

/* ----------------------------------------------------------------------------
   6. MOTIFS / TEXTURES
   ---------------------------------------------------------------------------- */

/* The Board — checkerboard texture on green */
.board-texture {
  background-image:
    linear-gradient(45deg, var(--green-board) 25%, transparent 25%, transparent 75%, var(--green-board) 75%),
    linear-gradient(45deg, var(--green-board) 25%, transparent 25%, transparent 75%, var(--green-board) 75%);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px;
  opacity: .5;
}

/* Faint crosshatch grid for dark heroes */
.grid-texture {
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* Radial gold glow overlay for dark heroes */
.glow-gold { background: var(--glow-gold); }

/* Positioned decorative layer helper */
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer--front { z-index: 1; }
.relative { position: relative; }
.z1 { position: relative; z-index: 1; }

/* ----------------------------------------------------------------------------
   7. WORDMARK / LOCKUP
   ---------------------------------------------------------------------------- */
.lockup { display: inline-flex; flex-direction: column; align-items: center; gap: .4rem; }
.lockup--row { flex-direction: row; align-items: center; gap: .7rem; }
.wordmark { font-family: var(--serif); font-weight: 500; letter-spacing: var(--track-wordmark); line-height: 1; color: var(--headline-ink); }
.wordmark--light { color: var(--parchment); }
.wordmark__sig { font-family: var(--sans); font-weight: 600; font-size: .62rem; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--gold); }

/* ----------------------------------------------------------------------------
   8. UTILITIES
   ---------------------------------------------------------------------------- */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-ink { color: var(--ink); }
.text-muted { color: var(--text-muted); }
.bg-green { background: var(--green); }
.bg-parchment { background: var(--parchment); }
.bg-cream { background: var(--cream); }
.bg-ink { background: var(--ink); }
.uppercase { text-transform: uppercase; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); } .mt-4 { margin-top: var(--space-4); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ----------------------------------------------------------------------------
   9. EXTRA MOTIFS & FILL-IN MARKERS  (added foundation completion)
   ---------------------------------------------------------------------------- */

/* Diagonal hatch well — photo placeholder / textured panel on green */
.hatch {
  background-color: var(--green);
  background-image: repeating-linear-gradient(45deg,
    rgba(201,162,74,.12) 0, rgba(201,162,74,.12) 1px,
    transparent 1px, transparent 9px);
}
.hatch--ink { background-color: var(--ink); }

/* Green→gold duotone — decorative gradient (covers, accents; never behind body text) */
.duotone { background: linear-gradient(135deg, var(--green) 0%, #2c5a3f 55%, var(--gold) 130%); }

/* Placeholder token — visibly-distinct fill-in marker for unconfirmed facts
   (coordinator contact, exact dates) in approval-draft materials. Screen + print. */
.placeholder-token {
  font-family: var(--mono);
  font-size: .9em;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px dotted var(--gold);
  background: rgba(201,162,74,.07);
  padding: 0 .2em .04em;
  border-radius: 2px 2px 0 0;
}
.section--green .placeholder-token,
.section--ink   .placeholder-token,
.sheet--green   .placeholder-token,
.sheet--ink     .placeholder-token { color: var(--on-green-soft); border-bottom-color: var(--gold); background: rgba(201,162,74,.12); }
/* Short inline "to confirm" tag — for unverified stats, distinct from bracket tokens */
.tc-tag { font-family: var(--mono); font-size: .7em; letter-spacing: .04em; color: var(--warn); opacity: .82; vertical-align: .15em; white-space: nowrap; }
