/* =========================
   Design tokens
   ========================= */

:root {
  --red: #c41419;
  --red-dark: #8f0f13;
  --red-light: #ff6b73;
  --teal-deep: #0d3d54;
  --teal: #125273;
  --teal-powder: #6ba9c7;
  --coral: #ff9ba0;
  --white: #ffffff;
  --text-dark: #0d3d54;
  --text-mid: #125273;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.3125rem;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-18: 4.5rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --site-max: 75rem;
  --hero-max: 77.5rem;
  --header-height: 5.25rem;
  --header-height-mobile: 4.5rem;
  --section-pad-x: var(--space-12);
  --section-pad-y: var(--space-24);
}

/* =========================
   Base
   ========================= */

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Public Sans', sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-dark);
  background: #f2f8fb;
  overflow-x: hidden;
}

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

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

#about,
#initiatives,
#donate {
  scroll-margin-top: 6.5rem;
}

/* =========================
   Reusable patterns
   ========================= */

.about,
.initiatives-inner,
.donate-inner,
.donate-legal {
  max-width: var(--site-max);
  margin: 0 auto;
}

.about,
.initiatives,
.donate {
  padding: var(--section-pad-y) var(--section-pad-x);
}

.section-label,
.initiative-num,
.tag,
.donate-legal-label,
.footer-copy,
.hero-eyebrow,
nav a,
.btn-primary,
.donate-btn {
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
}

.about-sidebar h2,
.initiatives-header h2,
.donate-sidebar h2 {
  font-family: 'Urbanist', sans-serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

/* =========================
   Header
   ========================= */

header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--section-pad-x);
  background: var(--white);
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 16px rgba(14, 42, 74, 0.10);
}

.logo-wrap img {
  width: auto;
  height: 3.75rem;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
  text-decoration: none;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover {
  color: var(--red);
  background: rgba(212, 43, 43, 0.06);
}

/* =========================
   Buttons
   ========================= */

.btn-primary,
.donate-btn {
  display: inline-block;
  padding: 0.95rem 1.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: var(--white);
  text-decoration: none;
  background: var(--red);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover,
.donate-btn:hover {
  background: var(--red-light);
  transform: translateY(-1px);
}

/* =========================
   Hero
   ========================= */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 90vh;
  margin-top: var(--header-height);
  overflow: hidden;
  background: var(--teal-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--teal-deep);
  background-image: url("/img/hero.jpg");
  background-position: center 40%;
  background-size: cover;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(13, 61, 84, 0.92) 0%,
    rgba(13, 61, 84, 0.72) 55%,
    rgba(13, 61, 84, 0.38) 100%
  );
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 61, 84, 0.3) 0%,
    transparent 40%,
    transparent 70%,
    rgba(13, 61, 84, 0.5) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 5.5rem;
  align-items: center;
  max-width: var(--hero-max);
  margin: 0 auto;
  padding: var(--space-24) var(--space-14);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  font-size: 0.8125rem;
  letter-spacing: 0.24em;
  color: var(--red-light);
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.75rem;
  height: 2px;
  background: var(--red);
}

.hero h1 {
  margin-bottom: 1.75rem;
  font-family: 'Urbanist', sans-serif;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

.hero h1 em {
  font-style: normal;
  font-weight: 300;
  color: var(--coral);
}

.hero-lead {
  max-width: 33rem;
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.78);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: var(--space-10);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.panel-card {
  padding: 1.75rem 1.875rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 2px;
}

.panel-card.l-red { border-left: 3px solid var(--red); }
.panel-card.l-blue { border-left: 3px solid var(--teal-powder); }
.panel-card.l-dim { border-left: 3px solid rgba(255, 255, 255, 0.14); }

.panel-stat {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: #e87070;
}

.panel-stat sup {
  font-size: 1.5rem;
  vertical-align: super;
}

.panel-sub {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}

.panel-quote {
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.tag {
  padding: var(--space-1) 0.625rem;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

/* =========================
   Mission band
   ========================= */

.mission-band {
  padding: 1.75rem var(--section-pad-x);
  text-align: center;
  background: var(--red);
}

.mission-band p {
  max-width: 52.5rem;
  margin: 0 auto;
  font-size: clamp(1rem, 1.8vw, 1.3125rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.93);
}

/* =========================
   About
   ========================= */

.about {
  display: grid;
  grid-template-columns: 1fr 1.6fr 0.85fr;
  gap: var(--space-16);
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 6rem;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 20px 60px rgba(14, 42, 74, 0.18);
}

.about-photo img {
  width: 100%;
  height: 26.25rem;
  object-fit: cover;
  object-position: center top;
}

.about-photo figcaption {
  padding: 0.625rem 0.875rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  background: var(--teal-deep);
}

.section-label {
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  color: var(--red);
}

.about-sidebar h2 {
  color: var(--teal-deep);
}

.about-sidebar h2 em {
  font-style: normal;
  font-weight: 300;
  color: var(--red);
}

.divider {
  width: 2.75rem;
  height: 3px;
  margin: 1.375rem 0;
  background: var(--teal);
  opacity: 0.25;
}

.about-body p {
  margin-bottom: 1.375rem;
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.78;
  color: var(--text-mid);
}

.about-body p:first-child {
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.62;
  color: var(--teal-deep);
}

/* =========================
   Initiatives
   ========================= */

.initiatives {
  position: relative;
  background: var(--teal-deep);
}

.initiatives::before,
.donate::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--red) 0%,
    var(--teal-powder) 50%,
    var(--red-dark) 100%
  );
}

.initiatives-header {
  margin-bottom: 3.25rem;
}

.initiatives-header .section-label {
  color: var(--teal-powder);
}

.initiatives-header h2 {
  margin-top: var(--space-2);
  color: var(--white);
}

.initiatives-header h2 span {
  font-weight: 300;
  color: var(--coral);
}

.initiative-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.initiative-card {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 2.25rem;
  background: rgba(13, 61, 84, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s;
}

.initiative-card::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.initiative-card:hover {
  background: rgba(18, 70, 100, 0.95);
}

.initiative-card:hover::after {
  transform: scaleX(1);
}

.initiative-num {
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: var(--teal-powder);
}

.initiative-card h3 {
  margin-bottom: 0.875rem;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--white);
}

.initiative-card p {
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.68);
}

.initiative-ghost {
  position: absolute;
  right: 1.125rem;
  bottom: 0.625rem;
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  user-select: none;
}

/* =========================
   Donate
   ========================= */

.donate {
  position: relative;
  background: #f2f8fb;
}

.donate-inner {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: var(--space-18);
  align-items: start;
}

.donate-sidebar h2 {
  margin-bottom: var(--space-5);
  color: var(--teal-deep);
}

.donate-sidebar p {
  margin-bottom: 1.75rem;
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--text-mid);
}

.donate-qr {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 18rem;
  margin-top: var(--space-2);
  padding: 1.125rem 1.25rem;
  background: var(--white);
  border: 1px solid rgba(13, 61, 84, 0.1);
  border-radius: 4px;
}

.donate-qr img {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
}

.donate-qr-text {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-mid);
}

.donate-qr-text strong {
  display: block;
  margin-bottom: var(--space-1);
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.donate-embed {
  overflow: hidden;
  border: 1px solid rgba(13, 61, 84, 0.08);
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(13, 61, 84, 0.12);
}

.donate-legal {
  margin-top: var(--space-8);
  padding: var(--space-6) 1.75rem;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(13, 61, 84, 0.58);
  background: var(--white);
  border: 1px solid rgba(13, 61, 84, 0.08);
  border-radius: 4px;
}

.donate-legal-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: rgba(13, 61, 84, 0.65);
}

/* =========================
   Footer
   ========================= */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-5);
  padding: 2.5rem var(--section-pad-x);
  background: #091e28;
  border-top: 1px solid rgba(196, 20, 25, 0.25);
}

footer img {
  width: auto;
  height: 3rem;
}

.footer-copy {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.3);
}

/* =========================
   Motion
   ========================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(1.625rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow { animation: fadeUp 0.65s ease both; }
.hero h1 { animation: fadeUp 0.65s 0.12s ease both; }
.hero-lead { animation: fadeUp 0.65s 0.22s ease both; }
.hero-cta { animation: fadeUp 0.65s 0.33s ease both; }
.hero-panel { animation: fadeUp 0.65s 0.18s ease both; }

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 880px) {
  :root {
    --header-height: var(--header-height-mobile);
    --section-pad-x: 1.25rem;
    --section-pad-y: 4rem;
  }

  header {
    padding: 0 var(--section-pad-x);
  }

  nav {
    display: none;
  }

  .hero-bg {
    background-position: center center;
  }

  .hero-inner,
  .about,
  .donate-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 2.5rem;
    padding: 3.5rem var(--section-pad-x);
  }

  .hero-lead {
    font-size: var(--text-md);
  }

  .about {
    gap: 2.25rem;
  }

  .about-photo {
    display: none;
  }

  .initiative-grid {
    grid-template-columns: 1fr;
  }

  .mission-band {
    padding: 1.5rem var(--section-pad-x);
  }

  .donate-qr {
    max-width: 100%;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem var(--section-pad-x);
  }
}