/* ==========================================================================
   Kevin Berger for Commissioner — house static rebuild
   Brand tokens pulled verbatim from the live Elementor build:
   Red #E82C2A, Navy #14377D (deep #0A1C3F), White. Poppins + Roboto.
   ========================================================================== */

:root {
  --red: #E82C2A;
  --red-dark: #C81E1C;
  --navy: #14377D;
  --navy-deep: #0A1C3F;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --ink-muted: #4B5566;
  --paper: #F5F5F5;
  --border: #E1E4EA;
  --success: #1F8A4C;
  --success-bg: #EAF7EF;
  --error: #C81E1C;
  --error-bg: #FCEAEA;

  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Roboto", "Segoe UI", system-ui, sans-serif;

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

  --shadow-card: 0 4px 16px rgba(10, 28, 63, 0.10), 0 1px 3px rgba(10, 28, 63, 0.08);
  --shadow-lifted: 0 20px 40px rgba(10, 28, 63, 0.18);

  --container: 1140px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

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

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* Visible focus ring everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.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;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, color 140ms ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-red {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(232, 44, 42, 0.35);
}
.btn-red:hover { background: var(--red-dark); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 44px; width: auto; border-radius: 4px; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--navy);
}
.brand-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
}
.main-nav a:hover { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { padding: 10px 22px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 4px 0;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(155deg, var(--navy-deep) 0%, var(--navy) 62%, var(--navy) 100%);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.hero-top-banner {
  background: var(--red);
  text-align: center;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
  padding: 56px 24px 0;
}
.hero-copy .badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-copy img.crest {
  height: 72px;
  width: auto;
  margin-bottom: 20px;
  border-radius: 6px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 8px;
}
.hero .tagline {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-portrait {
  position: relative;
  align-self: end;
  height: 100%;
}
.hero-portrait img {
  max-height: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.donate-strip {
  background: var(--navy-deep);
  padding: 18px 24px 22px;
}
.donate-strip .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.donate-strip p {
  width: 100%;
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.donate-amounts a {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 140ms ease, transform 140ms ease;
}
.donate-amounts a:hover { background: var(--red-dark); transform: translateY(-1px); }
.donate-amounts a.other {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--white);
}
.donate-amounts a.other:hover { background: rgba(255,255,255,0.12); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-paper { background: var(--paper); }
.section-header {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.section-header .accent { color: var(--red); }
.section-header p { color: var(--ink-muted); font-size: 1.05rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: center;
}
.about-figure {
  background: var(--navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lifted);
  aspect-ratio: 3 / 4;
}
.about-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.about-facts {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.about-facts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 1rem;
}
.about-facts .mark {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}
.about-source-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ---------- Join the team ---------- */
.join-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.join-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 1 / 1;
}
.join-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 1px;
  border-color: var(--red);
}

.check-group legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
  padding: 0;
}
.check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.check-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 9px 16px 9px 12px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.check-options label:has(input:checked) {
  border-color: var(--red);
  background: rgba(232,44,42,0.06);
}
.check-options input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--red);
}

/* Honeypot field — hidden from sighted users and screen readers, left in tab order for nobody */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  display: none;
}
.form-msg.is-success {
  display: block;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(31,138,76,0.3);
}
.form-msg.is-error {
  display: block;
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(200,30,28,0.3);
}

/* ---------- Donate CTA band ---------- */
.donate-band {
  background: var(--navy);
  color: var(--white);
}
.donate-band .container {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.donate-band h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.donate-band .donate-amounts a { background: var(--red); }
.donate-band-copy p { color: rgba(255,255,255,0.8); }

/* ---------- Contact ---------- */
.contact-section { background: var(--navy-deep); color: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.contact-copy .eyebrow { color: #FF8785; }
.contact-copy p { color: rgba(255,255,255,0.75); }
.contact-copy .contact-detail {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
}
.contact-copy .contact-detail a { color: var(--white); }
.contact-section .form-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}
.contact-section .field label { color: var(--white); }
.contact-section .field input,
.contact-section .field textarea {
  background: rgba(255,255,255,0.95);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 0;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 72px; border-radius: 6px; }
.footer-social a {
  color: var(--white);
  margin-left: 14px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.82rem;
}
.footer-bottom a { color: rgba(255,255,255,0.75); }
.footer-bottom img { height: 26px; width: auto; vertical-align: middle; }
.footer-credit { display: flex; align-items: center; gap: 8px; }

/* ---------- Confirmation page ---------- */
.confirmation-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background: var(--paper);
}
.confirmation-card {
  max-width: 520px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 48px 40px;
}
.confirmation-card .mark-lg {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}
.confirmation-card p { color: var(--ink-muted); margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .hero-copy { padding: 32px 24px 40px; text-align: center; }
  .hero-copy .hero-cta { justify-content: center; }
  .hero-portrait {
    order: -1;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    position: relative;
  }
  .hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    max-height: none;
    margin: 0;
  }
  .hero-portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,28,63,0) 55%, var(--navy-deep) 100%);
    pointer-events: none;
  }
  .about-grid,
  .join-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .join-photo { order: -1; }
  .donate-band .container { grid-template-columns: 1fr; text-align: center; }
  .donate-band .donate-amounts { justify-content: center; }
}

@media (max-width: 900px) {
  .main-nav, .header-actions .btn-outline-nav { display: none; }
  .nav-toggle { display: block; }
  .header-actions { gap: 8px; }
}

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-social { margin-top: 4px; }
  .footer-social a { margin-left: 0; margin-right: 14px; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--navy-deep);
  z-index: 200;
  padding: 24px;
  color: var(--white);
}
.mobile-nav.is-open { display: block; }
.mobile-nav .close-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  border-radius: 8px;
  padding: 8px 12px;
  float: right;
  cursor: pointer;
}
.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 60px 0 0;
  display: grid;
  gap: 22px;
}
.mobile-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}
.mobile-nav .btn { margin-top: 30px; }
