/* =========================================================
   The CHADA Foundation — shared styles
   Design: warm, dignified, hand-in-hand. Deep forest green and
   sunlit gold, drawn from the Foundation's mark — a family held
   in open hands beneath the shape of Africa.
   Type: Fraunces (display) + Inter (body/UI).
   ========================================================= */

:root {
  --ink: #241f14;
  --forest: #1e4630;
  --forest-dark: #12291b;
  --forest-tint: #305c42;
  --sand: #faf5e8;
  --sand-deep: #efe4c8;
  --paper: #fffdf6;
  --clay: #c99a3e;
  --clay-dark: #96701f;
  --brown: #7a4b23;
  --line: rgba(36, 31, 20, 0.14);
  --line-strong: rgba(36, 31, 20, 0.28);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--clay-dark); }

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.4em;
  color: var(--forest-dark);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.4vw, 4.1rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.35rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: var(--measure); }
p.wide { max-width: none; }

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-style: italic;
  font-weight: 400;
  color: var(--forest-tint);
  max-width: 48ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary {
  background: var(--clay);
  color: var(--paper);
}
.btn-primary:hover { background: var(--clay-dark); color: var(--paper); }
.btn-ghost {
  background: transparent;
  border-color: var(--forest-dark);
  color: var(--forest-dark);
}
.btn-ghost:hover { background: var(--forest-dark); color: var(--paper); }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line-strong);
  background: var(--sand);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65em;
  text-decoration: none;
  color: var(--forest-dark);
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: contain;
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name .full {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-name .tag {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--clay-dark);
  font-family: var(--font-display);
}
.brand:hover .brand-name .full { color: var(--forest-dark); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--forest-dark);
  border-bottom-color: var(--clay);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--forest-dark);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--forest-dark);
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line-strong);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 28px 18px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Hero (home) ---------- */

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: end;
}
.hero-copy .kicker {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--clay-dark);
  font-weight: 600;
  margin-bottom: 0.9em;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 1.6em;
  flex-wrap: wrap;
}
.hero-panel {
  background: var(--forest-dark);
  color: var(--sand);
  padding: 30px;
  border-radius: var(--radius);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-panel .figure {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
  color: var(--sand);
}
.hero-panel .figure-label {
  font-size: 0.92rem;
  color: rgba(243, 239, 228, 0.75);
  margin-top: 0.3em;
}
.hero-panel-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(243, 239, 228, 0.22);
}
.hero-panel-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 0.94rem;
}
.hero-panel-list li + li { border-top: 1px solid rgba(243, 239, 228, 0.14); }
.hero-panel-list strong { color: var(--sand); font-family: var(--font-display); font-weight: 600; }

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

/* ---------- Photo banner ---------- */

.photo-banner {
  border-bottom: 1px solid var(--line);
}
.photo-banner figure {
  margin: 0;
}
.photo-banner img {
  width: 100%;
  height: clamp(260px, 42vw, 480px);
  object-fit: cover;
  display: block;
}
.photo-banner figcaption {
  padding: 14px 28px;
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.65;
  font-style: italic;
  max-width: 1120px;
  margin: 0 auto;
}
.inline-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
}
.inline-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.inline-photo figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  opacity: 0.7;
  font-style: italic;
  background: var(--paper);
}

/* ---------- Page header (non-home) ---------- */

.page-header {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--line);
}
.page-header .kicker {
  font-size: 0.9rem;
  color: var(--clay-dark);
  font-weight: 600;
  margin-bottom: 0.8em;
}

/* ---------- Sections ---------- */

section.block {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
section.block:last-of-type { border-bottom: none; }
.block-tight { padding: 44px 0; }
.block-forest {
  background: var(--forest-dark);
  color: var(--sand);
}
.block-forest h2, .block-forest h3 { color: var(--sand); }
.block-forest .lede { color: rgba(243, 239, 228, 0.82); }
.block-forest p { color: rgba(243, 239, 228, 0.88); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

/* ---------- Stat strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 30px 28px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--forest-dark);
  font-weight: 600;
  line-height: 1;
}
.stat .label {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--ink);
  opacity: 0.75;
}
@media (max-width: 780px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: none; }
  .stat { border-top: 1px solid var(--line); }
  .stat:first-child, .stat:nth-child(2) { border-top: none; }
}

/* ---------- Program list ---------- */

.program-list {
  display: flex;
  flex-direction: column;
}
.program-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.program-list .program-row:last-child { border-bottom: 1px solid var(--line); }
.program-row h3 { margin-bottom: 0.3em; }
.program-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clay-dark);
}
.program-row .btn { align-self: center; }

@media (max-width: 720px) {
  .program-row { grid-template-columns: 1fr; gap: 10px; }
  .program-row .btn { justify-self: start; }
}

/* ---------- Cards (values / team) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.card {
  background: var(--sand);
  padding: 30px;
}
.card .mark {
  width: 34px;
  height: 2px;
  background: var(--clay);
  margin-bottom: 20px;
}
@media (max-width: 820px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------- Timeline (about) ---------- */

.timeline {
  border-top: 1px solid var(--line);
}
.timeline-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-row .year {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--clay-dark);
}

/* ---------- Donate page ---------- */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tier {
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: left;
  background: var(--paper);
}
.tier .amount {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--forest-dark);
  font-weight: 600;
}
.tier .impact {
  margin-top: 10px;
  font-size: 0.92rem;
  opacity: 0.8;
}
@media (max-width: 820px) {
  .tier-grid { grid-template-columns: 1fr 1fr; }
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.step {
  position: relative;
  padding-left: 46px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--clay);
  color: var(--clay-dark);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Forms ---------- */

form.stack {
  display: grid;
  gap: 18px;
  max-width: 560px;
}
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--forest-dark);
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--forest);
  outline: none;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}
.form-note { font-size: 0.86rem; opacity: 0.75; margin-top: -4px; }
.form-status {
  font-size: 0.92rem;
  margin-top: 6px;
  min-height: 1.4em;
}
.form-status.ok { color: var(--forest-dark); }

/* ---------- Contact info list ---------- */

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.info-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.info-list .k {
  font-weight: 600;
  color: var(--forest-dark);
  font-size: 0.92rem;
}

/* ---------- Map placeholder ---------- */

.map-frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest-dark);
  color: rgba(243, 239, 228, 0.85);
  padding: 52px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(243, 239, 228, 0.18);
}
.footer-grid h4 {
  font-family: var(--font-body);
  color: var(--sand);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a {
  color: rgba(243, 239, 228, 0.85);
  text-decoration: none;
  font-size: 0.94rem;
}
.footer-grid a:hover { color: var(--clay); }
.footer-brand p {
  color: rgba(243, 239, 228, 0.72);
  font-size: 0.94rem;
  max-width: 34ch;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 22px;
  font-size: 0.85rem;
  color: rgba(243, 239, 228, 0.6);
  flex-wrap: wrap;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
