:root {
  /* Brand colours sampled from the logo */
  --green: #00260a;
  --green-2: #0d3d1c;
  --green-3: #1f5533;
  --cream: #fff6e8;
  --beige: #f1e6d2;
  --beige-2: #e2d3b8;
  --on-green-muted: #d9d5c3;
  --ink-muted: #3f4f43;
  --todo: #ffe08a;
  /* Burnt orange accent. Cream text on it is 5.9:1, so text on orange fills is cream. */
  --accent: #a3410b;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--green);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; padding: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.2vw, 5.25rem); line-height: 1.02; }
h2 { font-size: clamp(2.1rem, 4vw, 3.25rem); line-height: 1.1; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 600; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green-3); outline-offset: 3px; border-radius: 4px; }
.donate > .wrap > div:first-child :focus-visible, .footer :focus-visible, .mobile-bar :focus-visible { outline-color: var(--cream); }

.wrap { width: min(100%, 1240px); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.eyebrow { font-size: .875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--beige-2); margin-bottom: 16px; }
.eyebrow-green { color: var(--green-3); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--cream); padding: 10px 16px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* Placeholder text that the organizer still needs to replace */
mark.todo { background: var(--todo); color: #2b2100; padding: .1em .3em; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.draft-banner { background: var(--todo); color: #2b2100; font-size: .9375rem; line-height: 1.4; padding: 10px var(--gutter); text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 28px;
  border: 1.5px solid transparent; border-radius: 999px;
  font: 600 1.0625rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-small { min-height: 44px; padding: 8px 22px; font-size: 1rem; }
.btn-accent { background: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--cream); }
.btn-accent:hover { background: var(--accent); }
.btn-full { width: 100%; }
.btn-cream { background: var(--cream); color: var(--green); }
.btn-cream:hover { background: var(--beige-2); }
.btn-green { background: var(--green); color: var(--cream); }
.btn-green:hover { background: var(--green-3); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--green); font-size: 1rem; padding-inline: 18px; }
.btn-outline:hover { background: var(--beige); }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--cream); color: var(--green); }
.nav, .hero-copy { position: relative; z-index: 1; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.nav-logo { display: block; flex: none; position: relative; top: 20px; }
.nav-logo img { height: 120px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; font-weight: 500; font-size: 1rem; }
.nav-links a:not(.btn) { text-decoration: none; padding-block: 10px; }
.nav-links a:not(.btn)::after { content: ""; display: block; width: 0; height: 2px; margin: 2px auto 0; background: var(--accent); transition: width .5s; }
.nav-links a:not(.btn):hover::after, .nav-links a:not(.btn):focus-visible::after { width: 100%; }

.hero-body {
  display: flex; align-items: center; min-height: clamp(520px, 72vh, 720px);
  padding-block: clamp(24px, 4vw, 48px) clamp(56px, 7vw, 96px);
}
.hero-copy { max-width: 520px; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: var(--ink-muted); margin-top: 24px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }
.text-link { font-weight: 600; text-underline-offset: 5px; padding-block: 12px; }
.text-link:hover { color: var(--green-3); }
/* Photo fills the right of the hero, under the nav, and fades into cream behind the text.
   The credit is repeated as text because the edge of the photo can be cropped. */
/* Starts just right of the text column, whatever the screen width */
.hero-photo { position: absolute; top: 156px; right: 0; bottom: 0; left: max(520px, calc(50% - 620px + var(--gutter) + 440px)); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, var(--cream) 0%, var(--cream) 6%, transparent 38%),
    linear-gradient(to bottom, var(--cream) 0%, transparent 14%);
}
.hero-photo figcaption {
  position: absolute; right: 8px; bottom: 6px; z-index: 1; max-width: calc(100% - 16px);
  padding: 6px 10px; border-radius: 4px; background: rgb(0 38 10 / .72);
  font-size: .8125rem; line-height: 1.4; color: var(--cream);
}

/* Statistics */
.why h2 { max-width: 15em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(40px, 5vw, 72px); border-top: 1.5px solid var(--green); }
.stat { padding: 28px 32px 8px 0; }
.stat + .stat { padding-left: 32px; border-left: 1px solid var(--beige-2); }
.stat dt { font-family: var(--serif); font-size: clamp(2.5rem, 4.2vw, 3.75rem); line-height: 1.05; letter-spacing: -0.02em; white-space: nowrap; }
.stat dd { margin-top: 14px; max-width: 22em; }
.source { margin-top: 36px; font-size: .9375rem; color: var(--ink-muted); }
.source a { text-underline-offset: 3px; }

/* Story */
.story { background: var(--beige); }
.story-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.story-logo { width: 150px; height: auto; }
.prose { max-width: 40em; }
.prose h2 { margin-bottom: 28px; }
.prose p + p { margin-top: 18px; }
.prose .eyebrow { margin-bottom: 16px; }

/* Support stages */
.support h2 { max-width: 15em; }
.stages { list-style: none; counter-reset: stage; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: clamp(40px, 5vw, 64px); }
.stages li { counter-increment: stage; border-top: 1.5px solid var(--green); padding-top: 18px; }
.stages li::before { content: counter(stage); display: block; font: 400 2.25rem/1 var(--serif); color: var(--green-3); margin-bottom: 36px; }
.stages h3 { font-size: 1.25rem; margin-bottom: 10px; }
.stages p { color: var(--ink-muted); }
.stages-note { margin-top: 36px; }

/* Donate */
.donate { background: var(--green-2); color: var(--cream); }
.donate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.donate-intro { position: sticky; top: 40px; }
.donate-note { margin-top: 22px; color: var(--on-green-muted); max-width: 30em; }
.give-card { background: var(--cream); color: var(--green); border-radius: 10px; padding: clamp(24px, 3vw, 36px); }
.raised { line-height: 1.3; margin-bottom: 12px; }
.raised strong { font: 400 2.5rem/1.1 var(--serif); letter-spacing: -0.01em; }
.bar { height: 10px; background: var(--beige-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--green-3); border-radius: 999px; }
.donors { margin-top: 10px; font-size: .9375rem; color: var(--ink-muted); }
#progress { margin-bottom: 22px; }

/* Donation options */
.form-group { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.form-group legend { padding: 0; margin-bottom: 12px; font-size: 1.125rem; font-weight: 600; }
.method-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice > span {
  display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 8px;
  border: 1.5px solid var(--accent); border-radius: 8px; background: transparent;
  font-weight: 600; line-height: 1.2; text-align: center;
  transition: background-color .2s, color .2s;
}
.choice:hover > span { background: var(--beige); }
.choice input:checked + span { background: var(--accent); color: var(--cream); }
.choice input:focus-visible + span { outline: 3px solid var(--green-3); outline-offset: 2px; }
.method > span { flex-direction: column; gap: 6px; min-height: 78px; font-size: .9375rem; }
.method svg, .secure-line svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.method svg { width: 24px; height: 24px; }

fieldset + .method-panel { margin-top: -10px; }
.pay-link { margin-top: 16px; }
.pay-link:disabled { opacity: .55; cursor: wait; }
.field { display: block; margin-top: 14px; }
.field span { display: block; margin-bottom: 6px; font-size: .9375rem; font-weight: 600; }
.field input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--accent); border-radius: 8px;
  background: #fff; color: var(--green); font: 500 1rem/1.3 var(--sans);
}
.field input:focus-visible { outline: 3px solid var(--green-3); outline-offset: 2px; }
.form-error { margin-top: 12px; color: #a3261b; font-size: .9375rem; line-height: 1.45; }
.payment-result { margin-bottom: 4px; padding: 10px 12px; border-radius: 6px; background: var(--beige); font-weight: 600; line-height: 1.45; }
.bank-fields { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 16px; margin: 14px 0; padding: 16px; background: var(--beige); border-radius: 8px; }
.bank-fields dt { font-size: .9375rem; color: var(--ink-muted); }
.bank-fields dd { font-weight: 600; overflow-wrap: anywhere; }
.account-number { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
/* Never wrap: a split account number could be misread and money sent to the wrong account */
.account-number span { font-size: 1.375rem; letter-spacing: .04em; white-space: nowrap; user-select: all; }
.copy-account {
  min-height: 44px; padding: 6px 16px; border: 1.5px solid var(--accent); border-radius: 999px;
  background: transparent; color: var(--green); font: 600 .9375rem/1 var(--sans); cursor: pointer;
  transition: background-color .2s;
}
.copy-account:hover { background: var(--cream); }
.bank-note { font-size: .9375rem; color: var(--ink-muted); }
.secure-line { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; font-size: .875rem; color: var(--ink-muted); }
.secure-line svg { width: 16px; height: 16px; }
.share { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--beige-2); }
.share h3 { font-size: 1rem; margin-bottom: 14px; }
.share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Questions */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(28px, 6vw, 96px); }
.faq { border-top: 1.5px solid var(--green); }
.faq details { border-bottom: 1px solid var(--beige-2); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 64px; padding-block: 14px; cursor: pointer; font-weight: 600; font-size: 1.125rem; line-height: 1.35; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.75rem/1 var(--serif); color: var(--green-3); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 22px; max-width: 42em; color: var(--ink-muted); }

/* Footer */
.footer { background: var(--green); color: var(--cream); padding-block: clamp(48px, 7vw, 88px); }
.footer-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 7vw, 96px); align-items: center; }
.footer-grid > img { height: clamp(170px, 20vw, 240px); width: auto; }
.footer-line { font: 400 clamp(2.1rem, 4vw, 3.25rem)/1.1 var(--serif); letter-spacing: -0.015em; margin-bottom: 26px; }
.footer-small { margin-top: 14px; font-size: .9375rem; color: var(--on-green-muted); }
.footer-small + .footer-small { margin-top: 6px; }
.footer-copy > .btn + .footer-small { margin-top: 30px; }
.footer-small a { text-underline-offset: 3px; }

/* Mobile donate bar */
.mobile-bar { display: none; }

@media (max-width: 960px) {
  .nav-links a:not(.btn) { display: none; }
  .donate-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-body { display: block; min-height: 0; padding-bottom: 0; }
  .hero-photo { position: relative; inset: auto; margin: 40px calc(-1 * var(--gutter)) 0; }
  .hero-photo img { height: auto; aspect-ratio: 3 / 2; }
  .hero-photo::after { background: linear-gradient(to bottom, var(--cream) 0%, transparent 22%); }
  .donate-intro { position: static; }
  .stages { grid-template-columns: repeat(2, 1fr); }
  .stages li::before { margin-bottom: 20px; }
}

@media (max-width: 680px) {
  body { padding-bottom: 76px; }
  .nav { padding-block: 14px; }
  .nav-logo img { height: 96px; }
  .nav-links .btn { display: none; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { padding: 24px 0; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--beige-2); }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story-logo { width: 110px; justify-self: start; }
  .stages { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .bank-fields { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bank-fields dd + dt { margin-top: 12px; }
  .mobile-bar {
    display: block; position: fixed; inset: auto 0 0 0; z-index: 30;
    background: var(--green); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--green-3);
  }
}

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