/* ============================================
   GenGives — Main Stylesheet
   ============================================

   Organization:
   1. CSS Custom Properties (Design Tokens)
   2. Reset & Base Styles
   3. Typography
   4. Layout Utilities
   5. Components (buttons, forms, header, footer)
   6. Sections (by category)
   7. Responsive Breakpoints

   Naming: BEM methodology (.block__element--modifier)
   Approach: Mobile-first
   ============================================ */

/* ============================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
  /* Brand Colors — pulled from give-platform app UI */
  --color-primary: #004A57;        /* Dark teal */
  --color-secondary: #95AB9D;      /* Sage green */
  --color-accent: #E3A944;         /* Gold */
  --color-coral: #C25847;          /* Logo pop — coral/terracotta. Pop only: buttons, icons, accents. Not for bg/text. */
  --color-orange: #CF7430;         /* Logo pop — warm orange (nudged darker for WCAG: white label hits 3:1 as large text). Pop only: buttons, icons, accents. Not for bg/text. */
  --color-success: #2FA76A;        /* Positive deltas */

  /* Surfaces */
  --color-page-bg: #EBE6DA;        /* Warm cream */
  --color-page-bg-sage: #E9EDE9;   /* Pale sage — third section tone, cool foil to the cream */
  --color-surface: #FFFFFF;        /* Cards, panels */

  /* Neutral Colors */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-gray-100: #F7F5F0;
  --color-gray-200: #E7E2D6;
  --color-gray-300: #D4CFC2;
  --color-gray-400: #B0AB9F;
  --color-gray-500: #95AB9D;
  --color-gray-600: #6B6F69;
  --color-gray-700: #444444;
  --color-gray-800: #2A2D2C;
  --color-gray-900: #111111;

  /* Semantic Colors */
  /* All text colors unified to the header-navigation color (#2A2D2C). */
  --color-text: var(--color-gray-800);
  --color-text-light: var(--color-text);
  --color-text-muted: var(--color-text);
  --color-background: var(--color-page-bg);
  --color-background-alt: var(--color-surface);

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */

  /* Layout */
  --container-max: 1200px;
  --container-padding: var(--space-lg);

  /* Border Radius — Subtle scale matching app UI */
  --radius-none: 0;
  --radius-sm: 6px;
  --radius-md: 8px;        /* Buttons */
  --radius-lg: 14px;       /* Cards */
  --radius-full: 9999px;   /* Pills */
  --radius-default: var(--radius-md);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 74, 87, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 74, 87, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 74, 87, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Z-index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-tooltip: 400;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */

*,
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

/* Serif only on the larger display sizes — h3 and below read better in sans. */
h1, h2 {
  font-family: var(--font-serif);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  font-family: var(--font-body);
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-text);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

/* ============================================
   4. LAYOUT UTILITIES
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  z-index: var(--z-tooltip);
  border-radius: var(--radius-default);
}

.skip-link:focus {
  top: var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   5. COMPONENTS
   ============================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  /* Bold 19px labels clear the WCAG "large text" threshold (≥18.66px bold),
     dropping the contrast bar to 3:1 so the warm coral/orange pops pass. */
  font-size: 1.1875rem;
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-default);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background-color: transparent;
  color: var(--color-primary);
}

.btn--secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

.btn--secondary:hover {
  background-color: transparent;
  color: var(--color-secondary);
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

.btn--accent:hover {
  background-color: transparent;
  color: var(--color-accent);
}

.btn--coral {
  background-color: var(--color-coral);
  color: var(--color-white);
  border-color: var(--color-coral);
}

.btn--coral:hover {
  background-color: transparent;
  color: var(--color-coral);
}

/* Coral by default, flips to a white fill on hover. For buttons on a dark
   panel (e.g. the demo form) where the standard coral hover reads poorly. */
.btn--coral-light {
  background-color: var(--color-coral);
  color: var(--color-white);
  border-color: var(--color-coral);
}

.btn--coral-light:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn--orange {
  background-color: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
}

.btn--orange:hover {
  background-color: transparent;
  color: var(--color-orange);
}

.btn--outline {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background-color: transparent;
  color: var(--color-primary);
}

.btn--pill {
  border-radius: var(--radius-full);
}

/* --- Site Header --- */
.site-header {
  background-color: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  gap: var(--space-md);
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.site-header__logo-img {
  display: block;
  height: 72px;
  width: auto;
  transition: opacity var(--transition-fast);
}

.site-header__logo:hover .site-header__logo-img {
  opacity: 0.85;
}

.site-header__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.site-header__toggle-icon,
.site-header__toggle-icon::before,
.site-header__toggle-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  position: relative;
}

.site-header__toggle-icon::before,
.site-header__toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.site-header__toggle-icon::before { top: -8px; }
.site-header__toggle-icon::after { top: 8px; }

.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon {
  background-color: transparent;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-header__nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  flex-direction: column;
  gap: var(--space-md);
}

.site-header__nav--open {
  display: flex;
}

.site-header__menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.site-header__link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  padding: var(--space-sm) 0;
  display: block;
}

.site-header__link:hover,
.site-header__link--active {
  color: var(--color-primary);
}

.site-header__cta {
  width: 100%;
  text-align: center;
}

/* --- Site Footer --- */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.site-footer a {
  color: var(--color-white);
  opacity: 0.85;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.site-footer__inner {
  display: grid;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  transition: opacity var(--transition-fast);
}

.site-footer__logo:hover {
  opacity: 0.85;
}

.site-footer__logo-img {
  display: block;
  height: 72px;
  width: auto;
}

.site-footer__description {
  margin-top: var(--space-sm);
  opacity: 0.85;
  max-width: 32ch;
}

.site-footer__heading {
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.site-footer__menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.site-footer__address p {
  margin-bottom: var(--space-sm);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.site-footer__copyright {
  margin: 0;
  opacity: 0.7;
  font-size: var(--font-size-sm);
}

.site-footer__legal {
  display: flex;
  gap: var(--space-lg);
  font-size: var(--font-size-sm);
}

/* --- Forms --- */
.form-field {
  margin-bottom: var(--space-md);
}

.form-field label {
  display: block;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ============================================
   6. SECTIONS

   Sections are organized by category:
   - Hero, Layout, Features, Content, Media,
     CTA, Forms, Social Proof, Navigation

   Each section follows BEM naming:
     .section-name
     .section-name__element
     .section-name--modifier
   ============================================ */

/* --- HERO SECTIONS --- */

.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background-color: var(--color-page-bg);
  text-align: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-bottom: var(--space-3xl);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  background-color: rgba(149, 171, 157, 0.15);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

.hero__headline {
  font-size: var(--font-size-4xl);
  max-width: 18ch;
  margin: 0 auto var(--space-md);
}

.hero__subhead {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  max-width: 60ch;
  margin: 0 auto var(--space-xl);
  line-height: var(--line-height-relaxed);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.hero__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-gray-200);
  box-shadow: var(--shadow-lg);
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__trust {
  padding-top: var(--space-xl);
  margin-top: var(--space-xl);
}

.hero__trust-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.hero__trust-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl) var(--space-2xl);
}

.hero__trust-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  max-width: 180px;
}

.hero__trust-logo {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.hero__trust-logo:hover {
  transform: scale(1.04);
}

/* Monterey County Gives logo includes a tagline lockup, so it needs a wider/taller box to read at parity with the other marks. */
.hero__trust-logo-wrap:has(img[src*="monterey-county-gives"]) {
  height: 80px;
  max-width: 300px;
}

/* --- FEATURES SECTIONS --- */

.features {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
}

.features__intro {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--space-3xl);
}

.features__intro h2 {
  margin-bottom: var(--space-md);
}

.features__intro p {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.feature-card {
  background-color: var(--color-page-bg-sage);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  /* Icon and title share a row; description spans the full width below. */
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-md);
  align-items: center;
  /* Pack rows to the top so the description doesn't get centered in the
     stretched track when a card is taller than its content. */
  align-content: start;
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background-color: rgba(0, 74, 87, 0.08);
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

/* Rotate icon colors across feature cards so the grid pops.
   The icon glyph is purely decorative (aria-hidden), so swapping its color
   doesn't count as a body text-color use of the pop palette. */
.features__grid .feature-card:nth-child(4n + 2) .feature-card__icon {
  background-color: rgba(194, 88, 71, 0.12);
  color: var(--color-coral);
}

.features__grid .feature-card:nth-child(4n + 3) .feature-card__icon {
  background-color: rgba(218, 124, 52, 0.14);
  color: var(--color-orange);
}

.features__grid .feature-card:nth-child(4n + 4) .feature-card__icon {
  background-color: rgba(227, 169, 68, 0.16);
  color: var(--color-accent);
}

.feature-card__title {
  font-size: var(--font-size-lg);
  margin-bottom: 0;
  /* Reserve two lines so descriptions start at the same Y across a row,
     whether a title wraps to one line or two. */
  display: flex;
  align-items: center;
  min-height: calc(2 * var(--line-height-tight) * 1em);
}

.feature-card__description {
  grid-column: 1 / -1;
  margin-top: var(--space-md);
  color: var(--color-text-light);
  margin-bottom: 0;
  line-height: var(--line-height-relaxed);
}

/* --- CONTENT SECTIONS --- */

.about {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
}

.about__inner {
  max-width: 1080px;
  margin: 0 auto;
}

.about__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.about__eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.about__heading {
  max-width: 39ch;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 0;
}

.about__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

/* Tab rail — rounded button cards */
.about__tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.about__tab {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
  text-align: left;
}

.about__tab:hover {
  border-color: var(--color-primary);
}

.about__tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.about__tab[aria-selected="true"] {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  font-weight: var(--font-weight-semibold);
}

.about__tab-number {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  letter-spacing: 0.06em;
  transition: color var(--transition-fast);
}

.about__tab[aria-selected="true"] .about__tab-number {
  color: rgba(255, 255, 255, 0.75);
}

/* Pane */
.about__panes {
  position: relative;
}

.about__pane {
  padding: var(--space-2xl);
  background-color: var(--color-secondary);
  background-image: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0) 65%);
  border-radius: var(--radius-lg);
  border: 4px solid var(--color-secondary);
  animation: about-pane-fade var(--transition-normal) ease;
}

.about__pane[hidden] {
  display: none;
}

.about__pane-text {
  /* Dark body text on the sage pane = 5.7:1 (white was 2.44:1, failing WCAG). */
  color: var(--color-text);
  font-size: calc(var(--font-size-xl) + 0.2rem);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

@keyframes about-pane-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .about__pane {
    animation: none;
  }
}

/* --- CTA SECTIONS --- */

.pricing-math {
  padding: var(--space-4xl) 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
}

.pricing-math__inner {
  max-width: 800px;
  margin: 0 auto;
}

.pricing-math__heading {
  color: var(--color-white);
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-xl);
}

.pricing-math__quote {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-xl);
  font-style: italic;
  color: var(--color-white);
}

.pricing-math__support {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xl);
}

.pricing-math .btn--accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

.pricing-math .btn--accent:hover {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

/* Coral CTA when used inside the dark-teal pricing-math band:
   on hover, flip to a light/outline state instead of disappearing
   into the background. */
.pricing-math .btn--coral:hover {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

/* --- SOCIAL PROOF SECTIONS --- */

.stats {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
  text-align: center;
}

.stats__heading {
  margin-bottom: var(--space-sm);
}

.stats__subhead {
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-lg);
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  max-width: 960px;
  margin: 0 auto;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background-color: var(--color-secondary);
  border-radius: var(--radius-lg);
  min-height: 180px;
}

.stat__value {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  line-height: 1;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.stat__label {
  display: block;
  font-size: var(--font-size-base);
  color: var(--color-white);
  font-weight: var(--font-weight-medium);
}

.stats__source {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

.social-proof {
  padding: var(--space-4xl) 0;
  background-color: var(--color-page-bg);
  overflow: hidden;
}

.social-proof__intro {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--space-md);
}

.social-proof__intro h2 {
  margin-bottom: var(--space-md);
}

.social-proof__intro p {
  color: var(--color-text-light);
  font-size: var(--font-size-lg);
}

@media (min-width: 768px) {
  .social-proof__intro {
    max-width: none;
  }

  .social-proof__intro p {
    white-space: nowrap;
  }
}

.testimonial-carousel {
  position: relative;
  margin-bottom: var(--space-md);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.testimonial-carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.testimonial-track {
  display: flex;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial {
  position: relative;
  background-color: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  flex: 0 0 100%;
  min-width: 0;
  text-align: center;
  overflow: hidden;
}

.testimonial::before {
  content: "\201C";
  position: absolute;
  top: calc(var(--space-md) - 5px);
  left: calc(var(--space-lg) - 5px);
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.25;
  pointer-events: none;
  user-select: none;
}

.testimonial-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.testimonial-carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background-color: var(--color-gray-300);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.testimonial-carousel__dot:hover {
  background-color: var(--color-secondary);
}

.testimonial-carousel__dot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.testimonial-carousel__dot[aria-current="true"] {
  background-color: var(--color-coral);
  transform: scale(1.3);
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-track {
    transition: none;
  }
}

.testimonial__quote {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  margin-bottom: 0;
  padding-top: var(--space-md);
  flex-grow: 1;
}

.testimonial__attribution {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-gray-200);
}

.testimonial__logo-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.testimonial__logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: auto;
  height: auto;
}

.testimonial__cite {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-style: normal;
  text-align: left;
}

.testimonial__name {
  display: block;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.logo-wall {
  border-top: 1px solid var(--color-gray-200);
  padding-top: var(--space-md);
  text-align: center;
}

.logo-wall__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.logo-wall__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl) var(--space-2xl);
}

.logo-wall__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  max-width: 200px;
}

.logo-wall__logo {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Monterey County Gives logo includes a tagline lockup, so it needs a wider/taller box to read at parity with the other marks. */
.logo-wall__logo-wrap:has(img[src*="monterey-county-gives"]) {
  height: 96px;
  max-width: 340px;
}

/* --- FORM SECTIONS --- */

.demo-form {
  padding: var(--space-4xl) 0;
  background-color: var(--color-page-bg-sage);
}

.demo-form__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  max-width: 1080px;
  margin: 0 auto;
}

.demo-form__copy h2 {
  margin-bottom: var(--space-md);
}

.demo-form__lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
  line-height: var(--line-height-relaxed);
}

.demo-form__expectations {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-md);
}

.demo-form__expectation {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
}

.demo-form__expectation-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: var(--color-white);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
}

.demo-form__expectation:nth-child(2) .demo-form__expectation-icon {
  background-color: var(--color-orange);
  color: var(--color-white);
}

.demo-form__expectation:nth-child(3) .demo-form__expectation-icon {
  background-color: var(--color-coral);
  color: var(--color-white);
}

.demo-form__expectation-text {
  margin: 0;
  line-height: var(--line-height-normal);
}

.demo-form__panel {
  background-color: var(--color-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-primary);
  color: var(--color-white);
}

/* Form sits on the dark-green panel — labels go white */
.demo-form__panel .form-field label {
  color: var(--color-white);
}

.demo-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.demo-form__reassurance {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

/* Honeypot — kept in the DOM for bots, removed from view and a11y tree. */
.demo-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Cloudflare Turnstile widget sits between the last field and the button. */
.demo-form__turnstile {
  margin: var(--space-md) 0;
}

/* Submit feedback message (success / error). */
.demo-form__status {
  margin: var(--space-md) 0 0;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
}

.demo-form__status--success {
  background-color: rgba(47, 167, 106, 0.18);
}

.demo-form__status--error {
  background-color: rgba(227, 74, 74, 0.2);
}


/* ============================================
   7. RESPONSIVE BREAKPOINTS
   ============================================

   Mobile-first.
   Mobile:  320px – 767px   (default styles above)
   Tablet:  768px – 1024px
   Desktop: 1025px+
   ============================================ */

/* Tablet and up */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-xl);
  }

  h1 { font-size: var(--font-size-5xl); }
  h2 { font-size: var(--font-size-4xl); }

  /* Header — switch to inline nav */
  .site-header__toggle {
    display: none;
  }

  .site-header__nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 0;
    box-shadow: none;
    background: transparent;
    gap: var(--space-xl);
  }

  .site-header__menu {
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg);
  }

  .site-header__item--cta {
    margin-left: var(--space-sm);
  }

  .site-header__cta {
    width: auto;
  }

  /* Footer columns */
  .site-footer__inner {
    grid-template-columns: 2fr 1fr;
  }

  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* --- Hero --- */
  .hero {
    padding: var(--space-4xl) 0 var(--space-3xl);
    text-align: left;
  }

  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }

  .hero__content {
    align-items: flex-start;
  }

  .hero__headline {
    font-size: 2.5rem; /* 40px — sized so the longer headline fits on 3 lines */
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .hero__subhead {
    font-size: var(--font-size-xl);
    margin-left: 0;
    margin-right: 0;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__trust {
    text-align: center;
  }

  /* --- Features --- */
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* --- Stats --- */
  .stats__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* --- Demo --- */
  .demo-form__inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .demo-form__row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

/* Desktop */
@media (min-width: 1025px) {
  :root {
    --container-padding: var(--space-2xl);
  }

  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* --- About: side rail of rounded tab buttons --- */
  .about__layout {
    grid-template-columns: 300px 1fr;
    gap: var(--space-xl);
    align-items: start;
  }

  .about__pane {
    min-height: 320px;
    padding: var(--space-3xl);
  }

  .pricing-math__heading {
    font-size: var(--font-size-4xl);
  }

  .pricing-math__quote {
    font-size: var(--font-size-2xl);
  }

  .testimonial__quote {
    font-size: var(--font-size-2xl);
  }
}
