:root {
  --ink: #002147;
  --ink-soft: #666666;
  --paper: #f5f5f5;
  --white: #ffffff;
  --cerulean: #49b6ff;
  --teal: #1d42a6;
  --brick: #49b6ff;
  --sky: #b9d6f2;
  --line: #ebebeb;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

body.modal-open {
  overflow: hidden;
}

button,
input { font: inherit; }

button { cursor: pointer; }

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  padding: 42px 0;
  overflow: hidden;
  background: var(--ink);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(0, 33, 71, 0.9), rgba(0, 33, 71, 0.7) 44%, rgba(0, 33, 71, 0.35)),
    linear-gradient(0deg, rgba(0, 33, 71, 0.4), rgba(0, 33, 71, 0.18));
}

.hero-shell,
.section-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 456px);
  gap: 44px;
  align-items: center;
}

.identity {
  color: var(--white);
  padding-top: 20px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sky);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.identity .eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--cerulean);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1;
  text-transform: none;
}

.eyebrow.dark { color: var(--brick); }

h1,
h2,
p { overflow-wrap: anywhere; }

h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.96;
  font-weight: 700;
}

.lede {
  max-width: 650px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 22px;
  line-height: 1.45;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row span {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.9);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.donation-panel {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 26px;
  border-top: 5px solid var(--cerulean);
}

.panel-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

form {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.frequency-grid,
.amount-grid {
  display: grid;
  gap: 10px;
}

.frequency-grid { grid-template-columns: repeat(2, 1fr); }
.amount-grid { grid-template-columns: repeat(3, 1fr); }

.frequency-grid label,
.amount-grid label {
  min-height: 48px;
  display: grid;
}

.frequency-grid input,
.amount-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.frequency-grid span,
.amount-grid span {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.frequency-grid input:checked + span,
.amount-grid input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.split,
.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-row {
  grid-template-columns: 1fr 1fr 1.2fr;
  margin-top: 10px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.field > span,
.check span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.field input:focus {
  border-color: var(--cerulean);
  box-shadow: 0 0 0 3px rgba(73, 182, 255, 0.24);
}

.card-input-wrap {
  position: relative;
  display: block;
}

.card-input-wrap input {
  padding-right: 128px;
  letter-spacing: 0;
}

.card-brand-strip {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  align-items: center;
  pointer-events: none;
}

.card-brand-strip img {
  width: 26px;
  height: auto;
  opacity: 0.42;
  transition: opacity 160ms ease, transform 160ms ease;
}

.card-brand-strip img.is-active,
.card-brand-strip:not(.has-active) img {
  opacity: 1;
}

.card-brand-strip img.is-active {
  transform: translateY(-1px);
}

.card-number-field input {
  font-variant-numeric: tabular-nums;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 2px;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.method-note,
.form-message {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.payment-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.payment-summary span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-summary strong {
  color: var(--teal);
  font-size: 28px;
  line-height: 1.05;
  text-align: right;
}

.form-message {
  min-height: 20px;
  margin: 0;
}

.form-message.is-error { color: #b42318; }
.form-message.is-success { color: #1f6f4a; }

.submit-button {
  min-height: 54px;
  border: 0;
  background: var(--cerulean);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  background: var(--sky);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.mission-band {
  background: var(--paper);
  padding: 54px 0;
}

.mission-band .section-shell {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mission-band article {
  border-top: 2px solid var(--cerulean);
  padding-top: 18px;
}

.mission-band span {
  color: var(--brick);
  font-weight: 900;
}

.mission-band h2,
.donor-band h2 {
  margin: 10px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.1;
}

.mission-band p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.donor-band {
  padding: 54px 0;
  background: #ffffff;
}

.donor-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 34px;
  align-items: start;
}

.donor-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.donor-list article {
  border: 1px solid var(--line);
  padding: 16px;
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: #ffffff;
}

.donor-list strong {
  color: var(--teal);
  font-size: 24px;
}

.donor-list span {
  font-weight: 800;
}

.donor-list em {
  color: var(--ink-soft);
  font-size: 13px;
}

.donor-list small {
  color: var(--brick);
  font-size: 12px;
  font-weight: 800;
}

footer {
  padding: 28px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
}

footer .section-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  font-size: 13px;
}

footer strong {
  color: var(--white);
}

.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.donation-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 33, 71, 0.72);
  backdrop-filter: blur(5px);
}

.donation-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  background: var(--white);
  border-top: 6px solid var(--cerulean);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  padding: 34px;
  outline: none;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.modal-close:hover {
  background: var(--paper);
}

.modal-check {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: rgba(73, 182, 255, 0.15);
  color: var(--teal);
}

.modal-eyebrow {
  margin: 0 0 10px;
  color: var(--cerulean);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.donation-modal h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  line-height: 1.08;
  color: var(--ink);
}

.modal-copy {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}

.modal-summary {
  display: grid;
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-bottom: 0;
}

.modal-summary div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-summary dt {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.modal-primary {
  width: 100%;
  min-height: 52px;
  border: 0;
  background: var(--cerulean);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.modal-primary:hover {
  background: var(--sky);
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    align-items: start;
  }

  .hero-shell,
  .mission-band .section-shell,
  .donor-layout {
    grid-template-columns: 1fr;
  }

  .identity {
    padding-top: 0;
  }

  .donor-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 18px 0 34px;
  }

  .hero-shell,
  .section-shell {
    width: min(100% - 28px, 1180px);
  }

  .hero-shell {
    gap: 18px;
  }

  h1 {
    font-size: 34px;
  }

  .lede {
    display: none;
  }

  .identity {
    order: 1;
  }

  .identity .eyebrow {
    margin-bottom: 10px;
    padding-bottom: 6px;
    font-size: 22px;
  }

  .trust-row {
    display: none;
  }

  .card-input-wrap input {
    padding-right: 104px;
  }

  .card-brand-strip {
    gap: 3px;
    right: 8px;
  }

  .card-brand-strip img {
    width: 22px;
  }

  .donation-panel {
    order: 2;
    padding: 20px;
  }

  .split,
  .donor-list {
    grid-template-columns: 1fr;
  }

  .mission-band,
  .donor-band {
    padding: 38px 0;
  }

  .donation-modal {
    padding: 14px;
    align-items: end;
  }

  .donation-modal-panel {
    max-height: calc(100vh - 28px);
    padding: 28px 20px 22px;
  }

  .donation-modal h2 {
    font-size: 29px;
  }

  .modal-summary div {
    display: grid;
    gap: 6px;
  }

  .modal-summary dd {
    text-align: left;
  }
}
