/*
 * Glenarm Baptist Church — site styles
 * Mobile-first; charcoal / red / white brand palette.
 * Animations respect prefers-reduced-motion (see html block).
 */

/* -------------------------------------------------------------------------- */
/* Design tokens                                                              */
/* -------------------------------------------------------------------------- */

:root {
  --color-charcoal: #141414;
  --color-charcoal-mid: #1c1c1c;
  --color-red: #e32222;
  --color-red-bright: #ff3b3b;
  --color-red-dark: #b81818;
  --color-red-soft: rgba(227, 34, 34, 0.1);
  --color-white: #ffffff;
  --color-bg: #f6f5f3;
  --color-bg-alt: #ebe9e4;
  --color-ink: #161616;
  --color-ink-muted: #4a4844;
  --color-divider: #0a0a0a;
  /* Typography: Fraunces (display) + Plus Jakarta Sans (UI/body) */
  --font-display: "Fraunces", "Georgia", serif;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --text-fluid-sm: clamp(0.75rem, 0.72rem + 0.14vw, 0.875rem);
  --text-fluid-base: clamp(0.8125rem, 0.76rem + 0.2vw, 0.9375rem);
  --text-fluid-lead: clamp(0.875rem, 0.8rem + 0.24vw, 1rem);
  --line-height-body: 1.72;
  --space-xs: 0.35rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: clamp(3.5rem, 6vw, 5.5rem);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.12);
  --header-h: 4.25rem;
  --max: 72rem;
  --pad-below-header: clamp(1.5rem, 4.25vw, 2.5rem);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --nav-overlay-z: 260;
  --header-z: 280;
  --fab-z: 300;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Reserve vertical scrollbar space (overlay scrollbars often ignore scrollbar-gutter) */
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-image {
    transform: none !important;
  }
}

body.nav-open {
  overflow: hidden;
}

/* Keep the header bar opaque when the mobile overlay is open (clear target for close control) */
body.nav-open .site-header {
  background: var(--color-charcoal-mid);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-fluid-base);
  line-height: var(--line-height-body);
  color: var(--color-ink);
  background: var(--color-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-charcoal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease-soft);
}

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

:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 3px;
}

/* Skip link — keyboard users jump to main content */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-red);
  color: var(--color-white);
  font-weight: 700;
  font-family: var(--font-sans);
}

.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

/* -------------------------------------------------------------------------- */
/* Site header & primary nav                                                  */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--header-z);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  transition:
    background-color 0.5s var(--ease-soft),
    border-color 0.45s var(--ease-soft),
    box-shadow 0.55s var(--ease-soft);
  background-color: rgba(14, 14, 14, 0.14);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
}

.site-header.is-solid {
  background: var(--color-charcoal-mid);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header:not(.is-solid) .brand-logo {
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.55));
}

.site-header:not(.is-solid) .brand-text {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.65);
}

.site-header:not(.is-solid) .site-nav a {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.5rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Desktop: avoid space-between reflow when logo/nav intrinsic widths settle (fonts, image decode) */
@media (min-width: 769px) {
  .header-inner {
    justify-content: flex-start;
  }

  .site-nav {
    margin-left: auto;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 2vw, 0.65rem);
  min-width: 0;
  text-decoration: none;
  line-height: 0;
  color: inherit;
}

.brand:hover {
  opacity: 0.94;
}

.brand-logo {
  height: clamp(1.3rem, 3.2vw + 0.95rem, 2.35rem);
  width: auto;
  /* Room for header padding, gap, and 46px menu control — keeps logo visible on narrow viewports */
  max-width: min(calc(100vw - 7.25rem), 260px);
  aspect-ratio: 640 / 160;
  object-fit: contain;
  flex-shrink: 1;
}

/* Text wordmark reserved for print / no-image fallback — logo always shows in the bar */
.brand-text {
  display: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-white);
  max-width: 11rem;
}

@media (min-width: 480px) {
  .brand-logo {
    height: 2.6rem;
    max-width: min(calc(100vw - 7.25rem), 300px);
  }
}

/* Hamburger — visible on small screens only */
/* position + z-index so the toggle stacks above the fixed mobile .site-nav overlay (later in DOM) */
.nav-toggle {
  position: relative;
  z-index: calc(var(--header-z) + 2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-soft),
    box-shadow 0.25s var(--ease-soft);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.nav-toggle[aria-expanded="true"]:hover {
  background: rgba(255, 255, 255, 0.26);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  position: relative;
  border-radius: 1px;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 1px;
  transition: transform 0.35s var(--ease-out-expo);
}

.nav-toggle-bar::before {
  top: -7px;
}

.nav-toggle-bar::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before,
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  width: 24px;
  height: 3px;
  left: -1px;
  background: var(--color-white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop: horizontal nav in header */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.site-nav a {
  position: relative;
  display: block;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.22s var(--ease-soft);
  /* Reduce width jitter when web font swaps in vs system-ui fallback */
  font-synthesis: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.25rem;
  height: 2px;
  background: linear-gradient(90deg, var(--color-red), var(--color-red-bright));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s var(--ease-out-expo);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-white);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--color-white);
  text-decoration: underline;
  text-decoration-color: var(--color-red-bright);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
  text-decoration-skip-ink: auto;
}

/* Avoid double bar: current page uses text underline instead of the hover rail */
.site-nav a[aria-current="page"]::after {
  display: none;
}

/* Mobile / tablet: full-viewport overlay menu (“canvas”) */
@media (max-width: 768px) {
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: var(--nav-overlay-z);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: calc(var(--header-h) + env(safe-area-inset-top, 0px)) clamp(1.5rem, 5vw, 2.5rem)
      calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
    background-color: rgba(12, 12, 12, 0.38);
    background-image: radial-gradient(
      ellipse 120% 85% at 50% 100%,
      rgba(227, 34, 34, 0.22) 0%,
      transparent 55%
    );
    backdrop-filter: blur(18px) saturate(165%);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
    border: none;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.98);
    /* Transitions enabled only after first paint (see html.nav-motion-ready in main.js)
       so the closed overlay does not “ease in” from the UA’s initial composite state. */
    transition: none;
    isolation: isolate;
  }

  /* Opening: show immediately for hit-testing; fade opacity/transform. Closing: hide
     visibility only after opacity finishes (visibility does not interpolate smoothly). */
  html.nav-motion-ready .site-nav {
    transition:
      opacity 0.4s var(--ease-out-expo),
      visibility 0s linear 0.4s,
      transform 0.45s var(--ease-out-expo);
  }

  html.nav-motion-ready .site-nav.is-open {
    transition:
      opacity 0.4s var(--ease-out-expo),
      visibility 0s linear 0s,
      transform 0.45s var(--ease-out-expo);
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
  }

  .site-nav:not(.is-open) li {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* Staggered link entrance when open */
  .site-nav.is-open li {
    animation: navLinkIn 0.5s var(--ease-out-expo) backwards;
  }

  .site-nav.is-open li:nth-child(1) {
    animation-delay: 0.05s;
  }

  .site-nav.is-open li:nth-child(2) {
    animation-delay: 0.1s;
  }

  .site-nav.is-open li:nth-child(3) {
    animation-delay: 0.15s;
  }

  .site-nav.is-open li:nth-child(4) {
    animation-delay: 0.2s;
  }

  .site-nav.is-open li:nth-child(5) {
    animation-delay: 0.25s;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .site-nav a {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 7vw, 2.35rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: none;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    color: var(--color-red-bright);
    padding-left: 0.35rem;
  }

  .site-nav a[aria-current="page"] {
    color: var(--color-white);
    text-decoration: underline;
    text-decoration-color: var(--color-red-bright);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.22em;
    text-decoration-skip-ink: auto;
  }

  .site-nav a[aria-current="page"]:hover,
  .site-nav a[aria-current="page"]:focus-visible {
    color: var(--color-red-bright);
  }
}

@keyframes navLinkIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Home: top load bar (markup on index only)                                  */
/* -------------------------------------------------------------------------- */

.page-load-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 400;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    var(--color-red),
    #ffc9c9,
    var(--color-red-bright),
    var(--color-red-dark),
    var(--color-red)
  );
  background-size: 220% 100%;
  animation: pageLoadBar 1.45s var(--ease-out-expo) forwards;
}

@keyframes pageLoadBar {
  0% {
    transform: scaleX(0.06);
    opacity: 1;
  }

  40% {
    transform: scaleX(0.62);
  }

  72% {
    transform: scaleX(0.94);
    opacity: 1;
  }

  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

/* First section (image hero) scrolls beneath the glass header */
.header-over-hero main {
  margin-top: calc(-1 * var(--header-h));
}

main {
  display: block;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* -------------------------------------------------------------------------- */
/* Hero — home (full-bleed image)                                           */
/* -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero--image {
  min-height: min(100dvh, 56rem);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

/* Inner pages: same language as home, shorter band */
.hero--image.hero--short {
  min-height: clamp(14.5rem, 34vh, 22rem);
  align-items: center;
}

@media (min-width: 720px) {
  .hero--image.hero--short {
    min-height: clamp(15.5rem, 30vh, 24rem);
  }
}

.hero--image.hero--short .hero-content {
  padding: clamp(1.65rem, 5vw, 2.65rem) 0;
}

.header-over-hero .hero--image.hero--short .hero-content {
  padding-top: calc(var(--header-h) + var(--pad-below-header));
  padding-bottom: clamp(1.65rem, 5vw, 2.65rem);
}

.hero--image.hero--short .hero h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.85rem);
  max-width: none;
  margin: 0 0 var(--space-md);
  animation: heroFadeUp 0.88s var(--ease-out-expo) 0.2s forwards;
}

.hero--image.hero--short .hero-accent {
  margin-bottom: var(--space-md);
  animation: heroLineIn 0.72s var(--ease-out-expo) 0.14s forwards;
}

.hero--image.hero--short .hero-eyebrow {
  margin-bottom: var(--space-sm);
  animation: heroFadeUp 0.75s var(--ease-out-expo) 0.06s forwards;
}

.hero--image.hero--short .hero-intro {
  opacity: 0;
  animation: heroFadeUp 0.95s var(--ease-out-expo) 0.4s forwards;
}

.hero--image.hero--short .hero-photo-credit {
  margin-top: var(--space-md);
  animation: heroFadeUp 0.9s var(--ease-out-expo) 0.52s forwards;
}

/* Focal tweaks for inner-page heroes (modest imagery, not “stage” photography) */
.hero-image.hero-image--meetings {
  object-position: center 42%;
}

.hero-image.hero-image--calendar {
  object-position: center 45%;
}

.hero-image.hero-image--contact {
  object-position: center 52%;
}

.hero-image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-charcoal);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  max-width: none;
  transform: scale(1.08);
  animation: heroKenBurns 22s var(--ease-soft) infinite alternate;
}

@keyframes heroKenBurns {
  from {
    transform: scale(1.06);
  }

  to {
    transform: scale(1.12);
  }
}

/* Layered scrim: vignette + bottom lift + subtle red glow */
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  animation: heroScrimIn 1.35s var(--ease-out-expo) 0.12s forwards;
  background:
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(227, 34, 34, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 100% 60% at 70% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 45%),
    linear-gradient(
      to top,
      rgba(10, 10, 10, 0.97) 0%,
      rgba(20, 20, 20, 0.75) 38%,
      rgba(20, 20, 20, 0.35) 72%,
      rgba(10, 10, 10, 0.5) 100%
    );
}

@keyframes heroScrimIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Slightly flatter scrim for short inner heroes (text sits mid-band) */
.hero--image.hero--short .hero-scrim {
  background:
    radial-gradient(ellipse 95% 85% at 50% 45%, rgba(227, 34, 34, 0.18) 0%, transparent 52%),
    linear-gradient(180deg, rgba(12, 12, 12, 0.45) 0%, rgba(14, 14, 14, 0.78) 45%, rgba(10, 10, 10, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(2.5rem, 10vw, 5rem) 0 clamp(2rem, 6vw, 3.5rem);
}

.header-over-hero .hero--image:not(.hero--short) .hero-content {
  padding-top: max(
    clamp(2.5rem, 10vw, 5rem),
    calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(0.75rem, 2.5vw, 1.25rem))
  );
}

.hero-panel-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin: 0 0 var(--space-md);
  opacity: 0;
  animation: heroFadeUp 0.9s var(--ease-out-expo) 0.15s forwards;
}

.hero-accent {
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--color-red), var(--color-red-bright));
  margin: 0 0 var(--space-lg);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  animation: heroLineIn 0.85s var(--ease-out-expo) 0.35s forwards;
}

@keyframes heroLineIn {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 6.5vw, 4rem);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  line-height: 1.05;
  color: var(--color-white);
  margin: 0 0 var(--space-lg);
  letter-spacing: -0.03em;
  text-transform: none;
  max-width: 16ch;
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.28s forwards;
}

.hero-quote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  margin: 0 0 var(--space-sm);
  border-left: 3px solid var(--color-red-bright);
  padding-left: var(--space-md);
  max-width: 36rem;
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.45s forwards;
}

.hero-ref {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 var(--space-lg);
  padding-left: calc(var(--space-md) + 3px);
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.55s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.62s forwards;
}

.hero-photo-credit {
  font-size: 0.68rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.4);
  margin: var(--space-md) 0 0;
  max-width: 38rem;
  opacity: 0;
  animation: heroFadeUp 1s var(--ease-out-expo) 0.72s forwards;
}

.hero-photo-credit a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration-color: rgba(255, 255, 255, 0.25);
}

.hero-photo-credit a:hover {
  color: var(--color-red-bright);
}

/* Inner pages: split hero with cross mark */
.hero-split {
  display: flex;
  flex-direction: column;
  min-height: clamp(22rem, 58vh, 38rem);
}

@media (min-width: 720px) {
  .hero-split {
    flex-direction: row;
    min-height: clamp(20rem, 48vh, 34rem);
  }
}

.hero-panel--text {
  flex: 1;
  background: var(--color-charcoal-mid);
  color: var(--color-white);
  display: flex;
  align-items: center;
  padding: clamp(2.25rem, 7vw, 4rem) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 720px) {
  .hero-panel--text {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.hero-panel--mark {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-red-dark) 0%, var(--color-red) 50%, var(--color-red-bright) 100%);
  min-height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

@media (min-width: 720px) {
  .hero-panel--mark {
    width: clamp(150px, 20vw, 260px);
    min-height: auto;
    min-width: 150px;
  }
}

.hero-cross {
  width: 100%;
  height: 100%;
  min-height: 6.5rem;
  display: block;
}

.hero--compact .hero-split {
  min-height: unset;
}

.hero--compact .hero-panel--text {
  padding: clamp(1.85rem, 5vw, 2.75rem) 0;
}

.hero--compact .hero-panel--mark {
  min-height: 5rem;
}

@media (min-width: 720px) {
  .hero--compact .hero-panel--mark {
    width: clamp(110px, 15vw, 190px);
    min-width: 110px;
  }
}

.hero--compact .hero-panel--text h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  max-width: none;
  animation: none;
  opacity: 1;
}

.hero--compact .hero-eyebrow {
  animation: none;
  opacity: 1;
}

.hero-intro {
  padding-left: 0;
  font-size: var(--text-fluid-lead);
  max-width: 36rem;
  line-height: var(--line-height-body);
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.scripture cite,
.scripture-ref {
  font-style: normal;
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-charcoal);
}

/* -------------------------------------------------------------------------- */
/* Sections, cards, buttons                                                   */
/* -------------------------------------------------------------------------- */

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-header {
  max-width: 42rem;
  margin-bottom: var(--space-xl);
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-red);
  font-weight: 700;
  margin: 0 0 var(--space-sm);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  font-weight: 500;
  margin: 0 0 var(--space-md);
  color: var(--color-charcoal);
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-transform: none;
}

.lead {
  font-size: var(--text-fluid-lead);
  color: var(--color-ink-muted);
  margin: 0;
  line-height: var(--line-height-body);
}

.prose {
  max-width: 44rem;
}

.prose p {
  margin: 0 0 var(--space-md);
}

.prose p:last-child {
  margin-bottom: 0;
}

.scripture {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-style: italic;
  font-weight: 400;
  color: var(--color-ink-muted);
  border-left: 3px solid var(--color-red);
  padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
  background: var(--color-red-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.scripture--plain {
  font-style: normal;
  font-size: var(--text-fluid-base);
  font-family: var(--font-sans);
}

.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-soft);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.card--schedule .card-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-charcoal);
}

.card-slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card-slots li {
  display: grid;
  grid-template-columns: minmax(4.5rem, max-content) 1fr;
  gap: 0.65rem 1rem;
  align-items: baseline;
  padding: 0.55rem 0;
}

.card-slots li + li {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 0.65rem;
}

.card-slot-time {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-red);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.card-slot-label {
  font-family: var(--font-sans);
  font-size: var(--text-fluid-sm);
  font-weight: 600;
  color: var(--color-charcoal);
  line-height: 1.45;
}

.card-season {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  line-height: 1.45;
}

.card-lede {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: var(--text-fluid-sm);
  line-height: var(--line-height-body);
}

.card-image--sunday {
  object-position: center 32%;
}

.card-image--wednesday {
  object-position: center 42%;
}

.card-image--friday {
  object-position: center 36%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.45rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.22s var(--ease-soft);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-charcoal);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-bright) 100%);
  color: var(--color-white);
  box-shadow: 0 8px 24px rgba(227, 34, 34, 0.35);
}

.btn-primary:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(227, 34, 34, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--color-charcoal);
  border-color: rgba(22, 22, 22, 0.25);
}

.btn-ghost:hover {
  border-color: var(--color-charcoal);
  background: rgba(22, 22, 22, 0.04);
  color: var(--color-charcoal);
}

.hero .btn-primary {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.hero .btn-ghost {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.35);
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--color-white);
}

/* -------------------------------------------------------------------------- */
/* Gospel page — full-bleed dark imagery, video, then prose                   */
/* -------------------------------------------------------------------------- */

body.page-gospel {
  background: var(--color-charcoal);
}

.gospel-fullpage {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  padding-bottom: var(--space-2xl);
  overflow: clip;
}

.gospel-fullpage__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-charcoal);
}

.gospel-fullpage__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  max-width: none;
  display: block;
}

.gospel-fullpage__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(227, 34, 34, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, rgba(6, 6, 6, 0.55) 0%, rgba(10, 10, 10, 0.82) 42%, rgba(12, 12, 12, 0.94) 100%);
}

.gospel-fullpage__inner {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + var(--pad-below-header));
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.gospel-fullpage__intro {
  max-width: 44rem;
}

.gospel-fullpage__eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.gospel-fullpage__accent {
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--color-red), var(--color-red-bright));
  margin: 0 0 var(--space-md);
  border-radius: 2px;
}

.gospel-fullpage__intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  line-height: 1.08;
  color: var(--color-white);
  margin: 0 0 var(--space-md);
  letter-spacing: -0.03em;
}

.gospel-fullpage__lead {
  font-size: var(--text-fluid-lead);
  line-height: var(--line-height-body);
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 40rem;
}

.gospel-fullpage__lead em {
  color: rgba(255, 255, 255, 0.92);
  font-style: italic;
}

.gospel-fullpage__video {
  width: 100%;
  max-width: 50rem;
  margin-inline: auto;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0a0a;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gospel-fullpage__prose {
  margin-inline: auto;
}

.prose--on-dark,
.gospel-fullpage__prose {
  color: rgba(255, 255, 255, 0.88);
}

.prose--on-dark a,
.gospel-fullpage__prose a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.prose--on-dark a:hover,
.gospel-fullpage__prose a:hover {
  color: var(--color-red-bright);
  text-decoration-color: rgba(255, 59, 59, 0.5);
}

.gospel-fullpage .scripture {
  background: rgba(227, 34, 34, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border-left-color: var(--color-red-bright);
}

.gospel-fullpage .scripture--plain {
  font-family: var(--font-sans);
  font-size: var(--text-fluid-base);
  font-style: normal;
}

.gospel-fullpage__actions {
  margin-top: 0;
  justify-content: center;
}

.gospel-fullpage .btn-primary:focus-visible {
  outline-color: var(--color-white);
}

.btn-ghost--on-dark {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.38);
}

.btn-ghost--on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--color-white);
}

.gospel-fullpage__photo-credit {
  font-size: 0.68rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.38);
  margin: 0 auto 0 0;
  max-width: 36rem;
  text-align: left;
}

.gospel-fullpage__photo-credit a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration-color: rgba(255, 255, 255, 0.22);
}

.gospel-fullpage__photo-credit a:hover {
  color: var(--color-red-bright);
}

.cta-band {
  margin-top: var(--space-xl);
  padding: var(--space-xl);
  background: linear-gradient(145deg, #1a1a1a 0%, var(--color-charcoal-mid) 100%);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: var(--space-md);
  align-items: center;
  border-left: 4px solid var(--color-red);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 700px) {
  .cta-band {
    grid-template-columns: 1fr auto;
    gap: var(--space-lg);
  }
}

.cta-band--with-video {
  grid-template-columns: 1fr;
}

.cta-band--with-video .cta-band__row {
  display: grid;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 700px) {
  .cta-band--with-video .cta-band__row {
    grid-template-columns: 1fr auto;
    gap: var(--space-lg);
  }
}

.cta-band__actions.btn-row {
  margin-top: 0;
}

.cta-band h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-xs);
  color: var(--color-white);
}

.cta-band p {
  margin: 0;
  opacity: 0.85;
  font-size: var(--text-fluid-base);
  line-height: 1.6;
}

.meeting-block {
  margin-bottom: var(--space-2xl);
}

.meeting-block:last-child {
  margin-bottom: 0;
}

.meeting-block h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-charcoal);
  margin: 0 0 var(--space-sm);
}

.meeting-meta {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 var(--space-lg);
}

.subsection {
  margin-bottom: var(--space-lg);
}

.subsection h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  margin: 0 0 var(--space-sm);
}

/* -------------------------------------------------------------------------- */
/* Calendar                                                                   */
/* -------------------------------------------------------------------------- */

.calendar-embed {
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calendar-embed iframe {
  display: block;
  width: 100%;
  min-height: min(72vh, 46rem);
  border: 0;
}

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

.site-footer {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0 var(--space-md);
  background: var(--color-charcoal-mid);
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-fluid-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
  }
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-white);
  margin: 0 0 var(--space-sm);
}

.site-footer address {
  font-style: normal;
  line-height: 1.75;
  margin: 0 0 var(--space-sm);
}

.footer-block p {
  margin: 0 0 var(--space-sm);
}

.footer-block p:last-child {
  margin-bottom: 0;
}

.footer-social a + a {
  margin-left: 0.15rem;
}

.footer-base {
  max-width: var(--max);
  margin: var(--space-xl) auto 0;
  padding: var(--space-md) clamp(1rem, 4vw, 2rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-base p {
  margin: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--color-red-bright);
}

/* Scroll-triggered fade-up */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-top {
  position: fixed;
  right: clamp(0.75rem, 3vw, 1.25rem);
  bottom: clamp(0.75rem, 3vw, 1.25rem);
  width: 50px;
  height: 50px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--color-red), var(--color-red-bright));
  color: var(--color-white);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.25s var(--ease-soft);
  z-index: var(--fab-z);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-top:hover {
  transform: translateY(-4px);
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
}
