:root {
  --blue: #456f9f;
  --blue-dark: #31577f;
  --gold: #c79a44;
  --green: #3d7054;
  --campaign-button: var(--green);
  --campaign-button-dark: #315f45;
  --ink: #162132;
  --text: #17212f;
  --muted: #667285;
  --line: #d9e0e7;
  --field: #f7f9fb;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 24px 70px rgba(22, 33, 50, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f3f7fb 0, #ffffff 680px),
    #ffffff;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

.campaign-loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #111111;
  font-size: 18px;
  font-weight: 800;
}

.campaign-loader span {
  display: inline-grid;
  place-items: center;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  background: #f7f7f7;
}

button,
input { font: inherit; }

button { cursor: pointer; }

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

.campaign-hero {
  padding: 28px 0 18px;
}

.campaign-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.campaign-shell {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.76fr);
  align-items: start;
  gap: 26px;
  padding: 18px;
  border: 1px solid rgba(69, 111, 159, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.bh {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.story-panel {
  position: sticky;
  top: 18px;
  min-width: 0;
}

.brand-lockup {
  display: block;
  width: min(150px, 54%);
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.image-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #dce5ed;
  box-shadow: 0 18px 42px rgba(22, 33, 50, 0.18);
}

.hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.story-copy {
  padding: 28px 6px 0;
}

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

.story-copy h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 0.98;
  font-weight: 900;
}

.story-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.impact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin: 24px 6px 4px;
  padding: 18px;
  border: 1px solid rgba(69, 111, 159, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(69, 111, 159, 0.1), rgba(199, 154, 68, 0.12));
}

.impact-card div:not(.progress) {
  display: grid;
  gap: 4px;
}

.impact-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.impact-card strong {
  color: var(--ink);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  font-weight: 900;
}

.progress {
  grid-column: 1 / -1;
  height: 16px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(69, 111, 159, 0.16);
}

.progress span {
  display: grid;
  place-items: center;
  height: 100%;
  min-width: 38px;
  background: linear-gradient(90deg, var(--campaign-button), var(--gold));
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.form-title-row {
  margin-bottom: 22px;
}

.form-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
}

.donation-section {
  min-width: 0;
  border: 1px solid rgba(22, 33, 50, 0.1);
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 14px 42px rgba(22, 33, 50, 0.1);
}

.donation-form {
  width: 100%;
  margin: 0;
}

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

legend {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.choice-row {
  display: grid;
  gap: 10px;
}

.choice-row.two { grid-template-columns: repeat(2, 1fr); }
.choice-row.three { grid-template-columns: repeat(3, 1fr); }
.amount-grid { grid-template-columns: repeat(3, 1fr); }

.choice-row label {
  min-height: 54px;
  display: grid;
}

.choice-row input {
  position: absolute;
  opacity: 0;
}

.choice-row span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.choice-row span:hover {
  border-color: rgba(69, 111, 159, 0.55);
  transform: translateY(-1px);
}

.choice-row input:checked + span {
  background: var(--campaign-button);
  border-color: var(--campaign-button);
  color: #ffffff;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 30px 0 26px;
}

.name-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field span {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
}

.field input::placeholder {
  color: #a8a8a8;
}

.field input:focus,
.submit-button:focus,
.choice-row span:focus-within {
  outline: 2px solid rgba(69, 111, 159, 0.38);
  outline-offset: 2px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}

.check input {
  width: 18px;
  height: 18px;
}

.dedication {
  margin-bottom: 0;
}

.method-note {
  margin: -14px 0 20px;
  color: #555555;
  line-height: 1.45;
}

.card-fields {
  margin-top: 30px;
}

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

.card-input-wrap input {
  padding-right: 128px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.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-row {
  display: grid;
  grid-template-columns: 90px 20px 90px 1fr;
  gap: 10px;
  align-items: start;
}

.card-row .field { margin-bottom: 0; }

.slash {
  display: grid;
  place-items: center;
  height: 44px;
  font-size: 22px;
}

.cvc {
  justify-self: end;
  width: 90px;
}

.total-heading {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 18px;
}

.total-box {
  min-height: 74px;
  border: 1px solid rgba(69, 111, 159, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(69, 111, 159, 0.08), rgba(61, 112, 84, 0.08));
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-weight: 800;
}

.form-message {
  min-height: 24px;
  margin: 16px 0;
  color: #555555;
  font-weight: 700;
}

.form-message.is-error { color: #b00020; }
.form-message.is-success { color: #2a6d38; }

.submit-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 6px;
  background: var(--campaign-button);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--campaign-button) 34%, transparent);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover {
  background: var(--campaign-button-dark);
  box-shadow: 0 16px 30px color-mix(in srgb, var(--campaign-button) 42%, transparent);
  transform: translateY(-1px);
}

.submit-button[disabled] {
  opacity: .65;
  cursor: wait;
}

.donor-wall-section {
  padding: 34px 0 18px;
}

.donor-wall-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr);
  gap: 4px 28px;
  align-items: end;
  margin-bottom: 18px;
}

.donor-wall-heading .eyebrow {
  grid-column: 1 / -1;
}

.donor-wall-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
  font-weight: 900;
}

.donor-wall-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.donor-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.donor-wall article {
  background: #ffffff;
  border: 1px solid rgba(22, 33, 50, 0.08);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(22, 33, 50, 0.08);
}

.donor-wall strong {
  display: block;
  color: var(--campaign-button);
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
}

.donor-wall span {
  display: block;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 6px;
}

.donor-wall em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.donor-wall small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

footer {
  margin-top: 34px;
  background: #eef3f7;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  padding: 22px 0;
}

.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, 0, 0, 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(--blue);
  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(--black);
  font-size: 28px;
  line-height: 1;
}

.modal-close:hover {
  background: #f5f5f5;
}

.modal-check {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: rgba(77, 121, 176, 0.16);
  color: var(--blue-dark);
}

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

.donation-modal h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.08;
  color: var(--black);
}

.modal-copy {
  margin: 16px 0 0;
  color: var(--muted);
  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(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

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

.modal-primary:hover {
  background: var(--campaign-button-dark);
}

@media (max-width: 900px) {
  .campaign-shell {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .story-panel {
    position: relative;
    top: auto;
  }

  .donation-section {
    padding: 24px;
  }

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

@media (max-width: 620px) {
  .container {
    width: calc(100% - 24px);
  }

  .campaign-hero {
    padding-top: 12px;
  }

  .campaign-topbar {
    margin-bottom: 8px;
    padding-inline: 2px;
  }

  .campaign-shell {
    padding: 10px;
  }

  .brand-lockup {
    width: min(118px, 52%);
  }

  .bh {
    font-size: 16px;
  }

  .story-copy {
    padding: 20px 2px 0;
  }

  .story-copy p:not(.eyebrow) {
    font-size: 16px;
  }

  .impact-card {
    grid-template-columns: 1fr;
    margin-inline: 0;
    padding: 16px;
  }

  .donation-section {
    padding: 20px 14px;
  }

  .name-row {
    grid-template-columns: 1fr;
  }

  .choice-row.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-row.three,
  .amount-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .card-row {
    grid-template-columns: 1fr 16px 1fr;
  }

  .cvc {
    grid-column: 1 / -1;
    width: 100%;
  }

  .donor-wall-heading {
    grid-template-columns: 1fr;
  }

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

  .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;
  }
}
