/* =========================================================================
   WW1AHT MASTER — DESIGN TOKENS  (single source of truth)
   -------------------------------------------------------------------------
   This is the ONE authoritative token file. Every other stylesheet in the
   theme inherits from here. Do NOT hardcode colours, font sizes or spacing
   elsewhere — reference these custom properties instead. That is what keeps
   the cascade clean and removes any need for !important overrides.

   COLOUR MODEL
   ------------
   Colour lives on a body PALETTE CLASS, not in :root. Switching the body
   class (palette-rfc_blue / palette-field_grey / palette-canvas_tan)
   re-skins the whole site. RFC Blue is the active default (set in
   functions.php via body_class). The old theme's legacy :root palette
   (--color-brass, --color-charcoal, --color-parchment, --color-khaki …) is
   RETIRED and deliberately not carried over.

   ACCESSIBILITY NOTE
   ------------------
   The raw brass --accent (#d4c5a1) FAILS WCAG AA as text on the light
   background. For tan-coloured TEXT and LINKS use --accent-ink (#7a6a3f).
   Reserve --accent for fills, borders, rules, and text on the dark --box.
   ========================================================================= */

:root {
  /* ---- Type families ------------------------------------------------- */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Lora', Georgia, 'Times New Roman', serif;

  /* ---- Type scale ---------------------------------------------------- */
  --font-base:   1.125rem;   /* 18px base — audience skews older, stay generous */
  --line-body:   1.75;
  --fs-display:  clamp(2.2rem, 5vw, 3.6rem);   /* hero H1 */
  --fs-h1:       clamp(2rem, 4vw, 3rem);
  --fs-h2:       2rem;       /* section headings (design range 1.8–2.1) */
  --fs-h3:       1.45rem;    /* card / sub headings (design range 1.3–1.6) */
  --fs-lead:     1.22rem;    /* lead paragraph */
  --fs-meta:     0.78rem;    /* eyebrow / meta labels (uppercase) */
  --lh-display:  1.04;
  --lh-heading:  1.08;
  --ls-eyebrow:  0.14em;     /* letter-spacing for uppercase eyebrows */
  --fw-heading:  700;
  --fw-semibold: 600;
  --fw-body:     400;

  /* ---- Spacing scale ------------------------------------------------- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;

  /* ---- Geometry ------------------------------------------------------ */
  --radius:    3px;
  --maxw:      1180px;   /* content max width */
  --maxw-read: 760px;    /* long-form reading column (design 720–820) */

  /* ---- Fixed brand constants (identical in every palette) ------------ */
  /* Donate scarlet is the ONE deliberate palette exception: it is always the
     priority action, so it never changes with the palette. */
  --donate:       #b8442e;
  --donate-hover: #9c3826;
  --donate-text:  #ffffff;

  /* Roundel colours (from the logo) — small accents only. */
  --roundel-blue: #26408b;
  --roundel-red:  #b0202f;

  /* Card hover shadow. */
  --shadow-card:  0 12px 30px rgba(42, 62, 92, 0.15);

  /* Motion. */
  --ease:     cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast: 0.12s;
  --dur-menu: 0.16s;
}

/* =========================================================================
   PALETTE 1 — RFC BLUE   (PRIMARY / DEFAULT)
   ========================================================================= */
body.palette-rfc_blue {
  --primary:      #2a3e5c;  /* RFC Blue — headers, primary UI, boxes */
  --primary-dark: #1e2e46;  /* darker blue — utility bar, hero gradients */
  --accent:       #d4c5a1;  /* brass / tan — fills, borders, rules */
  --hover-accent: #f0e6c8;  /* lighter tan — hover */
  --accent-ink:   #7a6a3f;  /* AA-safe tan for TEXT / links on light bg */
  --text:         #2c2c2c;  /* body text */
  --muted:        #6b6b6b;  /* secondary text */
  --bg:           #fdfaf5;  /* warm parchment page background */
  --surface:      #ffffff;  /* cards & panels */
  --line:         rgba(42, 62, 92, 0.14);  /* hairline borders */
  --box:          #2a3e5c;  /* filled box background */
  --box-text:     #d4c5a1;  /* text on filled box */
}

/* =========================================================================
   PALETTE 2 — FIELD GREY   (alt)
   ========================================================================= */
body.palette-field_grey {
  --primary:      #4b4f4e;
  --primary-dark: #3a3d3c;
  --accent:       #d6d2c4;
  --hover-accent: #ece8dc;
  --accent-ink:   #6b6250;
  --text:         #2c2c2c;
  --muted:        #6b6b6b;
  --bg:           #f5f3ef;
  --surface:      #ffffff;
  --line:         rgba(75, 79, 78, 0.16);
  --box:          #4b4f4e;
  --box-text:     #d6d2c4;
}

/* =========================================================================
   PALETTE 3 — CANVAS TAN   (alt)
   ========================================================================= */
body.palette-canvas_tan {
  --primary:      #7a6438;
  --primary-dark: #5c4a28;
  --accent:       #3e3a36;
  --hover-accent: #5c5148;
  --accent-ink:   #7a6438;
  --text:         #3e3a36;
  --muted:        #7a7368;
  --bg:           #fdf6e9;
  --surface:      #fffdf8;
  --line:         rgba(62, 58, 54, 0.16);
  --box:          #c2a875;
  --box-text:     #3e3a36;
}
