/* ==========================================================================
   Re-Elect Dan Cherrier — DUSD School Board, Area 5
   Site stylesheet
   ========================================================================== */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Karla:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ---- Design tokens ---- */
:root {
  --navy-950: #081d34;
  --navy-900: #0a2c4f;
  --navy-800: #123b66;
  --navy-700: #1c4d7d;
  --navy-600: #2c6198;
  --green-700: #4f9a2c;
  --green-600: #63ab3a;
  --green-500: #7cc741;
  --green-400: #97d566;
  --green-100: #e8f6db;

  --bg: #f8faf6;
  --surface: #ffffff;
  --surface-muted: #f1f5ee;
  --border: #e1e8db;
  --ink: #142434;
  --ink-muted: #4f5f6d;
  --ink-soft: #7c8b96;

  --accent: var(--green-500);
  --accent-ink: #163a08;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(10, 30, 55, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 30, 55, 0.12);
  --shadow-lg: 0 20px 48px rgba(10, 30, 55, 0.18);

  --container: 1160px;
  --font-display: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Karla', 'Segoe UI', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1a28;
    --surface: #102438;
    --surface-muted: #0d1f30;
    --border: #1d3a52;
    --ink: #eaf1f5;
    --ink-muted: #b6c6d1;
    --ink-soft: #8ba0ac;
    --green-100: #1c3712;
    --accent: var(--green-400);
    --accent-ink: #0d2004;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1a28;
  --surface: #102438;
  --surface-muted: #0d1f30;
  --border: #1d3a52;
  --ink: #eaf1f5;
  --ink-muted: #b6c6d1;
  --ink-soft: #8ba0ac;
  --green-100: #1c3712;
  --accent: var(--green-400);
  --accent-ink: #0d2004;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
}

/* ---- Reset & base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; color: var(--ink-muted); }
ul { padding-left: 1.2em; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}
section { padding-block: 72px; }
.section-tight { padding-block: 48px; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 12px;
}
:root[data-theme="dark"] .eyebrow,
@media (prefers-color-scheme: dark) { }
.eyebrow--on-dark { color: var(--green-400); }

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: inherit;
}
.btn-outline:hover { border-color: currentColor; }
.btn-navy {
  background: var(--navy-800);
  color: #fff;
}
.btn-navy:hover { background: var(--navy-700); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { height: 46px; width: auto; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--navy-900);
}
:root[data-theme="dark"] .brand-text strong,
body:has([data-theme]) .brand-text strong {}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-text strong { color: #fff; } }
:root[data-theme="dark"] .brand-text strong { color: #fff; }
.brand-text span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-700);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--ink-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--surface-muted); color: var(--ink); }
.main-nav a.active { color: var(--navy-900); background: var(--green-100); }
:root[data-theme="dark"] .main-nav a.active { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--navy-800);
  flex-shrink: 0;
}
:root[data-theme="dark"] .social-icon { color: #fff; }
.social-icon svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy-900);
}
:root[data-theme="dark"] .nav-toggle { color: #fff; }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 24px 20px;
    gap: 2px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; }
  .nav-toggle { display: inline-flex; }
  .header-social { display: none; }
}

/* ---- Hero ---- */
.hero {
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-700) 0%, var(--navy-900) 46%, var(--navy-950) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(124,199,65,0.07) 0 2px, transparent 2px 90px);
  pointer-events: none;
}
.hero .container {
  position: relative;
  padding-block: 76px 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: 18px;
}
.hero-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--green-400);
  display: inline-block;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.4rem);
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--green-400);
}
.hero-lede {
  color: rgba(255,255,255,0.82);
  font-size: 18px;
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 520px;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}
.hero-stat span {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-art-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(6px);
  max-width: 380px;
}
.hero-art-card img { border-radius: var(--radius-md); }
.hero-art-badge {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 220px;
  line-height: 1.3;
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; padding-block: 48px 40px; }
  .hero-art { order: -1; }
  .hero-art-card { max-width: 320px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); max-width: none; }
}

/* ---- Carousel / Gallery ---- */
.gallery-section { background: var(--surface); }
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  box-shadow: var(--shadow-md);
}
.carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}
.carousel__slide.is-active { opacity: 1; z-index: 2; }
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 26px;
  background: linear-gradient(0deg, rgba(8,29,52,0.82), transparent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(8,29,52,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.15s ease;
}
.carousel__nav:hover { background: rgba(8,29,52,0.8); }
.carousel__nav svg { width: 20px; height: 20px; }
.carousel__nav--prev { left: 16px; }
.carousel__nav--next { right: 16px; }
.carousel__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
}
.carousel__dot.is-active { background: var(--accent); width: 24px; border-radius: var(--radius-pill); }
.carousel__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 24px;
}
.carousel__empty img { width: 64px; opacity: 0.85; }
.carousel__empty p { color: rgba(255,255,255,0.6); max-width: 32ch; margin: 0; font-size: 14px; }
.carousel[hidden], .carousel__slide[hidden] { display: none; }

/* ---- Cards / grids ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
:root[data-theme="dark"] .card-icon { color: var(--green-400); }
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { margin: 0; font-size: 15px; }

.section-alt { background: var(--surface-muted); }

.achievement {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 26px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.achievement:first-of-type { border-top: none; }
.achievement .tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  display: inline-block;
  width: fit-content;
}
:root[data-theme="dark"] .achievement .tag { color: var(--green-400); }
.achievement h3 { margin-bottom: 8px; font-size: 20px; }
@media (max-width: 700px) {
  .achievement { grid-template-columns: 1fr; gap: 10px; }
}

/* ---- Timeline (About page) ---- */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.timeline li {
  position: relative;
  padding: 2px 0 26px 28px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border);
}
.timeline strong { display: block; font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.timeline span { font-size: 14px; color: var(--ink-soft); }

/* ---- Bio layout ---- */
.bio-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .bio-layout { grid-template-columns: 1fr; } }
.bio-portrait {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
  color: #fff;
  position: sticky;
  top: 110px;
}
.bio-portrait .avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green-500);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
}
.bio-portrait h3 { color: #fff; margin-bottom: 2px; font-size: 19px; }
.bio-portrait p { color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 20px; }
.bio-portrait .btn { margin-top: 4px; }

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(120deg, var(--green-600), var(--green-700));
  color: var(--accent-ink);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--accent-ink); margin-bottom: 6px; font-size: 1.7rem; }
.cta-band p { color: rgba(13,32,4,0.75); margin: 0; }
.cta-band .btn-primary { background: var(--navy-900); color: #fff; }
.cta-band .btn-primary:hover { background: var(--navy-800); }

/* ---- Forms ---- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.field .hint { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.field input,
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-100);
}
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 640px) { .checkbox-grid { grid-template-columns: 1fr; } }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--green-600); }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  display: none;
}
.form-msg.is-success { display: block; background: var(--green-100); color: var(--green-700); }
:root[data-theme="dark"] .form-msg.is-success { color: var(--green-400); }
.form-msg.is-error { display: block; background: #fbe3e0; color: #9c2f26; }

/* ---- Donate page ---- */
.donate-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) { .donate-hero { grid-template-columns: 1fr; } }
.donate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.donate-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.donate-amount {
  padding: 14px 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-800);
  background: var(--bg);
}
:root[data-theme="dark"] .donate-amount { color: #fff; }
.donate-fineprint { font-size: 12.5px; color: var(--ink-soft); margin-top: 16px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.72);
  padding-block: 56px 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand strong { font-family: var(--font-display); color: #fff; font-size: 17px; }
.footer-logo-chip {
  display: inline-flex;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}
.footer-logo-chip img { height: 30px; width: auto; display: block; }
.site-footer h4 {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,0.72); font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer-disclaimer { max-width: 620px; line-height: 1.5; }

/* ---- Page hero (interior pages) ---- */
.page-hero {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-800));
  color: #fff;
  padding-block: 56px;
}
.page-hero .eyebrow { color: var(--green-400); }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.6rem); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.78); max-width: 62ch; margin: 0; }

/* ---- Utilities ---- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.text-center { text-align: center; }
