/* Campaign colors: change these to match the campaign's branding. */
:root {
  --brand: #13294b;        /* header, hero, primary buttons */
  --brand-dark: #0b1a33;   /* footer */
  --accent: #b22234;       /* sign-up and donate buttons */
  --accent-dark: #8e1b29;
  --ink: #1b1f24;          /* body text, including the consent wording */
  --muted: #4a5260;
  --surface: #ffffff;
  --surface-soft: #f2f4f8;
  --border: #c9d0dc;
  --focus: #f0b429;
  --error: #a4161a;
  --error-bg: #fdecec;

  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2 { line-height: 1.2; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }

.skip-link {
  position: absolute; left: -10000px; top: 0;
  background: var(--surface); color: var(--brand); padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { background: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-dark); color: #fff; }
.button-accent { background: var(--accent); color: #fff; }
.button-accent:hover { background: var(--accent-dark); color: #fff; }
.button-outline { border-color: #fff; color: #fff; }
.button-outline:hover { background: #fff; color: var(--brand); }
.button-large { padding: 0.85rem 2rem; font-size: 1.125rem; }

/* ---------- header ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4rem; padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.brand {
  color: var(--brand);
  font-weight: 800;
  font-size: 1.125rem;
  text-decoration: none;
  line-height: 1.25;
}
.header-nav { display: flex; gap: 0.5rem; flex-shrink: 0; }
.header-nav .button { padding: 0.45rem 0.9rem; font-size: 0.95rem; }

/* ---------- home ---------- */

.hero { background: var(--brand); color: #fff; padding: clamp(3rem, 9vw, 6rem) 0; }
.hero .office {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}
.hero .tagline { margin: 0 0 2rem; font-size: clamp(1.2rem, 2.6vw, 1.5rem); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.about { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }

.signup-section { background: var(--surface-soft); padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.lede { margin: 0 0 1.75rem; color: var(--muted); }

/* ---------- sign-up form ---------- */

.signup-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row:has(.field-short) { grid-template-columns: 1fr 10rem; }
}

.field { margin-bottom: 1.15rem; }
.field label { display: block; margin-bottom: 0.3rem; font-weight: 600; }
.field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #8a94a6;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.field input:focus-visible { border-color: var(--brand); }
.field input:user-invalid { border-color: var(--error); }

.required { color: var(--error); }
.optional { color: var(--muted); font-weight: 400; }
.required-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }

/* Phone field + SMS consent, kept together so the checkbox sits right next to the phone field. */
.sms-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.sms-group .field { margin-bottom: 0.9rem; }

/* Consent wording must be easy to read: full-size, full-contrast text. */
.consent { display: flex; align-items: flex-start; gap: 0.75rem; }
.consent input[type="checkbox"] {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.15rem 0 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.consent label { color: var(--ink); font-size: 1rem; line-height: 1.55; font-weight: 400; cursor: pointer; }
.consent a { color: var(--brand); font-weight: 600; }

.form-error {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--error);
  background: var(--error-bg);
  color: var(--error);
  font-weight: 600;
}

/* Spam trap, invisible to people. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- privacy, thanks, 404 ---------- */

.legal { padding: clamp(2rem, 6vw, 3.5rem) 0; }
.legal h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.legal h2:target { scroll-margin-top: 1rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.5rem; }
.legal-meta { color: var(--muted); }

.message-page { padding: clamp(3rem, 10vw, 6rem) 0; }

/* ---------- footer ---------- */

.site-footer { background: var(--brand-dark); color: #fff; padding: 2.25rem 0; }
.footer-inner { display: grid; gap: 1rem; justify-items: start; }
.paid-for {
  margin: 0;
  padding: 0.5rem 0.9rem;
  border: 2px solid #fff;
  font-weight: 700;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a { color: #fff; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--focus); }
.copyright { margin: 0; font-size: 0.9rem; opacity: 0.85; }

@media (max-width: 480px) {
  /* Long committee names need the room; Donate is repeated in the hero. */
  .header-nav .button-accent { display: none; }
}
@media (max-width: 420px) {
  .header-nav .button { padding: 0.4rem 0.7rem; }
  .brand { font-size: 1rem; }
}
