/* Daanaa design tokens — the single source of truth for type and color.
 *
 * Served statically from /tokens.css so EVERY Daanaa surface reads the same
 * values, not just the React app:
 *
 *   - React app        linked in frontend/index.html; Tailwind's fontSize and
 *                      color scales reference these vars, so `text-body` and
 *                      friends resolve here.
 *   - open-data.html   standalone visibility/data page, linked directly.
 *   - Any future page  generated HTML, exports, embeds: link this file.
 *
 * Before this file existed, open-data.html hand-copied the palette into its
 * own :root and picked its own font sizes. That is how a design system drifts:
 * one surface at a time, each of them locally reasonable.
 *
 * Tailwind declares these with px fallbacks (e.g. `var(--text-body, 14px)`),
 * so a failure to load this file degrades to the correct size rather than
 * collapsing every text element.
 */

:root {
  /* ── Type scale ──────────────────────────────────────────────────────────
   * Derived from the sizes the codebase actually used: 2,038 hand-rolled
   * `text-[Npx]` across 24 distinct values, of which thirteen were the real
   * working scale and eleven were drift.
   *
   * Size only. Line height stays with the element so adopting a token never
   * changes vertical rhythm.
   */
  --text-micro:       10px;  /* legal footnotes, dense metadata */
  --text-label:       11px;  /* uppercase eyebrow labels, tags */
  --text-caption:     12px;  /* captions, breadcrumbs, secondary metadata */
  --text-small:       13px;  /* supporting copy, card body */
  --text-body:        14px;  /* default body text */
  --text-body-lg:     15px;  /* primary reading copy on guide pages */
  --text-lead:        16px;  /* intro paragraphs */
  --text-title-sm:    18px;  /* card titles, subsection headings */
  --text-title:       20px;  /* section headings */
  --text-title-lg:    24px;  /* page section headings */
  --text-headline:    28px;  /* major headings */
  --text-headline-lg: 32px;  /* page headings */
  --text-display:     40px;  /* hero numerals and display figures */

  /* Fluid heading sizes, for page titles that should scale with viewport.
   * Mirrors the h1/h2/h3-display utilities in src/index.css. */
  --text-fluid-h1: clamp(32px, 4vw, 44px);
  --text-fluid-h2: clamp(28px, 3.5vw, 36px);
  --text-fluid-h3: clamp(24px, 3vw, 32px);

  /* ── Brand palette ───────────────────────────────────────────────────────
   * Hex values matching frontend/tailwind.config.js. Any standalone page
   * should reference these rather than re-declaring its own copy.
   */
  --deep-navy:   #1A1A2E;
  --warm-cream:  #F5F0E8;
  --soft-gold:   #C9A96E;
  --pale-gold:   #E8D7C3;
  --muted-cream: #D9CFC2;
  --cool-grey:   #6B6B6B;
  --light-grey:  #E8E8E8;

  /* ── Font families ───────────────────────────────────────────────────── */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body:    "DM Sans", Inter, system-ui, sans-serif;

  /* ── Layout ──────────────────────────────────────────────────────────────
   * General spacing uses Tailwind's default scale and needs no tokens here:
   * 6,816 of 6,879 spacing utilities already sit on it. These three exist
   * because the nav height was a magic number, written once in Navigation.tsx
   * and copied into 37 page files as `pt-[72px]`. Changing the nav would have
   * silently slid content under the header on every one of them.
   */
  --nav-height:    72px;   /* fixed Navigation bar height */
  --nav-offset:    72px;   /* top padding to clear the nav */
  --nav-offset-lg: 108px;  /* nav clearance on tall hero sections */
  --anchor-offset: 88px;   /* scroll-margin so anchors clear the nav */
}

/* BEGIN generated cause palette
   Do not edit by hand. Regenerate:
     python3 scripts/generate_cause_palette.py

   One hue per NCCS family; surface/border/text derived by a per-theme
   recipe. Dark is the default (:root); light overrides it. */

:root {
  /* Arts, Culture & Humanities (A) */
  --cause-arts-surface: #3B1C2B;
  --cause-arts-border: #63364D;
  --cause-arts-text: #E79DC2;
  /* Education (BUV) */
  --cause-education-surface: #1C263B;
  --cause-education-border: #364563;
  --cause-education-text: #9DB6E7;
  /* Environment & Animals (CD) */
  --cause-environment-surface: #1C3B26;
  --cause-environment-border: #366345;
  --cause-environment-text: #9DE7B6;
  /* Health (EFGH) */
  --cause-health-surface: #1C353B;
  --cause-health-border: #365C63;
  --cause-health-text: #9DDAE7;
  /* Human Services (IJKLMNOP) */
  --cause-human-surface: #3B291C;
  --cause-human-border: #634936;
  --cause-human-text: #E7BC9D;
  /* International & Foreign Affairs (Q) */
  --cause-global-surface: #291C3B;
  --cause-global-border: #493663;
  --cause-global-text: #BC9DE7;
  /* Public & Societal Benefit (RSTW) */
  --cause-public-surface: #3B331C;
  --cause-public-border: #635836;
  --cause-public-text: #E7D49D;
  /* Religion-Related (X) */
  --cause-religion-surface: #351C3B;
  --cause-religion-border: #5C3663;
  --cause-religion-text: #DA9DE7;
  /* Mutual & Membership Benefit (Y) */
  --cause-mutual-surface: #1C3B35;
  --cause-mutual-border: #36635C;
  --cause-mutual-text: #9DE7DA;
  /* Unclassified (Z) - neutral, no hue */
  --cause-unknown-surface: #1B2233;
  --cause-unknown-border: #2C3547;
  --cause-unknown-text: #AEB6C4;
}

:root[data-theme="light"] {
  /* Arts, Culture & Humanities (A) */
  --cause-arts-surface: #F1DAE6;
  --cause-arts-border: #E3BFD1;
  --cause-arts-text: #6F2047;
  /* Education (BUV) */
  --cause-education-surface: #DAE2F1;
  --cause-education-border: #BFCBE3;
  --cause-education-text: #203A6F;
  /* Environment & Animals (CD) */
  --cause-environment-surface: #DAF1E2;
  --cause-environment-border: #BFE3CB;
  --cause-environment-text: #206F3A;
  /* Health (EFGH) */
  --cause-health-surface: #DAEDF1;
  --cause-health-border: #BFDDE3;
  --cause-health-text: #20626F;
  /* Human Services (IJKLMNOP) */
  --cause-human-surface: #F1E4DA;
  --cause-human-border: #E3CEBF;
  --cause-human-text: #6F4120;
  /* International & Foreign Affairs (Q) */
  --cause-global-surface: #E4DAF1;
  --cause-global-border: #CEBFE3;
  --cause-global-text: #41206F;
  /* Public & Societal Benefit (RSTW) */
  --cause-public-surface: #F1EBDA;
  --cause-public-border: #E3DABF;
  --cause-public-text: #6F5B20;
  /* Religion-Related (X) */
  --cause-religion-surface: #EDDAF1;
  --cause-religion-border: #DDBFE3;
  --cause-religion-text: #62206F;
  /* Mutual & Membership Benefit (Y) */
  --cause-mutual-surface: #DAF1ED;
  --cause-mutual-border: #BFE3DD;
  --cause-mutual-text: #206F62;
  /* Unclassified (Z) - neutral, no hue */
  --cause-unknown-surface: #EDEDEB;
  --cause-unknown-border: #DCDCD8;
  --cause-unknown-text: #4A4A46;
}

/* END generated cause palette */
