/* ==========================================================================
   Faith Tabernacle COGIC — Vandalia, MO
   Editorial Gospel flavor. Deep navy + warm gold + cream + oxblood.
   Mobile-first. prefers-color-scheme aware. Reverent, never theatrical.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Light theme — daytime cream */
  --ink: #11151D;
  --graphite: #1B2030;
  --slate: #2A3045;
  --mist: #B6AFA1;
  --bone: #FAF6EE;
  --cream: #F2EBDD;
  --paper: #ECE4D1;
  --gold: #C8A35F;
  --gold-deep: #A6863F;
  --navy: #102036;
  --navy-deep: #08111E;
  --oxblood: #6B1A24;
  --rule: rgba(17, 21, 29, 0.12);
  --rule-strong: rgba(17, 21, 29, 0.28);
  --rule-on-ink: rgba(242, 235, 221, 0.16);

  --bg: var(--cream);
  --bg-elev: var(--bone);
  --bg-paper: var(--paper);
  --fg: var(--ink);
  --fg-muted: rgba(17, 21, 29, 0.66);
  --fg-soft: rgba(17, 21, 29, 0.50);
  --accent: var(--gold);
  --accent-deep: var(--gold-deep);
  --on-accent: var(--ink);

  /* Typography */
  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Type scale */
  --fs-eyebrow: 0.72rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: clamp(1.4rem, 1.15rem + 0.9vw, 1.85rem);
  --fs-h2: clamp(1.9rem, 1.5rem + 2.2vw, 3.25rem);
  --fs-h1: clamp(2.5rem, 1.85rem + 4vw, 5.5rem);
  --fs-display: clamp(3rem, 2.1rem + 6vw, 7.5rem);

  /* Layout */
  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 7.5vw, 7.5rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Dark theme — late-evening sanctuary */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B121C;
    --bg-elev: #0F1825;
    --bg-paper: #131D2C;
    --fg: #F2EBDD;
    --fg-muted: rgba(242, 235, 221, 0.72);
    --fg-soft: rgba(242, 235, 221, 0.55);
    --rule: rgba(242, 235, 221, 0.14);
    --rule-strong: rgba(242, 235, 221, 0.28);
    --rule-on-ink: rgba(242, 235, 221, 0.18);
    --accent: #D4B470;
    --accent-deep: #C8A35F;
    --on-accent: #0B121C;
    --navy: #142540;
    --navy-deep: #0B121C;
    --oxblood: #A8323F;
    --cream: #0B121C;
    --paper: #131D2C;
    --bone: #0F1825;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  text-wrap: pretty;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle paper grain in light mode */
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: dark) {
  body { background-image: none; }
}

img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; margin: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.018em;
  line-height: 1.05;
  text-wrap: balance;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.it, .serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--accent-deep);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-deep);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent-deep);
  display: inline-block;
  margin-right: 0.7rem;
}

.lede {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 56ch;
  font-feature-settings: "ss01";
}

.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--fg-muted);
}

/* Tabular numbers anywhere time/date appears */
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section) 0; position: relative; }
.section--paper { background: var(--bg-paper); }
.section--bone { background: var(--bg-elev); }
.section--ink {
  background: var(--navy);
  color: var(--bone);
}
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--bone); }
.section--ink .lede { color: rgba(250, 246, 238, 0.78); }
.section--ink .eyebrow { color: var(--accent); }
.section--ink .eyebrow::before { background: var(--accent); }

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 880px) {
  .section-head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 3rem;
  }
}

.grid { display: grid; gap: clamp(1.25rem, 2vw, 2rem); }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Buttons ----------
   Light mode: deep ink fill, cream foreground.
   Dark mode: navy fill, warm cream foreground (contrast 13.4:1, well above WCAG AA 4.5:1). */
:root {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  --btn-border: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root {
    --btn-bg: #182842;          /* solid navy, lighter than --navy-deep so it reads as a button */
    --btn-fg: #FAF6EE;          /* warm cream, fixed light value */
    --btn-border: rgba(212, 180, 112, 0.35); /* faint gold ring */
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px -22px rgba(20, 18, 12, 0.6);
}
@media (prefers-color-scheme: dark) {
  .btn:hover { background: #213355; box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.7); }
}
.btn:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 0.12s;
}
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-strong);
}
.btn--gold {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn--gold:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.btn .arrow { display: inline-block; transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Skip link + focus ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.3s var(--ease);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--accent); outline-offset: 2px; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
  view-transition-name: site-nav;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(200, 163, 95, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.brand:hover .brand__mark {
  transform: scale(1.05);
  box-shadow: inset 0 0 0 1px rgba(200, 163, 95, 0.6), 0 0 0 4px rgba(200, 163, 95, 0.16);
}
.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-size: 0.95rem;
}
.brand__name small {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.nav__links {
  display: none;
  gap: 1.65rem;
  font-size: 0.94rem;
  font-weight: 500;
}
.nav__links a {
  position: relative;
  padding: 0.4rem 0;
  color: var(--fg-muted);
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a.is-active { color: var(--fg); }
.nav__links a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
}
.nav__cta { display: none; }
@media (min-width: 940px) {
  .nav__links { display: inline-flex; }
  .nav__cta { display: inline-flex; }
}

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}
.nav__toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--fg);
  display: block;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 940px) { .nav__toggle { display: none; } }

/* Persistent tap-to-call in the mobile header. Always visible <940px,
   hidden once the full nav links are shown on desktop. */
.nav__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--fg);
  background: transparent;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav__call:hover { background: rgba(200, 163, 95, 0.12); border-color: var(--accent); color: var(--accent-deep); }
.nav__call .icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
@media (max-width: 480px) {
  .nav__call .label { display: none; }
  .nav__call { padding: 0.55rem 0.75rem; }
}
@media (min-width: 940px) {
  .nav__call { display: none; }
}

/* ---- Mobile drawer ----
   Lives at body level, NOT inside <header>, so backdrop-filter on the nav
   does not create a containing block that traps position:fixed. */
.nav__mobile {
  position: fixed;
  inset: 0;
  background: var(--bg);
  padding: 76px var(--gutter) 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  z-index: 60;
  /* Keep readable on top of itself in both themes — no transparency, no blur. */
}
.nav__mobile.is-open { display: flex; }
.nav__mobile-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-soft);
  font-weight: 600;
}
.nav__mobile-head::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent-deep);
  display: inline-block;
}
.nav__mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1.1rem;
}
.nav__mobile-links a {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 0.85rem + 2vw, 1.7rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  line-height: 1.1;
}
.nav__mobile-links a:last-child { border-bottom: 0; }
.nav__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  /* actions are now FIRST in the drawer, no top margin needed */
}
.nav__mobile-actions .btn { width: 100%; }
.nav__mobile-tel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--bg-elev);
  color: var(--fg);
  text-decoration: none;
}
.nav__mobile-tel .label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fg-soft);
  display: block;
  margin-bottom: 0.15rem;
}
.nav__mobile-tel .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
.nav__mobile-tel .icon {
  width: 18px;
  height: 18px;
  stroke: var(--accent-deep);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
body.has-mobile-nav { overflow: hidden; }
@media (max-width: 480px) {
  .nav__mobile { padding-top: 64px; }
  .nav__mobile-links a { padding: 0.55rem 0; font-size: 1.35rem; }
  .nav__mobile-actions { gap: 0.5rem; margin-top: 0.85rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(3.5rem, 7vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 15%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(ellipse 80% 60% at 15% 85%, color-mix(in srgb, var(--navy) 10%, transparent), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 980px) {
  .hero__inner { grid-template-columns: 1.4fr 1fr; align-items: center; }
}
.hero__display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 1.6rem + 4.5vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-variation-settings: "SOFT" 60, "WONK" 0;
}
.hero__display .it {
  color: var(--oxblood);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
@media (prefers-color-scheme: dark) {
  .hero__display .it { color: #D88793; }
}
.hero__lede {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  color: var(--fg-muted);
  max-width: 52ch;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Service times card on right side of hero */
.hero__times {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 30px 60px -40px rgba(15, 25, 45, 0.45);
}
.hero__times h3 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-style: italic;
}
.hero__times ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero__times li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
  transition: transform 0.3s var(--ease), border-bottom-color 0.3s var(--ease);
}
.hero__times li:last-child { border-bottom: 0; }
.hero__times li:hover {
  transform: translateX(4px);
  border-bottom-color: var(--accent);
}
.hero__times .day {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero__times .label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: 0.15rem;
}
.hero__times .time {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.hero__times-note {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  color: var(--fg-soft);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero__times-note::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

/* Hero tagline marquee (subtle) */
.hero__tag {
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}

/* ---------- Reveal-on-scroll ---------- */
/* Only hide reveals when JS has confirmed it can hydrate them. */
/* Without JS (or before init), content is fully visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: translateY(0); }
.js .reveal .eyebrow::before {
  width: 0;
  transition: width 0.9s 0.25s var(--ease);
}
.js .reveal.is-in .eyebrow::before { width: 28px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 1.85rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--rule-strong);
  box-shadow: 0 30px 60px -40px rgba(15, 25, 45, 0.4);
}
.card__num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent-deep);
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: transform 0.4s var(--ease);
}
.card:hover .card__num { transform: translateX(2px); }
.card h3 {
  font-size: 1.4rem;
  line-height: 1.15;
}
.card p {
  color: var(--fg-muted);
  font-size: 1rem;
}

/* ---------- Pastor & First Lady (split section) ---------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__media { order: 2; }
}
.split__media {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}
.portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 25%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%),
    radial-gradient(ellipse at 70% 80%, color-mix(in srgb, var(--navy) 35%, transparent), transparent 60%),
    linear-gradient(135deg, var(--paper), var(--bg-elev));
  box-shadow: 0 20px 50px -30px rgba(15, 25, 45, 0.45);
}
.portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(17, 21, 29, 0.04) 0, rgba(17, 21, 29, 0.04) 1px, transparent 1px, transparent 6px),
    repeating-linear-gradient(90deg, rgba(17, 21, 29, 0.04) 0, rgba(17, 21, 29, 0.04) 1px, transparent 1px, transparent 6px);
  pointer-events: none;
}
.portrait .glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(4rem, 9vw, 7rem);
  color: rgba(17, 21, 29, 0.18);
  font-weight: 400;
  letter-spacing: -0.04em;
  animation: glyph-drift 9s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) {
  .portrait .glyph { color: rgba(212, 180, 112, 0.22); }
}
.portrait .label {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(11, 18, 28, 0.75);
  color: var(--bone);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
}
.portrait .label .role {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.2rem;
  font-weight: 600;
}
.portrait--second { transform: translateY(2rem); }

.split__body h2 { margin-bottom: 1.5rem; }
.split__body p {
  color: var(--fg-muted);
  font-size: 1.08rem;
  line-height: 1.6;
}
.split__body .signature {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--fg);
}

@keyframes glyph-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -6px); }
}

/* ---------- Scripture pull ---------- */
.scripture {
  position: relative;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  text-align: center;
  background: var(--bg-paper);
}
.scripture::before,
.scripture::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 480px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}
.scripture::before { top: 0; }
.scripture::after { bottom: 0; }
.scripture blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 1.3rem + 2.6vw, 3.25rem);
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 auto;
  letter-spacing: -0.015em;
  position: relative;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.scripture blockquote::before,
.scripture blockquote::after {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: 1.4em;
  line-height: 1;
  animation: scripture-breathe 5s ease-in-out infinite;
}
.scripture blockquote::before { content: '“'; margin-right: 0.1em; }
.scripture blockquote::after { content: '”'; margin-left: 0.05em; animation-delay: 2.5s; }
.scripture cite {
  display: block;
  margin-top: 1.75rem;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-deep);
}
.scripture .context {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  color: var(--fg-soft);
  font-family: var(--font-display);
  font-style: italic;
}

@keyframes scripture-breathe {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* ---------- Service times block (home, big) ---------- */
.times-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 760px) {
  .times-block { grid-template-columns: repeat(3, 1fr); }
}
.times-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.75rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}
.times-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 4px;
  height: 32px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.times-card .label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-soft);
  font-weight: 600;
}
.times-card .day {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--fg);
}
.times-card .time {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.6rem + 1.5vw, 2.75rem);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  margin-top: 0.25rem;
}
.times-card .note {
  font-size: 0.82rem;
  color: var(--fg-soft);
  margin-top: 0.4rem;
}

/* ---------- Ministry rows ---------- */
.ministry-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.4s var(--ease);
}
.ministry-row:hover { background: rgba(200, 163, 95, 0.05); }
.ministry-row__num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent-deep);
  font-size: 1.05rem;
  width: 2.5rem;
}
.ministry-row__title h3 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem);
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.ministry-row__title p {
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 60ch;
}
.ministry-row__action {
  text-align: right;
}
.ministry-row__action a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule-strong);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), letter-spacing 0.4s var(--ease);
}
.ministry-row:hover .ministry-row__action a {
  color: var(--accent-deep);
  border-color: var(--accent);
  letter-spacing: 0.16em;
}
@media (max-width: 720px) {
  .ministry-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "num title"
      ".   action";
    padding: 1.75rem 0;
    gap: 0.75rem 1rem;
  }
  .ministry-row__num { grid-area: num; }
  .ministry-row__title { grid-area: title; }
  .ministry-row__action { grid-area: action; text-align: left; }
}

/* ---------- Events list ---------- */
.event-list {
  display: grid;
  gap: 1rem;
}
.event-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  padding: 1.5rem 1.6rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 14px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
@media (min-width: 720px) {
  .event-item {
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 1.5rem;
  }
}
.event-item:hover {
  transform: translateY(-2px);
  border-color: var(--rule-strong);
}
.event-item .when {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent-deep);
  font-size: 1.05rem;
}
.event-item .when .time {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin-top: 0.2rem;
  font-weight: 600;
}
.event-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}
.event-item p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(ellipse 80% 100% at 100% 0, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%),
    var(--bg-paper);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: 1.5rem;
  align-items: center;
  transition: background 0.6s var(--ease);
}
.cta-banner:hover {
  background:
    radial-gradient(ellipse 80% 100% at 80% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--bg-paper);
}
@media (min-width: 760px) {
  .cta-banner { grid-template-columns: 1.4fr auto; gap: 2.5rem; }
}
.cta-banner h2 {
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.8rem);
  max-width: 22ch;
}
.cta-banner p {
  color: var(--fg-muted);
  margin-top: 0.85rem;
  max-width: 48ch;
}
.cta-banner .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Map iframe ---------- */
.map-frame {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: contrast(1.02);
}
@media (max-width: 720px) {
  .map-frame { aspect-ratio: 4 / 3; }
}

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: 1.1rem;
  max-width: 560px;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fg-soft);
}
.field input,
.field textarea {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--bg-elev);
  outline: none;
}
.field .error {
  font-size: 0.8rem;
  color: var(--oxblood);
  font-weight: 500;
  display: none;
}
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--oxblood); }
.field.is-invalid .error { display: block; }
.form .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.form .form-status {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-elev));
  border: 1px solid var(--accent);
  color: var(--fg);
  font-size: 0.95rem;
  display: none;
}
.form .form-status.is-shown { display: block; }
@media (max-width: 480px) {
  .field input, .field textarea { font-size: 16px; padding: 0.85rem 0.95rem; }
}

/* ---------- Page header ---------- */
.page-header {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  position: relative;
}
.page-header h1 {
  font-size: clamp(2.5rem, 1.8rem + 4vw, 5.25rem);
  line-height: 1.02;
  margin: 0.6rem 0 1.2rem;
  max-width: 16ch;
}
.page-header .lede { max-width: 60ch; }
.page-header::after {
  content: '';
  display: block;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  height: 1px;
  background: var(--rule);
}

/* ---------- Beliefs ---------- */
.beliefs {
  display: grid;
  gap: 0;
}
.belief {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.belief:last-child { border-bottom: 0; }
.belief__num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent-deep);
  font-size: 1.1rem;
}
.belief h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.belief p {
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 60ch;
}
@media (max-width: 720px) {
  .belief { grid-template-columns: 36px 1fr; gap: 0.85rem; padding: 1.4rem 0; }
  .belief h4 { font-size: 1.2rem; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: var(--bone);
  padding: clamp(4rem, 7vw, 6rem) 0 2.5rem;
  margin-top: var(--section);
  view-transition-name: site-footer;
}
.footer .container { color: inherit; }
.footer__top {
  display: grid;
  gap: 3rem;
}
@media (min-width: 860px) {
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; }
}
.footer__display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
  color: var(--bone);
}
.footer__display .it { color: var(--accent); }
.footer h5 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer ul li, .footer ul a {
  font-size: 0.95rem;
  color: rgba(250, 246, 238, 0.78);
  transition: color 0.2s var(--ease);
}
.footer ul a:hover { color: var(--accent); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-on-ink);
  font-size: 0.82rem;
  color: rgba(250, 246, 238, 0.6);
}
.footer__bottom .heritage { font-style: italic; font-family: var(--font-display); }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 720px) {
  .hero__times { padding: 1.5rem; }
  .hero__times li { padding: 0.85rem 0; }
  .cta-banner .actions .btn { width: 100%; }
  .footer__top { gap: 2rem; }
}
@media (max-width: 480px) {
  .nav__inner { height: 64px; gap: 1rem; }
  /* drawer keeps `inset: 0` (body-level), padding-top handles the header overlap */
  .brand__name { font-size: 0.9rem; }
  .brand__name small { font-size: 0.62rem; }
  .hero__ctas .btn { width: 100%; }
}

/* ---------- Reduced motion + hover guards ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scripture blockquote::before,
  .scripture blockquote::after,
  .portrait .glyph { animation: none; }
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
@media (hover: none) {
  .card:hover, .event-item:hover, .ministry-row:hover {
    transform: none;
    box-shadow: none;
    background: var(--bg-elev);
  }
  .btn:hover { transform: none; box-shadow: none; }
}

/* ---------- View transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) {
  animation: vt-fade-out 280ms cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: vt-fade-in 360ms cubic-bezier(0, 0, 0.2, 1) both;
}
@keyframes vt-fade-out {
  to { opacity: 0; transform: translateY(-8px); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
  ::view-transition-old(root) { animation-duration: 220ms; }
  ::view-transition-new(root) { animation-duration: 280ms; }
}
