:root {
  --ink: #14212b;
  --muted: #5e6f78;
  --line: #dce6e4;
  --paper: #fbfdfb;
  --white: #ffffff;
  --mint: #e6f5ec;
  --green: #0f8f5f;
  --green-dark: #0b6849;
  --coral: #e9634f;
  --gold: #f7bd4f;
  --blue: #2f6f9f;
  --shadow: 0 18px 50px rgba(20, 33, 43, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(220, 230, 228, 0.86);
  background: rgba(251, 253, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  font-size: 1.12rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: white;
  box-shadow: 0 2px 10px rgba(20, 33, 43, 0.12);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--green-dark);
}

.nav-actions,
.hero-actions,
.amount-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  border: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.amount-row button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
}

.primary-button {
  background: var(--green);
  color: white;
  box-shadow: 0 9px 22px rgba(15, 143, 95, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}

.ghost-button {
  padding: 0 14px;
  background: transparent;
  color: var(--ink);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}

.large {
  min-height: 52px;
  padding: 0 22px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  background: #102019;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(6, 18, 16, 0.82), rgba(6, 18, 16, 0.34) 55%, rgba(6, 18, 16, 0.06)),
    url("https://images.unsplash.com/photo-1593113598332-cd288d649433?auto=format&fit=crop&w=2200&q=85") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24vh;
  z-index: -1;
  background: linear-gradient(0deg, rgba(251, 253, 251, 1), rgba(251, 253, 251, 0));
}

.hero-content {
  width: min(760px, calc(100% - 36px));
  margin: 0 0 clamp(58px, 10vh, 110px) clamp(18px, 8vw, 96px);
  color: white;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.hero-content .eyebrow {
  color: #9df0c7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(4rem, 11vw, 9.2rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-content p:not(.eyebrow) {
  width: min(620px, 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(680px, 100%);
  margin: 28px 0 0;
}

.hero-stats div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-stats dt {
  font-size: 1.45rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.quick-give,
.tools-band,
.start-panel,
.impact,
.stories,
.site-footer {
  padding: clamp(42px, 7vw, 84px) clamp(18px, 4vw, 56px);
}

.quick-give {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-give h2,
.section-heading h2,
.start-panel h2,
.impact h2,
.stories h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 4vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.amount-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.amount-row button {
  padding: 0 18px;
  background: var(--mint);
  color: var(--green-dark);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 22px;
}

.category-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.category-tabs button.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.campaign-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px rgba(20, 33, 43, 0.06);
}

.campaign-card img {
  height: 220px;
  object-fit: cover;
}

.campaign-body {
  padding: 18px;
}

.campaign-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eff7fa;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.campaign-card h3 {
  margin-bottom: 8px;
  font-size: 1.24rem;
  line-height: 1.22;
}

.campaign-card p {
  color: var(--muted);
  line-height: 1.55;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9efed;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.funding-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.91rem;
}

.campaign-card .primary-button {
  width: 100%;
}

.start-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.72fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
  background: var(--mint);
}

.start-panel p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.starter-form,
.modal-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

input,
select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.impact-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.impact-grid svg {
  color: var(--coral);
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
}

.impact-grid p,
.site-footer p {
  color: var(--muted);
  line-height: 1.6;
}

.stories {
  background: #f5f8f7;
}

.story-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.story-strip figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
}

.story-strip img {
  height: 250px;
  object-fit: cover;
}

.story-strip figcaption {
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  background: var(--ink);
  color: white;
}

.site-footer p {
  max-width: 460px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 14px 22px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.modal {
  width: min(520px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(20, 33, 43, 0.52);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.checkbox-label {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

.fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .campaign-grid,
  .impact-grid,
  .story-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 66px;
    padding: 12px 14px;
  }

  .ghost-button {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(6, 18, 16, 0.32), rgba(6, 18, 16, 0.88)),
      url("https://images.unsplash.com/photo-1593113598332-cd288d649433?auto=format&fit=crop&w=1200&q=85") center / cover;
  }

  .hero-content {
    width: calc(100% - 28px);
    margin: 0 14px 54px;
  }

  .hero-actions,
  .quick-give,
  .section-heading,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button,
  .starter-form .primary-button {
    width: 100%;
  }

  .hero-stats,
  .campaign-grid,
  .impact-grid,
  .story-strip {
    grid-template-columns: 1fr;
  }

  .quick-give,
  .tools-band,
  .start-panel,
  .impact,
  .stories,
  .site-footer {
    padding: 40px 14px;
  }

  .amount-row {
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-links {
    justify-content: flex-start;
  }
}
