/* High Street Church of God — styles
   Mobile-first. Tokens first, then base, layout, components, pages. */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ivory: #FAF6EE;
  --parchment: #EFE6D4;
  --parchment-deep: #E4D8C0;
  --midnight: #1C2740;
  --midnight-deep: #141C30;
  --midnight-soft: #2B3858;
  --sage: #55664E;
  --sage-light: #A9B79E;
  --gold: #C99A45;
  --gold-text: #87601D;      /* gold for text on light backgrounds (AA) */
  --gold-deep: #6B4B12;      /* gold text on pale-gold tints (AA) */
  --gold-pale: #E9D3A6;
  --charcoal: #2A2826;
  --muted: #5D5A55;          /* secondary text on ivory (AA) */
  --line: #D9CDB6;
  --plum: #6A4C5E;
  --river: #3E6670;
  --white: #FFFFFF;
  --error: #9B2C2C;
  --success: #2F5E3A;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.9rem;
  --step-0: 1.125rem;
  --step-1: 1.35rem;
  --step-2: clamp(1.55rem, 1.3rem + 1vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.7rem);
  --step-4: clamp(2.5rem, 1.7rem + 3.6vw, 4.6rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --space-6: clamp(4rem, 3rem + 4vw, 7rem);

  --radius-sm: 6px;
  --radius-md: 14px;
  --arch: 999px 999px 0 0;

  --container: 72rem;
  --measure: 38rem;
  --header-h: 4.5rem;

  --ease-out: cubic-bezier(0.22, 0.8, 0.24, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  font-variation-settings: "SOFT" 60;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 400; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.25; }
p { margin: 0 0 var(--space-2); max-width: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0 0 var(--space-2); padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

a { color: var(--midnight); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-text); text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}
.on-dark :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--gold-pale); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--midnight); color: var(--white);
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; color: var(--white); }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2rem, 46rem); margin-inline: auto; }

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--midnight); color: var(--white); }
.btn-primary:hover { background: var(--midnight-soft); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--midnight-deep); }
.btn-gold:hover { background: var(--gold-pale); color: var(--midnight-deep); }
.btn-outline { border-color: var(--midnight); color: var(--midnight); background: transparent; }
.btn-outline:hover { background: var(--midnight); color: var(--white); }
.btn-outline-light { border-color: var(--gold-pale); color: var(--white); background: transparent; }
.btn-outline-light:hover { background: var(--gold-pale); color: var(--midnight-deep); }
.btn[aria-disabled="true"], .btn:disabled {
  background: var(--parchment); color: var(--muted); border-color: var(--line);
  cursor: not-allowed; transform: none;
}
.btn .spinner {
  width: 1rem; height: 1rem; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-link { font-weight: 600; }
.link-light { color: var(--gold-pale); font-weight: 600; }
.link-light:hover { color: var(--white); }

/* ---------- Announcement ---------- */
.announcement {
  background: var(--gold); color: var(--midnight-deep);
  font-size: var(--step--1); font-weight: 600; text-align: center;
  padding: 0.6rem 1rem;
}
.announcement a { color: var(--midnight-deep); margin-left: 0.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ivory) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: var(--midnight);
}
.brand:hover { color: var(--midnight); }
.brand-mark { width: 2.4rem; height: 2.4rem; flex: none; }
.brand-name {
  display: flex; flex-direction: column;
  font-family: var(--font-display); font-size: 1.25rem; line-height: 1.05; font-weight: 600;
}
.brand-sub { font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; color: var(--sage); letter-spacing: 0.02em; margin-top: 0.15rem; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 2.9rem; padding: 0 1rem;
  border: 1.5px solid var(--midnight); border-radius: 999px;
  background: transparent; color: var(--midnight);
  font: 600 1rem var(--font-body); cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 1.1rem; height: 2px; background: currentColor; transition: background 0.2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor;
  transition: transform 0.3s var(--ease-out);
}
.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: rotate(-45deg); }

.site-nav {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--ivory);
  padding: var(--space-4) 1.25rem var(--space-5);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--space-4);
  visibility: hidden; opacity: 0;
  transform: translateY(-0.75rem);
  transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
.site-nav.is-open {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-out), visibility 0s;
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { margin: 0; border-bottom: 1px solid var(--line); }
.nav-list a {
  display: block; padding: 1rem 0;
  font-family: var(--font-display); font-size: 1.6rem; text-decoration: none; color: var(--midnight);
}
.nav-list a[aria-current="page"] { color: var(--gold-text); }
.nav-cta { align-self: flex-start; }

@media (min-width: 64rem) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; inset: auto; padding: 0; overflow: visible; background: none;
    flex-direction: row; align-items: center; gap: 1.75rem;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  .nav-list { display: flex; gap: 1.5rem; }
  .nav-list li { border: 0; }
  .nav-list a {
    font-family: var(--font-body); font-size: 1rem; font-weight: 500; padding: 0.5rem 0;
    background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 2px no-repeat;
    transition: background-size 0.3s var(--ease-out), color 0.2s;
  }
  .nav-list a:hover, .nav-list a[aria-current="page"] { background-size: 100% 2px; color: var(--midnight); }
}

/* ---------- Review-mode labels ---------- */
.pending {
  border: 1.5px dashed var(--gold);
  background: color-mix(in srgb, var(--gold-pale) 30%, transparent);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--charcoal);
  font-size: var(--step--1);
  max-width: var(--measure);
}
.pending strong { color: var(--gold-deep); font-weight: 700; }
.pending + .pending { margin-top: 0.6rem; }
.on-dark .pending, .site-footer .pending { color: var(--ivory); background: rgba(201, 154, 69, 0.12); }
.on-dark .pending strong, .site-footer .pending strong { color: var(--gold-pale); }
.sample-tag {
  display: inline-block; font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1.5;
  color: var(--gold-deep); background: var(--gold-pale); padding: 0.15rem 0.55rem; border-radius: 999px;
  vertical-align: middle;
}
.review-ribbon {
  position: fixed; right: 0.75rem; bottom: 0.75rem; z-index: 40; max-width: 15rem; margin: 0;
  background: var(--midnight); color: var(--gold-pale);
  font-size: 0.78rem; line-height: 1.35; font-weight: 600; padding: 0.5rem 0.85rem; border-radius: 12px;
  box-shadow: 0 6px 18px rgba(20, 28, 48, 0.25);
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--midnight);
  color: var(--ivory);
  padding: var(--space-5) 0 var(--space-6);
}
.hero-grid { display: grid; gap: var(--space-4); align-items: center; }
.hero-place { color: var(--gold-pale); font-weight: 600; font-size: 1rem; margin-bottom: var(--space-3); }
.hero-title { color: var(--ivory); margin-bottom: var(--space-3); }
.hero-title .line { display: block; }
.hero-title .line:nth-child(2) { color: var(--gold-pale); font-style: italic; font-weight: 300; }
.hero-intro { font-size: var(--step-1); line-height: 1.5; color: #E6E0D2; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: var(--space-4); }

.hero-art { order: -1; justify-self: start; width: 7.5rem; }
.window { width: 100%; height: auto; overflow: visible; }
.window .glow { transform-origin: center; transform-box: fill-box; }

@media (min-width: 56rem) {
  .hero { padding: var(--space-6) 0; }
  .hero-grid { grid-template-columns: 1.35fr 1fr; gap: var(--space-5); }
  .hero-art { order: 0; width: 100%; max-width: 25rem; justify-self: end; }
}

/* Orchestrated load: lines rise, then intro, then window light. */
.js .hero-title .line, .js .hero-intro, .js .hero-actions, .js .hero-place {
  opacity: 0; transform: translateY(0.8rem);
  animation: rise 0.9s var(--ease-out) forwards;
}
.js .hero-place { animation-delay: 0.05s; }
.js .hero-title .line:nth-child(1) { animation-delay: 0.15s; }
.js .hero-title .line:nth-child(2) { animation-delay: 0.4s; }
.js .hero-title .line:nth-child(3) { animation-delay: 0.65s; }
.js .hero-intro { animation-delay: 0.95s; }
.js .hero-actions { animation-delay: 1.1s; }
.js .hero-art { opacity: 0; animation: fade 1.6s ease 0.3s forwards; }
.window .glow { animation: drift 22s ease-in-out infinite alternate; }
.window .glow-2 { animation: drift-2 28s ease-in-out infinite alternate; }
.window .pane { animation: shimmer 9s ease-in-out infinite; }
.window .pane:nth-of-type(3n) { animation-delay: -3s; }
.window .pane:nth-of-type(3n+1) { animation-delay: -6s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes drift { from { transform: translate(-18%, -10%) scale(1); } to { transform: translate(14%, 18%) scale(1.15); } }
@keyframes drift-2 { from { transform: translate(12%, 20%); } to { transform: translate(-16%, -14%); } }
@keyframes shimmer { 0%, 100% { opacity: 0.88; } 50% { opacity: 1; } }

/* Real building photo in an arched "window" with a gold surround and sill */
.hero-photo { position: relative; margin: 0 0 0.6rem; aspect-ratio: 3 / 4; }
.hero-photo picture, .hero-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--arch);
}
.hero-photo::before {
  content: ""; position: absolute; inset: -6px; border: 1.5px solid var(--gold);
  border-radius: var(--arch); opacity: 0.7; pointer-events: none;
}
.hero-photo::after {
  content: ""; position: absolute; left: -10px; right: -10px; bottom: -8px; height: 6px;
  background: var(--gold); border-radius: 2px;
}
.photo-glow {
  position: absolute; inset: 0; border-radius: var(--arch); pointer-events: none;
  background: radial-gradient(60% 45% at 50% 32%, rgba(255, 238, 200, 0.55), rgba(255, 238, 200, 0) 70%);
  mix-blend-mode: soft-light;
  animation: glow-breathe 9s ease-in-out infinite alternate;
}
@keyframes glow-breathe { from { opacity: 0.35; } to { opacity: 1; } }
@media (min-width: 56rem) {
  .hero-photo { margin-bottom: 0; }
  .hero-photo::before { inset: -12px; }
  .hero-photo::after { left: -22px; right: -22px; bottom: -14px; height: 10px; }
}

/* ---------- When & where band ---------- */
.when-where { position: relative; margin-top: calc(var(--space-5) * -1); padding-bottom: var(--space-5); }
.ww-grid {
  display: grid; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 18px 40px -24px rgba(28, 39, 64, 0.35);
}
.ww-item { padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--line); }
.ww-item:last-child { border-bottom: 0; }
.ww-item h3 { font-size: 1.15rem; color: var(--sage); font-family: var(--font-body); font-weight: 700; margin-bottom: 0.6rem; }
.ww-item p { font-size: 1.05rem; }
.ww-item h2.ww-heading { font-family: var(--font-body); font-size: 1.15rem; color: var(--sage); font-weight: 700; margin-bottom: 0.6rem; }
@media (min-width: 56rem) {
  .ww-grid { grid-template-columns: repeat(3, 1fr); }
  .ww-item { border-bottom: 0; border-right: 1px solid var(--line); padding: var(--space-4); }
  .ww-item:last-child { border-right: 0; }
}

.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li { margin: 0 0 0.85rem; }
.service-name { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--midnight); }
.service-when { display: block; font-weight: 600; }
.service-format { display: block; color: var(--muted); font-size: 0.98rem; }
.addr { font-style: normal; font-size: 1.1rem; line-height: 1.5; margin-bottom: 0.6rem; }

/* ---------- Generic sections ---------- */
.section { padding: var(--space-6) 0; }
.section-tight { padding: var(--space-5) 0; }
.section-parchment { background: var(--parchment); }
.section-dark { background: var(--midnight); color: var(--ivory); }
.section-dark h2, .section-dark h3 { color: var(--ivory); }
.section-dark p { color: #E6E0D2; }
.section-dark a:not(.btn) { color: var(--gold-pale); }
.section-head { margin-bottom: var(--space-4); max-width: 44rem; }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.section-dark .section-head p { color: #D9D3C4; }

/* Welcome */
.welcome-grid { display: grid; gap: var(--space-4); }
@media (min-width: 56rem) { .welcome-grid { grid-template-columns: 1fr 1.1fr; gap: var(--space-6); align-items: start; } }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative;
  padding: 0 0 var(--space-3) 4rem; margin: 0;
  border-left: 1px solid var(--line); margin-left: 1.3rem; padding-left: 2.6rem;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.step-icon {
  position: absolute; left: -1.3rem; top: -0.2rem;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ivory); border: 1.5px solid var(--gold); color: var(--gold-text);
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.step-icon svg { width: 1.2rem; height: 1.2rem; }
.steps li:hover .step-icon { background: var(--gold); color: var(--midnight-deep); transform: scale(1.08); }
.steps h3 { margin-bottom: 0.35rem; }

/* Mission */
.mission-quote {
  font-family: var(--font-display); font-weight: 300; font-style: italic;
  font-size: var(--step-2); line-height: 1.4; color: var(--midnight);
  margin: 0 0 var(--space-3); max-width: 40rem;
}
.mission-grid { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 56rem) { .mission-grid { grid-template-columns: 14rem 1fr; gap: var(--space-5); } }

/* Scripture */
.scripture-band { padding-top: 0; }
.scripture { margin: 0; border-left: 3px solid var(--gold); padding: 0.25rem 0 0.25rem clamp(1.25rem, 3vw, 2.25rem); }
.scripture blockquote { margin: 0; }
.scripture p {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: var(--step-2); line-height: 1.45; color: var(--midnight); max-width: 40rem; margin: 0 0 1rem;
}
.scripture figcaption { font-weight: 700; color: var(--sage); font-size: 1rem; }

/* Vision tagline: each word steps a little higher, ending on "Soar" */
.tagline {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 0.55em;
  font-family: var(--font-display); font-size: var(--step-4); font-weight: 400; line-height: 1.05;
  color: var(--midnight); margin: 0 0 var(--space-3); max-width: none;
}
.tagline span:nth-child(2) { margin-bottom: 0.12em; }
.tagline span:nth-child(3) { margin-bottom: 0.24em; }
.tagline span:nth-child(4) { margin-bottom: 0.36em; }
.tagline-small { font-size: var(--step-3); margin-top: 0.5rem; }
.sub-head { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; color: var(--sage); margin: var(--space-3) 0 0; }
.vision-list { list-style: none; padding: 0; margin: 0 0 var(--space-3); }
.vision-list li { padding: 0.8rem 0 0.8rem 1.75rem; border-bottom: 1px solid var(--line); position: relative; margin: 0; max-width: var(--measure); }
.vision-list li::before { content: ""; position: absolute; left: 0.2rem; top: 1.3rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold); }
.motto { margin: var(--space-3) 0 0; padding-left: 1.25rem; border-left: 3px solid var(--sage-light); }
.motto p { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); line-height: 1.5; color: var(--midnight); margin: 0; }

/* Plan your visit: photo + order of worship */
.visit-grid { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 56rem) { .visit-grid { grid-template-columns: 19rem 1fr; gap: var(--space-6); } }
.visit-photo { margin: 0; max-width: 19rem; }
.visit-photo figcaption { margin-top: 0.85rem; color: var(--muted); font-size: 1rem; }
.welcome-quote {
  font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: var(--step-2);
  line-height: 1.4; color: var(--midnight); margin-bottom: var(--space-4); max-width: 36rem;
}
/* Order of worship as a timeline: a gold line with a ring at each moment (no numbers) */
.order-list { list-style: none; padding: 0 0 0 1.75rem; margin: 0; max-width: 34rem; position: relative; }
.order-list::before {
  content: ""; position: absolute; left: 0.45rem; top: 0.9rem; bottom: 0.9rem; width: 2px;
  background: linear-gradient(var(--gold), var(--gold-pale)); transform-origin: top;
}
.order-list li { position: relative; padding: 0.55rem 0; margin: 0; font-size: 1.1rem; }
.order-list li::before {
  content: ""; position: absolute; left: -1.75rem; top: 0.95rem;
  width: 0.95rem; height: 0.95rem; border-radius: 50%;
  background: var(--ivory); border: 2.5px solid var(--gold); box-sizing: border-box;
}
.order-list li:last-child::before { background: var(--gold); }

/* Plain steps with gold dots instead of numbers */
.dot-list { list-style: none; padding: 0; }
.dot-list li { position: relative; padding-left: 1.6rem; margin-bottom: 0.7rem; }
.dot-list li::before { content: ""; position: absolute; left: 0.25rem; top: 0.65em; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold); }

/* Ministry emphasis */
.scripture-label { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; color: var(--sage); margin: 0 0 0.75rem; }
.emphasis-grid { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 56rem) { .emphasis-grid { grid-template-columns: 1.3fr 1fr; } }
.emphasis-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.emphasis-list li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; align-items: baseline; padding: 0.85rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.emphasis-week { font-weight: 700; color: var(--sage); }
.emphasis-focus { font-family: var(--font-display); font-size: var(--step-1); color: var(--midnight); }
.emphasis-list .pending { padding: 0.4rem 0.7rem; }

/* Zoom meetings */
.meeting { padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.meeting h3 { margin-bottom: 0.2rem; }
.meeting-when { color: var(--muted); margin-bottom: 0.75rem; }
.meeting .dial { margin-bottom: 1rem; }
.meeting .dial dd { font-size: 1.15rem; }
.zelle-id { font-size: 1.3rem; font-weight: 700; color: var(--midnight); margin-bottom: 0.5rem; word-break: break-word; }

/* History gallery */
.gallery { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.gallery li { margin: 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.gallery figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.4rem; }

/* Prayer line */
.prayer-card { border-top: 5px solid var(--sage); margin-top: var(--space-4); }
.prayer-card[data-empty] { display: none; }
.prayer-card h2 { font-size: var(--step-2); margin: 0; }
.prayer-card .lede { margin: 0; }
.dial { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1.25rem; margin: 0; align-items: baseline; }
.dial dt { font-weight: 700; color: var(--sage); }
.dial dd { margin: 0; font-size: 1.25rem; font-weight: 600; }

/* Arch image frame — signature shape used for all photos */
.arch-frame {
  position: relative; aspect-ratio: 3 / 4; width: 100%;
  border-radius: var(--arch); overflow: hidden;
  background: var(--midnight);
  border: 6px solid var(--white);
  box-shadow: 0 0 0 1px var(--line);
}
.arch-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arch-frame.photo-failed img { display: none; }
.arch-frame .arch-art { width: 100%; height: 100%; }
.arch-small { max-width: 14rem; margin-inline: auto; }

/* Ministries (featured list on home) */
.ministry-rows { list-style: none; padding: 0; margin: 0 0 var(--space-4); border-top: 1px solid var(--line); }
.ministry-row { margin: 0; border-bottom: 1px solid var(--line); }
.ministry-row a {
  display: grid; grid-template-columns: 3rem 1fr; gap: 0.25rem 1.1rem; align-items: start;
  padding: var(--space-3) 0; text-decoration: none; color: inherit;
  transition: padding 0.3s var(--ease-out), background-color 0.3s;
}
.ministry-row a:hover { padding-left: 0.75rem; background: color-mix(in srgb, var(--parchment) 55%, transparent); }
.ministry-row .m-icon { grid-row: span 2; }
.ministry-row .m-name { font-family: var(--font-display); font-size: var(--step-2); color: var(--midnight); line-height: 1.2; }
.ministry-row .m-summary { color: var(--muted); margin: 0; }
@media (min-width: 56rem) {
  .ministry-row a { grid-template-columns: 3rem 18rem 1fr; align-items: center; }
  .ministry-row .m-icon { grid-row: auto; }
}

.m-icon {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; color: var(--white);
  background: var(--cat, var(--sage));
}
.m-icon svg { width: 1.45rem; height: 1.45rem; }
[data-cat="worship"] { --cat: var(--gold-text); }
[data-cat="prayer"] { --cat: var(--sage); }
[data-cat="youth"] { --cat: var(--river); }
[data-cat="fellowship"] { --cat: var(--midnight-soft); }
[data-cat="outreach"] { --cat: var(--plum); }
[data-cat="boards"] { --cat: var(--midnight); }
[data-cat="other"] { --cat: var(--charcoal); }

/* Two ways to worship */
.two-ways-grid { display: grid; gap: 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 56rem) { .two-ways-grid { grid-template-columns: 1fr 1fr; } }
.way { padding: var(--space-5) var(--space-4); position: relative; }
.way-inperson { background: var(--white); }
.way-online { background: var(--sage); color: var(--white); }
.way-online h2 { color: var(--white); }
.way-online p { color: #F1F3EE; }
.way .btn { margin-top: var(--space-2); }

/* Gatherings */
.gatherings-grid { display: grid; gap: var(--space-5); }
@media (min-width: 56rem) { .gatherings-grid { grid-template-columns: 1.2fr 1fr; } }
.event-list { list-style: none; padding: 0; margin: 0; }
.event { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.event-date { text-align: center; border: 1.5px solid var(--gold); border-radius: var(--radius-sm); padding: 0.4rem 0; line-height: 1.1; align-self: start; }
.event-date .mon { display: block; font-size: 0.85rem; font-weight: 700; color: var(--gold-text); }
.event-date .day { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--midnight); }
.event h3 { margin: 0 0 0.2rem; font-size: 1.2rem; }
.event p { margin: 0; color: var(--muted); font-size: 1rem; }
.empty-note { color: var(--muted); }

.connect-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3);
}
.connect-card h3 { font-size: var(--step-2); }

/* Giving invite (quiet) */
.giving-invite-inner { display: grid; gap: var(--space-3); align-items: center; }
@media (min-width: 56rem) { .giving-invite-inner { grid-template-columns: 1fr auto; gap: var(--space-5); } }

/* Closing contact */
.closing { text-align: left; }
.closing-inner { display: grid; gap: var(--space-3); border-top: 1px solid var(--line); padding-top: var(--space-5); }
.closing-flat { border-top: 0; padding-top: 0; }
.after-steps { margin-top: var(--space-3); }
@media (min-width: 56rem) { .closing-inner { grid-template-columns: 1.4fr 1fr; align-items: end; } }
.closing-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Inner page header ---------- */
.page-hero { background: var(--midnight); color: var(--ivory); padding: var(--space-5) 0; position: relative; overflow: hidden; }
.page-hero h1 { color: var(--ivory); font-size: clamp(2.3rem, 1.6rem + 3vw, 3.8rem); margin-bottom: var(--space-2); }
.page-hero p { color: #E6E0D2; font-size: var(--step-1); line-height: 1.5; max-width: 36rem; margin: 0; }
.page-hero-grid { display: grid; gap: var(--space-3); align-items: end; }
.page-hero .mini-window { display: none; }
@media (min-width: 56rem) {
  .page-hero { padding: var(--space-6) 0 var(--space-5); }
  .page-hero-grid { grid-template-columns: 1fr 9rem; }
  .page-hero .mini-window { display: block; width: 9rem; opacity: 0.9; }
}

/* ---------- Content layouts ---------- */
.split { display: grid; gap: var(--space-4); }
@media (min-width: 56rem) { .split { grid-template-columns: 16rem 1fr; gap: var(--space-5); } }
.split + .split { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.split h2 { font-size: var(--step-2); }
.prose p, .prose li { max-width: var(--measure); }

.belief-list { list-style: none; padding: 0; margin: 0; }
.belief-list li { padding: 0.8rem 0 0.8rem 1.75rem; border-bottom: 1px solid var(--line); position: relative; margin: 0; }
.belief-list li::before { content: ""; position: absolute; left: 0.2rem; top: 1.3rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold); }

.people { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.person .arch-frame { max-width: 13rem; margin-bottom: 1rem; }
.person h3 { margin-bottom: 0.15rem; }
.person .role { color: var(--sage); font-weight: 600; margin-bottom: 0.5rem; }

.values { display: grid; gap: var(--space-3); }
@media (min-width: 40rem) { .values { grid-template-columns: 1fr 1fr; } }
.value h3 { font-size: 1.2rem; }

/* Ministries directory */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-4); }
.filter-btn {
  min-height: 2.75rem; padding: 0.5rem 1.1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--charcoal);
  font: 600 0.98rem var(--font-body); cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.filter-btn:hover { border-color: var(--midnight); }
.filter-btn[aria-pressed="true"] { background: var(--midnight); border-color: var(--midnight); color: var(--white); }

.ministry-dir { display: grid; gap: var(--space-4); }
.ministry {
  display: grid; gap: var(--space-3);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-3); border-top: 5px solid var(--cat, var(--sage));
}
@media (min-width: 48rem) { .ministry { grid-template-columns: 9rem 1fr; padding: var(--space-4); gap: var(--space-4); } }
.ministry .arch-frame { max-width: 9rem; border-width: 4px; }
.ministry h2 { font-size: var(--step-2); margin-bottom: 0.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.ministry .m-cat { color: var(--cat); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.6rem; }
.ministry dl { display: grid; gap: 0.5rem 1.25rem; margin: var(--space-2) 0; }
@media (min-width: 40rem) { .ministry dl { grid-template-columns: 9rem 1fr; } }
.ministry dt { font-weight: 700; color: var(--sage); }
.ministry dd { margin: 0; }
.ministry[hidden] { display: none; }

/* Online worship */
.join-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-4); display: grid; gap: var(--space-3);
}
.join-card .meta { display: grid; gap: 0.25rem; }
.howto { display: grid; gap: var(--space-4); }
@media (min-width: 48rem) { .howto { grid-template-columns: 1fr 1fr; } }

/* FAQ (Plan your visit) */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0; font-family: var(--font-display); font-size: var(--step-1); color: var(--midnight);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.7rem; height: 0.7rem;
  border-right: 2px solid var(--gold-text); border-bottom: 2px solid var(--gold-text);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .faq-body { padding: 0 0 1.25rem; }

/* Contact */
.contact-grid { display: grid; gap: var(--space-5); }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1fr 1.25fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 var(--space-3); }
.contact-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.contact-list .label { display: block; color: var(--sage); font-weight: 700; font-size: 0.95rem; }
.contact-list a { font-size: 1.15rem; font-weight: 600; word-break: break-word; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.15rem; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4) var(--space-3); }
@media (min-width: 48rem) { .form-card { padding: var(--space-4); } }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; }
.field .hint { font-size: 0.92rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem;
  padding: 0.7rem 0.9rem;
  font: 1.05rem/1.4 var(--font-body); color: var(--charcoal);
  background: var(--ivory); border: 1.5px solid #B9AC93; border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--midnight); background: var(--white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.95rem; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.req { color: var(--error); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: var(--radius-sm); padding: 0.9rem 1rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-success { background: #E3EDE1; color: var(--success); border: 1px solid #B7CDB3; }
.form-status.is-error { background: #F6E3E1; color: var(--error); border: 1px solid #E2B8B3; }
.form-status.is-info { background: var(--parchment); color: var(--charcoal); border: 1px solid var(--line); }
.form-note { font-size: 0.92rem; color: var(--muted); margin: 0; }
.inline-form { display: grid; gap: 0.75rem; }
@media (min-width: 30rem) { .inline-form .row { display: flex; gap: 0.6rem; align-items: start; } .inline-form .row .field { flex: 1; } }

/* ---------- Newsletter dialog ---------- */
.nl-dialog {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%;
  max-height: calc(100dvh - 2rem);
  background: var(--ivory); color: var(--charcoal);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 -10px 40px rgba(20, 28, 48, 0.3);
  overflow: auto;
}
.nl-dialog::backdrop { background: rgba(20, 28, 48, 0.55); }
@media (min-width: 40rem) {
  .nl-dialog { margin: auto; max-width: 30rem; border-radius: var(--radius-md); }
}
.nl-dialog[open] { animation: sheet-in 0.45s var(--ease-out); }
.nl-dialog[open]::backdrop { animation: fade 0.35s ease; }
.nl-dialog.is-closing { animation: sheet-out 0.25s ease forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(2rem); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(1.5rem); } }
.nl-top { background: var(--midnight); color: var(--ivory); padding: var(--space-3) var(--space-3) var(--space-2); position: relative; }
.nl-top h2 { color: var(--ivory); font-size: var(--step-2); margin: 0; padding-right: 2.5rem; }
.nl-body { padding: var(--space-3); }
.nl-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1.5px solid rgba(233, 211, 166, 0.6); background: transparent; color: var(--ivory);
  cursor: pointer; display: grid; place-items: center;
}
.nl-close:hover { background: rgba(233, 211, 166, 0.15); }
.nl-close svg { width: 1rem; height: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--midnight-deep); color: #DCD6C8; padding: var(--space-6) 0 var(--space-3); margin-top: 0; }
.site-footer a { color: var(--ivory); }
.site-footer a:hover { color: var(--gold-pale); }
.footer-grid { display: grid; gap: var(--space-4); }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 64rem) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 0.9fr; } }
.footer-brand .brand { color: var(--ivory); }
.footer-brand .brand-sub { color: var(--sage-light); }
.footer-brand p { margin-top: var(--space-2); color: #CFC8B8; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.site-footer h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--gold-pale); letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.5rem; }
.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--gold-pale);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}
.link-button:hover { color: var(--white); text-decoration-thickness: 2px; }
.site-footer .service-name { color: var(--ivory); font-size: 1.1rem; }
.site-footer .service-format { color: #B9B2A2; }
.footer-bottom {
  margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid rgba(233, 211, 166, 0.2);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: 0.92rem; color: #B9B2A2;
}
.socials { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.socials a { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid rgba(233, 211, 166, 0.4); display: grid; place-items: center; }
.socials svg { width: 1.15rem; height: 1.15rem; }

/* ---------- 404 / thank-you ---------- */
.simple-page { padding: var(--space-6) 0; }
.simple-page .arch-small { margin: 0 0 var(--space-4); }
.simple-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-3); }

/* ---------- Gentle reveal (sparingly applied) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(1rem); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .hero-title .line, .js .hero-intro, .js .hero-actions, .js .hero-place, .js .hero-art { opacity: 1; transform: none; animation: none; }
  .window .glow, .window .glow-2, .window .pane, .photo-glow { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nl-dialog, .review-ribbon, .announcement { display: none !important; }
  body { background: #fff; }
  .hero, .page-hero { background: #fff; color: #000; }
}


/* =====================================================================
   PHOTOS
   ===================================================================== */
/* Inner-page headers: photo behind a navy wash, slow drift + parallax */
.page-hero.has-media { padding: var(--space-6) 0; min-height: clamp(18rem, 42vw, 26rem); display: flex; align-items: flex-end; }
.page-hero-media { position: absolute; inset: -8% 0; z-index: 0; will-change: transform; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; animation: drift-zoom 26s ease-in-out infinite alternate; }
.page-hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 28, 48, 0.94) 0%, rgba(20, 28, 48, 0.82) 45%, rgba(20, 28, 48, 0.5) 100%),
    linear-gradient(0deg, rgba(20, 28, 48, 0.75), rgba(20, 28, 48, 0) 55%);
}
@media (max-width: 55.99rem) {
  .page-hero-media::after { background: linear-gradient(0deg, rgba(20, 28, 48, 0.92), rgba(20, 28, 48, 0.8)); }
}
.page-hero.has-media .container { position: relative; z-index: 1; width: min(100% - 2rem, var(--container)); }
.page-hero.has-media .page-hero-grid { grid-template-columns: 1fr; }
.page-hero.photo-failed .page-hero-media { display: none; }
@keyframes drift-zoom { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }

/* Home hero: the church photo breathes slowly inside its arch */
.hero-photo { overflow: visible; }
.hero-photo picture { overflow: hidden; border-radius: var(--arch); }
.hero-photo img { animation: drift-zoom 30s ease-in-out infinite alternate; transform-origin: 50% 35%; }

/* Photo cards on the home page ("worship in person / from home") */
.way-media {
  margin: calc(var(--space-5) * -1) calc(var(--space-4) * -1) var(--space-4);
  height: clamp(12rem, 24vw, 16rem); overflow: hidden; position: relative; background: var(--midnight-soft);
}
.way-media:empty { display: none; }
.way-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.way:hover .way-media img { transform: scale(1.06); }
.way-media.photo-failed { display: none; }

/* Round photo thumbnails for featured ministries */
.m-thumb {
  width: 3rem; height: 3rem; border-radius: 50%; overflow: hidden; flex: none; position: relative;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 3.5px var(--cat, var(--sage)); grid-row: span 2;
}
.m-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.ministry-row a:hover .m-thumb img { transform: scale(1.15); }
@media (min-width: 56rem) { .m-thumb { grid-row: auto; width: 3.5rem; height: 3.5rem; } }

/* Ministry cards: photo zooms gently on hover, card lifts */
.ministry { transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), opacity 0.45s var(--ease-out); }
.ministry:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(28, 39, 64, 0.45); }
.ministry .arch-frame img { transition: transform 1.1s var(--ease-out); }
.ministry:hover .arch-frame img { transform: scale(1.07); }
.arch-frame.has-photo .arch-art { opacity: 0; }
.arch-frame.photo-failed .arch-art { opacity: 1; }

/* Pastoral staff: a monogram until a real portrait is supplied (never a stock face) */
.monogram {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 3rem; color: var(--gold-pale); letter-spacing: 0.04em;
  background: radial-gradient(circle at 50% 35%, var(--midnight-soft), var(--midnight-deep));
}

/* Photo credits */
.credit-list { padding-left: 1.2rem; font-size: 0.95rem; color: var(--muted); }

/* =====================================================================
   MOTION
   ===================================================================== */
/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--gold), var(--gold-pale));
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* Header tightens and casts a soft shadow once the page scrolls */
.site-header { transition: box-shadow 0.35s var(--ease-out), background-color 0.35s var(--ease-out); }
.header-inner { transition: min-height 0.35s var(--ease-out); }
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(20, 28, 48, 0.45); }
@media (min-width: 64rem) { .site-header.is-scrolled .header-inner { min-height: 3.75rem; } }

/* Page enters softly */
.motion main { animation: page-in 0.6s var(--ease-out) both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

/* Scroll reveals. Elements are tagged by script; --d is a per-item stagger delay. */
.motion [data-anim] { transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out), clip-path 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.motion [data-anim="up"]:not(.in-view) { opacity: 0; transform: translateY(1.75rem); }
.motion [data-anim="left"]:not(.in-view) { opacity: 0; transform: translateX(-1.75rem); }
.motion [data-anim="right"]:not(.in-view) { opacity: 0; transform: translateX(1.75rem); }
.motion [data-anim="zoom"]:not(.in-view) { opacity: 0; transform: scale(0.94); }
.motion [data-anim="fade"]:not(.in-view) { opacity: 0; }
/* Photo frames open like a curtain rising, the image settling as it does */
.motion [data-anim="wipe"]:not(.in-view) { clip-path: inset(100% 0 0 0); }
.motion [data-anim="wipe"].in-view { clip-path: inset(0 0 0 0); }
.motion [data-anim="wipe"] img { transition: transform 1.6s var(--ease-out); }
.motion [data-anim="wipe"]:not(.in-view) img { transform: scale(1.18); }

/* Vision words rise one after another */
.motion .tagline span { display: inline-block; transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
.motion .tagline:not(.in-view) span { opacity: 0; transform: translateY(0.6em); }

/* Scripture appears word by word */
.motion .word-reveal .w { display: inline-block; transition: opacity 0.6s ease, transform 0.7s var(--ease-out), filter 0.7s ease; transition-delay: var(--d, 0s); }
.motion .word-reveal:not(.in-view) .w { opacity: 0; transform: translateY(0.35em); filter: blur(4px); }

/* Order of worship: the gold line draws down, rings light in sequence */
.motion .order-list::before { transition: transform 1.6s var(--ease-out); }
.motion .order-list:not(.in-view)::before { transform: scaleY(0); }
.motion .order-list li { transition: opacity 0.6s ease, transform 0.6s var(--ease-out); transition-delay: var(--d, 0s); }
.motion .order-list:not(.in-view) li { opacity: 0; transform: translateX(-0.75rem); }

/* Buttons: a soft sheen passes over on hover */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }
.btn[aria-disabled="true"]::after { display: none; }

/* Mobile menu links slide in one after another */
.site-nav.is-open .nav-list li { animation: nav-in 0.5s var(--ease-out) both; }
.site-nav.is-open .nav-list li:nth-child(2) { animation-delay: 0.05s; }
.site-nav.is-open .nav-list li:nth-child(3) { animation-delay: 0.1s; }
.site-nav.is-open .nav-list li:nth-child(4) { animation-delay: 0.15s; }
.site-nav.is-open .nav-list li:nth-child(5) { animation-delay: 0.2s; }
.site-nav.is-open .nav-list li:nth-child(6) { animation-delay: 0.25s; }
.site-nav.is-open .nav-cta { animation: nav-in 0.5s var(--ease-out) 0.3s both; }
@keyframes nav-in { from { opacity: 0; transform: translateX(-1rem); } to { opacity: 1; transform: none; } }
@media (min-width: 64rem) { .site-nav.is-open .nav-list li, .site-nav.is-open .nav-cta { animation: none; } }

/* FAQ answers unfold */
.faq details[open] .faq-body { animation: unfold 0.45s var(--ease-out); }
@keyframes unfold { from { opacity: 0; transform: translateY(-0.5rem); } to { opacity: 1; transform: none; } }

/* Ministry filter: cards settle back in when shown */
.ministry.is-entering { animation: card-in 0.55s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes card-in { from { opacity: 0; transform: translateY(1rem) scale(0.98); } to { opacity: 1; transform: none; } }

/* Form status messages arrive with a small lift */
.form-status:not(:empty) { animation: unfold 0.4s var(--ease-out); }

/* Back to top */
.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 45;
  width: 3rem; height: 3rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--midnight); color: var(--gold-pale); display: grid; place-items: center;
  box-shadow: 0 10px 24px -10px rgba(20, 28, 48, 0.6);
  opacity: 0; transform: translateY(1rem); pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), background-color 0.25s;
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--midnight-soft); }
.to-top svg { width: 1.1rem; height: 1.1rem; }
.review-ribbon { right: 4.75rem; }

/* =====================================================================
   DEPTH: layered shadows, photo backgrounds, angled bands, light orbs
   ===================================================================== */
:root {
  --shadow-1: 0 1px 2px rgba(20, 28, 48, 0.06), 0 4px 12px -4px rgba(20, 28, 48, 0.1);
  --shadow-2: 0 2px 4px rgba(20, 28, 48, 0.05), 0 14px 32px -12px rgba(20, 28, 48, 0.25);
  --shadow-3: 0 4px 10px rgba(20, 28, 48, 0.06), 0 30px 60px -24px rgba(20, 28, 48, 0.45);
}
.ministry, .join-card, .form-card, .connect-card { box-shadow: var(--shadow-1); }
.ministry:hover, .join-card:hover, .connect-card:hover { box-shadow: var(--shadow-3); }
.ww-grid { box-shadow: var(--shadow-3); }
.two-ways-grid { box-shadow: var(--shadow-2); }
.join-card, .connect-card, .form-card { transition: box-shadow 0.5s var(--ease-out), transform 0.5s var(--ease-out); }

/* Photo backgrounds behind whole sections */
.has-bg { position: relative; isolation: isolate; overflow: hidden; }
.section-bg { position: absolute; inset: -12% 0; z-index: -2; will-change: transform; }
.section-bg img { width: 100%; height: 100%; object-fit: cover; }
.section-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 28, 48, 0.86), rgba(20, 28, 48, 0.78) 50%, rgba(20, 28, 48, 0.9)); }
.section-bg.photo-failed { display: none; }
.has-bg.on-dark, .has-bg.section-dark { background: var(--midnight); color: var(--ivory); }
.has-bg h2, .has-bg h3 { color: var(--ivory); }
.has-bg p, .has-bg .lede { color: #E2DCCD; }
.has-bg a:not(.btn) { color: var(--gold-pale); }
.has-bg .closing-inner { border-top-color: rgba(233, 211, 166, 0.25); }
.has-bg .btn-primary { background: var(--gold); color: var(--midnight-deep); }
.has-bg .btn-primary:hover { background: var(--gold-pale); color: var(--midnight-deep); }
.has-bg .btn-outline { border-color: var(--gold-pale); color: var(--ivory); }
.has-bg .btn-outline:hover { background: var(--gold-pale); color: var(--midnight-deep); }
.has-bg :focus-visible { outline-color: var(--gold-pale); }

/* Light variant: the photo shows through a warm ivory wash (for closing calls to action) */
.has-bg.bg-light { background: var(--ivory); color: var(--charcoal); }
.has-bg.bg-light .section-bg::after { background: linear-gradient(180deg, rgba(250, 246, 238, 0.93), rgba(250, 246, 238, 0.88) 50%, rgba(250, 246, 238, 0.95)); }
.has-bg.bg-light h2, .has-bg.bg-light h3 { color: var(--charcoal); }
.has-bg.bg-light p, .has-bg.bg-light .lede { color: var(--charcoal); }
.has-bg.bg-light a:not(.btn) { color: var(--midnight); }
.has-bg.bg-light .closing-inner { border-top-color: var(--line); }
.has-bg.bg-light .btn-primary { background: var(--midnight); color: var(--white); }
.has-bg.bg-light .btn-primary:hover { background: var(--midnight-soft); color: var(--white); }
.has-bg.bg-light .btn-outline { border-color: var(--midnight); color: var(--midnight); }
.has-bg.bg-light .btn-outline:hover { background: var(--midnight); color: var(--white); }
.has-bg.bg-light :focus-visible { outline-color: var(--gold); }

/* Home hero: stained-glass light behind, deep navy wash, drifting motes on top */
.hero.has-bg .section-bg::after {
  background:
    radial-gradient(60% 80% at 80% 40%, rgba(201, 154, 69, 0.18), transparent 70%),
    linear-gradient(100deg, rgba(20, 28, 48, 0.96) 0%, rgba(20, 28, 48, 0.9) 50%, rgba(20, 28, 48, 0.78) 100%);
}
.hero-motes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero .container { position: relative; z-index: 1; }

/* Scripture on a candlelit photo */
.scripture-band.has-bg { padding: calc(var(--space-6) + 3vw) 0; }
.scripture-band.has-bg .section-bg::after { background: radial-gradient(70% 90% at 50% 50%, rgba(20, 28, 48, 0.72), rgba(20, 28, 48, 0.92)); }
.has-bg .scripture { border-left-color: var(--gold); }
.has-bg .scripture p { color: var(--ivory); font-size: var(--step-3); line-height: 1.35; }
.has-bg .scripture figcaption, .has-bg .scripture-label { color: var(--gold-pale); }

/* Angled band edges give the page a sense of layers */
.angled { clip-path: polygon(0 3vw, 100% 0, 100% calc(100% - 3vw), 0 100%); margin: -3vw 0; z-index: 1; }
.angled.section-dark { padding: calc(var(--space-5) + 3vw) 0; }

/* Soft floating light in the parchment sections */
.section-parchment { position: relative; overflow: hidden; isolation: isolate; }
.orb {
  position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(40px); opacity: 0.55;
  animation: orb-float 16s ease-in-out infinite alternate;
}
.orb-a { width: 26rem; height: 26rem; right: -8rem; top: -8rem; background: radial-gradient(circle, rgba(201, 154, 69, 0.55), transparent 70%); }
.orb-b { width: 20rem; height: 20rem; left: -6rem; bottom: -8rem; background: radial-gradient(circle, rgba(85, 102, 78, 0.4), transparent 70%); animation-duration: 20s; animation-delay: -6s; }
@keyframes orb-float { from { translate: 0 0; } to { translate: 3rem 2.5rem; } }

/* =====================================================================
   INTERACTIVE
   ===================================================================== */
/* Next gathering countdown */
.next-service {
  position: relative; z-index: 2; margin: 0 0 1rem; padding: 1.1rem 1.25rem;
  background: rgba(28, 39, 64, 0.93); color: var(--ivory);
  border: 1px solid rgba(233, 211, 166, 0.25); border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--shadow-3);
  display: grid; gap: 0.9rem; align-items: center;
}
.next-service[data-empty] { display: none; }
@media (min-width: 56rem) { .next-service { grid-template-columns: 1fr auto auto; gap: 2rem; padding: 1.1rem 1.75rem; } }
.ns-label { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--gold-pale); font-size: 0.95rem; }
.ns-pulse { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(201, 154, 69, 0.6); animation: pulse 2s infinite; }
.ns-live .ns-pulse { background: #E5675B; box-shadow: 0 0 0 0 rgba(229, 103, 91, 0.6); }
@keyframes pulse { 70% { box-shadow: 0 0 0 0.6rem rgba(201, 154, 69, 0); } 100% { box-shadow: 0 0 0 0 rgba(201, 154, 69, 0); } }
.ns-name { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.15; display: block; color: var(--ivory); }
.ns-when { color: #CFC8B8; font-size: 1rem; }
.ns-count { display: flex; gap: 0.5rem; }
.ns-unit { min-width: 3.6rem; text-align: center; padding: 0.45rem 0.35rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(233, 211, 166, 0.18); }
.ns-num { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1; color: var(--ivory); font-variant-numeric: tabular-nums; }
.ns-num.tick { animation: tick 0.45s var(--ease-out); }
@keyframes tick { from { transform: translateY(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
.ns-cap { display: block; font-size: 0.75rem; color: #B9B2A2; margin-top: 0.25rem; }
.next-service .btn { white-space: nowrap; }

/* Scrolling schedule ribbon */
.marquee { overflow: hidden; background: var(--gold); color: var(--midnight-deep); padding: 0.95rem 0; position: relative; z-index: 2; }
.marquee[data-empty] { display: none; }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 1.25rem; padding-right: 1.25rem; white-space: nowrap; font-family: var(--font-display); font-size: 1.3rem; }
.marquee-item svg { width: 0.9rem; height: 0.9rem; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Cards that tilt toward the cursor, with a spotlight that follows it */
[data-tilt] { transform-style: preserve-3d; }
[data-spotlight] { position: relative; isolation: isolate; }
[data-spotlight]::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), rgba(201, 154, 69, 0.16), transparent 60%);
  transition: opacity 0.4s ease;
}
[data-spotlight]:hover::before { opacity: 1; }
.way-online[data-spotlight]::before { background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.14), transparent 60%); }
[data-spotlight] > * { position: relative; z-index: 2; }
[data-spotlight] > .way-media { z-index: 0; }

/* Headings slide up from behind a mask */
.motion .mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.motion .mask-inner { display: block; transition: transform 1s var(--ease-out); }
.motion .mask:not(.in-view) .mask-inner { transform: translateY(105%); }

/* Ministry list: a photo preview floats beside the cursor */
.hover-preview {
  position: fixed; left: 0; top: 0; z-index: 70; width: 15rem; aspect-ratio: 4 / 3; pointer-events: none;
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-3); border: 4px solid var(--white);
  opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.85) rotate(-3deg);
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
}
.hover-preview.is-on { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1) rotate(-3deg); }
.hover-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Back-to-top shows reading progress as a ring */
.to-top .ring { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); transform: rotate(-90deg); }
.to-top .ring circle { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; }

/* Page-to-page transitions in browsers that support them */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.28s ease both; }
::view-transition-new(root) { animation: vt-in 0.45s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-0.5rem); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(0.75rem); } }

@media (prefers-reduced-motion: reduce) {
  .page-hero-media img, .hero-photo img, .orb, .ns-pulse, .marquee-track { animation: none !important; }
  .marquee-track { flex-wrap: wrap; width: auto; }
  .hover-preview, .hero-motes { display: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .motion .mask-inner { transform: none !important; }
  .motion [data-anim], .motion [data-anim] img, .motion .tagline span, .motion .word-reveal .w,
  .motion .order-list li, .motion .order-list::before {
    opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important;
  }
  .scroll-progress { display: none; }
  .btn::after { display: none; }
}
