:root {
  color-scheme: light dark;

  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f1eee7;
  --text: #1c1a17;
  --text-muted: #6b675e;
  --border: rgba(20, 18, 14, 0.12);
  --accent: #3f5fc4;
  --accent-hover: #33509e;
  --accent-soft: rgba(63, 95, 196, 0.09);
  --btn-text: #ffffff;
  --gold: #a9791b;
  --nav-bg: rgba(250, 248, 244, 0.88);
  --shadow: 0 16px 36px rgba(20, 18, 14, 0.09);

  /* The logo mark keeps its own fixed dark card in both themes -- it's
     part of the brand asset itself, not something that flips. */
  --logo-card: #202024;

  /* Quiet nod to the calendar site: today's liturgical color, mixed
     faintly into the hairlines under the nav and above the footer.
     Set dynamically by theme.js; --accent is just the pre-JS fallback. */
  --liturgical-raw: var(--accent);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1040px;
  --radius: 16px;
}

:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --surface: #1c1c1f;
  --surface-2: #232326;
  --text: #f4f3f0;
  --text-muted: #b9b7b2;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #6f94e6;
  --accent-hover: #8fadf0;
  --accent-soft: rgba(111, 148, 230, 0.14);
  --btn-text: #0b0b0c;
  --gold: #d8b24a;
  --nav-bg: rgba(11, 11, 12, 0.88);
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c;
    --surface: #1c1c1f;
    --surface-2: #232326;
    --text: #f4f3f0;
    --text-muted: #b9b7b2;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #6f94e6;
    --accent-hover: #8fadf0;
    --accent-soft: rgba(111, 148, 230, 0.14);
    --btn-text: #0b0b0c;
    --gold: #d8b24a;
    --nav-bg: rgba(11, 11, 12, 0.88);
    --shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

header.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  border-bottom: 1px solid color-mix(in srgb, var(--liturgical-raw) 40%, var(--border));
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { height: 34px; width: auto; flex-shrink: 0; display: block; }
.brand .wordmark {
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.92rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand .wordmark .w-least { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav.links {
  display: flex;
  gap: 26px;
}
nav.links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.links a:hover,
nav.links a[aria-current="page"] {
  border-bottom-color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 680px) {
  nav.links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  nav.links.open { display: flex; }
  nav.links a { padding: 14px 24px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .brand .wordmark { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,12,0.25) 0%, rgba(11,11,12,0.55) 55%, rgba(11,11,12,0.88) 100%);
}
.hero .hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px 44px;
  width: 100%;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(111, 148, 230, 0.22);
  border: 1px solid rgba(111, 148, 230, 0.5);
  color: #eef2fd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  color: #fdfcfa;
  font-size: clamp(2rem, 5.5vw, 3.3rem);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 720px;
}
.hero.compact { min-height: 30vh; }
.hero.compact .hero-inner { padding: 56px 24px 36px; }

/* ---------- Bands / sections ---------- */

.band {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
.band.surface { background: var(--surface); }
.band.tint { background: var(--surface-2); }

.band h1 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 0 0 20px;
}
.band > .container > p.lede {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.band h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 12px;
  text-align: center;
}
.band h3 {
  font-size: 1.05rem;
  margin: 20px 0 8px;
  text-align: center;
}
.band p { color: var(--text-muted); max-width: 720px; margin: 0 auto 14px; }
.band p strong { color: var(--text); }
.band ul { max-width: 640px; margin: 0 auto 14px; padding-left: 20px; color: var(--text-muted); }

.section-intro { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-intro p { margin: 0; }

/* ---------- Stat row (home) ---------- */

.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 8px;
}
.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  box-shadow: var(--shadow);
}
.stat-chip strong { color: var(--text); }

/* ---------- Generic cards ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .cards-grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 8px;
  text-align: left;
  font-size: 1.05rem;
  color: var(--text);
}
.card p {
  margin: 0;
  max-width: none;
  font-size: 0.93rem;
}

/* ---------- Values grid (about) ---------- */

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
@media (max-width: 820px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .values-grid { grid-template-columns: 1fr; }
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: left;
  box-shadow: var(--shadow);
}
.value-card .value-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.value-card h3 {
  text-align: left;
  margin: 0 0 6px;
  font-size: 0.98rem;
  color: var(--text);
}
.value-card p { margin: 0; max-width: none; font-size: 0.9rem; }

/* ---------- About sections-as-cards ---------- */

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto 20px;
}
.section-card h2 {
  margin-top: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.section-card:last-child { margin-bottom: 0; }

/* ---------- CTA buttons ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 28px 0 8px;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--btn-text);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 8px;
  min-width: 200px;
  text-align: center;
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.btn:hover { background: var(--accent-hover); color: var(--btn-text); }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  min-width: unset;
}
.btn.secondary:hover { border-color: var(--accent); color: var(--accent-hover); }

.badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
}
.badge-row img { height: 68px; width: auto; }

/* ---------- Give page layout ---------- */

.give-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .give-layout { grid-template-columns: 1fr; }
}
.give-copy p.lede {
  text-align: left;
  margin: 0 0 20px;
  max-width: none;
  font-size: 1.08rem;
}
.give-copy .trust-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.give-copy .trust-row img { height: 64px; width: auto; }
.give-copy .tax-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: none;
  margin: 14px 0 0;
}

.embed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
}
.embed-card iframe { border: none; border-radius: 8px; max-width: 100%; }

/* ---------- Newsletter embed ---------- */

.embed-wrap { display: flex; justify-content: center; margin-top: 24px; }
.embed-wrap iframe { border: none; border-radius: 8px; }

/* ---------- Footer ---------- */

/* The last content section on every page sits directly against the
   footer -- drop its own divider so only the footer's (liturgical-tinted)
   top border shows there, instead of two hairlines back to back. */
body > section.band:last-of-type {
  border-bottom: none;
}

footer.site-footer {
  background: var(--surface-2);
  padding: 40px 0 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  border-top: 1px solid color-mix(in srgb, var(--liturgical-raw) 40%, var(--border));
}
footer.site-footer .footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
footer.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  text-transform: uppercase;
}
footer.site-footer .footer-brand .brand-mark { height: 24px; }
footer.site-footer .footer-brand .w-least { color: var(--accent); }
footer.site-footer .social a {
  color: var(--text-muted);
  margin-left: 18px;
  text-decoration: none;
}
footer.site-footer .social a:first-child { margin-left: 0; }
footer.site-footer .social a:hover { color: var(--accent); }
footer.site-footer p { max-width: 680px; margin: 0 auto; text-align: center; }
