/* ============================================
   Design tokens
   ============================================ */
:root {
  /* Color roles */
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-dark: #0b1d33;
  --text: #101826;
  --text-muted: #545f6e;
  --text-on-dark: #f5f6f8;
  --text-on-dark-muted: #aab4c4;
  --border: #e1e2e6;
  --border-dark: #1c3350;
  --brand: #14315c;       /* ANC navy blue */
  --brand-light: #2f5590;
  --accent: #c8102e;      /* ANC red, used sparingly */
  --accent-dark: #960d24;
  --accent-on-dark: #ff5c72; /* AA-safe red for dark backgrounds */
  --focus: #2f6df6;

  /* Type scale — 1.25 ratio, 17px base */
  --fs-body: 1.0625rem;   /* 17 */
  --fs-lead: 1.25rem;     /* 20 */
  --fs-h4: 1.5625rem;     /* 25 */
  --fs-h3: 1.9375rem;     /* 31 */
  --fs-h2: 2.4375rem;     /* 39 */
  --fs-h1: 3.0625rem;     /* 49 */
  --fs-display: 3.8125rem; /* 61 */

  --font-display: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  --radius: 10px;
  --radius-sm: 6px;
  --container: 1200px;
  --shadow-card: 0 1px 2px rgba(15, 26, 20, 0.04), 0 8px 24px rgba(15, 26, 20, 0.06);
}

@media (max-width: 640px) {
  :root {
    --fs-h1: 2.375rem;
    --fs-display: 2.75rem;
    --fs-h2: 1.875rem;
    --fs-h3: 1.5rem;
    --sp-9: 64px;
    --sp-10: 80px;
  }
}

/* ============================================
   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;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-4);
  font-weight: 600;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p { margin: 0 0 var(--sp-4); max-width: 68ch; color: var(--text-muted); }
p.lead { font-size: var(--fs-lead); color: var(--text); max-width: 56ch; }

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

section { padding: var(--sp-10) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

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

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  background: var(--brand);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--sp-4); }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 15px 28px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--brand); background: rgba(20,49,92,0.05); }

.btn-on-dark {
  background: transparent;
  border-color: rgba(244,242,236,0.35);
  color: var(--text-on-dark);
}
.btn-on-dark:hover { border-color: var(--text-on-dark); background: rgba(244,242,236,0.08); }

.btn-block { width: 100%; }

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  gap: var(--sp-5);
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
}
.brand-mark img { height: 34px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding: var(--sp-2) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: var(--brand); border-color: var(--accent); }

.nav-cta { display: flex; align-items: center; gap: var(--sp-4); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-size: 1.1rem;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding-top: var(--sp-9);
  padding-bottom: var(--sp-9);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(20,49,92,0.07), transparent),
    var(--bg);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-9);
  align-items: center;
}
.hero-copy h1 { margin-bottom: var(--sp-5); }
.hero-copy .lead { margin-bottom: var(--sp-6); }
.hero-actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-7); }

.hero-stats {
  display: flex;
  gap: var(--sp-7);
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-5);
}
.hero-stats .stat-num {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--brand);
  display: block;
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.hero-stats .stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 16ch;
}

.hero-portrait {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 598 / 900;
  background: var(--brand);
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-portrait .badge {
  position: absolute;
  left: var(--sp-5);
  bottom: var(--sp-5);
  right: var(--sp-5);
  background: rgba(15,26,20,0.72);
  backdrop-filter: blur(6px);
  color: var(--text-on-dark);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.hero-portrait .badge strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 2px; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 420px; }
}

/* ============================================
   Proof band
   ============================================ */
.proof-band {
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.proof-band .container {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
  justify-content: space-between;
}
.proof-item { display: flex; align-items: baseline; gap: var(--sp-2); color: var(--text-muted); font-size: 0.9375rem; }
.proof-item strong { font-family: var(--font-display); color: var(--text); font-size: 1.1rem; }

/* ============================================
   Section headers
   ============================================ */
.section-head {
  max-width: 720px;
  margin-bottom: var(--sp-8);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ============================================
   About / bio split
   ============================================ */
.about-split .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--sp-9);
  align-items: start;
}
.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
  position: sticky;
  top: 96px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.credential-list { list-style: none; margin: var(--sp-6) 0 0; padding: 0; display: grid; gap: var(--sp-5); }
.credential-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}
.credential-list li:last-child { border-bottom: none; padding-bottom: 0; }
.credential-year {
  font-family: var(--font-display);
  color: var(--brand);
  font-weight: 600;
}
.credential-list h4 { margin-bottom: var(--sp-1); }
.credential-list p { margin-bottom: 0; }

@media (max-width: 900px) {
  .about-split .container { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 420px; }
}

/* ============================================
   Vision pillars
   ============================================ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
}
.pillar-num {
  font-family: var(--font-display);
  color: var(--accent-dark);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-4);
  display: block;
}
.pillar-card h4 { margin-bottom: var(--sp-3); }
.pillar-card p { margin-bottom: 0; font-size: 0.9375rem; }

@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Impact / dark section
   ============================================ */
.impact-section {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}
.impact-section h2, .impact-section h3, .impact-section h4 { color: var(--text-on-dark); }
.impact-section p { color: var(--text-on-dark-muted); }
.impact-section .eyebrow { color: var(--accent-on-dark); }
.impact-section .eyebrow::before { background: var(--accent-on-dark); }

.impact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-9);
  align-items: center;
}
.impact-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1600 / 1408;
  border: 1px solid var(--border-dark);
}
.impact-photo img { width: 100%; height: 100%; object-fit: cover; }

.impact-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}
.impact-stat {
  border-top: 1px solid var(--border-dark);
  padding-top: var(--sp-4);
}
.impact-stat .stat-num {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--accent-on-dark);
  display: block;
  margin-bottom: var(--sp-2);
  line-height: 1;
}
.impact-stat .stat-label { font-size: 0.875rem; color: var(--text-on-dark-muted); }

@media (max-width: 900px) {
  .impact-layout { grid-template-columns: 1fr; }
  .impact-photo { max-width: 480px; }
}

/* ============================================
   Commitments list
   ============================================ */
.commitments {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-7);
}
.commitments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.commitments li {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--text);
}
.commitments li svg { flex: none; margin-top: 3px; color: var(--brand); }

/* ============================================
   Get involved / action cards
   ============================================ */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.action-card h4 { margin-bottom: 0; }
.action-card p { margin-bottom: 0; font-size: 0.9375rem; flex: 1; }

@media (max-width: 860px) {
  .action-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Donate
   ============================================ */
.donate-section {
  background: var(--brand);
  color: var(--text-on-dark);
}
.donate-section .eyebrow { color: var(--accent-on-dark); }
.donate-section .eyebrow::before { background: var(--accent-on-dark); }
.donate-section h2 { color: var(--text-on-dark); }
.donate-section .section-head p.lead { color: var(--text-on-dark-muted); }

.donate-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--sp-7);
  max-width: 640px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.donate-panel p { color: var(--text-muted); }
.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin: var(--sp-5) 0 var(--sp-6);
}
.amount-btn {
  border: 1.5px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: var(--sp-4) var(--sp-2);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.amount-btn:hover { border-color: var(--brand); }
.amount-btn[aria-pressed="true"] {
  border-color: var(--brand);
  background: rgba(20,49,92,0.06);
  color: var(--brand);
}
.donate-note { font-size: 0.8125rem; color: var(--text-muted); margin-top: var(--sp-4); margin-bottom: 0; }

@media (max-width: 560px) {
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   Signup form
   ============================================ */
.signup-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-7);
  box-shadow: var(--shadow-card);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}
.form-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-field input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}
.form-field input:focus { border-color: var(--brand); }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.form-check input { margin-top: 3px; }
.form-status { font-size: 0.875rem; color: var(--brand); margin-top: var(--sp-4); min-height: 1.2em; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--surface-dark);
  color: var(--text-on-dark-muted);
  padding: var(--sp-9) 0 var(--sp-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--border-dark);
}
.footer-brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.footer-brand img { height: 30px; width: auto; }
.footer-brand span { font-family: var(--font-display); color: var(--text-on-dark); font-weight: 600; }
.site-footer h5 {
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 var(--sp-4);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.site-footer a { text-decoration: none; color: var(--text-on-dark-muted); font-size: 0.9375rem; }
.site-footer a:hover { color: var(--text-on-dark); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  font-size: 0.8125rem;
}
.footer-bottom nav { display: flex; gap: var(--sp-5); }
.footer-bottom nav a { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================
   Scroll-reveal (restrained)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
