@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Raleway:wght@600;700&display=swap');

/* ==========================================================================
   LCHP — Design Tokens
   ========================================================================== */
:root {
  /* Brand Colours */
  --color-primary: #7878B4;        /* Bluebell */
  --color-primary-dark: #62629E;   /* Bluebell (hover) */
  --color-secondary: #5F8A5F;      /* Meadow */
  --color-text: #3C3C4C;           /* Stone */
  --color-background: #F7F5F0;     /* Linen */
  --color-card: #E8EBF5;           /* Sky */
  --color-accent: #C9A8BF;         /* Petal */
  --color-white: #ffffff;

  /* Aliases used throughout page markup (previously undefined — kept as
     first-class tokens so both names always resolve) */
  --color-stone: var(--color-text);
  --color-sky: var(--color-card);

  /* Typography */
  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Fluid type scale — scales smoothly between 360px and 1200px viewports */
  --text-h1: clamp(2rem, 1.15rem + 3.8vw, 3rem);
  --text-h2: clamp(1.6rem, 1rem + 2.7vw, 2.5rem);
  --text-h3: clamp(1.35rem, 1rem + 1.6vw, 2rem);
  --text-h4: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  --text-hero: clamp(2.25rem, 1.2rem + 4.7vw, 4rem);
  --text-page-hero: clamp(2.1rem, 1.2rem + 4vw, 3.5rem);
  --text-lead: clamp(1.05rem, 1rem + 0.5vw, 1.25rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: clamp(3rem, 2rem + 5vw, 8rem); /* section rhythm, fluid */

  /* Layout */
  --max-width: 1200px;
  --border-radius: 8px; /* ROUND_EIGHT */
  --header-clearance: clamp(6.5rem, 5rem + 5vw, 9rem);

  /* Elevation */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.1);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Accessibility helpers */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 2000;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
  color: var(--color-white);
  text-decoration: none;
}

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

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p {
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: var(--text-lead);
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

::selection {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 0.5rem + 2.5vw, 2rem);
}

.container-narrow {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: var(--space-xl) 0;
}

.section-white  { background-color: var(--color-white); }
.section-sky    { background-color: var(--color-card); }

.section-meadow {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.section-meadow h2, .section-meadow p {
  color: var(--color-white);
}

.text-center { text-align: center; }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.text-stone { color: var(--color-stone); }

h2.text-stone, h3.text-stone, h4.text-stone { color: var(--color-stone); }

/* ==========================================================================
   Grid Layouts — desktop → tablet → mobile
   ========================================================================== */
.grid-2, .grid-3, .grid-4, .grid-5 {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

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

@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* Impact stats read better side-by-side even on phones */
@media (max-width: 820px) {
  .impact-stats .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .impact-stats .grid-3 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(120, 120, 180, 0.32);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-outline:hover {
  background-color: var(--color-white);
  color: var(--color-text);
}

.btn-outline-primary {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-light {
  background-color: var(--color-white);
  color: var(--color-text);
}

.btn-light:hover {
  background-color: var(--color-card);
  color: var(--color-text);
}

/* ==========================================================================
   Header — three independent floating elements: full logo top-left,
   nav pill centred, CTA top-right. Burger + frosted drawer on smaller
   screens. No full-width banner at any size.
   ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 84px; /* keeps elements vertically centred even when
                       the nav pill is out of flow (burger/drawer mode) */
  padding: 0.9rem clamp(1rem, 3vw, 2.5rem);
  background: transparent;
  pointer-events: none; /* only the floating elements themselves are clickable */
  transition: transform 0.35s var(--ease);
}

header > * {
  pointer-events: auto;
}

body.header-hidden header {
  transform: translateY(-130%);
}

/* Never hide the header while the mobile drawer is open */
body.mobile-menu-open header {
  transform: none;
}

/* --- Floating logo: bare two-state mark, top-left corner.
       White over dark hero imagery; crossfades to Stone once the header
       is compact (over light page content) or on light-hero pages. --- */
.floating-logo {
  display: grid;
  flex-shrink: 0;
  text-decoration: none;
}

.floating-logo:hover {
  text-decoration: none;
}

.floating-logo img {
  grid-area: 1 / 1;
  height: 54px;
  width: auto;
  transition: opacity 0.3s var(--ease), height 0.25s var(--ease);
}

body.header-compact .floating-logo img {
  height: 42px;
}

.logo-on-dark {
  opacity: 1;
  filter: drop-shadow(0 2px 10px rgba(20, 20, 30, 0.45));
}

.logo-on-light {
  opacity: 0;
}

body.header-compact .logo-on-dark,
body.hero-light .logo-on-dark {
  opacity: 0;
}

body.header-compact .logo-on-light,
body.hero-light .logo-on-light {
  opacity: 1;
}

/* --- Nav pill: links only, centred --- */
.nav-pill {
  margin: 0 auto;
  min-width: 0;
  padding: 0.45rem 0.5rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, 1.1vw, 1.4rem);
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  white-space: nowrap;
}

.nav-links .nav-active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Narrow-desktop band: tighten the nav so it stays on one line */
@media (min-width: 1201px) and (max-width: 1380px) {
  .nav-links {
    gap: 0.35rem;
  }

  .nav-links a {
    font-size: 0.92rem;
  }

  .floating-logo img {
    height: 46px;
  }
}

/* Desktop nav links: same ghost formatting as the corner CTA —
   white words over dark hero imagery, Stone over light content,
   frosted chip + glow on hover, soft chip marking the active page. */
@media (min-width: 1201px) {
  .nav-links a {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    color: var(--color-white);
    text-shadow: 0 1px 6px rgba(20, 20, 30, 0.45);
    transition: color 0.3s var(--ease), background-color 0.25s var(--ease),
      box-shadow 0.25s var(--ease), text-shadow 0.3s var(--ease);
  }

  .nav-links a:hover {
    text-decoration: none;
  }

  .nav-links .nav-active {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.18);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.4);
    color: var(--color-white);
  }

  body.header-compact .nav-links a,
  body.hero-light .nav-links a {
    color: var(--color-text);
    text-shadow: none;
  }

  body.header-compact .nav-links .nav-active,
  body.hero-light .nav-links .nav-active {
    color: var(--color-primary-dark);
    background: rgba(120, 120, 180, 0.14);
  }

  body.header-compact .nav-links a:hover,
  body.header-compact .nav-links a:focus-visible,
  body.hero-light .nav-links a:hover,
  body.hero-light .nav-links a:focus-visible {
    background: rgba(120, 120, 180, 0.14);
    box-shadow: 0 0 18px rgba(120, 120, 180, 0.5);
    color: var(--color-primary-dark);
  }
}

/* --- Floating CTA: top-right corner --- */
.floating-cta {
  flex-shrink: 0;
}

/* Two-state ghost CTA — floating words, same logic as the logo:
   white over dark hero imagery, Bluebell over light content. */
.floating-cta .btn {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  white-space: nowrap;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--color-white);
  text-shadow: 0 1px 6px rgba(20, 20, 30, 0.45);
  transition: color 0.3s var(--ease), background-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease), text-shadow 0.3s var(--ease),
    transform 0.2s var(--ease);
}

body.header-compact .floating-cta .btn,
body.hero-light .floating-cta .btn {
  color: var(--color-primary-dark);
  text-shadow: none;
}

/* Glow + soft background on hover / keyboard focus */
.floating-cta .btn:hover,
.floating-cta .btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.45);
  color: var(--color-white);
  transform: none;
}

body.header-compact .floating-cta .btn:hover,
body.header-compact .floating-cta .btn:focus-visible,
body.hero-light .floating-cta .btn:hover,
body.hero-light .floating-cta .btn:focus-visible {
  background: rgba(120, 120, 180, 0.14);
  box-shadow: 0 0 20px rgba(120, 120, 180, 0.55);
  color: var(--color-primary-dark);
}

/* Press state: fills solid for unmistakable feedback */
.floating-cta .btn:active,
body.header-compact .floating-cta .btn:active,
body.hero-light .floating-cta .btn:active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 0 24px rgba(120, 120, 180, 0.7);
  text-shadow: none;
  transform: translateY(1px);
}

/* The drawer CTA is hidden while the corner CTA is showing */
.nav-links .nav-cta-item {
  display: none;
}

/* --- Burger: bare floating lines, no chip --- */
.burger-menu {
  display: none;
  flex-shrink: 0;
  background: transparent;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: var(--border-radius);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px;
  z-index: 1005;
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--color-white);
  box-shadow: 0 1px 5px rgba(20, 20, 30, 0.45);
  transition: all 0.3s var(--ease);
}

body.header-compact .burger-menu span,
body.hero-light .burger-menu span,
body.mobile-menu-open .burger-menu span {
  background: var(--color-primary);
  box-shadow: none;
}

body.mobile-menu-open .burger-menu span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.mobile-menu-open .burger-menu span:nth-child(2) {
  opacity: 0;
}

body.mobile-menu-open .burger-menu span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile drawer & overlay (siblings of the pill — never trapped in
       its stacking context, so stacking and clicks work everywhere) --- */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 60, 76, 0.35);
  z-index: 1003;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

body.mobile-menu-open .mobile-overlay {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1200px) {
  /* The pill becomes an invisible passthrough — its child .nav-links turns
     into the fixed drawer. No backdrop-filter here, or it would become the
     drawer's containing block and trap it inside the header again. */
  .nav-pill,
  body.header-compact .nav-pill {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
    pointer-events: none;
  }

  .burger-menu {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(78vw, 320px);
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border-left: 1px solid rgba(255, 255, 255, 0.65);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 6rem 2rem 2rem;
    margin: 0;
    transform: translateX(105%);
    transition: transform 0.3s var(--ease);
    z-index: 1004;
    box-shadow: -5px 0 25px rgba(60, 60, 76, 0.18);
    overflow-y: auto;
    pointer-events: auto;
  }

  /* solid fallback for browsers without backdrop-filter */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav-links {
      background: rgba(247, 245, 240, 0.97);
    }
  }

  body.mobile-menu-open .nav-links {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-links .nav-cta-item {
    display: block;
    margin-top: var(--space-sm);
    width: 100%;
  }

  .nav-links .nav-cta-item .btn {
    display: block;
    width: 100%;
  }
}

/* --- Small screens: bare logo + bare burger only --- */
@media (max-width: 640px) {
  header {
    min-height: 64px;
    padding: 0.75rem 1rem;
  }

  .floating-logo img,
  body.header-compact .floating-logo img {
    height: 36px;
  }

  .floating-cta {
    display: none; /* CTA lives in the drawer */
  }
}

/* ==========================================================================
   Heroes — one system for every page
   ========================================================================== */
.hero,
.page-hero {
  text-align: center;
  padding: var(--header-clearance) 0 clamp(2.5rem, 2rem + 4vw, 4rem);
  background-color: var(--color-background);
}

.hero {
  padding: clamp(8rem, 6rem + 8vw, 12rem) 0 clamp(4rem, 3rem + 6vw, 8rem);
}

.hero h1 {
  font-size: var(--text-hero);
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.page-hero h1 {
  font-size: var(--text-page-hero);
}

.hero p,
.page-hero p {
  font-size: var(--text-lead);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.page-hero p:last-child {
  margin-bottom: 0;
}

/* Image variant — set the picture per page with:
   style="--hero-image: url('/images/example.jpg')" */
.hero,
.page-hero--image {
  background-color: var(--color-text); /* fallback while image loads */
  background-image:
    linear-gradient(rgba(56, 54, 74, 0.45), rgba(76, 74, 112, 0.68)),
    var(--hero-image, none);
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

.hero h1,
.page-hero--image h1 {
  color: var(--color-white);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background-color: var(--color-card);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.card-white {
  background-color: var(--color-white);
}

.gov-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  cursor: pointer;
}

.gov-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* Story cards */
.story-card {
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.story-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.story-card .card-content {
  padding: 1.5rem;
}

.pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Value / integration cards */
.value-card {
  text-align: center;
  padding: var(--space-md) 1.25rem;
}

.value-icon {
  width: 88px;
  height: 88px;
  background-color: var(--color-background);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--color-primary);
}

.value-icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.value-card .card-note {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--color-stone);
}

.integration-card {
  padding: var(--space-md);
  text-align: center;
  border-radius: var(--border-radius);
}

.integration-icon {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.integration-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* ==========================================================================
   Home page components
   ========================================================================== */
.scripture-strip {
  text-align: center;
  padding: 3rem 0;
}

.scripture-strip blockquote {
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem);
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.scripture-strip .accent-line {
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  margin: 1.5rem auto 0;
}

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

.stat-item h3 {
  font-size: clamp(2.2rem, 1.5rem + 3.5vw, 3.5rem);
  margin-bottom: 0.5rem;
}

.how-it-works {
  text-align: center;
}

.step-item {
  position: relative;
}

.step-icon {
  width: 80px;
  height: 80px;
  background-color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--color-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.step-icon svg {
  width: 40px;
  height: 40px;
}

/* Newsletter */
.newsletter-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  max-width: 500px;
  margin: 2rem auto 0;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
}

@media (max-width: 560px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* ==========================================================================
   Process diagram (What We Do)
   ========================================================================== */
.process-diagram {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 3rem 0;
  position: relative;
}

.process-diagram::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 10%;
  right: 10%;
  height: 2px;
  border-top: 2px dashed var(--color-secondary);
  z-index: 0;
}

.step-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.process-step {
  background-color: var(--color-white);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: var(--color-primary);
  font-weight: bold;
  font-size: 1.5rem;
}

.process-text {
  text-align: center;
  margin-top: 1rem;
  padding: 0 1rem;
}

@media (max-width: 820px) {
  .process-diagram {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .process-diagram::before {
    display: none;
  }
}

/* ==========================================================================
   Donation page
   ========================================================================== */
.toggle-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.toggle-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.toggle-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.donation-card {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-white);
  border: 2px solid var(--color-primary);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  text-align: center;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  cursor: pointer;
  color: inherit;
}

.donation-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.donation-card h3 {
  font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.5rem);
  margin-bottom: 0.5rem;
  transition: color 0.2s var(--ease);
}

.donation-card p {
  margin-bottom: 0;
}

.donation-card.selected,
.donation-card:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.donation-card.selected h3,
.donation-card:hover h3 {
  color: var(--color-white);
}

.donation-summary {
  text-align: center;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  min-height: 1.5rem;
}

.payment-form {
  max-width: 600px;
  margin: 0 auto;
}

.gift-aid-box {
  background-color: var(--color-card);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0;
}

.gift-aid-box input[type='checkbox'] {
  width: 24px;
  height: 24px;
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: var(--color-white);
  color: var(--color-text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(120, 120, 180, 0.25);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Inline demo-form feedback (replaces alert() popups) */
.form-feedback {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
}

.form-feedback.visible {
  display: block;
  animation: feedback-in 0.35s var(--ease);
}

.form-feedback--success {
  background-color: rgba(95, 138, 95, 0.15);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
}

.section-meadow .form-feedback--success {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  border-color: var(--color-white);
}

.form-feedback--note {
  background-color: rgba(120, 120, 180, 0.12);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   FAQ accordion (Contact)
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  cursor: pointer;
}

.faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--color-primary);
}

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

.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
  margin-right: 4px;
}

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

.faq-content {
  margin-top: 1rem;
  margin-bottom: 0;
  color: var(--color-stone);
  line-height: 1.6;
}

.faq-item[open] .faq-content {
  animation: faq-open 0.35s var(--ease);
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Page-specific sections
   ========================================================================== */
.pray-section {
  background-color: var(--color-secondary);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-xl) 0;
}

.pray-section h2,
.pray-section p {
  color: var(--color-white);
}

.prayer-box {
  background-color: rgba(255, 255, 255, 0.1);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  max-width: 500px;
  margin: 0 auto;
}

.prayer-box ul {
  text-align: left;
  margin: 1rem 0;
  padding-left: 1.5rem;
}

/* Full-width photo band (About) */
.photo-band {
  height: clamp(220px, 40vw, 500px);
  background-image: var(--band-image);
  background-size: cover;
  background-position: center;
}

@media (min-width: 1025px) and (hover: hover) {
  .photo-band {
    background-attachment: fixed; /* parallax on desktop only — janky/broken on iOS */
  }
}

/* Location banner (Contact) */
.location-banner {
  width: 100%;
  overflow: hidden;
  margin-top: 2rem;
}

.location-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 600px;
  object-fit: cover;
  object-position: center 20%;
}

@media (max-width: 640px) {
  .location-banner img {
    aspect-ratio: 4 / 3;
  }
}

/* Rounded content images */
.img-rounded {
  width: 100%;
  border-radius: var(--border-radius);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* ==========================================================================
   Footer — Stone panel: the pastel logo is designed for dark backgrounds,
   so this is where it finally shines.
   ========================================================================== */
footer {
  background-color: var(--color-stone);
  color: rgba(247, 245, 240, 0.78);
  padding: var(--space-lg) 0;
  border-top: 4px solid var(--color-primary);
}

footer p {
  color: rgba(247, 245, 240, 0.78);
}

footer strong {
  color: var(--color-white);
}

footer h4,
footer h4.text-stone {
  color: var(--color-white);
}

footer a,
footer .footer-links a {
  color: rgba(247, 245, 240, 0.85);
}

footer a:hover {
  color: var(--color-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.footer-logo {
  display: inline-block;
}

.footer-logo img {
  height: 116px;
  width: auto;
  margin-bottom: var(--space-sm);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(247, 245, 240, 0.16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .footer-logo img {
    height: 92px;
  }
}

/* ==========================================================================
   Scroll-reveal animation
   Elements are only hidden once JS confirms it is running (body.js-reveal),
   so content is never lost if JavaScript fails to load.
   ========================================================================== */
body.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

body.js-reveal [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Reduced motion — switch off all non-essential animation
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body.js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
