/* ==========================================================================
   St. Andrew's Anglican Church — site styles
   Two directions live in this stylesheet, switched by a class on <html>:
     .dir-paper     → Paper & Ink (editorial, reverent)
     .dir-burgundy  → Burgundy & Gold (rich, ceremonial)
   Density modifier:
     .density-airy / .density-comfortable / .density-compact
   ========================================================================== */

@font-face {
  font-family: "Guildford Pro";
  src: url("fonts/GuildfordProBook.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Guildford Pro";
  src: url("fonts/GuildfordProBold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #faf6ee;
  --bone: #f4eee2;
  --ink: #1a2238;
  --ink-soft: #2c3550;
  --ink-mute: #5b627a;
  --burgundy: #5a1a26;
  --burgundy-deep: #44131d;
  --gold: #c8a35c;
  --gold-dark: #a08246;
  --rule: rgba(26, 34, 56, 0.16);

  --serif: "Guildford Pro", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --mono: "iA Writer Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  --measure: 62ch;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(64px, 9vw, 140px);
  --shell-max: 1240px;

  /* Direction-driven (default = paper) */
  --bg: var(--paper);
  --bg-alt: var(--bone);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --fg-mute: var(--ink-mute);
  --accent: var(--gold-dark);
  --accent-bright: var(--gold);
  --hairline: rgba(26, 34, 56, 0.18);
  --hero-bg: var(--paper);
  --hero-fg: var(--ink);
  --nav-bg: var(--paper);
  --nav-fg: var(--ink);
  --footer-bg: var(--ink);
  --footer-fg: var(--bone);
  --footer-rule: rgba(244, 238, 226, 0.18);
}

/* ---------- Direction: Burgundy & Gold ---------- */
html.dir-burgundy {
  --bg: var(--bone);
  --bg-alt: #ede4d3;
  --fg: var(--burgundy-deep);
  --fg-soft: var(--burgundy);
  --fg-mute: #6b4a3f;
  --accent: var(--gold-dark);
  --accent-bright: var(--gold);
  --hairline: rgba(90, 26, 38, 0.22);
  --hero-bg: var(--burgundy);
  --hero-fg: var(--bone);
  --nav-bg: var(--bone);
  --nav-fg: var(--burgundy-deep);
  --footer-bg: var(--burgundy-deep);
  --footer-fg: var(--bone);
  --footer-rule: rgba(200, 163, 92, 0.28);
}

/* Accent palette overrides — apply ON TOP of dir-burgundy.
   Re-point --accent / --accent-bright AND --gold / --gold-dark so footer + buttons follow. */
html.dir-burgundy.accent-cream {
  --gold: #f4eee2;            /* the bone color itself, used as accent */
  --gold-dark: #d9cfb8;
  --accent: rgba(244, 238, 226, 0.78);
  --accent-bright: var(--bone);
  --footer-rule: rgba(244, 238, 226, 0.22);
}
html.dir-burgundy.accent-sage {
  --gold: #9aa886;            /* sage green */
  --gold-dark: #6e7d5c;
  --accent: var(--gold-dark);
  --accent-bright: var(--gold);
  --footer-rule: rgba(154, 168, 134, 0.32);
}

/* ---------- Density ---------- */
html.density-airy   { --section-y: clamp(96px, 12vw, 180px); }
html.density-compact { --section-y: clamp(48px, 6vw, 88px); }

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern", "liga", "onum";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a.link { border-bottom: 1px solid var(--hairline); transition: border-color .2s, color .2s; }
a.link:hover { border-bottom-color: var(--accent); color: var(--accent); }

p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 2em 0; }

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 14px;
  transform: translateY(-2px);
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.08; letter-spacing: -0.012em; }
.display { font-size: clamp(48px, 7.4vw, 112px); line-height: 1.02; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 5.4vw, 76px); }
h2 { font-size: clamp(30px, 3.8vw, 52px); }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; }
h4 { font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }

.lede {
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.5;
  color: var(--fg-soft);
  max-width: 36ch;
  text-wrap: balance;
}

.smallcaps {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ---------- Layout ---------- */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.shell-wide {
  max-width: 1480px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
section.tight { padding-top: clamp(40px, 5vw, 80px); padding-bottom: clamp(40px, 5vw, 80px); }

.rule { height: 1px; background: var(--hairline); border: 0; margin: 0; }
.rule-gold { height: 1px; background: var(--accent); width: 56px; border: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  color: var(--nav-fg);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: saturate(1.05);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: 1480px;
  margin: 0 auto;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1; min-width: 0; align-items: stretch; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 30px; letter-spacing: -0.018em; white-space: nowrap; }
.brand-sub {
  font-size: 12.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
  display: block;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.menu { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.menu a {
  position: relative;
  font-size: 16px;
  letter-spacing: 0.02em;
  padding: 6px 0;
  color: var(--nav-fg);
  opacity: .85;
  transition: opacity .2s, color .2s;
}
.menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.2, .6, .2, 1);
}
.menu a:hover { opacity: 1; color: var(--accent); }
.menu a:hover::after { transform: scaleX(1); }
.menu a[aria-current="page"] { opacity: 1; }
.menu a[aria-current="page"]::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .menu a::after { transition: none; }
}
.menu .visit-cta {
  border: 1px solid currentColor;
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 1;
  transition: background .2s, color .2s;
}
.menu .visit-cta:hover { background: var(--fg); color: var(--bg); }
.menu .visit-cta::after { display: none; }
html.dir-burgundy .menu .visit-cta:hover { background: var(--burgundy); color: var(--bone); }

/* mobile nav */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--nav-fg);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: none;
}
.menu-toggle svg { width: 22px; height: 22px; display: block; }
.menu-toggle .icon-close { display: none; }
.nav.is-open .menu-toggle .icon-open { display: none; }
.nav.is-open .menu-toggle .icon-close { display: block; }

@media (max-width: 880px) {
  .menu-toggle { display: inline-flex; }
  .nav-inner { padding: 14px var(--gutter); gap: 12px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 22px; }
  .brand-sub { font-size: 10.5px; margin-top: 5px; letter-spacing: 0.14em; }
  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--hairline);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open .menu { display: flex; }
  .menu a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--hairline);
    font-size: 16px;
  }
  .menu a:last-child { border-bottom: none; }
  .menu .visit-cta {
    margin-top: 14px;
    border: 1px solid currentColor;
    text-align: center;
    padding: 14px 18px;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  padding-top: clamp(72px, 10vw, 140px);
  padding-bottom: clamp(72px, 10vw, 140px);
  position: relative;
  overflow: hidden;
}
.hero .shell-wide { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .hero { padding-top: 48px; padding-bottom: 48px; }
  .hero-grid { gap: 32px; }
  .display { font-size: clamp(40px, 11vw, 56px); }
}

.hero .eyebrow { color: var(--accent-bright); }
.hero h1 { color: var(--hero-fg); }
.hero .lede { color: color-mix(in oklab, var(--hero-fg) 80%, transparent); }
html.dir-burgundy .hero .lede { color: rgba(244, 238, 226, 0.82); }

.hero-meta {
  margin-top: 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 28px;
  align-items: baseline;
  max-width: 480px;
  border-top: 1px solid color-mix(in oklab, var(--hero-fg) 22%, transparent);
  padding-top: 24px;
}
.hero-meta dt { font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent-bright); }
.hero-meta dd { margin: 0; font-size: 18px; color: var(--hero-fg); }
.hero-meta dd small { display: block; font-size: 13px; color: color-mix(in oklab, var(--hero-fg) 65%, transparent); margin-top: 4px; }

.hero-image {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
}
html.dir-burgundy .hero-image { border-color: rgba(200, 163, 92, 0.35); background: rgba(244, 238, 226, 0.06); }

/* ===== Hero slideshow ===== */
.hero-slideshow .slides { position: absolute; inset: 0; }
.hero-slideshow .slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  will-change: opacity;
}
.hero-slideshow .slide.is-active { opacity: 1; }
.hero-slideshow .slide-dots {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 2;
  pointer-events: auto;
}
.hero-slideshow .dot {
  appearance: none;
  width: 8px; height: 8px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.hero-slideshow .dot:hover { transform: scale(1.25); }
.hero-slideshow .dot.is-active { background: rgba(255, 255, 255, 0.95); }
html.dir-burgundy .hero-slideshow .dot { border-color: rgba(244, 238, 226, 0.7); }
html.dir-burgundy .hero-slideshow .dot.is-active { background: rgba(244, 238, 226, 0.95); }
@media (prefers-reduced-motion: reduce) {
  .hero-slideshow .slide { transition: none; }
}
.hero-image img,
.person .portrait img,
.map img,
.figure-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
html.dir-paper .hero-image img,
html.dir-paper .person .portrait img,
html.dir-paper .map img,
html.dir-paper .figure-img img {
  filter: saturate(0.92) contrast(1.02);
}
html.dir-burgundy .hero-image img,
html.dir-burgundy .person .portrait img,
html.dir-burgundy .map img,
html.dir-burgundy .figure-img img {
  filter: saturate(0.95) contrast(1.04) brightness(0.97);
}
.figure-img {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.photo-break {
  margin: clamp(40px, 6vw, 96px) 0;
}
.photo-break figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.photo-break img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
html.dir-paper .photo-break img { filter: saturate(0.9) contrast(1.02); }
html.dir-burgundy .photo-break img { filter: saturate(0.95) contrast(1.05) brightness(0.95); }
.figure-img.tall { aspect-ratio: 4/5; }
.figure-img.wide { aspect-ratio: 3/2; }
.figure-img figcaption {
  position: absolute; left: 0; bottom: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  background: var(--bg);
  padding: 6px 10px;
  border-top: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
}
.placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background-image:
    repeating-linear-gradient(135deg,
      transparent 0 11px,
      color-mix(in oklab, var(--fg) 5%, transparent) 11px 12px);
}
html.dir-burgundy .hero .placeholder {
  background-image: repeating-linear-gradient(135deg,
      transparent 0 11px,
      rgba(244, 238, 226, 0.08) 11px 12px);
}
.placeholder span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--fg) 55%, transparent);
  background: var(--bg);
  padding: 8px 14px;
  border: 1px solid var(--hairline);
}
html.dir-burgundy .hero .placeholder span {
  color: rgba(244, 238, 226, 0.7);
  background: rgba(68, 19, 29, 0.7);
  border-color: rgba(200, 163, 92, 0.35);
}

/* The cross watermark behind hero text in burgundy direction */
.hero-watermark {
  position: absolute;
  right: -80px; top: 50%;
  transform: translateY(-50%);
  width: min(620px, 70vw);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
html.dir-paper .hero-watermark { display: none; }

/* ---------- Buttons / CTAs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
html.dir-burgundy .btn:hover { background: var(--burgundy); color: var(--bone); border-color: var(--burgundy); }

.btn.solid {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn.solid:hover { background: transparent; color: var(--fg); }
html.dir-burgundy .btn.solid {
  background: var(--burgundy);
  color: var(--bone);
  border-color: var(--burgundy);
}
html.dir-burgundy .btn.solid:hover {
  background: transparent;
  color: var(--burgundy);
}

.btn.gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.btn.gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--ink); }

.btn .arrow { font-family: var(--serif); }

/* on dark hero */
.hero .btn { color: var(--hero-fg); border-color: color-mix(in oklab, var(--hero-fg) 60%, transparent); }
.hero .btn:hover { background: var(--hero-fg); color: var(--hero-bg); border-color: var(--hero-fg); }
.hero .btn.gold { color: var(--ink); border-color: var(--gold); background: var(--gold); }
.hero .btn.gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---------- Visit / service times card ---------- */
.visit-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
  padding: clamp(28px, 3.4vw, 44px);
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
}
html.dir-burgundy .visit-card { background: var(--bone); border-color: rgba(90, 26, 38, 0.16); }
.visit-card .mark { width: 56px; height: 56px; }
.visit-card .when { font-size: clamp(22px, 2vw, 28px); font-weight: 700; }
.visit-card .when small { display: block; font-size: 13px; font-weight: 400; color: var(--fg-mute); margin-top: 4px; letter-spacing: 0; text-transform: none; }
@media (max-width: 720px) {
  .visit-card { grid-template-columns: 1fr; text-align: left; }
  .visit-card .btn { justify-self: start; }
}

/* ---------- Two-col content ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.two-col.equal { grid-template-columns: 1fr 1fr; }
.two-col.flip { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 880px) { .two-col, .two-col.equal, .two-col.flip { grid-template-columns: 1fr; } }
.two-col h2 { margin-bottom: 28px; }
.two-col .col-side { position: sticky; top: 96px; }

/* ---------- Newcomer steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 48px);
  margin-top: 56px;
}
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step { padding-top: 28px; border-top: 1px solid var(--hairline); }
.step .num {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}
.step h3 { margin-bottom: 12px; }

/* ---------- Belief / value stack ---------- */
.tenets { display: grid; gap: 0; margin-top: 56px; }
.tenet {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(28px, 3vw, 44px) 0;
  border-top: 1px solid var(--hairline);
  align-items: baseline;
}
.tenet:last-child { border-bottom: 1px solid var(--hairline); }
@media (max-width: 720px) { .tenet { grid-template-columns: 1fr; gap: 12px; } }
.tenet .idx { font-family: var(--mono); font-size: 13px; color: var(--fg-mute); letter-spacing: 0.1em; }
.tenet h3 { font-size: clamp(22px, 1.8vw, 26px); }
.tenet p { color: var(--fg-soft); margin: 0; }

/* ---------- Clergy grid ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 48px);
  margin-top: 64px;
}
@media (max-width: 880px) { .people { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .people { grid-template-columns: 1fr; } }
.person .portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  margin-bottom: 20px;
}
.person h3 { font-size: 22px; margin-bottom: 4px; }
.person .role { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.person p { font-size: 16px; color: var(--fg-soft); margin-top: 12px; }

.person .bio { margin-top: 14px; }
.person .bio summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  padding: 4px 0;
  border-bottom: 1px solid currentColor;
  transition: opacity .2s;
}
.person .bio summary::-webkit-details-marker { display: none; }
.person .bio summary:hover { opacity: 0.7; }
.person .bio .bio-less { display: none; }
.person .bio[open] .bio-more { display: none; }
.person .bio[open] .bio-less { display: inline; }
.person .bio .bio-body { margin-top: 16px; }
.person .bio .bio-body p {
  font-size: 15px;
  line-height: 1.65;
  margin-top: 0;
  color: var(--fg-soft);
}
.person .bio .bio-body p + p { margin-top: 12px; }
.person .bio + .link { margin-top: 16px; display: inline-block; }
.person .bio-pending {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-style: normal;
}

/* ---------- Ministry grid ---------- */
.ministries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
@media (max-width: 720px) { .ministries { grid-template-columns: 1fr; } }
.ministry {
  position: relative;
  padding: clamp(28px, 3vw, 44px);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.ministry::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s cubic-bezier(.2, .6, .2, 1);
  pointer-events: none;
}
.ministry:hover::before { transform: scaleX(1); }
.ministry .num { font-family: var(--mono); font-size: 12px; color: var(--fg-mute); letter-spacing: 0.16em; margin-bottom: 24px; transition: color .25s ease; }
.ministry:hover .num { color: var(--accent); }
.ministry h3 { margin-bottom: 12px; }
.ministry p { font-size: 16px; color: var(--fg-soft); margin: 0; }
.ministry .meta { margin-top: 20px; font-size: 13px; color: var(--fg-mute); letter-spacing: 0.04em; }
@media (prefers-reduced-motion: reduce) {
  .ministry::before { transition: none; }
  .ministry .num { transition: none; }
}

/* ---------- Worship liturgy schedule ---------- */
.liturgy {
  margin-top: 56px;
  border-top: 1px solid var(--hairline);
}
.liturgy-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: clamp(20px, 3vw, 48px);
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
@media (max-width: 720px) { .liturgy-row { grid-template-columns: 1fr; gap: 6px; } }
.liturgy-row time { font-family: var(--serif); font-weight: 700; font-size: 22px; }
.liturgy-row .what h3 { font-size: 20px; margin-bottom: 6px; }
.liturgy-row .what p { color: var(--fg-soft); margin: 0; font-size: 16px; }
.liturgy-row .badge {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 12px;
  align-self: start;
}

/* ---------- Quote / scripture pull ---------- */
.pull {
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  padding: clamp(48px, 6vw, 88px) 0;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}
.pull blockquote {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.32;
  font-weight: 400;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.pull cite {
  display: block;
  margin-top: 28px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Pull: prayer formatting (line-broken) ---------- */
.pull-prayer blockquote {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.5;
  text-wrap: initial;
  font-style: italic;
}
.pull-prayer blockquote .amen {
  font-style: normal;
  color: var(--accent);
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .pull-prayer blockquote br { display: none; }
  .pull-prayer blockquote { font-style: italic; }
}

/* ---------- Page header (for inner pages) ---------- */
.page-head {
  background: var(--bg);
  padding-top: clamp(72px, 9vw, 132px);
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--hairline);
}
.page-head .shell { display: grid; grid-template-columns: 1fr; gap: 24px; }
.page-head h1 { max-width: 14ch; }
.crumbs { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-mute); }
.crumbs a:hover { color: var(--accent); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  margin-top: 56px;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.info-block { padding: clamp(28px, 3vw, 40px); background: var(--bg-alt); border: 1px solid var(--hairline); }
.info-block h4 { color: var(--accent); margin-bottom: 18px; }
.info-block p { font-size: 18px; }
.info-block address { font-style: normal; line-height: 1.6; }
.map {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: clamp(64px, 8vw, 110px) 0 36px;
  margin-top: 0;
}
.footer .shell-wide {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
}
@media (max-width: 880px) { .footer .shell-wide { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer .shell-wide { grid-template-columns: 1fr; } }

.footer .brand-name { color: var(--footer-fg); }
.footer .brand-sub { color: var(--gold); }
.footer h4 { color: var(--gold); margin-bottom: 18px; font-size: 11px; letter-spacing: 0.28em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { opacity: 0.78; font-size: 15px; }
.footer a:hover { opacity: 1; color: var(--gold); }
.footer .colophon {
  border-top: 1px solid var(--footer-rule);
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: color-mix(in oklab, var(--footer-fg) 60%, transparent);
}
.footer .colophon .affiliations {
  display: flex; align-items: center; gap: 28px;
}
.footer .colophon img { height: 36px; opacity: 0.85; }
html.dir-paper .footer .colophon img { filter: brightness(0) invert(1); }

/* ---------- Helpers ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-mute);
  text-transform: uppercase;
}
.dotted-list { list-style: none; padding: 0; margin: 0; }
.dotted-list li {
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 24px;
  font-size: 16px;
}
.dotted-list li:last-child { border-bottom: 1px solid var(--hairline); }
.dotted-list .lbl { color: var(--fg-mute); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; align-self: center; }

/* ---------- Direction-specific touches ---------- */
html.dir-burgundy section.bone-band { background: var(--bone); }
html.dir-paper section.bone-band { background: var(--bone); }

html.dir-burgundy .page-head { background: var(--bone); }
html.dir-burgundy .info-block { background: rgba(90, 26, 38, 0.04); }
html.dir-burgundy .visit-card { background: rgba(90, 26, 38, 0.04); }

/* Quiet ornament on inner page heads, only burgundy direction */
html.dir-burgundy .page-head { position: relative; overflow: hidden; }
html.dir-burgundy .page-head::after {
  content: "";
  position: absolute; right: -60px; bottom: -120px;
  width: 380px; height: 380px;
  background: url("cross-gold.svg") no-repeat center/contain;
  opacity: 0.07;
  pointer-events: none;
}

/* ---------- Missions partners list ---------- */
.missions-partners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 56px);
  margin-top: clamp(48px, 6vw, 80px);
}
@media (max-width: 880px) { .missions-partners { grid-template-columns: 1fr; gap: 40px; } }
.missions-partners .region {
  border-top: 1px solid var(--accent);
  padding-top: 22px;
}
.missions-partners .region h4 {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.28em;
}
.missions-partners .org {
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
}
.missions-partners .org:first-of-type { border-top: 0; }
.missions-partners .org-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  display: block;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.missions-partners .org-desc {
  font-size: 14.5px;
  color: var(--fg-soft);
  line-height: 1.55;
  margin: 0;
}
.missions-note {
  grid-column: 1 / -1;
  margin-top: clamp(28px, 3vw, 40px);
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--fg-mute);
  font-style: italic;
  max-width: 68ch;
}

/* ---------- Sermons strip (homepage) ---------- */
.sermons-strip { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.sermons-strip-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.sermons-strip-line {
  font-family: var(--serif);
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.35;
  color: var(--fg);
  margin: 0;
  max-width: 36ch;
  text-wrap: balance;
  letter-spacing: -0.005em;
}
.sermons-strip-line .sep { color: var(--accent); margin: 0 .35em; }
@media (max-width: 720px) {
  .sermons-strip-inner { grid-template-columns: 1fr; align-items: start; }
  .sermons-strip-inner .btn { justify-self: start; }
}

/* ---------- Sermons (Spotify embed) ---------- */
.sermons {
  margin-top: 16px;
}
.sermons-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(36px, 4vw, 56px);
}
.sermons-head h2 { margin-top: 0; }
.sermons-head .btn { justify-self: end; align-self: end; }
@media (max-width: 720px) {
  .sermons-head { grid-template-columns: 1fr; align-items: start; }
  .sermons-head .btn { justify-self: start; }
}
.sermon-player {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  padding: clamp(14px, 1.4vw, 20px);
}
.sermon-player::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 56px; height: 2px;
  background: var(--accent);
}
.sermon-player iframe {
  width: 100%;
  height: 352px;
  border: 0;
  display: block;
  border-radius: 12px;
  background: transparent;
}
@media (max-width: 720px) {
  .sermon-player iframe { height: 232px; }
}

/* ---------- Ghost-link button (inline CTA in body copy) ---------- */
.btn-ghost-link {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px 22px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.btn-ghost-link:hover { background: var(--accent); color: var(--paper); }
html.dir-burgundy .btn-ghost-link { border-color: var(--gold); color: var(--gold); }
html.dir-burgundy .btn-ghost-link:hover { background: var(--gold); color: var(--burgundy); }

/* ---------- Vision page: rector's letter ---------- */
.rector-letter p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-soft);
}
.rector-letter p strong {
  color: var(--fg);
  font-weight: 700;
}

/* ---------- Vision page: closing statement ---------- */
.closing-statement {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.closing-statement .eyebrow { margin-bottom: 28px; }
.closing-statement .eyebrow::before { display: none; }
.closing-body {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.5;
  color: var(--fg);
  margin: 0 0 22px;
  text-wrap: balance;
  max-width: none;
}
.closing-body strong { font-weight: 700; }
.closing-amen {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-top: 32px;
  max-width: none;
}
html.dir-burgundy .closing-amen { color: var(--gold); }

/* ---------- Dialog: Creeds & Declarations ---------- */
dialog.creed-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  margin: 0;
  inset: 0;
  color: var(--fg);
}
dialog.creed-dialog::backdrop {
  background: color-mix(in oklab, var(--ink) 75%, transparent);
  backdrop-filter: blur(2px);
}
.creed-dialog__inner {
  background: var(--paper);
  width: min(720px, 100%);
  max-height: 92vh;
  margin: 4vh auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(20, 20, 20, 0.18);
  border-top: 3px solid var(--accent);
}
html.dir-burgundy .creed-dialog__inner { border-top-color: var(--gold); }
.creed-dialog__head {
  position: relative;
  padding: 36px 48px 24px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bone);
}
.creed-dialog__head .eyebrow { margin: 0 0 12px; }
.creed-dialog__head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0;
}
.creed-dialog__close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.creed-dialog__close:hover { background: var(--ink); color: var(--paper); }
.creed-dialog__body {
  padding: 36px 48px 48px;
  overflow-y: auto;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--fg);
}
.creed-dialog__body p { margin: 0 0 22px; }
.creed-dialog__body p:last-child { margin-bottom: 0; }
.creed-amen {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}
html.dir-burgundy .creed-amen { color: var(--gold-deep, var(--gold)); }

.declaration-list {
  list-style: none;
  counter-reset: decl;
  padding: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
}
.declaration-list li {
  counter-increment: decl;
  position: relative;
  padding: 18px 0 18px 56px;
  border-top: 1px solid var(--hairline);
}
.declaration-list li:last-child { border-bottom: 1px solid var(--hairline); }
.declaration-list li::before {
  content: counter(decl, upper-roman) ".";
  position: absolute;
  left: 0;
  top: 22px;
  font-family: var(--mono, var(--sans));
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-mute);
}

@media (max-width: 720px) {
  .creed-dialog__inner { margin: 0; height: 100%; max-height: 100%; }
  .creed-dialog__head { padding: 26px 22px 20px; }
  .creed-dialog__close { top: 14px; right: 14px; width: 36px; height: 36px; }
  .creed-dialog__body { padding: 24px 22px 36px; font-size: 17px; }
  .declaration-list li { padding-left: 44px; }
}
