/* =========================================================
   OUR FAMILIES — Design Tokens
   Warm, dignified civic-nonprofit palette derived from the
   organization's logo: weathered dark texture, deep red +
   charcoal wordmark, steel-blue icon. Accent: deep red for
   warmth/urgency of care, navy for trust/institutional weight.
   ========================================================= */

:root,
[data-theme='light'] {
  /* Surfaces — warm parchment / off-white, not stark white */
  --color-bg: #faf6f0;
  --color-surface: #ffffff;
  --color-surface-2: #fdfbf8;
  --color-surface-offset: #f2ece2;
  --color-surface-offset-2: #e9e0d2;
  --color-surface-dynamic: #ded2bc;
  --color-divider: #e4dac8;
  --color-border: #d8cbb3;

  /* Text — warm near-black charcoal */
  --color-text: #2a2420;
  --color-text-muted: #6f6459;
  --color-text-faint: #a89c8c;
  --color-text-inverse: #faf6f0;

  /* Primary accent — Deep Navy (trust, institutional, echoes icon steel-blue) */
  --color-primary: #16324a;
  --color-primary-hover: #0e2436;
  --color-primary-active: #081722;
  --color-primary-highlight: #d7e0e6;

  /* Secondary / warm accent — Brick Red (echoes wordmark red) */
  --color-accent: #9c2b2b;
  --color-accent-hover: #7d2020;
  --color-accent-active: #5e1717;
  --color-accent-highlight: #f0d9d5;

  /* Success (used sparingly — confirmation states) */
  --color-success: #3f7a4f;
  --color-success-hover: #2d5c39;
  --color-success-active: #1f3f27;
  --color-success-highlight: #d8e6da;

  /* Warning / error (form validation only) */
  --color-error: #a13a2c;
  --color-error-hover: #832d22;
  --color-error-highlight: #f0d9d3;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — warm-toned */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 40 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.2 0.02 40 / 0.10);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 40 / 0.16);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'DM Serif Display', 'Georgia', serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', sans-serif;

  /* Fixed inverse surface — used for hero/mission/involved sections that are
     always dark navy regardless of light/dark theme (they use inverse text). */
  --color-inverse-surface: #16324a;
  --color-inverse-surface-active: #081722;
  --color-on-inverse: #faf6f0;
  --color-on-inverse-muted: #cbd8e2;
}

[data-theme='dark'] {
  --color-bg: #171310;
  --color-surface: #1d1815;
  --color-surface-2: #221c18;
  --color-surface-offset: #26201b;
  --color-surface-offset-2: #2c251f;
  --color-surface-dynamic: #362d25;
  --color-divider: #332b23;
  --color-border: #453a2f;

  --color-text: #ece4d8;
  --color-text-muted: #b3a494;
  --color-text-faint: #7d7060;
  --color-text-inverse: #1d1815;

  --color-primary: #7ea3bd;
  --color-primary-hover: #a0bdd1;
  --color-primary-active: #c1d5e2;
  --color-primary-highlight: #2a3b46;

  --color-accent: #d16b5f;
  --color-accent-hover: #dd8b80;
  --color-accent-active: #e8ada4;
  --color-accent-highlight: #4a2e28;

  --color-success: #7fb589;
  --color-success-hover: #9bc7a3;
  --color-success-highlight: #2b3d2e;

  --color-error: #d1786a;
  --color-error-hover: #dd968b;
  --color-error-highlight: #442a24;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);

  --color-inverse-surface: #0e2032;
  --color-inverse-surface-active: #060e17;
  --color-on-inverse: #faf6f0;
  --color-on-inverse-muted: #cbd8e2;
}

/* Type scale */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.75rem);
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}
