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

:root {
  --red: #E0001B;
  --red-deep: #9F0014;
  --red-soft: #FFECEF;
  --white: #FFFFFF;
  --ivory: #FFF9F5;
  --ink: #211719;
  --muted: #6C5B5F;
  --green: #2F6F5E;
  --green-soft: #E8F3EF;
  --gold: #D6A84F;
  --gold-soft: #FFF4D8;
  --blue: #175B7A;
  --blue-soft: #DDF2FF;
  --line: rgba(33, 23, 25, 0.12);
  --shadow: 0 20px 55px rgba(54, 26, 30, 0.12);
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Arial, Helvetica, sans-serif;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: 82px;
  padding: 8px clamp(16px, 5vw, 72px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand img { width: 160px; height: 62px; object-fit: contain; }
.site-nav, .nav-links, .nav-actions { display: flex; align-items: center; }
.site-nav { gap: 22px; color: var(--muted); font-size: 0.92rem; font-weight: 800; }
.nav-links { gap: 22px; }
.nav-actions { gap: 10px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--red); }
.nav-menu { position: relative; }
.nav-menu > button {
  display: inline-flex;
  padding: 12px 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: none;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}
.nav-menu > button::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.dropdown {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  z-index: 60;
  display: grid;
  min-width: 220px;
  padding: 8px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}
.dropdown a { padding: 11px 12px; color: var(--ink); border-radius: 6px; white-space: nowrap; }
.dropdown a:hover, .dropdown a:focus-visible { color: var(--red); background: var(--red-soft); outline: none; }
.nav-menu:hover .dropdown, .nav-menu:focus-within .dropdown, .nav-menu.is-open .dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.header-action {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  color: var(--blue) !important;
  background: var(--blue-soft);
  border-radius: 7px;
}
.nav-donate {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  color: var(--white) !important;
  background: var(--red);
  border-radius: 7px;
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 118px) 0;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -160px;
  width: 380px;
  height: 380px;
  border: 65px solid rgba(224, 0, 27, 0.06);
  border-radius: 50%;
}
.breadcrumbs { margin-bottom: 22px; color: var(--muted); font-size: 0.86rem; font-weight: 800; }
.breadcrumbs a { color: var(--red); text-decoration: none; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--red); }
.page-hero h1 {
  max-width: 850px;
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
}
.page-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.75; }

.section { padding: clamp(58px, 8vw, 96px) 0; }
.section.soft { background: var(--ivory); }
.section.blue { background: #EAF6FC; }
.section.red-soft { background: var(--red-soft); }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading h2 { margin: 0 0 14px; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; }
.section-heading p, .prose p { color: var(--muted); line-height: 1.75; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(34px, 7vw, 82px); align-items: center; }
.editorial-image { min-height: 430px; overflow: hidden; border-radius: 8px; box-shadow: var(--shadow); }
.editorial-image img { width: 100%; height: 100%; object-fit: cover; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature, .resource, .person, .project, .news-card {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(33, 23, 25, 0.05);
}
.feature i, .resource i {
  display: inline-grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  place-items: center;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 50%;
  font-size: 1.25rem;
}
.feature h3, .resource h3, .person h3, .project h3, .news-card h3 { margin: 0 0 10px; }
.feature p, .resource p, .person p, .project p, .news-card p { margin: 0; color: var(--muted); line-height: 1.65; }

.button {
  display: inline-flex;
  min-height: 46px;
  padding: 0 19px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 7px;
  font-weight: 900;
  text-decoration: none;
}
.button.secondary { color: var(--red); background: var(--white); }
.button.blue { color: var(--white); background: var(--blue); border-color: var(--blue); }
.text-link { color: var(--red); font-weight: 900; text-decoration: none; }
.text-link::after { content: " \2192"; }

.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.person { min-height: 245px; border-top: 4px solid var(--red); }
.person-role { display: block; margin-bottom: 24px; color: var(--green); font-size: 0.78rem; font-weight: 900; text-transform: uppercase; }
.person-avatar { display: grid; width: 64px; height: 64px; margin-bottom: 20px; place-items: center; color: var(--red); background: var(--red-soft); border-radius: 50%; font-size: 1.6rem; }

.resource-grid, .news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.resource { display: flex; min-height: 260px; flex-direction: column; }
.resource .text-link { margin-top: auto; padding-top: 22px; }
.project { border-top: 4px solid var(--red); }
.project-image {
  width: calc(100% + 52px);
  height: 240px;
  margin: -26px -26px 24px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tag { padding: 7px 10px; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 0.76rem; font-weight: 900; }
.funding-list { display: grid; gap: 8px; margin: 18px 0 24px; padding: 0; list-style: none; color: var(--muted); }
.funding-list li::before { content: "\2713"; margin-right: 8px; color: var(--red); font-weight: 900; }

.news-card { min-height: 250px; overflow: hidden; }
.news-card-image {
  width: calc(100% + 52px);
  height: 170px;
  margin: -26px -26px 22px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.news-label { display: block; margin-bottom: 18px; color: var(--red); font-size: 0.76rem; font-weight: 900; text-transform: uppercase; }

.form-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr); gap: 40px; align-items: start; }
.form-card { padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.86rem; font-weight: 900; }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(33, 23, 25, 0.2);
  border-radius: 6px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red); outline: 3px solid rgba(224, 0, 27, 0.1); }
.contact-list { display: grid; gap: 18px; }
.contact-item { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
.contact-item i { display: grid; width: 42px; height: 42px; place-items: center; color: var(--red); background: var(--red-soft); border-radius: 50%; }
.contact-item strong { display: block; margin-bottom: 4px; }
.contact-item p { margin: 0; color: var(--muted); line-height: 1.55; }
.map { width: 100%; min-height: 420px; border: 0; }
.notice { padding: 18px; color: var(--red-deep); background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 0 6px 6px 0; line-height: 1.6; }

.demo-banner {
  margin-bottom: 24px;
  padding: 14px 16px;
  color: #6B4C0E;
  background: var(--gold-soft);
  border: 1px solid rgba(214, 168, 79, 0.45);
  border-radius: 7px;
  font-weight: 800;
  line-height: 1.55;
}
.donation-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .75fr); gap: 34px; align-items: start; }
.giving-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
.giving-switch label, .amount-choice label {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}
.giving-switch label:has(input:checked), .amount-choice label:has(input:checked) {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red);
}
.giving-switch input, .amount-choice input { accent-color: var(--red); }
.amount-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.payment-method {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.payment-method i { display: inline-grid; width: 44px; height: 44px; margin-bottom: 16px; place-items: center; color: var(--red); background: var(--red-soft); border-radius: 50%; }
.payment-method h3 { margin: 0 0 10px; }
.payment-method p { margin: 0; color: var(--muted); line-height: 1.65; }
.demo-account { display: block; margin-top: 12px; padding: 10px; color: var(--ink); background: var(--ivory); border-radius: 5px; font-family: Consolas, monospace; font-size: .86rem; }
.donation-result { display: none; margin-top: 16px; }
.donation-result.is-visible { display: block; }

.site-footer { color: rgba(255,255,255,.75); background: var(--ink); border-top: 5px solid var(--red); }
.footer-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 62px 0 42px; }
.footer-grid { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(150px, .7fr)) minmax(240px, 1fr); gap: clamp(28px, 5vw, 64px); }
.footer-grid h2 { color: var(--white); font-size: .86rem; text-transform: uppercase; }
.footer-grid p { line-height: 1.65; }
.footer-brand { max-width: 350px; }
.footer-brand > strong { display: block; margin-bottom: 14px; color: var(--white); font-size: 1.45rem; }
.footer-column h2 { margin-bottom: 16px; letter-spacing: .08em; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: rgba(255,255,255,.75); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.socials, .social-links { display: flex; gap: 9px; margin-top: 32px; }
.socials a, .social-links a { display: grid; width: 42px; height: 42px; place-items: center; color: var(--white); border: 1px solid rgba(255,255,255,.2); border-radius: 50%; text-decoration: none; }
.footer-contact { display: grid; gap: 13px; }
.footer-contact .contact-line { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.footer-contact .contact-line > i { display: grid; width: 32px; height: 32px; place-items: center; color: var(--gold); border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.footer-contact strong { display: block; margin-bottom: 4px; color: var(--white); font-size: .76rem; text-transform: uppercase; }
.footer-contact a { color: rgba(255,255,255,.75); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: .86rem; }
.footer-bottom p { margin: 0; }

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 850ms ease, transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .motion-ready .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 980px) {
  .site-header { gap: 12px; }
  .menu-toggle { display: grid; order: 3; }
  .site-nav {
    position: static;
    display: flex;
    padding: 0;
    align-items: center;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-links { display: none; }
  .site-header.menu-open .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    display: grid;
    gap: 0;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }
  .site-header.menu-open .nav-menu > button { width: 100%; padding: 12px; justify-content: space-between; }
  .site-header.menu-open .dropdown {
    position: static;
    display: none;
    min-width: 0;
    margin-bottom: 6px;
    padding: 4px 8px;
    visibility: visible;
    opacity: 1;
    transform: none;
    background: var(--ivory);
    box-shadow: none;
  }
  .site-header.menu-open .nav-menu.is-open .dropdown { display: grid; }
  .nav-actions { margin-left: auto; }
  .dropdown a { padding: 10px; }
  .split, .bcocd-layout, .form-layout, .donation-layout { grid-template-columns: 1fr; }
  .feature-grid, .resource-grid, .project-grid, .news-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .brand img { width: 88px; height: 46px; }
  .site-header.menu-open .nav-links { left: 10px; right: 10px; }
  .nav-actions { gap: 6px; }
  .header-action, .nav-donate { min-height: 38px; padding: 0 9px !important; font-size: .8rem; }
  .page-hero h1 { font-size: 2.45rem; }
  .feature-grid, .resource-grid, .project-grid, .news-grid, .team-grid, .form-grid, .footer-grid, .payment-grid { grid-template-columns: 1fr; }
  .amount-choice { grid-template-columns: 1fr; }
  .editorial-image { min-height: 320px; }
  .form-card { padding: 20px; }
  .footer-bottom { flex-direction: column; }
}
