/* ------------------------------------------------------------------ */
/* Fonts                                                                */
/* Greenstone is self-hosted from assets/fonts/.                        */
/* Work Sans is loaded from Google Fonts (see <link> in index.html).    */
/* Chiswick Sans (heading) is self-hosted if a file is dropped in.      */
/* ------------------------------------------------------------------ */
@font-face {
  font-family: "Greenstone";
  src: url("assets/fonts/Greenstone-Regular.woff2") format("woff2"),
       url("assets/fonts/Greenstone-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Greenstone";
  src: url("assets/fonts/Greenstone-Italic.woff2") format("woff2"),
       url("assets/fonts/Greenstone-Italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Chiswick Sans";
  src: url("assets/fonts/ChiswickSansText-Regular-Web.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-navy: #19314c;      /* header bar, body text in card */
  --color-blue: #176087;      /* hero bg, selected border, headings */
  --color-cream: #fafdff;     /* card bg, hero text */
  --color-twilight: #f7fdff;  /* logo tagline */
  --color-selected: #e0ecee;  /* selected pill fill */
  --color-border: #c8d4da;    /* unselected pill border, muted text */

  --font-display: "Greenstone", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Chiswick Sans", "Work Sans", Georgia, serif;
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--color-navy);
  background: var(--color-blue);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

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

/* ================================================================ */
/* Site header                                                      */
/* ================================================================ */
.site-header {
  background: var(--color-navy);
  color: var(--color-cream);
  height: 106px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 10;
}

.site-header__inner {
  width: 100%;
  max-width: 1512px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.site-logo__mark {
  display: block;
  width: auto;
  height: 60px;
  max-width: 100%;
  flex: 0 0 auto;
}

/* ================================================================ */
/* Hero section                                                     */
/* ================================================================ */
.hero {
  position: relative;
  background: var(--color-blue);
  color: var(--color-cream);
  padding: 110px 24px 0;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.hero__bg img {
  display: block;
  width: 140%;
  max-width: none;
  margin-top: -3%;
  opacity: 1;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 0 0;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-cream);
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.05;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.hero__deck {
  font-family: var(--font-body);
  color: var(--color-cream);
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.5;
  max-width: 797px;
  margin: 36px auto 0;
}

.hero__deck strong {
  font-family: var(--font-body);
  font-weight: 600;
}

/* ================================================================ */
/* Donate card                                                      */
/* ================================================================ */
.donate-card {
  position: relative;
  z-index: 2;
  background: var(--color-cream);
  color: var(--color-navy);
  border-radius: 10px 10px 0 0;
  width: calc(100% - 48px);
  max-width: 1119px;
  margin: 88px auto 0;
  padding: 63px clamp(24px, 6vw, 120px) 72px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
}

.donate-card__title {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-blue);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.15;
  text-align: center;
  margin: 0 0 44px;
}

.donate-form {
  max-width: 491px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ------- Frequency toggle (Give once / Monthly) --------------- */
.frequency {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.frequency__option {
  appearance: none;
  background: transparent;
  border: 3px solid var(--color-border);
  color: var(--color-navy);
  font: inherit;
  font-family: var(--font-body);
  font-size: 22px;
  height: 54px;
  cursor: pointer;
  border-radius: 14px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.frequency__option + .frequency__option { margin-left: 6px; }

.frequency__option.is-selected {
  background: var(--color-selected);
  border-color: var(--color-blue);
  font-weight: 500;
}

.frequency__option:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ------- Preset amounts grid ---------------------------------- */
.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.amount {
  appearance: none;
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-navy);
  font: inherit;
  font-family: var(--font-body);
  font-size: 22px;
  height: 54px;
  cursor: pointer;
  border-radius: 14px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, border-width 120ms ease;
}

.amount.is-selected {
  background: var(--color-selected);
  border: 3px solid var(--color-blue);
  font-weight: 500;
}

.amount:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ------- Custom amount input ---------------------------------- */
.custom-amount {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
  height: 75px;
  border: 3px solid var(--color-blue);
  border-radius: 14px;
  background: var(--color-cream);
  margin-top: 10px;
}

.custom-amount__symbol {
  font-family: var(--font-body);
  font-size: 32px;
  color: var(--color-navy);
}

.custom-amount__input {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-family: var(--font-body);
  font-size: 32px;
  color: var(--color-navy);
  outline: none;
  padding: 0;
}

.custom-amount__currency {
  font-family: var(--font-body);
  font-size: 22px;
  color: var(--color-navy);
  padding-left: 8px;
}

.custom-amount:focus-within {
  box-shadow: 0 0 0 3px rgba(23, 96, 135, 0.18);
}

/* ------- Disclosure ------------------------------------------- */
.disclosure {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 20px;
  color: var(--color-navy);
  margin: 10px 0 0;
}

/* ------- Dedicate + Add comment row --------------------------- */
.extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.dedicate {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 22px;
  color: var(--color-navy);
  user-select: none;
}

.dedicate input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dedicate__box {
  display: inline-block;
  width: 26px;
  height: 25px;
  border: 2px solid var(--color-border);
  border-radius: 5px;
  background: transparent;
  flex: 0 0 auto;
  position: relative;
  transition: background 120ms ease, border-color 120ms ease;
}

.dedicate input:checked + .dedicate__box {
  background: var(--color-blue);
  border-color: var(--color-blue);
}

.dedicate input:checked + .dedicate__box::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 7px; height: 13px;
  border: solid var(--color-cream);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.dedicate input:focus-visible + .dedicate__box {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.comment-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  font-family: var(--font-body);
  font-size: 22px;
  color: var(--color-border);
  text-decoration: underline;
  text-underline-offset: 6px;
  cursor: pointer;
  padding: 0;
}

.comment-toggle:hover,
.comment-toggle[aria-expanded="true"] { color: var(--color-blue); }

/* Reveal fields */
.dedicate-fields[hidden],
.comment-field[hidden] { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  color: var(--color-navy);
}

.field__label {
  font-weight: 500;
}

.field input,
.field textarea {
  font: inherit;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--color-navy);
  padding: 12px 14px;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-cream);
  width: 100%;
  outline: none;
}

.field input:focus,
.field textarea:focus { border-color: var(--color-blue); }

/* ------- Donate button ---------------------------------------- */
.donate-button {
  appearance: none;
  background: var(--color-selected);
  border: 3px solid var(--color-blue);
  color: var(--color-navy);
  font: inherit;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 22px;
  height: 65px;
  border-radius: 14px;
  cursor: pointer;
  margin-top: 20px;
  transition: background 120ms ease, color 120ms ease, transform 80ms ease;
}

.donate-button:hover { background: #d1e2e6; }
.donate-button:active { transform: translateY(1px); }
.donate-button:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

.paypal-container {
  margin-top: 16px;
  min-height: 0;
}

.paypal-container:not(:empty) { margin-top: 24px; }

/* ================================================================ */
/* Responsive                                                        */
/* ================================================================ */
@media (max-width: 900px) {
  .site-header { height: 88px; }
  .site-header__inner { padding: 0 20px; }
  .site-logo__mark { height: 44px; }

  .hero { padding-top: 48px; }
  .hero__inner { padding-top: 24px; }
  .donate-card { padding: 48px 24px 56px; margin-top: 56px; }
  .donate-form { gap: 16px; }
  .frequency__option { font-size: 18px; height: 50px; }
  .amount { font-size: 18px; height: 50px; }
  .custom-amount { height: 64px; padding: 0 18px; }
  .custom-amount__symbol,
  .custom-amount__input { font-size: 26px; }
  .donate-button { font-size: 20px; height: 60px; }
  .extras { flex-direction: column; align-items: flex-start; gap: 14px; }
  .dedicate, .comment-toggle { font-size: 18px; }
}

@media (max-width: 480px) {
  .site-logo__mark { height: 36px; }
  .amounts { gap: 10px; }
  .hero__deck { font-size: 17px; }
}
