/* =========================================================
   Krewson for Kansas — Campaign Site Styles
   Placeholder palette: green. Swap --brand vars when logo lands.
   ========================================================= */

:root {
  /* Krewson for State House — palette pulled from logo:
     teal (jade), dark navy-teal, sage. */
  --brand:        #1FA088;   /* logo teal / jade */
  --brand-dark:   #1F3D3A;   /* logo dark navy-teal (primary text/dark surfaces) */
  --brand-darker: #15302D;   /* deeper variant for footer */
  --brand-light:  #DCEEDA;   /* pale tint for section backgrounds */
  --accent:       #B7DDB1;   /* logo sage green dot — accent / highlights */
  --ink:          #1F3D3A;
  --ink-soft:     #4a5e5a;
  --paper:        #ffffff;
  --paper-soft:   #f4f9f5;
  --line:         #dde7e1;
  --shadow-sm:    0 2px 6px rgba(31, 61, 58, 0.07);
  --shadow-md:    0 8px 24px rgba(31, 61, 58, 0.12);
  --shadow-lg:    0 18px 48px rgba(31, 61, 58, 0.18);
  --radius:       12px;
  --radius-lg:    20px;
  --maxw:         1180px;
  --serif:        'Playfair Display', Georgia, serif;
  --sans:         'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.4rem); }
h2 { font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 .75rem;
}
.eyebrow-dark  { color: var(--brand-dark); }
.eyebrow-light { color: var(--accent); }

.lead { font-size: 1.1rem; color: var(--ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .35em;
  font-weight: 600; color: var(--brand-dark);
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: border-color .2s ease;
  text-decoration: none;
}
.link-arrow:hover { border-color: var(--brand); text-decoration: none; }
.link-arrow-light { color: var(--accent); }
.link-arrow-light:hover { border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em;
  font-family: var(--sans); font-weight: 700;
  font-size: 1rem;
  padding: .85em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); box-shadow: var(--shadow-md); }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); }
.btn-outline:hover { background: #fff; color: var(--brand-dark); }

.btn-ghost { background: transparent; color: #fff; padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--accent); transform: none; }

/* Variants for use on light backgrounds (e.g. over the hero image) */
.btn-on-light { background: transparent; color: var(--brand-dark); border-color: var(--brand-dark); }
.btn-on-light:hover { background: var(--brand-dark); color: #fff; }
.btn-link-dark { background: transparent; color: var(--brand-dark); padding-left: 4px; padding-right: 4px; }
.btn-link-dark:hover { color: var(--brand); transform: none; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand-text {
  flex-direction: column; align-items: flex-start; gap: 0;
  line-height: 1.05;
}
.brand-text .brand-name {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: .02em;
  color: var(--brand-dark);
}
.brand-text .brand-sub {
  font-size: .68rem; letter-spacing: .2em;
  font-weight: 700; color: var(--brand);
  border: 0; padding: 0;
  margin-top: 2px;
}
.brand-img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 320px;
}
.brand-img-footer { height: 56px; }
/* Falls back to the dark-on-transparent logo.png; we white-ify it so it reads on the dark footer.
   Once you supply a true light variant at assets/logo-light.png, this class won't be applied. */
.brand-img-footer-tinted { filter: brightness(0) invert(1); }
.brand-fallback {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-fallback-footer .brand-mark { background: #fff; color: var(--brand-dark); }
.brand-fallback-footer .brand-name { color: #fff; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand); color: #fff;
  font-family: var(--serif); font-weight: 900; font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.brand-name {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: .04em;
  color: var(--brand-dark);
}
.brand-sub {
  font-size: .72rem; letter-spacing: .22em;
  font-weight: 700; color: var(--ink-soft);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.primary-nav {
  display: flex; align-items: center; gap: 28px;
}
.primary-nav a {
  font-weight: 600; color: var(--ink);
  font-size: .95rem;
}
.primary-nav a:hover { color: var(--brand-dark); text-decoration: none; }
.primary-nav .btn { color: #fff; }

.nav-social {
  display: inline-flex; align-items: center; gap: 6px;
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}
.nav-social-link {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  color: var(--brand-dark);
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.nav-social-link svg { width: 18px; height: 18px; display: block; }
.nav-social-link:hover {
  background: var(--brand-light);
  color: var(--brand-darker);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--ink); margin: 5px 0;
  transition: transform .25s ease, opacity .25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 6vw, 80px);
}
.hero-stage {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}
.hero-stage-image {
  display: block;
  width: 100%;
  height: auto;
}
.hero-stage-ctas {
  position: absolute;
  left: 50%;
  bottom: clamp(8px, 2.5%, 28px);
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(31, 61, 58, 0.12);
}
.hero-tagline-block {
  text-align: center;
  max-width: 760px;
  margin: clamp(28px, 4vw, 48px) auto 0;
}
.hero-tagline-block .hero-tagline {
  color: var(--brand-dark);
  font-size: clamp(2rem, 3.4vw + 1rem, 3.2rem);
  margin-bottom: .35em;
}
.hero-tagline-block .hero-lede {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1vw + .8rem, 1.2rem);
  margin: 0;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.hero-inner-stacked {
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 40px);
  text-align: center;
  justify-items: center;
}
.hero-content { max-width: 620px; }
.hero-content-centered { max-width: 760px; text-align: center; }
.hero-content-centered .hero-lede { margin-left: auto; margin-right: auto; }
.hero-content-centered .hero-ctas { justify-content: center; }

.hero-image-wrap {
  width: 100%;
  max-width: 880px;
  position: relative;
}
.hero-image {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .25));
}
.hero-image-placeholder {
  display: none;
  aspect-ratio: 16 / 9;
  width: 100%;
  align-items: center; justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.05) 0 14px,
      rgba(255,255,255,.1) 14px 28px);
  border: 1px dashed rgba(255,255,255,.3);
  border-radius: var(--radius);
  color: rgba(255,255,255,.85);
  font-weight: 600;
  padding: 24px;
}
.hero-image-placeholder small {
  display: inline-block;
  margin-top: 8px;
  font-weight: 400;
  font-size: .85em;
  color: rgba(255,255,255,.65);
}
.hero h1, .hero-tagline { color: #fff; }
.hero-tagline {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 3.4vw + 1rem, 3.4rem);
  margin: 0 0 .5em;
}
.hero .eyebrow { color: var(--accent); }
.hero-logo {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  margin: 0 0 28px;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.18));
}
.hero-logo-tinted {
  /* Fallback: use the dark logo and lighten/whiten it for the dark hero */
  filter: brightness(0) invert(1) drop-shadow(0 6px 20px rgba(0,0,0,0.25));
}
.hero-lede {
  font-size: clamp(1.05rem, 1vw + .8rem, 1.2rem);
  color: rgba(255,255,255,.92);
  max-width: 560px;
  margin-top: 1rem;
}
.hero-ctas {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
}

/* Hero portrait (right column) */
.hero-portrait { display: flex; justify-content: center; align-items: center; }
.hero-portrait-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
}
.hero-portrait-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-portrait-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,.04) 0 12px,
      rgba(255,255,255,.08) 12px 24px
    );
  color: rgba(255,255,255,.78);
  font-weight: 600; font-size: .95rem;
  letter-spacing: .03em;
  padding: 24px;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(72px, 10vw, 120px) 0;
}
.section-alt { background: var(--paper-soft); }
.section-dark {
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(244,196,48,.08), transparent 60%),
    linear-gradient(180deg, var(--brand-darker), var(--brand-dark));
  color: #fff;
}
.section-dark h2 { color: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head-light { color: rgba(255,255,255,.92); }
.section-sub { font-size: 1.1rem; color: var(--ink-soft); }
.section-head-light .section-sub { color: rgba(255,255,255,.85); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.grid-2-flip > div:first-child { order: 2; }
.grid-2-flip > div:last-child  { order: 1; }

/* ---------- About ---------- */
.about-closing,
.district-closing {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--brand-dark);
  border-left: 3px solid var(--brand);
  padding-left: 16px;
  margin: 1.5rem 0;
}
.about-photo { position: relative; }
.about-photo-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.about-photo .photo-placeholder {
  display: none;        /* shown via JS onerror if image missing */
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(31,160,136,.12), rgba(31,160,136,.04)),
    repeating-linear-gradient(45deg, var(--paper-soft) 0 12px, #eef3ef 12px 24px);
  border: 1px solid var(--line);
  place-items: center;
  color: var(--ink-soft); font-weight: 600; letter-spacing: .04em;
  box-shadow: var(--shadow-md);
}

/* ---------- Priorities ---------- */
.priorities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.priority-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 18px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.priority-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(31, 160, 136, .45);
}
.priority-icon {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: grid; place-items: center;
}
.priority-icon svg { width: 26px; height: 26px; }
.priority-icon svg .med-leaf { fill: var(--brand-light); }
.priority-card h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--brand-dark);
}
.priority-card p {
  color: var(--ink-soft);
  margin: 4px 0 0;
  font-size: .92rem;
  line-height: 1.4;
}
.priority-card-wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  border-color: transparent;
  color: #fff;
  align-items: flex-start;
  padding: 36px 40px;
  gap: 28px;
}
.priority-card-wide h3 {
  color: #fff;
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: .35em;
}
.priority-card-wide p { color: rgba(255,255,255,.92); }
.priority-card-wide .priority-icon {
  background: rgba(255,255,255,.15);
  color: #fff;
  width: 56px; height: 56px;
}
.priority-card-wide .priority-icon svg { width: 30px; height: 30px; }
.priority-card-wide-body { flex: 1; }
.wide-lede {
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  max-width: 720px;
}
.wide-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.wide-points li {
  font-size: .95rem;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}
.wide-points strong {
  display: block;
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
}
@media (max-width: 900px) {
  .priority-card-wide { flex-direction: column; padding: 28px; gap: 20px; }
  .wide-points { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- District ---------- */
.district-map-col { position: relative; }
.district-map {
  position: relative;
  isolation: isolate;
  z-index: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--paper-soft);
}
.district-map .leaflet-container {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  font-family: var(--sans);
}
.district-map-loading,
.district-map-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: .02em;
  padding: 16px;
  text-align: center;
  pointer-events: none;
  background: rgba(255,255,255,.7);
  z-index: 500;
}
.district-map-note { font-size: .9rem; }
.map-caption {
  margin: 12px 0 0;
  font-size: .82rem;
  color: var(--ink-soft);
}
.district-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.district-card h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.dates-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.dates-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.dates-list li:last-child { border-bottom: 0; }
.dates-list strong { color: var(--ink); font-weight: 600; }
.dates-list span { color: var(--ink-soft); }

/* ---------- Get Involved ---------- */
.involve-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
}
.involve-card {
  display: block;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 28px 24px;
  color: #fff;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.involve-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  background: rgba(255,255,255,.1);
  border-color: var(--accent);
}
.involve-card h3 { color: #fff; font-family: var(--sans); font-size: 1.15rem; font-weight: 700; }
.involve-card p { color: rgba(255,255,255,.82); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.contact-list li { padding: 8px 0; color: var(--ink-soft); }
.contact-list strong { color: var(--ink); margin-right: 8px; }

.voter-info {
  margin-top: 32px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
}
.voter-info h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--brand-dark);
  margin: .15em 0 .5em;
}
.voter-info p { color: var(--brand-darker); margin: 0 0 1rem; }
.voter-info .btn { margin: 4px 0 12px; }
.voter-info-help { font-size: .9rem; color: var(--ink-soft); margin-top: 4px; }
.voter-info-help a { color: var(--brand-dark); font-weight: 600; text-decoration: underline; }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: grid; gap: 14px;
}
.signup-embed {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.signup-embed iframe {
  width: 100%;
  height: 640px;
  border: 0;
  display: block;
}
.signup-fallback {
  margin: 0;
  padding: 12px 16px;
  font-size: .85rem;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,125,58,.18);
}
.contact-form button { justify-self: start; margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-darker);
  color: rgba(255,255,255,.82);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  gap: 32px;
  align-items: center;
  padding: 56px 24px 32px;
}
.footer-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-brand {
  display: inline-block;
  text-decoration: none;
  transition: opacity .15s ease;
}
.footer-brand:hover { opacity: 0.85; text-decoration: none; }
.footer-brand .brand-logo-footer .brand-mark { background: #fff; color: var(--brand-dark); }
.footer-brand .brand-logo-footer .brand-name { color: #fff; }
.footer-tag { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 8px 0 0; color: rgba(255,255,255,.6); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { color: rgba(255,255,255,.85); font-weight: 500; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.social-link svg { width: 18px; height: 18px; display: block; }
.social-link:hover { background: rgba(255,255,255,.1); border-color: var(--accent); color: var(--accent); text-decoration: none; }

.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}
.footer-legal .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}
.footer-legal p { margin: 0; }

/* ---------- Donate popup ---------- */
.donate-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .25s ease;
}
.donate-popup[hidden] { display: none !important; }
.donate-popup.is-open { opacity: 1; }
.donate-popup-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 40, 38, 0.62);
  backdrop-filter: blur(4px);
}
.donate-popup-card {
  position: relative;
  z-index: 1;
  background: var(--paper);
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 36px 32px 28px;
  border-radius: var(--radius-lg);
  border-top: 6px solid var(--brand);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  text-align: center;
  transform: translateY(8px);
  transition: transform .25s ease;
}
.donate-popup.is-open .donate-popup-card { transform: translateY(0); }
.donate-popup-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
.donate-popup-close:hover { background: var(--paper-soft); color: var(--ink); }
.donate-popup-logo {
  display: block;
  max-width: 200px;
  height: auto;
  margin: 0 auto 14px;
}
.donate-popup-card h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--brand-dark);
  margin: 0 0 .4em;
}
.donate-popup-lede {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 22px;
}
.donate-popup-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.donate-popup-amounts .btn {
  font-size: 1rem;
  padding: .75em 0;
  border-radius: 10px;
}
.donate-popup-other-amt { background: var(--brand-dark) !important; }
.donate-popup-other-amt:hover { background: var(--brand-darker) !important; }
.donate-popup-decline {
  background: transparent;
  border: 0;
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: underline;
}
.donate-popup-decline:hover { color: var(--ink); }

/* Prevent background scroll when popup is open */
body.donate-popup-open { overflow: hidden; }

@media (max-width: 480px) {
  .donate-popup-card { padding: 28px 22px 22px; }
  .donate-popup-amounts { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .priorities-grid { grid-template-columns: repeat(2, 1fr); }
  .priority-card-wide { grid-column: 1 / -1; }
  .involve-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: 76px; left: 0; right: 0;
    background: #fff;
    flex-direction: column; align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .primary-nav a:last-child { border-bottom: 0; margin-top: 8px; align-self: flex-start; }

  .grid-2, .grid-2-flip { grid-template-columns: 1fr; }
  .grid-2-flip > div:first-child,
  .grid-2-flip > div:last-child { order: initial; }

  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait-frame { max-width: 320px; margin: 0 auto; }

  .priorities-grid { grid-template-columns: 1fr; }
  .involve-grid { grid-template-columns: 1fr; }

  /* Social icons in the mobile nav menu — center them and detach the divider */
  .nav-social {
    padding-left: 0;
    margin-left: 0;
    border-left: 0;
    padding-top: 12px;
    justify-content: center;
  }

  /* HERO: take the CTAs off the image and put them below on phones, so they
     don't sit on top of the logo/portrait. */
  .hero { padding: 24px 0 40px; }
  .hero-stage-ctas {
    position: static;
    transform: none;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    margin: 18px auto 0;
    max-width: 360px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-stage-ctas .btn {
    width: 100%;
    padding: 1em 1.5em;
    font-size: 1.05rem;
  }

  /* District map a bit shorter on phones */
  .district-map { aspect-ratio: 1 / 1; }
  /* On phones, show the District 22 description first, then the map below it */
  #district .district-map-col { order: 2; }

  /* Contact iframe: shorter on phones so it doesn't dominate the page */
  .signup-embed iframe { height: 560px; }

  /* About headshot a touch smaller on phones */
  .about-photo-img { max-width: 360px; margin: 0 auto; }

  /* Footer: stack actions and let legal stack cleanly */
  .footer-actions { flex-wrap: wrap; gap: 14px; }
  .footer-legal .container { flex-direction: column; align-items: flex-start; text-align: left; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .brand-text .brand-name { font-size: 1.1rem; letter-spacing: 0; }
  .brand-text .brand-sub { font-size: .58rem; letter-spacing: .15em; }
  .header-inner { min-height: 64px; }
  .primary-nav { top: 64px; }
}
