:root {
  --background: #f7f4ec;
  --surface: #ffffff;
  --surface-muted: #ece7da;
  --primary: #1f6f5b;
  --primary-dark: #155243;
  --accent: #b86b2c;
  --ink: #18221e;
  --muted: #667069;
  --border: #d8d2c5;
  --dark: #13241f;
  --hero-overlay: linear-gradient(90deg, rgba(14, 24, 21, 0.84), rgba(14, 24, 21, 0.48) 52%, rgba(14, 24, 21, 0.12));
  --input-bg: #ffffff;
  --shadow: 0 18px 40px rgba(29, 37, 33, 0.08);
}

:root[data-theme="dark"] {
  --background: #101815;
  --surface: #18241f;
  --surface-muted: #22322c;
  --primary: #63b996;
  --primary-dark: #a7e2c8;
  --accent: #d8944a;
  --ink: #f3f0e7;
  --muted: #b6c3bb;
  --border: #314239;
  --dark: #0b1110;
  --hero-overlay: linear-gradient(90deg, rgba(6, 11, 10, 0.88), rgba(6, 11, 10, 0.58) 54%, rgba(6, 11, 10, 0.18));
  --input-bg: #101815;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: rgba(247, 244, 236, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

:root[data-theme="dark"] .site-header {
  background: rgba(16, 24, 21, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

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

.brand span:last-child {
  min-width: 0;
}

.brand small,
.muted {
  color: var(--muted);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

nav a {
  color: var(--primary-dark);
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
}

.nav-button,
.theme-toggle {
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary-dark);
}

.theme-toggle {
  min-height: 42px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 900;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  width: 100vw;
  min-height: min(760px, calc(100vh - 72px));
  margin-left: calc(50% - 50vw);
  padding: clamp(54px, 9vw, 112px) max(16px, calc((100vw - 1160px) / 2)) 46px;
  background:
    var(--hero-overlay),
    url("images/wayhouse-build-hero.jpg") center / cover;
  color: #fff;
  display: grid;
  align-content: center;
}

.hero .eyebrow,
.hero .hero-copy {
  color: #f1eee6;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 22px;
  font-size: clamp(44px, 8vw, 82px);
  line-height: 0.97;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.mission-band h2,
.cost-card h3,
.budget-band h3,
.engine-grid h3,
.facility-grid h3 {
  font-size: 22px;
  line-height: 1.12;
}

.hero-copy,
.beta-note,
.section-heading p,
.two-col p,
.give-section p,
.site-footer p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

.beta-note {
  max-width: 680px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 16px;
  font-weight: 800;
  color: var(--ink);
}

:root[data-theme="dark"] .beta-note {
  background: rgba(24, 36, 31, 0.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  color: var(--primary-dark);
}

.mission-band,
.journey-grid,
.engine-grid,
.facility-grid,
.budget-band,
.form-row,
.two-col,
.give-section {
  display: grid;
  gap: 16px;
}

.mission-band {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 42px;
}

.mission-band article,
.panel,
.journey-grid article,
.facility-grid article,
.budget-band,
.cost-card,
.engine-grid article {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.light-grid article {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.light-grid p {
  color: var(--muted);
}

.section {
  padding: 44px 0;
}

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

.journey-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.facility-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.budget-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--surface-muted);
}

.journey-grid span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  margin-bottom: 12px;
}

.journey-grid p,
.facility-grid p,
.budget-band p,
.engine-grid p,
.cost-card li {
  color: var(--muted);
  line-height: 1.45;
}

.two-col,
.give-section {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
  align-items: start;
}

.donation-stack {
  display: grid;
  gap: 16px;
}

.cost-card ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.dark-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 56px max(16px, calc((100vw - 1160px) / 2));
  background: var(--dark);
  color: #fff;
}

.dark-section .section-heading p,
.dark-section .engine-grid p {
  color: #d8e4df;
}

.visual-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.visual-band img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.engine-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.engine-grid article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

form {
  display: grid;
  gap: 16px;
}

.secure-note {
  border-left: 4px solid var(--accent);
  background: var(--surface-muted);
  color: var(--muted);
  margin-top: 18px;
  padding: 14px 16px;
  line-height: 1.45;
}

.form-intro,
.zeffy-embed-card p,
.payment-steps li {
  color: var(--muted);
  line-height: 1.45;
}

.form-intro {
  margin-bottom: 0;
  font-weight: 800;
}

.payment-steps {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.payment-steps h3 {
  margin-bottom: 10px;
}

.payment-steps ol {
  margin: 0;
  padding-left: 20px;
}

.payment-steps li {
  margin-bottom: 8px;
}

.payment-steps li:last-child {
  margin-bottom: 0;
}

.zeffy-embed-card {
  display: grid;
  gap: 14px;
}

.zeffy-frame {
  width: 100%;
  min-height: 760px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
}

.direct-donation-link {
  width: fit-content;
}

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

.compact-row {
  max-width: 220px;
}

label {
  color: var(--ink);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  padding: 12px 13px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--primary-dark);
  font-weight: 800;
}

.form-status.error {
  color: #b3261e;
}

.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 30px auto 0;
  border-top: 1px solid var(--border);
  padding: 28px 0 42px;
}

@media (max-width: 860px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
  }

  nav {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    overflow: visible;
    padding: 0;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 8px 7px;
    text-align: center;
    white-space: normal;
    font-size: 14px;
    line-height: 1.12;
  }

  .theme-toggle {
    align-self: center;
    justify-self: end;
  }

  main {
    width: min(100% - 28px, 1160px);
  }

  .hero {
    min-height: auto;
    padding: 48px 16px 38px;
    background-position: 58% center;
  }

  h1 {
    font-size: clamp(38px, 12vw, 56px);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.05;
  }

  h3 {
    font-size: 20px;
  }

  .hero-copy,
  .beta-note,
  .section-heading p,
  .two-col p,
  .give-section p,
  .site-footer p {
    font-size: 16px;
    line-height: 1.5;
  }

  .hero-actions .button {
    width: 100%;
  }

  .mission-band article,
  .panel,
  .journey-grid article,
  .facility-grid article,
  .budget-band,
  .cost-card,
  .engine-grid article {
    padding: 17px;
  }

  .mission-band,
  .journey-grid,
  .engine-grid,
  .facility-grid,
  .budget-band,
  .form-row,
  .two-col,
  .give-section,
  .visual-band {
    grid-template-columns: 1fr;
  }

  .zeffy-frame {
    min-height: 720px;
  }

  .direct-donation-link {
    width: 100%;
  }

  .section {
    padding: 34px 0;
  }
}

@media (max-width: 380px) {
  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
