/* =========================================================
   Witheren Heights Buddhist Monastery — stylesheet
   Plain CSS, no build step, no framework. Organised by section:
   1. Design tokens
   2. Reset & base
   3. Layout helpers
   4. Typography
   5. Buttons & form controls
   6. Header & navigation
   7. Hero / page hero
   8. Cards (values, huts, donation, gallery)
   9. Sections (quote, stats, FAQ, testimonials/reflections)
   10. Footer
   11. Utilities (reveal-on-scroll, toast, back-to-top)
   12. Responsive tweaks
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light;

  /* brand palette (fixed — used for intentional accent panels) */
  --forest: #1f3a2e;
  --forest-dark: #142720;
  --moss: #557a5b;
  --cream: #f6f3ea;
  --sand: #dccfb8;
  --gold: #b68a3a;
  --gold-light: #d1a758;
  --charcoal: #26312b;

  /* semantic tokens (swap with theme) */
  --bg: var(--cream);
  --bg-soft: #efe6d3;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.62);
  --text: var(--charcoal);
  --text-muted: rgba(38, 49, 43, 0.72);
  --text-faint: rgba(38, 49, 43, 0.5);
  --border: rgba(31, 58, 46, 0.12);

  /* header is always dark (forest), independent of the light page theme */
  --header-bg: rgba(20, 39, 32, 0.92);
  --header-text: var(--cream);
  --header-text-muted: rgba(246, 243, 234, 0.78);
  --header-border: rgba(246, 243, 234, 0.12);

  --shadow-soft: 0 10px 40px -14px rgba(31, 58, 46, 0.22);
  --shadow-card: 0 4px 24px -10px rgba(38, 49, 43, 0.16);

  --radius-sm: 0.6rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 999px;

  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 420ms;
  --dur-slow: 900ms;

  --header-h: 4.75rem;
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--forest);
  letter-spacing: -0.01em;
}

p {
  color: var(--text-muted);
}

::selection {
  background: rgba(182, 138, 58, 0.32);
  color: var(--forest);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

main {
  flex: 1;
}

/* Respect reduced-motion: kill smooth scroll & shorten every transition/animation */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 2rem;
  }
}

.section {
  padding-block: clamp(3.5rem, 6vw, 6.5rem);
}

.section-soft {
  background: var(--bg-soft);
}

.grid {
  display: grid;
  gap: 1.75rem;
}

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

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

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

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.flow > * + * {
  margin-top: 1rem;
}

.stack {
  display: flex;
  flex-direction: column;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* ---------- 4. Typography ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--gold);
}

[data-tone="light"] .eyebrow {
  color: var(--sand);
}

.section-heading {
  max-width: 42rem;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin-top: 0.75rem;
}

.section-heading p {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
}

[data-tone="light"] .section-heading p {
  color: rgba(246, 243, 234, 0.85);
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  max-width: 46rem;
}

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

.italic-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--cream);
}

/* ---------- 5. Buttons & form controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  text-align: center;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gold);
  color: var(--forest);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--gold-light);
}

.btn-secondary {
  background: var(--forest);
  color: var(--cream);
  box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
  background: var(--forest-dark);
}

.btn-outline {
  border-color: rgba(246, 243, 234, 0.55);
  color: var(--cream);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(246, 243, 234, 0.12);
}

.btn-outline-forest {
  border-color: rgba(31, 58, 46, 0.3);
  color: var(--forest);
  background: transparent;
}

.btn-outline-forest:hover {
  background: rgba(31, 58, 46, 0.06);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.6rem 1.15rem;
  font-size: 0.82rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.field .required {
  color: var(--gold);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  font-size: 0.94rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(85, 122, 91, 0.18);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #c0503f;
}

.field-error {
  font-size: 0.8rem;
  color: #c0503f;
}

.field-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- 6. Header & navigation ----------
   The header (and its mobile menu) is intentionally always dark
   (forest), regardless of the page's light theme — a fixed brand band
   rather than something that switches with a theme toggle. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--header-border);
  transition: box-shadow var(--dur-fast) var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--header-border), 0 12px 24px -20px rgba(0, 0, 0, 0.35);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--moss));
  transition: width 80ms linear;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.logo-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--header-text);
}

.logo-sub {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
}

.main-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.main-nav ul {
  display: flex;
  gap: 1.85rem;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--header-text-muted);
  position: relative;
  padding-block: 0.3rem;
  transition: color var(--dur-fast) var(--ease);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transition: right var(--dur-med) var(--ease);
}

.main-nav a:hover {
  color: var(--header-text);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
}

.main-nav a[aria-current="page"] {
  color: var(--header-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* On narrow phones the logo + donate pill + hamburger don't all fit on
   one line, which forces horizontal overflow. Hide the header's donate
   pill here and rely on the hamburger instead — the same "Make a
   Donation" button already reappears, full-width, inside the open
   mobile menu (see .mobile-nav .btn below), so nothing is lost. */
@media (max-width: 639.98px) {
  .header-actions .btn {
    display: none;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--header-text);
}

.nav-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--header-border);
  background: var(--forest-dark);
}

.mobile-nav .container {
  padding-bottom: 1.5rem;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  padding-block: 0.75rem;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--header-border);
  color: var(--header-text);
}

.mobile-nav a[aria-current="page"] {
  color: var(--gold-light);
}

.mobile-nav .btn {
  margin-top: 1rem;
}

/* Extra breathing room on the smallest phones, where even logo +
   hamburger alone can run tight. */
@media (max-width: 380px) {
  .header-inner {
    gap: 0.75rem;
  }
  .logo {
    gap: 0.55rem;
  }
  .logo-mark {
    width: 38px;
    height: 38px;
  }
  .logo-sub {
    display: none;
  }
}

@media (min-width: 1024px) {
  .main-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* ---------- 7. Hero / page hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 39, 32, 0.82) 0%, rgba(31, 58, 46, 0.6) 45%, rgba(16, 28, 21, 0.88) 100%);
}

.hero-content {
  max-width: 40rem;
  padding-block: 6rem 4rem;
}

.hero-content .eyebrow {
  color: var(--sand);
}

.hero-content h1 {
  color: var(--cream);
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  margin-top: 1rem;
}

.hero-content p {
  color: rgba(246, 243, 234, 0.88);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  margin-top: 1.5rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(246, 243, 234, 0.75);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-scroll-cue svg {
  width: 1.1rem;
  height: 1.1rem;
  animation: bounce 2.2s var(--ease) infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

.page-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.page-hero .hero-content {
  padding-block: 4rem 3.5rem;
  max-width: 42rem;
}

.page-hero h1 {
  color: var(--cream);
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  margin-top: 0.75rem;
}

.page-hero p {
  color: rgba(246, 243, 234, 0.88);
  margin-top: 1rem;
  max-width: 36rem;
}

/* ---------- 8. Cards ---------- */
.card {
  background: var(--surface-glass);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.9rem;
}

.value-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.icon-badge {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: rgba(31, 58, 46, 0.1);
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-badge svg {
  width: 1.4rem;
  height: 1.4rem;
}

.value-card h3 {
  font-size: 1.2rem;
}

.hut-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.hut-card figure {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hut-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.hut-card:hover img {
  transform: scale(1.045);
}

.hut-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hut-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hut-card-title h3 {
  font-size: 1.35rem;
}

.hut-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hut-card-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hut-card-list svg {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--gold);
  flex-shrink: 0;
}

.donation-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.donation-card.is-featured {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}

.donation-card.is-featured h3,
.donation-card.is-featured p {
  color: var(--cream);
}

.donation-card.is-featured .icon-badge {
  background: rgba(246, 243, 234, 0.16);
  color: var(--gold-light);
}

.donation-card .badge {
  position: absolute;
  top: -0.7rem;
  right: 1.5rem;
  background: var(--gold);
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.contact-card .label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-card .value {
  font-size: 0.95rem;
  word-break: break-word;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 1 / 1;
  border: none;
  padding: 0;
  background: var(--surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 39, 32, 0.55) 100%);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item .gallery-caption {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.75rem;
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  text-align: left;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 18, 14, 0.9);
}

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

.lightbox figure {
  max-width: 46rem;
  width: 100%;
}

.lightbox img {
  width: 100%;
  border-radius: var(--radius-md);
  max-height: 72vh;
  object-fit: contain;
  background: var(--forest-dark);
}

.lightbox figcaption {
  color: var(--sand);
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: rgba(246, 243, 234, 0.12);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.lightbox-close svg {
  width: 1.3rem;
  height: 1.3rem;
}

/* ---------- 9. Sections: stats, quote, FAQ, reflections ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--forest);
}

.stat-label {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.quote-section {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 9vw, 8rem);
  isolation: isolate;
}

.quote-section .hero-media img {
  filter: saturate(0.9);
}

.quote-section .hero-overlay {
  background: rgba(20, 39, 32, 0.8);
}

.quote-carousel {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
  position: relative;
  min-height: 9rem;
}

.quote-slide {
  display: none;
}

.quote-slide.is-active {
  display: block;
  animation: fade-in var(--dur-slow) var(--ease);
}

.quote-slide p {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.quote-slide footer {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}

.quote-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.quote-dots button {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(246, 243, 234, 0.35);
  border: none;
  padding: 0;
}

.quote-dots button.is-active {
  background: var(--gold);
  width: 1.4rem;
  border-radius: var(--radius-full);
  transition: width var(--dur-fast) var(--ease);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FAQ accordion — native <details>, zero JS */
.faq-list {
  max-width: 44rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 1.5rem;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .chevron {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform var(--dur-fast) var(--ease);
}

.faq-item[open] summary .chevron {
  transform: rotate(180deg);
}

.faq-item p {
  padding-bottom: 1.2rem;
  font-size: 0.94rem;
}

/* Reflections (traditional sayings, not testimonials) */
.reflections-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .reflections-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.reflection-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reflection-card .quote-mark {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
}

.reflection-card p.reflection-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
}

.reflection-card .reflection-source {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Amount selector (Support page) */
.amount-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.amount-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.amount-btn {
  border-radius: var(--radius-full);
  padding: 0.85rem 1.6rem;
  font-weight: 700;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--forest);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.amount-btn:hover {
  background: rgba(31, 58, 46, 0.06);
}

.amount-btn.is-selected {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--forest);
  box-shadow: var(--shadow-soft);
}

.custom-amount-field {
  display: flex;
  align-items: center;
  max-width: 16rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.custom-amount-field span {
  padding-left: 1rem;
  color: var(--text-faint);
}

.custom-amount-field input {
  border: none;
  background: transparent;
  padding: 0.8rem;
  width: 100%;
  outline: none;
  color: var(--text);
  font: inherit;
}

.donate-hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  max-width: 22rem;
  text-align: center;
}

/* Impact / where funds go */
.impact-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .impact-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.impact-card {
  text-align: center;
  gap: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.impact-card .icon-badge {
  margin-inline: auto;
}

/* CTA banner */
.cta-banner {
  background: var(--forest);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* Map placeholder */
.map-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 2rem;
}

.map-placeholder svg {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--moss);
}

.map-placeholder p {
  max-width: 18rem;
  font-size: 0.85rem;
}

/* Success / toast */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 3rem 1.5rem;
  background: rgba(85, 122, 91, 0.08);
  border-radius: var(--radius-lg);
}

.form-success svg {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--moss);
}

.form-success h3 {
  font-size: 1.4rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 1rem);
  background: var(--forest);
  color: var(--cream);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-soft);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--gold-light);
  flex-shrink: 0;
}

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--forest);
  color: var(--cream);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 4rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

.footer-about p {
  color: rgba(246, 243, 234, 0.75);
  max-width: 22rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.footer-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(246, 243, 234, 0.8);
  transition: color var(--dur-fast) var(--ease);
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: rgba(246, 243, 234, 0.82);
  margin-bottom: 0.7rem;
}

.footer-contact svg {
  width: 1rem;
  height: 1rem;
  color: var(--gold-light);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(246, 243, 234, 0.25);
  background: rgba(246, 243, 234, 0.08);
  color: var(--cream);
  font: inherit;
  font-size: 0.85rem;
  outline: none;
}

.newsletter-form input::placeholder {
  color: rgba(246, 243, 234, 0.5);
}

.newsletter-form input:focus {
  border-color: var(--gold);
}

.newsletter-note {
  margin-top: 0.6rem;
  font-size: 0.76rem;
  color: rgba(246, 243, 234, 0.6);
}

.footer-bottom {
  border-top: 1px solid rgba(246, 243, 234, 0.12);
  padding-block: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(246, 243, 234, 0.6);
}

.footer-bottom .closing {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--sand);
}

/* ---------- 11. Utilities ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: var(--radius-full);
  background: var(--forest);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  z-index: 55;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 1.2rem;
  height: 1.2rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--forest);
  color: var(--cream);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

.divider {
  height: 1px;
  background: var(--border);
  border: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 12. Misc responsive ---------- */
@media (min-width: 1024px) {
  .split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
  .split.reverse .split-media {
    order: 2;
  }
}

.split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
  margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  .split-media {
    margin-bottom: 0;
  }
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
