/* ==========================================================================
   Eluri Lakshmi Devi Charitable Trust
   Shared stylesheet for all pages.

   Tailwind utilities handle one-off layout in the markup. Everything that
   repeats across pages — the masthead, navigation, page banners, cards,
   tables, forms, the footer — lives here as a named component class so the
   eight pages stay visually identical.

   Contents
     1.  Tokens
     2.  Base & typography
     3.  Utility bar + masthead + navigation
     4.  Mobile drawer
     5.  Buttons
     6.  Page banner & breadcrumbs
     7.  Section furniture
     8.  Cards, lists, statistics
     9.  Tables
     10. Accordion
     11. Gallery & lightbox
     12. Forms
     13. Footer
     14. Motion, print, reduced motion
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
  --brand: #8B2A28;
  --brand-700: #6F1F1E;
  --brand-800: #541616;
  --brand-900: #3C1010;
  --brand-100: #F4E8E0;
  --brand-200: #E8CDBF;
  --mint: #FBF6EE;
  --gold: #C4A035;
  --ink: #2C1814;
  --rule: #E8DDD4;          /* hairline borders */
  --ease: cubic-bezier(0.25, 0.8, 0.3, 1);
  --masthead-h: 5.25rem;
  --subnav-h: 2.75rem;
  --page-hero-h: 20rem;
}

/* -------------------------------------------------------------------------
   2. Base & typography
   ------------------------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--masthead-h) + var(--subnav-h));
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  color: #5A433A;
  background: #fff;
}

/* Keep every full-width band flush with the screen. */
body > header,
body > main,
body > footer,
.masthead,
.hero,
.page-hero,
.hero-bar,
.site-footer {
  width: 100%;
  max-width: 100%;
}

/* A closed menu must not widen the page and leave a white strip. */
#drawer[aria-hidden="true"] {
  visibility: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: -0.012em;
}

.bg-brand-900 h1,
.bg-brand-900 h2,
.bg-brand-900 h3,
.bg-brand-900 h4 {
  color: #fff;
}

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
}

/* Body links inside prose */
.prose-link {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--brand-200);
  transition: text-decoration-color 0.2s ease;
}
.prose-link:hover { text-decoration-color: var(--brand); }

/* -------------------------------------------------------------------------
   3. Utility bar + masthead + navigation
   ------------------------------------------------------------------------- */

/* Thin band above the masthead: registration, phone, office hours */
.utility-bar {
  background: var(--brand-900);
  color: #F0D9C8;
  font-size: 0.78rem;
}
.utility-bar a { color: #F8EDE4; transition: color 0.2s ease; }
.utility-bar a:hover { color: #fff; }

.utility-sep {
  width: 1px;
  height: 0.85rem;
  background: rgba(255, 255, 255, 0.22);
}

/* Masthead sticks once the utility bar has scrolled away */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--masthead-h);
  background: #FBF8F3;
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.25s ease;
}
.masthead > div { height: 100%; }
.masthead.is-stuck { box-shadow: 0 6px 20px -14px rgba(44, 24, 20, 0.55); }

/* Official circular seal */
.seal {
  display: block;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--gold);
}
.seal--sm {
  width: 2.7rem;
  height: 2.7rem;
}

/* Emblem + wordmark */
.wordmark-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
.wordmark-sub {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--brand-700);
}

/* Primary navigation */
.masthead nav[aria-label="Primary"] {
  align-self: stretch;
  height: 100%;
}
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  height: 100%;
  padding: 0 0.7rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s ease;
}
.nav-item:hover { color: var(--brand); }

/* Current page gets a solid rule beneath it */
.nav-item::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: -1px;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-item.is-current { color: var(--brand-700); font-weight: 600; }
.nav-item.is-current::after { transform: scaleX(1); }

/* Eight items need a slightly tighter measure before the wide desktop. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav-item { padding: 0 0.42rem; font-size: 0.8125rem; }
  .nav-item::after { left: 0.42rem; right: 0.42rem; }
}

/* -------------------------------------------------------------------------
   4. Mobile drawer
   ------------------------------------------------------------------------- */
.hamburger { position: relative; display: block; width: 20px; height: 14px; }
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.32s var(--ease), opacity 0.18s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 6px; }
.hamburger span:nth-child(3) { top: 12px; }
.is-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.is-open .hamburger span:nth-child(2) { opacity: 0; }
.is-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.drawer-link.is-current { color: var(--brand-700); font-weight: 600; }

/* -------------------------------------------------------------------------
   5. Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 0.4rem;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, box-shadow 0.22s ease;
}
.btn svg { flex: none; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }

.btn--outline { border-color: #D4C4B8; color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--brand); color: var(--brand-700); background: var(--mint); }

.btn--onDark {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}
.btn--onDark:hover {
  background: #fff;
  color: var(--brand-800);
  border-color: #fff;
}

.btn--lg { padding: 0.9rem 1.7rem; font-size: 0.95rem; }
.btn--block { width: 100%; }

/* -------------------------------------------------------------------------
   6. Page banner & breadcrumbs
   ------------------------------------------------------------------------- */
/* Inner-page heroes: a photograph, a warm maroon scrim, type set over it.
   Shorter than the home hero so the page itself begins without a long scroll. */
.page-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  height: var(--page-hero-h);
  min-height: var(--page-hero-h);
  max-height: var(--page-hero-h);
  overflow: hidden;
  background: #2A1010;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.page-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(42, 16, 16, 0.28) 0%, rgba(42, 16, 16, 0.12) 38%, rgba(42, 16, 16, 0.78) 100%),
    linear-gradient(102deg, rgba(42, 16, 16, 0.86) 0%, rgba(42, 16, 16, 0.5) 46%, rgba(42, 16, 16, 0.16) 100%);
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(196, 160, 53, 0.15) 70%, transparent 100%);
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; width: 100%; padding-top: 2.75rem; padding-bottom: 2.25rem; }
.page-hero h1,
.page-hero .about-banner-lines { color: #fff; text-shadow: 0 2px 22px rgba(28, 10, 10, 0.4); }
.page-hero-lead {
  max-width: 36rem;
  margin-top: 1rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #F3E4D8;
}

.page-hero--panel { align-items: center; }
.page-hero--panel .page-hero-scrim {
  background:
    linear-gradient(100deg, rgba(42, 16, 16, 0.55) 0%, rgba(42, 16, 16, 0.2) 58%, rgba(42, 16, 16, 0.35) 100%);
}
.page-hero-card {
  max-width: 38rem;
  padding: 1.15rem 1.15rem 1.3rem;
  background: rgba(36, 14, 14, 0.58);
  border: 1px solid rgba(196, 160, 53, 0.5);
  border-radius: 0.35rem;
  box-shadow: 0 18px 40px -24px rgba(20, 8, 8, 0.7);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

@media (min-width: 640px) {
  :root { --page-hero-h: 26rem; }
  .page-hero-inner { padding-top: 4rem; padding-bottom: 2.75rem; }
  .page-hero-card { padding: 1.6rem 1.8rem 1.8rem; }
}

@media (min-width: 1024px) {
  :root { --page-hero-h: 30rem; }
  .page-hero-inner { padding-top: 4.5rem; padding-bottom: 3rem; }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #E2C4B0;
}
.breadcrumb a { color: #F3E0D2; transition: color 0.2s ease; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current="page"] { color: #fff; }

/* -------------------------------------------------------------------------
   7. Section furniture
   ------------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--brand-700);
}

/* Eyebrow preceded by a short gold rule */
.eyebrow--ruled {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow--ruled::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  flex: none;
  background: var(--gold);
}

/* Short rule under section headings — a printed-report cue */
.heading-rule::after {
  content: "";
  display: block;
  width: 2.6rem;
  height: 3px;
  margin-top: 1rem;
  background: var(--gold);
}

.lead { font-size: 1.05rem; line-height: 1.75; color: #5A433A; }

/* --- Home page hero ----------------------------------------------------
   City-style full-bleed photograph: the image is the background, a lighter
   two-axis scrim keeps type readable on the left, and a frosted bar holds
   the figures along the bottom edge.
   ----------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 4.6rem);
  background: #2A1010;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(42, 16, 16, 0.55) 0%, rgba(42, 16, 16, 0.48) 40%,
                            rgba(42, 16, 16, 0.72) 100%),
    linear-gradient(105deg, rgba(42, 16, 16, 0.82) 0%, rgba(42, 16, 16, 0.68) 46%,
                            rgba(42, 16, 16, 0.55) 100%);
}

.hero-inner {
  position: relative;
  width: 100%;
  padding-top: 3.5rem;
  padding-bottom: 3rem;
}

.hero-copy {
  max-width: 38rem;
}

.hero-title {
  font-size: clamp(2.2rem, 4.6vw, 3.35rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(28, 10, 10, 0.45);
}

.hero-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #fff;
  text-shadow: 0 1px 16px rgba(28, 10, 10, 0.4);
}

.eyebrow--onDark { color: #E8C9A0; }

.hero-bar {
  position: relative;
  z-index: 1;
  background: rgba(42, 16, 16, 0.58);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.hero-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.75rem;
  padding: 1.35rem 0 1.5rem;
}
.hero-figures dd {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hero-figures--pillars dd {
  font-size: 1.2rem;
  line-height: 1.25;
  font-variant-numeric: normal;
}
.hero-figures dt {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #E8D0C0;
}

@media (min-width: 768px) {
  .hero-bg { object-position: 58% 42%; transform: scale(1.05); }
  .hero-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-figures > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    padding-left: 2rem;
  }

  .hero-figures--pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem 1.35rem;
  }
  .hero-figures--pillars > div + div {
    border-left: 0;
    padding-left: 0;
  }
  .hero-figures--pillars > div {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.85rem;
  }
  .hero-figures--pillars > div:nth-child(-n+3) {
    border-top: 0;
    padding-top: 0;
  }
}

@media (min-width: 1200px) {
  .hero-figures--pillars {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .hero-figures--pillars > div {
    border-top: 0;
    padding-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    padding-left: 1.1rem;
  }
  .hero-figures--pillars > div:first-child {
    border-left: 0;
    padding-left: 0;
  }
}

@media (min-width: 1024px) {
  .hero { min-height: calc(100svh - 7.2rem); }
  .hero-inner { padding-top: 5rem; padding-bottom: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none; }
}

/* Sidebar note used on inner pages */
.sidenote {
  border-left: 3px solid var(--brand);
  background: var(--mint);
  padding: 1.25rem 1.4rem;
}

/* On a cream band the quote needs a white ground so the maroon rule still reads. */
.program-band--cream .sidenote {
  background: #fff;
}

.sidenote--ondark {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--gold);
}

/* Section strip. Solid fill and a fixed offset — no blur, so it stays flush while scrolling. */
.page-subnav {
  position: sticky;
  top: var(--masthead-h);
  z-index: 40;
  height: var(--subnav-h);
  background: #FBF8F3;
  border-bottom: 1px solid var(--rule);
}
.page-subnav-row {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-subnav-row::-webkit-scrollbar { display: none; }
.page-subnav a {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 100%;
  padding: 0 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  color: #6B5348;
  border-bottom: 2px solid transparent;
}
.page-subnav a:hover {
  color: var(--brand-700);
  border-bottom-color: var(--gold);
}

/* Programme photographs share one frame so each band lines up. */
.program-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 40%;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--mint);
}

/* Five pillar cards, packed from the left: three, then two. */
.pillar-grid {
  display: grid;
  gap: 1.5rem;
}
.pillar-grid > * { height: 100%; }
.pillar-grid .card {
  box-shadow: 0 1px 2px rgba(44, 24, 20, 0.05), 0 10px 24px -18px rgba(44, 24, 20, 0.35);
}
@media (min-width: 640px) {
  .pillar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .pillar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* About Us — editorial layout for the official document */
.about-banner-lines {
  margin-top: 1.35rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.018em;
  color: #F6E6D8;
}
.about-banner-lines span { display: block; }

.pull-quote {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.pull-quote--lg {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.45;
}
.pull-quote--onDark { color: #fff; }

.value-item {
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
}
.value-item:last-child { border-bottom: 1px solid var(--rule); }
.value-item p {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.philosophy-line {
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.philosophy-line p {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}

.about-close {
  text-align: center;
}
.about-close .heading-rule::after { margin-inline: auto; }

/* Closing band used on every page, immediately above the footer wave. */
.close-cta {
  background: #FBF6EE;
}
.close-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding: 3rem 1.5rem 3.25rem;
}
.close-cta-copy { max-width: 38rem; }
.close-cta-copy h2 {
  margin-top: 0.85rem;
  font-size: clamp(1.85rem, 4.2vw, 2.45rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.close-cta-copy p {
  margin-top: 0.85rem;
  max-width: 34rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #6B5348;
}
.close-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}

@media (min-width: 768px) {
  .close-cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 3.75rem 1.5rem 4rem;
  }
}

/* -------------------------------------------------------------------------
   8. Cards, lists, statistics
   ------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 0.6rem;
}
.card--hover {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}
.card--hover:hover {
  border-color: var(--brand-200);
  box-shadow: 0 1px 2px rgba(44, 24, 20, 0.05), 0 16px 34px -22px rgba(44, 24, 20, 0.45);
  transform: translateY(-3px);
}

.card-media { overflow: hidden; }
.card-media img { transition: transform 0.6s var(--ease); }
.card--hover:hover .card-media img { transform: scale(1.04); }

/* Small square icon tile */
.icon-tile {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--brand-700);
  background: var(--mint);
  border-radius: 0.4rem;
  flex: none;
}
/* Text link with trailing arrow */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-700);
}
.arrow-link svg { transition: transform 0.25s var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* Ticked list */
.tick-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  font-size: 0.925rem;
  line-height: 1.65;
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38rem;
  width: 0.9rem;
  height: 0.9rem;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7.6 14.2 3.8 10.4l1.4-1.4 2.4 2.4 7-7 1.4 1.4-8.4 8.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7.6 14.2 3.8 10.4l1.4-1.4 2.4 2.4 7-7 1.4 1.4-8.4 8.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Figure captions used on documentary photographs */
.figcaption {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #7A6358;
}

/* Statistic block */
.stat-figure {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.stat-figure--onDark { color: #fff; }
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #6B5348;
}
.stat-label--onDark { color: #E8C9A0; }

/* -------------------------------------------------------------------------
   9. Tables
   ------------------------------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 0.75rem;
  font-size: 0.78rem;
  color: #7A6358;
}
.data-table th,
.data-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.data-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-800);
  background: var(--mint);
  border-bottom: 1px solid var(--brand-100);
}
.data-table tbody tr:hover { background: #FBF6EE; }

/* -------------------------------------------------------------------------
   10. Accordion (FAQ)
   ------------------------------------------------------------------------- */
.accordion-item { border-bottom: 1px solid var(--rule); }

.accordion-trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.15rem 0;
  text-align: left;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}
.accordion-trigger:hover { color: var(--brand-700); }
.accordion-trigger svg { flex: none; margin-top: 0.2rem; transition: transform 0.25s ease; }
.accordion-trigger[aria-expanded="true"] { color: var(--brand-700); }
.accordion-trigger[aria-expanded="true"] svg { transform: rotate(45deg); }

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}
.accordion-panel.is-open { grid-template-rows: 1fr; }
.accordion-panel > div { overflow: hidden; }
.accordion-panel p {
  padding-bottom: 1.2rem;
  font-size: 0.925rem;
  line-height: 1.7;
  color: #5A433A;
}

/* -------------------------------------------------------------------------
   11. Gallery & lightbox
   ------------------------------------------------------------------------- */
.filter-chip {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.filter-chip:hover { border-color: var(--brand-200); background: var(--mint); }
.filter-chip.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--brand-100);
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1rem 0.9rem;
  font-size: 0.78rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(44, 16, 16, 0.88), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover figcaption,
.gallery-item:focus-visible figcaption { opacity: 1; transform: translateY(0); }
.gallery-item.is-missing {
  display: grid;
  place-items: center;
  min-height: 8rem;
  aspect-ratio: 4 / 3;
  cursor: default;
  color: #7A6358;
  font-size: 0.78rem;
  text-align: center;
  padding: 1rem;
}
.gallery-item.is-missing figcaption { position: static; opacity: 1; transform: none; background: none; color: inherit; padding: 0; }

.gallery-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
}
.gallery-pages[hidden] { display: none; }
.gallery-page {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}
.gallery-page:hover { border-color: var(--brand-200); background: var(--mint); }
.gallery-page.is-current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.gallery-page:disabled { opacity: 0.4; }
.gallery-page-gap {
  min-width: 1.4rem;
  text-align: center;
  color: #7A6358;
}

/* Award photographs stay uncropped. The certificate sits on a paper ground. */
.gallery-item.award-frame {
  background: #fff;
  border: 1px solid var(--rule);
}
.gallery-item.award-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.award-sheet {
  background:
    linear-gradient(180deg, #fff 0%, var(--mint) 100%);
  border: 1px solid var(--rule);
  border-radius: 0.6rem;
  padding: 0.85rem;
  box-shadow: 0 1px 2px rgba(44, 24, 20, 0.05), 0 18px 36px -28px rgba(44, 24, 20, 0.45);
}
.award-meta {
  display: grid;
  gap: 0;
}
.award-meta div {
  display: grid;
  gap: 0.15rem 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}
.award-meta div:last-child { border-bottom: 1px solid var(--rule); }
.award-meta dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7A6358;
}
.award-meta dd {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
@media (min-width: 640px) {
  .award-meta div { grid-template-columns: 9.5rem 1fr; align-items: baseline; }
}

#lightbox.is-open { display: flex; opacity: 1; }
#lightbox-image {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
#lightbox.is-open #lightbox-image { opacity: 1; transform: scale(1); }

.lightbox-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.4rem;
  transition: background-color 0.2s ease;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.26); }

/* -------------------------------------------------------------------------
   12. Forms
   ------------------------------------------------------------------------- */
.field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}
.field-label .opt { font-weight: 400; color: #8A7266; }

.field {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #D4C4B8;
  border-radius: 0.35rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder { color: #A08A7C; }
.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(139, 42, 40, 0.16);
}
.field.has-error { border-color: #C0392B; background: #FEF6F5; }

select.field {
  appearance: none;
  padding-right: 2.3rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%232C1814' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
}

.field-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: #C0392B;
}
.field-error.is-visible { display: block; }

/* Donation amount selector */
.amount-option {
  padding: 0.9rem 0.85rem;
  text-align: left;
  border: 1px solid #D4C4B8;
  border-radius: 0.4rem;
  background: #fff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.amount-option:hover { border-color: var(--brand-200); background: var(--mint); }
.amount-option.is-selected {
  border-color: var(--brand);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.amount-value {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.amount-note { display: block; margin-top: 0.15rem; font-size: 0.75rem; color: #7A6358; }

/* Segmented control (one-time / monthly) */
.segment {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--mint);
  border: 1px solid var(--brand-100);
  border-radius: 0.45rem;
}
.segment button {
  padding: 0.45rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5A433A;
  border-radius: 0.3rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.segment button.is-active { background: #fff; color: var(--brand-700); box-shadow: 0 1px 2px rgba(44,24,20,0.12); }

/* -------------------------------------------------------------------------
   13. Footer
   ------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  --wave: clamp(3.6rem, 9vw, 6.5rem);
  margin-top: -2px;
  padding-top: var(--wave);
  background: #6E2426;
  color: #F3E0D2;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(var(--wave) + 2px);
  background-color: #6E2426;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23FBF6EE' d='M0 0H1440V120H0Z'/%3E%3Cpath fill='%236E2426' d='M0 46C240 78 480 86 720 56C960 26 1180 20 1440 48V120H0Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

/* Real SVG between the last section and the footer. Hidden on desktop. */
.footer-wave {
  display: none;
}

/* Phones and tablets: one in-flow wave, no stacked background. */
@media (max-width: 1023px) {
  html,
  body {
    background-color: #FBF6EE;
  }
  .site-footer {
    margin-top: 0;
    padding-top: 1.75rem;
  }
  .site-footer::before {
    content: none;
  }
  .footer-wave {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    background: #FBF6EE;
  }
  .footer-wave svg {
    display: block;
    width: 100%;
    height: 3.75rem;
    margin: 0 0 -2px;
  }
}
.footer-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
}
.footer-link {
  display: inline-block;
  padding: 0.28rem 0;
  font-size: 0.85rem;
  color: #D4B8A8;
  transition: color 0.2s ease;
}
.footer-link:hover { color: #fff; }
.site-footer a[href^="mailto"],
.site-footer address { overflow-wrap: anywhere; }

/* Link columns sit two-up on a phone so the footer is not one long stack. */
@media (max-width: 767px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.25rem;
  }
  .site-footer .footer-brand { grid-column: 1 / -1; }
}

/* Keep the copyright clear of the fixed back-to-top control. */
@media (max-width: 639px) {
  .site-footer .px-6 > p,
  .site-footer .footer-bar {
    padding-right: 4.5rem;
  }
  .site-footer .footer-bar {
    padding-bottom: 1.35rem;
  }
  :root { --masthead-h: 4.5rem; }
  .seal { width: 2.65rem; height: 2.65rem; }
  .wordmark-name { font-size: 1rem; }
  .wordmark-sub { font-size: 0.56rem; letter-spacing: 0.12em; }
  .hero-figures { gap: 1rem 0.85rem; padding: 1.1rem 0 1.2rem; }
  .hero-figures--pillars dd { font-size: 1.02rem; }
  .hero-title { font-size: clamp(1.85rem, 8.2vw, 2.4rem); }
}

.social-btn {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  color: #F0D9C8;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.35rem;
  transition: background-color 0.2s ease;
}
.social-btn:hover { background: var(--brand); color: #fff; }

/* -------------------------------------------------------------------------
   14. Motion, print, reduced motion
   ------------------------------------------------------------------------- */

/* Deliberately understated: a short fade and 14px rise, nothing bouncy. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

#back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease), visibility 0.25s;
}
#back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .utility-bar, .masthead, #drawer, #drawer-overlay,
  #back-to-top, #lightbox { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; }
}
