:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-soft: #f3eee6;
  --text: #1f2a24;
  --text-muted: #55605a;
  --heading: #17201b;
  --border: #e3dccf;
  --green: #2e7d4f;
  --green-dark: #23633e;
  --green-soft: #e6f2ea;
  --focus: #1b5e9e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 42, 36, .06), 0 8px 24px rgba(31, 42, 36, .07);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sticky-h: 76px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom));
}

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

h1, h2 {
  font-family: var(--serif);
  color: var(--heading);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
p { margin: 0 0 1em; }

a { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 680px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1.0625rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); }
.btn--primary:disabled { background: #c9d3cc; color: #4d5a52; cursor: not-allowed; }
.btn--outline { background: var(--surface); color: var(--heading); border-color: var(--border); }
.btn--outline:hover { border-color: var(--green); color: var(--green-dark); }
.btn--lg { min-height: 56px; font-size: 1.125rem; }
.btn--block { width: 100%; }

/* Notices */
.notice { padding: 14px 16px; text-align: center; font-weight: 600; }
.notice--thanks { background: var(--green-soft); color: var(--green-dark); }

/* 1. Hero */
.hero { padding: 32px 0 40px; }
.hero__grid { display: grid; gap: 28px; }
.hero__photo { margin: 0; }
.hero__photo img {
  width: 100%; max-width: 340px; aspect-ratio: 268 / 450; object-fit: cover;
  margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 .5em; color: var(--green-dark);
  font-weight: 700; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase;
}
.lead { font-size: 1.25rem; color: var(--heading); }
.hero__text .btn { margin-top: .5em; }

@media (max-width: 599px) {
  .hero__photo img { max-width: 240px; }
  .hero__text .btn { width: 100%; }
}

@media (min-width: 860px) {
  .hero { padding: 64px 0 72px; }
  .hero__grid { grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
}

/* 2. Donate */
.donate { padding: 8px 0 48px; scroll-margin-top: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 20px;
}
@media (min-width: 600px) { .card { padding: 40px; } }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.amounts {
  display: grid; gap: 12px; margin: 24px 0 20px;
  grid-template-columns: repeat(2, 1fr);
}
.amount {
  min-height: 60px; border-radius: 12px;
  border: 2px solid var(--border); background: var(--surface);
  color: var(--heading); font: 700 1.25rem/1 var(--sans); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.amount:hover { border-color: var(--green); }
.amount[aria-checked="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
/* An odd last amount takes the full row */
.amount:last-child:nth-child(odd) { grid-column: 1 / -1; }

.btn--donate { border-radius: 12px; text-transform: uppercase; letter-spacing: .02em; }
.donate-note {
  margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 1rem; color: var(--text-muted);
}
.form-msg {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 10px;
  background: var(--surface-soft); font-size: 1rem;
}

/* 3. Story */
.story { padding: 16px 0 24px; }
.story__section { padding: 32px 0; border-top: 1px solid var(--border); }
.story__section:first-child { border-top: 0; }
.story__photo { margin: 4px 0 24px; }
.story__photo img {
  width: 100%; max-width: 300px; aspect-ratio: 262 / 450; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.story__photo--natural img { aspect-ratio: auto; max-width: 360px; }
.story__photo figcaption { font-size: .9375rem; color: var(--text-muted); margin-top: 8px; }
@media (min-width: 680px) {
  .story__photo { float: right; width: 240px; margin: 6px 0 16px 32px; }
  .story__section::after { content: ''; display: table; clear: both; }
}

.story__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; clear: both; }
.story__pair figure { margin: 0; }
.story__pair img {
  width: 100%; aspect-ratio: 3 / 5; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.story__pair figcaption { font-size: .9375rem; color: var(--text-muted); margin-top: 8px; }
@media (min-width: 680px) { .story__pair { gap: 20px; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: .5em; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: .35em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%2323633e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

.signoff { margin-top: 1.5em; }

/* 4. Share */
.share { padding: 40px 0 48px; background: var(--surface-soft); }
.share__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.share__actions .btn { flex: 1 1 200px; }

/* Thank-you page */
.page-thanks { padding-bottom: 0; }
.thanks { padding: 32px 0 16px; }
.thanks__card { text-align: center; }
.thanks__photo {
  width: 140px; height: 140px; object-fit: cover; object-position: center 30%;
  margin: 0 auto 20px; border-radius: 50%; box-shadow: var(--shadow);
}
.thanks__share-title { font-size: 1.375rem; margin-top: 1.4em; padding-top: 1.2em; border-top: 1px solid var(--border); }
.thanks__card .share__actions { justify-content: center; }
.thanks__back { margin: 24px 0 0; font-weight: 600; }
@media (min-width: 860px) { .thanks { padding: 64px 0 24px; } }

/* 5. Footer */
.footer { padding: 32px 0; font-size: 1rem; color: var(--text-muted); }
.footer strong { color: var(--heading); }
.footer__small { font-size: .9375rem; }

/* 6. Sticky CTA (mobile only) */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 243, .96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(31, 42, 36, .06);
  transition: transform .2s ease;
}
.sticky-cta.is-hidden { transform: translateY(110%); }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .sticky-cta { display: none; }
}
