:root {
  --cream: #f7f3ed;
  --paper: #fffdf9;
  --ink: #1a1a18;
  --green: #1b4332;
  --green-mid: #2d6a4f;
  --green-soft: #d8ede3;
  --clay: #c0592a;
  --clay-soft: #f3e4d9;
  --gold: #b8860b;
  --muted: #5c5a54;
  --line: #ddd6cb;
  --max: 1140px;
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  opacity: 0;
  transition: opacity 0.25s ease;
}

body.page-ready {
  opacity: 1;
}

body.page-leave {
  opacity: 0;
}

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

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

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

/* Top bar */
.topbar {
  background: var(--green);
  color: #e8f5ef;
  font-size: 0.82rem;
  text-align: center;
  padding: 0.55rem 1rem;
}

.topbar a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 3px solid var(--clay);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--green);
}

.brand-tag {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--clay);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.nav a:hover,
.nav a.is-active {
  color: var(--clay);
}

.nav-donate {
  background: var(--clay);
  color: #fff !important;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
}

.nav-donate:hover {
  background: #a84d24;
  color: #fff !important;
}

.menu-toggle {
  display: none;
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 0.4rem 0.65rem;
  font-weight: 700;
  color: var(--green);
}

/* Typography */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.6rem;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  color: var(--green);
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 58ch;
}

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(27, 67, 50, 0.92) 0%, rgba(27, 67, 50, 0.45) 55%, rgba(27, 67, 50, 0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 0 3.5rem;
  max-width: 680px;
}

.hero-content h1 {
  color: #fff;
}

.hero-content .lead {
  color: #dceee6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.72rem 1.2rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-light {
  background: #fff;
  color: var(--green);
}

.btn-light:hover {
  background: var(--green-soft);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-clay {
  background: var(--clay);
  color: #fff;
}

.btn-clay:hover {
  background: #a84d24;
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: var(--green-mid);
}

/* Impact band */
.impact-band {
  background: var(--clay);
  color: #fff;
  padding: 2rem 0;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.impact-grid strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.impact-grid span {
  font-size: 0.85rem;
  opacity: 0.92;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
}

.section-head.center {
  text-align: center;
}

.section-head.center .lead {
  margin: 0 auto;
}

/* Photo mosaic */
.mosaic {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 0.6rem;
}

.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.mosaic .wide {
  grid-row: span 2;
}

/* Programme cards */
.programme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.programme-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.programme-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.programme-card-body {
  padding: 1.2rem 1.25rem 1.35rem;
  border-top: 4px solid var(--green);
}

.programme-card:nth-child(2) .programme-card-body {
  border-top-color: var(--clay);
}

.programme-card:nth-child(3) .programme-card-body {
  border-top-color: var(--gold);
}

.programme-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.split img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 4px solid var(--paper);
  box-shadow: 0 8px 30px rgba(27, 67, 50, 0.12);
}

.split.reverse {
  direction: rtl;
}

.split.reverse > * {
  direction: ltr;
}

/* Quote */
.quote-block {
  background: var(--green);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.quote-block blockquote {
  margin: 0 auto;
  max-width: 720px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.45;
  font-style: italic;
}

.quote-block cite {
  display: block;
  margin-top: 1rem;
  font-family: "Nunito", sans-serif;
  font-style: normal;
  font-size: 0.88rem;
  opacity: 0.85;
}

/* Office cards */
.office-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.office-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.office-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.office-card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.office-card h3 {
  margin-bottom: 0.35rem;
}

.office-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.table th {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.table tr:last-child td {
  border-bottom: none;
}

/* Info list */
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list strong {
  color: var(--green);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.5rem;
}

.form-panel,
.info-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
  margin-bottom: 0.85rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--green-mid);
  border-color: var(--green-mid);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-status {
  display: none;
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #b8dcc8;
}

/* Footer */
.site-footer {
  background: var(--green);
  color: #c8e6d8;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  color: #fff;
  font-family: "Playfair Display", serif;
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.footer-grid p,
.footer-grid a {
  font-size: 0.88rem;
  color: #c8e6d8;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  font-size: 0.78rem;
  color: #9ecfb8;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Page header (inner pages) */
.page-hero {
  background: var(--green-soft);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-bottom: 0.5rem;
}

@media (max-width: 960px) {
  .impact-grid,
  .programme-grid,
  .office-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .mosaic .wide {
    grid-row: span 1;
    grid-column: span 2;
  }

  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse {
    direction: ltr;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 118px;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.4rem 0;
  }

  .impact-grid,
  .programme-grid,
  .office-grid,
  .footer-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

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

  .mosaic .wide {
    grid-column: span 1;
  }

  .hero {
    min-height: 460px;
  }
}
