/* ==========================================================================
   The BS Foundation — design tokens
   Source of truth: claude.ai/design → "BS Foundation Brand Guidelines"
   Values copied verbatim from tokens/colors.css, typography.css, spacing.css.
   Do not hand-tune these. Change them in the design system, then re-sync.
   ========================================================================== */

/* --- Layer 1: Foundation. Never changes.
   Carries logo, nav, footer, donation/transparency, legal. --- */
:root {
  --bsf-forest: #1B3409;        /* sampled from the crest: rgb(27,52,9) */
  --bsf-forest-deep: #112205;   /* pressed / footer base */
  --bsf-forest-soft: #2E4A1C;   /* hover on forest surfaces */
  --bsf-cream: #F5EFE1;         /* page background — never pure white */
  --bsf-cream-deep: #ECE4D0;    /* alternate section / card on cream */
  --bsf-ink: #15170F;           /* body text */
  --bsf-sage: #8C9677;          /* decorative: rules, ornaments, borders on forest */
  --bsf-sage-light: #D8DCC8;    /* quiet fills, disabled */
  --bsf-stone: #6B665A;         /* secondary text (5.0:1 on cream) */
  --bsf-line: #D9D1BD;          /* hairlines on cream */

  /* Accent hooks — default to foundation values.
     Sponsored-maker palettes live in a separate site section. */
  --accent-primary: #1B3409;
  --accent-on-primary: #F5EFE1;
  --accent-secondary: #8C9677;
  --accent-tint: #ECE4D0;

  /* Semantic aliases */
  --surface-page: var(--bsf-cream);
  --surface-raised: var(--bsf-cream-deep);
  --surface-brand: var(--bsf-forest);
  --surface-feature: var(--accent-tint);
  --text-body: var(--bsf-ink);
  --text-muted: var(--bsf-stone);
  --text-brand: var(--bsf-forest);
  --text-on-brand: var(--bsf-cream);
  --border-hairline: var(--bsf-line);
  --focus-ring: var(--bsf-forest);
  --link: var(--bsf-forest);
  --link-hover: var(--accent-primary);

  /* Error — from Input.jsx */
  --bsf-error: #8A1C1C;

  /* --- Type --- */
  --font-display: 'Cormorant Garamond', 'Libre Caslon Display', Georgia, serif;
  --font-sans: 'Instrument Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;

  --type-display-xl: 600 88px/0.95 var(--font-display);
  --type-display-l: 600 64px/1.0 var(--font-display);
  --type-display-m: 600 44px/1.05 var(--font-display);
  --type-h3: 600 30px/1.15 var(--font-display);
  --type-h4: 600 20px/1.3 var(--font-sans);
  --type-body-l: 400 19px/1.55 var(--font-sans);
  --type-body: 400 16px/1.6 var(--font-sans);
  --type-small: 400 14px/1.5 var(--font-sans);
  --type-eyebrow: 600 12px/1.2 var(--font-sans);

  --tracking-display: -0.01em;
  --tracking-eyebrow: 0.22em;
  --tracking-wordmark: 0.2em;   /* "BS FOUNDATION" set in display caps */

  /* --- Space, shape, motion --- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px; --space-10: 128px;
  --radius-0: 0; --radius-1: 2px; --radius-pill: 999px;
  --border-1: 1px solid var(--bsf-line);
  --border-double: 3px double currentColor;  /* echoes the crest's double ring */
  --content-max: 1200px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 140ms; --dur-base: 220ms;

  /* z-index scale */
  --z-nav: 50; --z-skip: 60;
}
