:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17191c;
  --muted: #63686f;
  --line: rgba(23, 25, 28, 0.12);
  --brand: #0d7c66;
  --brand-dark: #064e42;
  --accent: #d84f31;
  --gold: #c38b2f;
  --shadow: 0 24px 80px rgba(31, 35, 43, 0.12);
}

body.dark {
  color-scheme: dark;
  --bg: #101214;
  --surface: #181b1e;
  --surface-strong: #202429;
  --ink: #f4f1ea;
  --muted: #aeb5bd;
  --line: rgba(244, 241, 234, 0.14);
  --brand: #4fc4a8;
  --brand-dark: #8be0ca;
  --accent: #ff805d;
  --gold: #e7b45e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(13, 124, 102, 0.08), transparent 360px),
    var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.top-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.icon-button,
.filter-pill {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
}

.icon-button svg,
.primary-action svg,
.secondary-action svg,
.search-box svg,
.feature-card svg {
  width: 18px;
  height: 18px;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  min-height: 720px;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-areas: "panel content";
  align-items: start;
  gap: 24px;
  padding: 104px clamp(18px, 5vw, 72px) 34px;
}

.hero-media {
  position: absolute;
  inset: 18px clamp(12px, 3vw, 38px) 0;
  z-index: -2;
  overflow: hidden;
  border-radius: 8px;
  background: #0f0f10;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-content {
  grid-area: content;
  justify-self: end;
  align-self: start;
  max-width: 860px;
  color: #fffdf8;
  text-align: right;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.72);
}

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

.hero h1,
.section-heading h2,
.support h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 5.8vw, 78px);
  font-weight: 900;
}

.hero-copy {
  max-width: 620px;
  margin: 22px 0 0;
  margin-left: auto;
  color: rgba(255, 253, 248, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-action {
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
}

.secondary-action {
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-panel {
  grid-area: panel;
  align-self: end;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.12);
  color: #fffdf8;
  backdrop-filter: blur(18px);
}

.hero-panel span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.hero-panel strong {
  display: block;
  margin-top: 14px;
  font-size: 24px;
  line-height: 1.25;
}

.hero-panel p {
  margin: 12px 0 0;
  color: rgba(255, 253, 248, 0.78);
  line-height: 1.7;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 1160px;
  margin: 42px auto 0;
  padding: 0 18px;
}

.metrics div {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1;
}

.metrics span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.featured-section,
.library-section,
.support {
  max-width: 1160px;
  margin: 92px auto 0;
  padding: 0 18px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.support h2 {
  font-size: clamp(32px, 4vw, 54px);
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 0.85fr;
  gap: 16px;
}

.feature-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-card.large {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  color: #fff;
}

.feature-card.large::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 55%);
}

.feature-card.large img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card.large div {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: end;
}

.feature-card svg {
  width: 34px;
  height: 34px;
  color: var(--brand);
}

.feature-card span,
.resource-card .tag,
.donation-card span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.feature-card h3,
.resource-card h3 {
  margin: 18px 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.feature-card p,
.resource-card p,
.support p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.search-box input {
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-pill {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
}

.filter-pill.active,
.filter-pill:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  color: var(--brand-dark);
}

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

.resource-card {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.resource-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  box-shadow: var(--shadow);
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.resource-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.resource-footer a {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}

.status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 28px;
  margin-bottom: 80px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.support > div:first-child {
  max-width: 660px;
}

.donation-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.donation-card strong {
  display: block;
  margin-top: 18px;
  font-size: 24px;
}

.donation-card p {
  color: var(--muted);
  line-height: 1.7;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 16px;
}

.payment-grid figure {
  margin: 0;
}

.payment-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.payment-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.support-note {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 0 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  color: var(--brand-dark);
  font-weight: 900;
}

.support-note svg {
  width: 18px;
  height: 18px;
}

.qr-placeholder {
  display: grid;
  width: min(220px, 100%);
  aspect-ratio: 1;
  place-items: center;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--ink) 12px, transparent 12px) 16px 16px / 32px 32px no-repeat,
    linear-gradient(var(--ink) 12px, transparent 12px) 16px 16px / 32px 32px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(0deg, transparent 0 8px, color-mix(in srgb, var(--ink) 12%, transparent) 8px 10px),
    var(--surface-strong);
}

.qr-placeholder div {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 36%, var(--surface-strong) 36% 64%, transparent 64%),
    linear-gradient(0deg, transparent 36%, var(--surface-strong) 36% 64%, transparent 64%),
    var(--ink);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

  .hero {
    min-height: 760px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "panel";
    padding-top: 86px;
  }

  .hero-content {
    justify-self: start;
    text-align: left;
  }

  .hero-copy {
    margin-left: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-panel {
    max-width: 440px;
  }

  .metrics,
  .feature-grid,
  .resource-grid,
  .support {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card.large,
  .support > div:first-child {
    grid-column: 1 / -1;
  }

  .section-heading.split {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 14px;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 700px;
    padding: 78px 18px 24px;
  }

  .hero-media {
    inset: 0;
    border-radius: 0;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .metrics,
  .feature-grid,
  .resource-grid,
  .support {
    grid-template-columns: 1fr;
  }

  .metrics {
    margin-top: 24px;
  }

  .featured-section,
  .library-section,
  .support {
    margin-top: 64px;
  }

  .site-footer {
    flex-direction: column;
  }

  .payment-grid {
    grid-template-columns: 1fr;
  }
}
