/* ==========================================================================
   Amy Stern for Berkeley County Council — site styles
   Brand tokens are taken straight from the logo package:
   navy #2b2c7b, red #e81e2e.
   ========================================================================== */

:root {
  --navy:       #2b2c7b;
  --navy-deep:  #1e1f5c;
  --navy-soft:  #4a4ca3;
  --red:        #e81e2e;
  --red-deep:   #c4131f;

  --ink:        #1a1c2e;
  --ink-soft:   #4d5168;
  --ink-faint:  #7a7f96;

  --paper:      #ffffff;
  --pale:       #f5f7fc;
  --pale-warm:  #fbfaf7;
  --line:       #dfe4f0;

  --shell:      1160px;
  --radius:     14px;
  --radius-lg:  22px;

  --shadow-sm:  0 1px 2px rgba(26,28,46,.06), 0 2px 8px rgba(26,28,46,.05);
  --shadow-md:  0 4px 12px rgba(26,28,46,.07), 0 12px 32px rgba(26,28,46,.08);
  --shadow-lg:  0 10px 28px rgba(26,28,46,.10), 0 30px 60px rgba(26,28,46,.10);

  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --header-h: 162px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--navy);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ============================ HEADER ============================ */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: var(--header-h);
}
.header-logo { display: block; line-height: 0; flex: 0 0 auto; }
/* Sized by height, so the wordmark + tagline lockup stays in proportion.
   Keep --header-h a little above the max height here or the bar will clip. */
.header-logo img { height: clamp(84px, 9.6vw, 126px); width: auto; }

.header-right { display: flex; align-items: center; gap: 22px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-display); font-weight: 600; font-size: .93rem;
  letter-spacing: .01em; color: var(--navy); text-decoration: none;
  padding: 9px 13px; border-radius: 8px; white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
.nav a:hover { background: var(--pale); color: var(--navy-deep); }
.nav a[aria-current="page"] { color: var(--red); }
.nav a[aria-current="page"]:hover { background: #fdeff0; }

.nav .nav-donate {
  background: var(--red); color: #fff; margin-left: 8px;
  padding: 10px 20px; border-radius: 999px;
}
.nav .nav-donate:hover { background: var(--red-deep); color: #fff; }

.nav-toggle { display: none; }

/* social icon buttons */
.socials { display: flex; align-items: center; gap: 8px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pale); color: var(--navy);
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.socials a:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }

/* ============================ BUTTONS ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  letter-spacing: .01em; text-decoration: none; cursor: pointer;
  padding: 15px 30px; border-radius: 999px; border: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }

.btn--red   { background: var(--red);  color: #fff; box-shadow: var(--shadow-sm); }
.btn--red:hover { background: var(--red-deep); color: #fff; box-shadow: var(--shadow-md); }

.btn--navy  { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn--navy:hover { background: var(--navy-deep); color: #fff; box-shadow: var(--shadow-md); }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }

.btn--white { background: #fff; color: var(--navy); box-shadow: var(--shadow-md); }
.btn--white:hover { background: var(--pale); color: var(--navy-deep); }

.btn--outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--outline-white:hover { background: #fff; color: var(--navy); border-color: #fff; }

.btn--facebook { background: #1877f2; color: #fff; box-shadow: var(--shadow-sm); }
.btn--facebook:hover { background: #0f5fd1; color: #fff; box-shadow: var(--shadow-md); }

.btn--lg { padding: 17px 36px; font-size: 1.06rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ============================ HERO ============================ */

.hero {
  position: relative; isolation: isolate;
  min-height: min(76vh, 660px);
  display: flex; align-items: center;
  padding-block: clamp(56px, 8vw, 110px);
  background: var(--navy-deep);
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0; z-index: -2;
}
/* <picture> is inline by default, which leaves the img's height:100% with
   nothing to resolve against. */
.hero__media picture { display: block; width: 100%; height: 100%; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; }
/* The scrim is dark under the copy column (which ends around 53% of the hero)
   and clears out well before her face, which sits at ~72% across in
   amy-hero.jpg. Keep those two numbers in mind before retuning these stops. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(92deg,
      rgba(24,25,72,.95) 0%,
      rgba(25,26,78,.92) 40%,
      rgba(28,29,86,.66) 54%,
      rgba(30,31,92,.22) 66%,
      rgba(30,31,92,.05) 76%,
      rgba(30,31,92,.14) 100%),
    linear-gradient(0deg, rgba(20,21,64,.22), rgba(20,21,64,0) 40%);
}
.hero__inner { max-width: 600px; color: #fff; }
.hero h1 { color: #fff; margin-bottom: .35em; text-shadow: 0 2px 24px rgba(10,11,40,.35); }
.hero__lede {
  font-size: clamp(1.06rem, 1.7vw, 1.25rem);
  color: rgba(255,255,255,.93); margin-bottom: 1.6em; max-width: 34em;
}
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--red); }

/* On a phone the hero copy is tall enough to cover the whole frame, so instead
   of layering text over the photo the hero stacks: a clean photo band on top,
   fading into the navy panel that carries the headline and buttons. Her face is
   never behind type. */
@media (max-width: 760px) {
  .hero {
    display: block; min-height: 0; padding-block: 0;
    background: var(--navy-deep);
  }
  .hero::after { display: none; }

  .hero__media {
    position: relative; inset: auto; z-index: 0;
    aspect-ratio: 5 / 4;
  }
  /* absolute so the band's height comes from aspect-ratio, not the image */
  .hero__media img { position: absolute; inset: 0; object-position: 50% 34%; }
  .hero__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg,
      rgba(30,31,92,0) 52%,
      rgba(30,31,92,.45) 76%,
      rgba(30,31,92,.88) 92%,
      var(--navy-deep) 100%);
  }

  .hero .shell { position: relative; z-index: 1; padding-block: 6px 52px; margin-top: -6px; }
  .hero__inner { max-width: none; }
  .hero h1 { text-shadow: none; }
}

/* ============================ SECTIONS ============================ */

.section { padding-block: clamp(64px, 8vw, 108px); }
.section--pale { background: var(--pale); }
.section--warm { background: var(--pale-warm); }
.section--navy { background: var(--navy); color: rgba(255,255,255,.9); }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy .eyebrow { color: #fff; }
.section--navy .eyebrow::before { background: var(--red); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 3px; border-radius: 2px;
  background: var(--red); flex: 0 0 auto;
}

.section-head { max-width: 62ch; margin-bottom: clamp(34px, 4vw, 54px); }
.section-head.is-centered { margin-inline: auto; text-align: center; }
.section-head.is-centered .eyebrow { justify-content: center; }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; }
.section--navy .section-head p { color: rgba(255,255,255,.82); }

.rule-strip { height: 6px; background: linear-gradient(90deg, var(--navy) 0 50%, var(--red) 50% 100%); }

.page-head {
  background: var(--navy);
  color: #fff;
  padding-block: clamp(48px, 6vw, 82px);
}
.page-head h1 { color: #fff; }
.page-head p { color: rgba(255,255,255,.85); font-size: 1.08rem; max-width: 60ch; }
.page-head .eyebrow { color: #fff; }

/* ============================ SPLIT / MEDIA ============================ */

.split {
  display: grid; gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1fr 1fr; align-items: center;
}
.split--narrow-media { grid-template-columns: 0.85fr 1.15fr; }
.split--wide-media   { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 880px) { .split, .split--narrow-media, .split--wide-media { grid-template-columns: 1fr; } }

.framed {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); position: relative;
}
.framed img { width: 100%; }
.framed--accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: linear-gradient(90deg, var(--navy) 0 50%, var(--red) 50% 100%);
}

/* ============================ CARDS ============================ */

.card-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: .5em; }
.card p { color: var(--ink-soft); font-size: 1rem; }

.card__icon {
  width: 52px; height: 52px; border-radius: 13px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--pale); color: var(--navy);
}
.card__icon svg { width: 26px; height: 26px; fill: currentColor; }
.card:nth-child(2) .card__icon { background: #fdeef0; color: var(--red); }

.card__link {
  margin-top: auto; padding-top: 16px;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.card__link svg { width: 15px; height: 15px; fill: currentColor; transition: transform .18s ease; }
.card__link:hover svg { transform: translateX(3px); }

/* stat strip */
.stats {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.stat { text-align: center; padding: 18px 12px; }
.stat__num {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 4.4vw, 3rem); line-height: 1; color: #fff;
}
.stat__label {
  display: block; margin-top: 10px; font-size: .9rem; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.7);
  font-family: var(--font-display); font-weight: 600;
}

/* ============================ BIO PROSE ============================ */

.prose { max-width: 68ch; font-size: 1.08rem; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose blockquote {
  margin: 2em 0; padding: 4px 0 4px 26px;
  border-left: 5px solid var(--red);
  font-family: var(--font-display); font-weight: 600; font-size: 1.22rem;
  line-height: 1.45; color: var(--navy); font-style: normal;
}
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }

.factbar {
  display: grid; gap: 2px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-block: 34px;
}
.factbar div { background: #fff; padding: 20px 22px; }
.factbar dt {
  font-family: var(--font-display); font-weight: 700; font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 6px;
}
.factbar dd { margin: 0; font-weight: 600; color: var(--navy); font-size: 1.02rem; }

/* ============================ ISSUES ============================ */

.issue {
  display: grid; gap: clamp(28px, 4vw, 54px);
  grid-template-columns: 1fr 1fr; align-items: center;
  padding-block: clamp(40px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
}
.issue:last-of-type { border-bottom: 0; }
.issue:nth-child(even) .issue__media { order: -1; }
@media (max-width: 880px) {
  .issue { grid-template-columns: 1fr; }
  .issue:nth-child(even) .issue__media { order: 0; }
}
.issue__num {
  font-family: var(--font-display); font-weight: 800; font-size: 3.4rem;
  line-height: 1; color: var(--pale); -webkit-text-stroke: 2px var(--line);
  display: block; margin-bottom: -.15em;
}
.issue__list { list-style: none; padding: 0; margin: 22px 0 0; }
.issue__list li {
  position: relative; padding-left: 32px; margin-bottom: 12px;
  color: var(--ink-soft); font-size: 1rem;
}
.issue__list li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* receipts panel — a concrete example sitting inside an issue's argument */
.proof {
  background: var(--pale); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px; margin: 28px 0;
}
.proof__label {
  font-family: var(--font-display); font-weight: 700; font-size: .74rem;
  letter-spacing: .13em; text-transform: uppercase; color: var(--red);
  margin-bottom: 10px;
}
.proof__lead { font-size: 1rem; color: var(--ink); margin-bottom: 4px; }
.proof .issue__list { margin-top: 14px; }
.proof .issue__list li { color: var(--ink); }
.proof .issue__list li::before { background-color: var(--navy); }

/* ============================ CALLOUT ============================ */

.callout {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--red);
  border-radius: 10px; padding: 22px 26px; margin-top: 34px;
  box-shadow: var(--shadow-sm);
}
.callout svg { width: 24px; height: 24px; fill: var(--red); flex: 0 0 auto; margin-top: 3px; }
.callout p { font-size: .98rem; color: var(--ink-soft); }

/* ============================ COUNTDOWN ============================ */

.countdown { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.countdown__unit {
  min-width: 92px; padding: 14px 16px; text-align: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
}
.countdown__num {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 2rem; line-height: 1; color: #fff;
}
.countdown__label {
  display: block; margin-top: 6px; font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.72);
}

/* ============================ KEY DATES ============================ */

.dates-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.datecard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.datecard__label {
  font-family: var(--font-display); font-weight: 700; font-size: .74rem;
  letter-spacing: .13em; text-transform: uppercase; color: var(--red);
}
.datecard__date {
  font-family: var(--font-display); font-weight: 800; font-size: 1.22rem;
  color: var(--navy); margin: 8px 0 12px; line-height: 1.2;
}
.datecard p:last-child { font-size: .96rem; color: var(--ink-soft); }
.datecard--now { border-color: var(--red); border-width: 2px; background: #fffafa; }

/* ============================ POLLING PLACES ============================ */

.poll-tools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 24px;
}
.poll-search { position: relative; flex: 1 1 320px; max-width: 460px; }
.poll-search svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; fill: var(--ink-faint); pointer-events: none;
}
.poll-search input {
  width: 100%; padding: 14px 16px 14px 46px; font-family: inherit; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
}
.poll-search input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(43,44,123,.13); }
.poll-count { font-size: .93rem; color: var(--ink-faint); font-weight: 600; }

.poll-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}
.poll {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 24px 20px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.poll:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--navy-soft); }
.poll__precinct {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--font-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .11em; text-transform: uppercase; color: var(--red);
  margin-bottom: 10px;
}
.poll__num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: .72rem; letter-spacing: 0;
  flex: 0 0 auto;
}
.poll__place { font-size: 1.12rem; margin-bottom: 6px; }
.poll__addr { font-size: .96rem; color: var(--ink-soft); margin-bottom: 14px; }
.poll__split {
  font-size: .84rem; color: var(--ink-faint); font-style: italic; margin-bottom: 14px;
}
.poll__link {
  margin-top: auto; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 700; font-size: .93rem;
  text-decoration: none; color: var(--navy);
}
.poll__link svg { width: 14px; height: 14px; fill: currentColor; }
.poll__link:hover { color: var(--red); }
.poll.is-hidden { display: none; }
.poll-empty { color: var(--ink-faint); font-style: italic; padding: 20px 0; }

/* ============================ DISTRICT MAP ============================ */

.mapwrap {
  display: grid; gap: clamp(28px, 4vw, 52px);
  grid-template-columns: minmax(280px, 0.9fr) 1.1fr; align-items: start;
}
@media (max-width: 880px) { .mapwrap { grid-template-columns: 1fr; } }

.mapfigure {
  margin: 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--header-h) + 20px);
}
@media (max-width: 880px) { .mapfigure { position: static; } }
.mapfigure figcaption {
  font-size: .85rem; color: var(--ink-faint); margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line);
}

.dmap { width: 100%; height: auto; display: block; }
.dmap__county { fill: #eef1f8; stroke: #dde3f0; stroke-width: 2; }
.dmap__fill   { fill: var(--navy); fill-opacity: .06; }
.dmap__p {
  fill: var(--navy); fill-opacity: .14; stroke: #fff; stroke-width: 2.4;
  transition: fill-opacity .15s ease;
}
/* split precincts read as lighter *and* dashed, so the legend is decodable
   without relying on a 4%-opacity difference */
.dmap__p[data-partial] {
  fill-opacity: .04; stroke: var(--navy-soft); stroke-width: 1.8; stroke-dasharray: 7 5;
}
.dmap__p:hover, .dmap__p.is-active { fill-opacity: .28; }
.dmap__outline { fill: none; stroke: var(--red); stroke-width: 5; stroke-linejoin: round; }
.dmap__pin circle { fill: var(--red); stroke: #fff; stroke-width: 2.5; }
.dmap__pin text {
  fill: #fff; font-family: var(--font-display); font-weight: 700; font-size: 21px;
  text-anchor: middle; pointer-events: none;
}
.dmap__pin.is-active circle { fill: var(--navy); }

.maplegend { list-style: none; padding: 0; margin: 16px 0 0; font-size: .88rem; color: var(--ink-soft); }
.maplegend li { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.maplegend i {
  width: 20px; height: 13px; border-radius: 3px; flex: 0 0 auto; display: block;
  border: 1px solid var(--line);
}
.maplegend .k-in    { background: rgba(43,44,123,.22); border-color: rgba(43,44,123,.3); }
.maplegend .k-part  { background: rgba(43,44,123,.04); border: 1.5px dashed var(--navy-soft); }
.maplegend .k-out   { background: #eef1f8; }

/* ============================ FORMS ============================ */

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(26px, 3.4vw, 40px); box-shadow: var(--shadow-md);
}
.form-card h3 { margin-bottom: .3em; }
.form-card > p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 1.5em; }

.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: .84rem; letter-spacing: .04em; color: var(--navy); margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; font-family: inherit; font-size: 1rem;
  color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43,44,123,.13);
}
.field input:user-invalid { border-color: var(--red); }
.field .hint { font-size: .84rem; color: var(--ink-faint); margin-top: 5px; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
fieldset legend {
  font-family: var(--font-display); font-weight: 600; font-size: .84rem;
  letter-spacing: .04em; color: var(--navy); margin-bottom: 10px; padding: 0;
}
.check-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.check {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .96rem; cursor: pointer; background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.check:hover { border-color: var(--navy-soft); background: var(--pale); }
.check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--red); flex: 0 0 auto; }
/* `.is-checked` is set by site.js. `:has()` below is the no-JS equivalent —
   kept as a separate rule so an engine that chokes on :has() cannot take the
   class-based rule down with it. */
.check.is-checked { border-color: var(--red); background: #fffafa; }
.check:has(input:checked) { border-color: var(--red); background: #fffafa; }

.consent {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: .82rem; line-height: 1.5; color: var(--ink-faint);
  margin: 6px 0 20px; cursor: pointer;
}
.consent input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--red); flex: 0 0 auto; }

/* Formspree honeypot. Hidden from people and from screen readers; bots that
   fill every field they find get their submission dropped. Must not use
   type="hidden" — Formspree only checks _gotcha when it is a real input. */
.gotcha {
  position: absolute !important; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

.form-note { margin-top: 14px; font-size: .95rem; font-weight: 600; min-height: 1.4em; }
.form-note.is-ok   { color: #14804a; }
.form-note.is-err  { color: var(--red-deep); }

.signup__grid { display: grid; gap: clamp(30px, 4vw, 56px); grid-template-columns: 1fr 1fr; }
@media (max-width: 880px) { .signup__grid { grid-template-columns: 1fr; } }

/* ============================ CTA BAND ============================ */

.cta-band {
  background: var(--navy); color: #fff; text-align: center;
  padding-block: clamp(56px, 7vw, 92px);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 56ch; margin-inline: auto; font-size: 1.06rem; }
.cta-band .btn-row { justify-content: center; margin-top: 30px; }

/* ============================ FOOTER ============================ */

.site-footer {
  background: var(--navy-deep); color: rgba(255,255,255,.72);
  padding-block: 58px 30px; font-size: .95rem;
}
.footer-grid {
  display: grid; gap: 36px; grid-template-columns: 1fr auto; align-items: start;
  padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.14);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { height: clamp(128px, 15vw, 184px); width: auto; margin-bottom: 16px; }
.footer-tag {
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6);
}
.footer-right { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
@media (min-width: 781px) { .footer-right { align-items: flex-end; } }

.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a {
  color: #fff; text-decoration: none; font-family: var(--font-display);
  font-weight: 600; font-size: .93rem;
}
.footer-nav a:hover { color: var(--red); }

.site-footer .socials a { background: rgba(255,255,255,.12); color: #fff; }
.site-footer .socials a:hover { background: #fff; color: var(--navy); }

.footer-mail { color: rgba(255,255,255,.86); font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; }
.footer-mail:hover { color: #fff; }
/* secondary contact line, quieter than the phone number above it */
.footer-mail--soft { font-size: .88rem; font-weight: 500; color: rgba(255,255,255,.58); margin-top: -8px; }

.footer-bar {
  display: flex; flex-wrap: wrap; gap: 14px 26px;
  align-items: center; justify-content: space-between; padding-top: 26px;
  font-size: .84rem; color: rgba(255,255,255,.55);
}
.paid-box {
  border: 1px solid rgba(255,255,255,.28); border-radius: 6px;
  padding: 7px 14px; letter-spacing: .04em;
}
.footer-legal { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer-legal a { color: rgba(255,255,255,.68); text-decoration: none; }
.footer-legal a:hover { color: #fff; }

/* agency credit — sits quieter than the policy link next to it.
   Scoped to .footer-legal so it outranks the generic `.footer-legal a` colour. */
.footer-legal .footer-credit {
  font-size: .78rem; color: rgba(255,255,255,.46); letter-spacing: .02em;
}
.footer-legal .footer-credit:hover { color: rgba(255,255,255,.92); text-decoration: underline; }

/* ============================ REVEAL ============================ */

.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1);
}
.js .reveal-d1.is-in { transition-delay: .08s; }
.js .reveal-d2.is-in { transition-delay: .16s; }
.js .reveal-d3.is-in { transition-delay: .24s; }
.js .reveal-d4.is-in { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .poll:hover { transform: none; }
}

/* ============================ MOBILE NAV ============================ */

@media (max-width: 980px) {
  :root { --header-h: 130px; }
  .header-logo img { height: clamp(80px, 22vw, 104px); }

  .nav-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px; border: 1px solid var(--line);
    border-radius: 10px; background: #fff; cursor: pointer; padding: 0;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 20px; height: 2px; background: var(--navy);
    border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle span { position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after  { top: 6px; }
  .nav-toggle[aria-expanded="true"] span { background: transparent; }
  .nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

  .header-right { gap: 12px; }
  .socials { display: none; }

  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px; box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; border-radius: 10px; }
  .nav .nav-donate { margin: 10px 0 0; text-align: center; justify-content: center; }
}

@media (max-width: 420px) {
  body { font-size: 17px; }
  .btn { width: 100%; }
  .btn-row { gap: 10px; }
}

@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle, .signup, form { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .poll { break-inside: avoid; }
}
