﻿/* ===== Variables ===== */
:root {
  /* —— Palette (site colors; accent pair lives in critical.css) —— */
  --color-bg: #fff;
  --color-text: #2c2c2c;
  --color-text-muted: #5a5a5a;
  --color-text-subtle: #777;
  /* --color-accent / --color-accent-soft: defined in critical.css (single source) */
  --color-accent-border: rgb(from var(--color-accent-soft) r g b / 0.6);
  /* KCC Yellow — same as UI accent (--color-accent in critical.css) */
  --color-kcc-yellow: var(--color-accent);
  /* KCC Green — brand token (#067261); not used in components until adopted */
  --color-kcc-green: #067261;
  /* Hairline blend between stacked home sections (see .view-home seams) */
  --home-section-seam-h: 1px;
  /* Legacy UI gold (original site accent before KCC yellow); stored — not wired into components */
  --color-legacy-accent: #b8860b;
  --color-legacy-accent-soft: #d4a84b;
  --color-border: #e8e4dc;

  --color-inverse: #000;
  --color-inverse-elevated: #111;

  --color-on-inverse: #fff;
  /* Secondary text on black / dark overlays (verses, footer, modal meta, photo sections) */
  --color-on-inverse-muted: #f2f2f2;

  --color-border-inverse: rgba(255, 255, 255, 0.15);
  --color-overlay-inverse: rgba(255, 255, 255, 0.12);
  --color-overlay-inverse-hover: rgba(255, 255, 255, 0.22);

  --color-skeleton-shimmer: rgba(255, 255, 255, 0.06);

  /* Black translucency overlays */
  --scrim-hover: rgba(0, 0, 0, 0.04);
  --scrim-overlay-light: rgba(0, 0, 0, 0.28);
  --scrim-overlay: rgba(0, 0, 0, 0.45);
  --scrim-photo-deep: rgba(0, 0, 0, 0.6);
  --scrim-photo: rgba(0, 0, 0, 0.75);
  --scrim-modal: rgba(0, 0, 0, 0.94);

  --hero-gradient-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
  /* KCC-specific fonts — Tiempos Headline (self-hosted) + Poppins (Google Fonts) */
  /* --font-heading: "Tiempos Headline", Georgia, serif; */
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Poppins", system-ui, sans-serif;
  /* --font-body: "Outfit", system-ui, sans-serif; */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-lift: 0 8px 28px rgba(0, 0, 0, 0.13);
  --shadow-elevated: 0 2px 6px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.14);
  --shadow-panel: 0 4px 20px rgba(0, 0, 0, 0.22);
  --shadow-modal: 0 12px 48px rgba(0, 0, 0, 0.35);
  --shadow-nav: 0 10px 24px rgba(0, 0, 0, 0.12);
  --shadow-accent: 0 6px 24px rgb(from var(--color-accent) r g b / 0.25);
  --shadow-accent-lg: 0 6px 24px rgb(from var(--color-accent) r g b / 0.35);
  --shadow-drop-tight: 0 2px 6px rgba(0, 0, 0, 0.4);
  --site-header-height: calc(var(--space-sm) * 2 + 44px + 2px);
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
* {
  -webkit-tap-highlight-color: transparent;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
html {
  scroll-behavior: smooth;
  background: var(--color-bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(55vw, 260px);
}
.nav {
  justify-self: center;
  display: flex;
  gap: var(--space-md);
}
.nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s;
}
.nav a:hover { color: var(--color-accent); }
.nav a.active,
.logo.active { color: var(--color-accent); font-weight: 600; }
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-backdrop {
  display: none;
}
.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-toggle:hover {
  background: var(--color-accent);
  color: var(--color-on-inverse);
}
.site-header--nav-open .nav-toggle {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-inverse);
}
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 20px;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.site-header--nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header--nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-header--nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.lang-toggle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-toggle:hover {
  background: var(--color-accent);
  color: var(--color-on-inverse);
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  color: var(--color-accent);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.social-link:hover {
  background: var(--color-accent);
  color: var(--color-on-inverse);
}

/* ===== SPA views ===== */
.view {
  display: none;
  opacity: 0;
}
/* Visible by default: each page ships its own view pre-rendered and pre-activated,
   so it must paint before (or without) app.js. The cross-fade below starts from
   .view-enter, which the router adds only when it swaps views client-side. */
.view.active {
  display: block;
  opacity: 1;
}
.view.active.view-enter {
  opacity: 0;
}
.view.active.view-fade-in {
  opacity: 1;
  transition: opacity 0.45s ease;
}
.view.active.view-fade-out {
  opacity: 0;
  transition: opacity 0.28s ease;
}

/* Tab views (not home): margin clears the fixed header; padding on sections is breathing room below it. */
.view-join-us,
.view-giving,
.view-about,
.view-ministries,
.view-statement-of-faith,
.view-404 {
  background: var(--color-bg);
  min-height: 100vh;
  margin-top: var(--site-header-height);
}

/* 404.html only — generated by scripts/build-deploy.mjs, not present in app.html. */
.view-404 .section-content {
  max-width: 40rem;
  text-align: center;
}
.view-404 .page-title {
  margin-bottom: var(--space-md);
}
.view-sermons {
  background: var(--color-bg);
  min-height: 100vh;
  margin-top: var(--site-header-height);
}

.page-main-section {
  padding: var(--space-md) 0 var(--space-xl);
}

/* Shared page heading band: an <h1.page-title> plus an optional .section-intro
   tagline. Every page except Home opens with one — Home is deliberately different
   (full-bleed hero). The section that follows drops its own top padding, because the
   header already supplies the page's top spacing and the gap below the tagline. */
.page-header {
  padding: var(--space-xl) 0;
  background: var(--color-bg);
  text-align: center;
}
/* The negative top margin trims the heading font's half-leading, so the gap above the
   title reads as even with the padding below the tagline rather than optically deeper. */
.page-header .page-title {
  margin-top: -0.35rem;
  margin-bottom: var(--space-sm);
}
/* Tagline: the Statement of Faith pull-quote treatment, now shared by every page
   header — heading face, italic, narrow measure. The header's own bottom padding
   provides the gap below, so the margin is zeroed. */
.page-header .section-intro {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto;
}
.page-header + section,
.page-header + .sermon-tabs {
  padding-top: 0;
}
/* About: the heading sits on the KCC green band that its Vision section continues. */
.page-header--inverse {
  background: var(--color-kcc-green);
}
.page-header--inverse .page-title {
  color: var(--color-on-inverse);
}
.page-header--inverse .section-intro {
  color: var(--color-on-inverse-muted);
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-lg);
  text-align: center;
}
.about-content.about-page {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

/* ===== Hero ===== */
.hero {
  --hero-pad-top: calc(80px + var(--space-xl));
  --hero-pad-bottom: var(--space-xl);
  --hero-pad-x: var(--space-lg);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 85vh;
  padding: var(--hero-pad-top) var(--hero-pad-x) var(--hero-pad-bottom);
  overflow: hidden;
}
.hero-main {
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-inverse);
  background-image:
    var(--hero-gradient-overlay),
    url("images/home/crossonahill-bw-2.webp");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
.hero-content {
  position: relative;
  text-align: center;
}
.hero-verse-wrap {
  grid-row: 3;
  align-self: center;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 40rem;
  margin-top: clamp(1rem, 3.5vh, 2rem);
  padding: 0 var(--space-md) var(--space-lg);
  text-align: center;
}
.hero-verse {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-on-inverse-muted);
  letter-spacing: 0.02em;
}
.hero-verse-ref {
  display: block;
  margin: var(--space-xs) 0 0;
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.65vw, 1rem);
  font-style: normal;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-on-inverse-muted);
  letter-spacing: 0.04em;
}
.hero-title {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-heading);
  color: var(--color-on-inverse);
  line-height: 1.2;
}
.hero-name {
  display: block;
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
}
.hero-tagline {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--color-accent-soft);
  margin-top: 0.35em;
  letter-spacing: 0.04em;
}
.hero-cta { margin-top: var(--space-sm); }
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
/* .btn's display would otherwise beat the UA stylesheet's [hidden] rule, so hidden buttons stay visible. */
.btn[hidden] {
  display: none;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-inverse);
  border: none;
}
.btn-primary:hover {
  background: var(--color-accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-lg);
}

/* ===== Section content (max-width wrapper) ===== */
.section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Fixed header: keep anchor jumps (native and scrollIntoView) clear of it.
   --header-h is measured and set by initHeaderOffset() in app.js. */
section[id] {
  scroll-margin-top: var(--header-h, 5.5rem);
}

/* ===== Section common ===== */
.services,
.about,
.ministries {
  padding: var(--space-xl) 0;
}
.who-we-are {
  padding: var(--space-xl) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: transparent;
}
.who-we-are::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/home/img-9170.webp");
  background-size: cover;
  background-position: center 44%;
  background-repeat: no-repeat;
  filter: grayscale(100%);
  pointer-events: none;
}
.who-we-are::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.38) 0%, transparent var(--home-section-seam-h)),
    var(--scrim-photo);
  pointer-events: none;
}
.who-we-are .section-content {
  position: relative;
  z-index: 1;
}
.who-we-are .section-title {
  color: var(--color-on-inverse);
}
.who-we-are .about-lead {
  color: var(--color-on-inverse);
}
.who-we-are .about-content p {
  color: var(--color-on-inverse-muted);
}
.who-we-are .about-faith a {
  color: var(--color-accent-soft);
  border-bottom-color: var(--color-accent-border);
}
.who-we-are .about-faith a:hover {
  color: var(--color-on-inverse);
  border-bottom-color: var(--color-on-inverse);
}
.what-we-believe {
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
  background-color: transparent;
}
.what-we-believe::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/home/how-to-read-the-bible.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%);
  pointer-events: none;
}
.what-we-believe::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.38) 0%, transparent var(--home-section-seam-h)),
    var(--scrim-photo-deep);
  pointer-events: none;
}
.what-we-believe .section-content {
  position: relative;
  z-index: 1;
}
.what-we-believe .section-title {
  color: var(--color-on-inverse);
}
.what-we-believe .about-lead {
  color: var(--color-on-inverse);
}
.what-we-believe .about-content p {
  color: var(--color-on-inverse-muted);
}
.what-we-believe .about-faith a {
  color: var(--color-accent-soft);
  border-bottom-color: var(--color-accent-border);
}
.what-we-believe .about-faith a:hover {
  color: var(--color-on-inverse);
  border-bottom-color: var(--color-on-inverse);
}
.latest-sermons {
  position: relative;
  padding: var(--space-xl) 0;
  background: var(--color-kcc-green);
  text-align: center;
}
/* Top edge bleed: hero (black) → green. Content stays above via z-index. */
.latest-sermons::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--home-section-seam-h);
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--color-kcc-green) 42%, var(--color-inverse)) 0%,
    var(--color-kcc-green) 100%
  );
}
/* Wider than the 1200px global .section-content so the featured video has room,
   but not the full 1800px it used to run to — that stretched the queue rows. */
.latest-sermons .section-content {
  position: relative;
  z-index: 1;
  max-width: 1500px;
}
.latest-sermons .section-title {
  color: var(--color-on-inverse);
}
.latest-sermons .section-intro {
  color: var(--color-on-inverse-muted);
}
.all-sermons {
  padding: 0 0 var(--space-xl);
  background: var(--color-bg);
}

/* ===== Sermon series — trial card layout (Aug 2026) =====
   Needs no per-series rules: artwork is an <img>, not a background image. */
.sermon-series-card {
  padding: 0 0 var(--space-xl);
  background: var(--color-bg);
}
.sermon-series-card[hidden] {
  display: none;
}
/* Entrance for the Series tab. The cards are `hidden` until the playlist API
   returns, so rather than a placeholder they wait for every card's artwork to
   decode and then rise in together, staggered — revealSermonSeriesCards() in
   app.js sets the per-card transition-delay and adds the --in class. */
.series-card-enter {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.series-card-enter.series-card-enter--in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .series-card-enter {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.series-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}
.series-card__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 530;
  object-fit: cover;
}
.series-card__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg);
}
.series-card__text {
  min-width: 0;
}
.series-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
  margin: 0;
}
.series-card__tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0.4rem 0 0;
  max-width: 52ch;
}
.series-card__meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-subtle);
  margin: 0.6rem 0 0;
}
.series-card__toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}
.series-card__chevron {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 5px 0;
  border-color: currentColor transparent transparent;
  transition: transform 0.2s;
}
.series-card__toggle[aria-expanded='true'] .series-card__chevron {
  transform: rotate(180deg);
}
/* Doubled class beats the .sermon-cards margin shorthand defined further down. */
.sermon-cards.series-card__episodes {
  margin-top: var(--space-md);
}
.series-card__episodes[hidden] {
  display: none;
}
/* Episode number sits over the thumbnail so the grid still reads as a sequence. */
.series-episode-card__num {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  min-width: 1.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

/* ===== Sermons page tabs ===== */
.sermon-tabs {
  display: flex;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-bg);
}
/* Fades in the moment the page paints — the tab bar is static markup, so unlike the
   series cards it never waits on the API. A CSS animation rather than a JS-added
   class, so it still ends up visible with JS off. */
.sermon-tabs__list {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  animation: sermon-tabs-fade-in 1s ease both;
}
@keyframes sermon-tabs-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sermon-tabs__list {
    animation: none;
  }
}
.sermon-tab {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.55rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sermon-tab:hover {
  color: var(--color-text);
}
.sermon-tab.is-active {
  background: var(--color-accent);
  color: var(--color-text);
}
.sermon-panel[hidden] {
  display: none;
}
@media (max-width: 480px) {
  .sermon-tabs {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
  }
  .sermon-tab {
    font-size: 0.85rem;
    padding: 0.5rem 1.1rem;
  }
}

/* ===== Sermon search ===== */
.sermon-search {
  margin-top: 0;
}
.sermon-search__field {
  position: relative;
  display: flex;
  align-items: center;
}
.sermon-search__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  /* Right padding clears the submit button that sits inside the field. */
  padding: 0.9rem 3.6rem 0.9rem 1.25rem;
  appearance: none;
  -webkit-appearance: none;
}
.sermon-search__input::placeholder {
  color: var(--color-text-muted);
}
.sermon-search__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
/* Suppress the browser's built-in clear (×) on type=search — Chrome/Safari, then Edge. */
.sermon-search__input::-webkit-search-cancel-button,
.sermon-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.sermon-search__input::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}
.sermon-search__submit {
  position: absolute;
  right: 0.45rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--color-accent);
  color: #1c1c1c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}
.sermon-search__submit:hover {
  background: var(--color-accent-soft);
}
.sermon-search__submit:active {
  transform: scale(0.94);
}
.sermon-search__icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  pointer-events: none;
}
.sermon-search__feedback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: var(--space-sm);
  text-align: center;
}
.sermon-search__feedback[hidden] {
  display: none;
}
.sermon-search__status {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.sermon-search__spinner {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: sermon-search-spin 0.75s linear infinite;
}
.sermon-search__spinner[hidden] {
  display: none;
}
@keyframes sermon-search-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sermon-search__spinner {
    animation-duration: 2.4s;
  }
}
.latest-sermons .section-title {
  margin-bottom: var(--space-xs);
}
.latest-sermons-stage {
  position: relative;
  margin: var(--space-lg) 0 0;
}
.sermon-featured-layout {
  display: grid;
  /* The queue is a stack of compact rows, so it gets a capped track rather than a
     share of the (up to 1800px) content width — at 1fr it grew to ~700px. Keep this
     in sync with .sermon-loading--featured or the skeleton shifts on load. */
  grid-template-columns: minmax(0, 1fr) clamp(300px, 30%, 460px);
  gap: var(--space-md);
  text-align: left;
  align-items: stretch;
}
.sermon-featured-slot {
  transition: opacity 0.22s ease;
}
.sermon-featured-slot.is-swapping {
  opacity: 0;
}
.sermon-featured-slot .sermon-card {
  width: 100%;
  max-width: 100%;
  box-shadow: var(--shadow-lift);
}
.sermon-featured-slot .sermon-title {
  font-size: 1.15rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-clamp: 3;
}
.sermon-queue {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.sermon-queue-item {
  display: flex;
  align-items: stretch;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, border-color 0.18s;
  font: inherit;
  font-family: inherit;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}
.sermon-queue-item:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.22);
}
.sermon-queue-item__thumb {
  flex: 0 0 110px;
  overflow: hidden;
  background: var(--color-inverse-elevated);
  align-self: stretch;
}
.sermon-queue-item:hover .sermon-queue-item__thumb .sermon-thumb {
  transform: translate3d(0, 0, 0) scale(1.05);
}
.sermon-queue-item__info {
  flex: 1;
  min-width: 0;
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}
.sermon-queue-item .sermon-title {
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-clamp: 2;
  color: var(--color-on-inverse);
  font-weight: 500;
  margin: 0;
}
.sermon-queue-item:hover .sermon-title {
  color: var(--color-accent);
}
.sermon-queue-item .sermon-date {
  font-size: 0.72rem;
  color: var(--color-on-inverse-muted);
  margin: 0;
}
.latest-sermons .sermon-card {
  background: var(--color-kcc-green);
  border: none;
}
.sermon-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
  text-align: left;
}
.sermon-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
button.sermon-card {
  font: inherit;
  font-family: inherit;
  text-align: inherit;
  padding: 0;
  margin: 0;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
/* Back to top (sermons page) */
.back-to-top {
  /* --btt-lift is set from JS so the button rests on top of the footer icon loop. */
  --btt-offset: clamp(1rem, 3vw, 2rem);
  --btt-lift: 0px;
  position: fixed;
  right: var(--btt-offset);
  bottom: calc(var(--btt-offset) + var(--btt-lift));
  z-index: 60;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.back-to-top[hidden] {
  display: none;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--color-accent-soft);
}
.back-to-top__arrow {
  width: 0.7rem;
  height: 0.7rem;
  border-left: 2px solid #1c1c1c;
  border-top: 2px solid #1c1c1c;
  transform: rotate(45deg);
  margin-top: 0.2rem;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

.view-sermons .sermon-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.sermon-featured-slot .sermon-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}
.sermon-thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-inverse-elevated);
}
.latest-sermons .sermon-thumb-link {
  transform: translateZ(0);
}
.sermon-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.latest-sermons .sermon-thumb {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  margin: -1px;
  /* Explicit identity keeps compositing stable when hover scale ends (avoids 1px snap). */
  transform: translate3d(0, 0, 0);
}
.latest-sermons .sermon-card:hover .sermon-thumb {
  transform: translate3d(0, 0, 0) scale(1.04);
}
.sermon-card:hover .sermon-thumb {
  transform: scale(1.04);
}
.sermon-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--scrim-overlay-light);
  transition: background 0.2s;
}
.sermon-play::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 26px;
  border-color: transparent transparent transparent var(--color-on-inverse);
  margin-left: 5px;
  filter: drop-shadow(var(--shadow-drop-tight));
}
.sermon-card:hover .sermon-play {
  background: var(--scrim-overlay);
}
.sermon-info {
  padding: var(--space-sm) var(--space-sm) var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.latest-sermons .sermon-info {
  background: var(--color-bg);
}

.sermon-title {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
}
.sermon-card:hover .sermon-title {
  color: var(--color-accent);
}
.sermon-date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-subtle);
  margin: 0;
}
.sermon-loading {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
}
.sermon-skeleton {
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-skeleton-shimmer) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sermon-loading--featured {
  display: none;
  /* Must match .sermon-featured-layout above. */
  grid-template-columns: minmax(0, 1fr) clamp(300px, 30%, 460px);
  gap: var(--space-md);
  align-items: stretch;
}
.latest-sermons-stage.is-loading .sermon-loading--featured {
  display: grid;
}
.latest-sermons-stage.is-loading .sermon-featured-layout {
  display: none;
}
.sermon-skeleton--featured-main {
  aspect-ratio: unset;
  min-height: 260px;
}
.sermon-skeleton-queue {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.sermon-skeleton--queue-item {
  aspect-ratio: unset;
  flex: 1;
  min-height: 64px;
}
@media (max-width: 768px) {
  .sermon-featured-layout {
    grid-template-columns: 1fr;
  }
  .sermon-loading--featured {
    grid-template-columns: 1fr;
  }
  .sermon-skeleton--featured-main {
    min-height: 200px;
  }
  /* Phones show the latest sermon only. The queue was a horizontal rail here, but
     tapping an item swapped the featured card above it — off screen, so the tap read
     as doing nothing. "See all sermons" covers the rest. The markup is still rendered
     (so a resize back to desktop needs no re-render); lazy thumbnails inside a
     display:none subtree are never fetched, so hiding it costs no bandwidth. */
  .sermon-queue,
  .sermon-skeleton-queue {
    display: none;
  }
}
.btn-outline {
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-on-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}
.sermon-cta {
  margin-top: var(--space-lg);
}
.latest-sermons .sermon-cta .btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--color-on-inverse);
}
.latest-sermons .sermon-cta .btn-outline:hover {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--color-on-inverse);
  box-shadow: var(--shadow);
}

/* ===== Sermon fullscreen modal player ===== */
body.sermon-player-modal-open {
  overflow: hidden;
}
.sermon-player-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  box-sizing: border-box;
}
.sermon-player-modal[hidden] {
  display: none !important;
}
.sermon-player-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim-modal);
  cursor: pointer;
}
.sermon-player-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  max-height: calc(100vh - 2 * var(--space-md));
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.sermon-player-modal__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--color-overlay-inverse);
  color: var(--color-on-inverse);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.sermon-player-modal__close:hover {
  background: var(--color-overlay-inverse-hover);
}
.sermon-player-modal__close-x {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
}
.sermon-player-modal__frame-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-inverse-elevated);
  box-shadow: var(--shadow-modal);
}
.sermon-player-modal__frame-wrap::before {
  content: '';
  display: block;
  padding-bottom: 56.25%;
}
.sermon-player-modal__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.sermon-player-modal__meta {
  color: var(--color-on-inverse);
  text-align: center;
  padding: 0 var(--space-sm) var(--space-sm);
}
.sermon-player-modal__title {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 var(--space-xs);
}
.sermon-player-modal__date {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-on-inverse-muted);
  margin: 0 0 var(--space-md);
}
.sermon-player-modal__yt.btn-outline {
  border-color: var(--color-accent-soft);
  color: var(--color-accent-soft);
}
.sermon-player-modal__yt.btn-outline:hover {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

/* ===== Sermons page ===== */
.section-title--left,
.section-intro--left {
  text-align: left;
}
.sermons-load-more-wrap {
  margin-top: var(--space-md);
  text-align: center;
}
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin: 0 auto var(--space-lg);
}
.join-card {
  text-align: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
}
.join-card h3 {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
}
.join-card p {
  margin: 0;
  color: var(--color-text-muted);
}
.join-card a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
}
.join-card a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}
.giving-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 1100px;
  margin: 0 auto var(--space-xl);
}
@media (max-width: 620px) {
  .giving-methods { grid-template-columns: 1fr; }
}
.giving-method-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.giving-method-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}
.giving-account {
  background: #f8f7f5;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-sm) var(--space-md);
  margin-top: -12px;
}
.giving-account-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.giving-account-label--spaced {
  margin-top: var(--space-sm);
}
.giving-account-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}
.giving-account-number {
  display: block;
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text);
}
.giving-ref {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}
.giving-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: var(--color-accent-soft);
  color: #7a5800;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-top: var(--space-xs);
}
.giving-note-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: var(--space-xs);
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
}
.giving-note-link:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}
.who-copy {
  max-width: 760px;
}
.services-address {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin: var(--space-lg) 0 0;
}
.map-embed {
  max-width: 900px;
  margin: var(--space-lg) auto 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-sm);
  text-align: center;
}
.section-intro {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
  font-size: 1.1rem;
}

/* ===== Services ===== */
.services {
  position: relative;
  background: var(--color-bg);
}
.view-home .services::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--home-section-seam-h);
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    var(--color-kcc-green) 0%,
    color-mix(in srgb, var(--color-bg) 72%, var(--color-kcc-green)) 100%
  );
}
.view-home .services > .section-content {
  position: relative;
  z-index: 2;
}
.service-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}
.service-card {
  width: 100%;
  max-width: 500px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
}
.service-main {
  border-top: 4px solid var(--color-text);
  justify-self: end;
}
.service-mandarin {
  border-top: 4px solid var(--color-accent);
  justify-self: start;
}
.service-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}
.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}
.service-card .lang {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text-muted);
}
.service-card p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.98rem;
}
.service-time {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ===== About ===== */
.about-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.section-body {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm);
}
.section-body--lead {
  font-size: 1.1rem;
}
.section-body:last-of-type { margin: 0; }
.about-faith {
  margin-top: var(--space-md);
  font-size: 1rem;
}
.about-faith a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
  transition: color 0.2s, border-color 0.2s;
}
.about-faith a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* ===== About Page ===== */
.about-intro-section {
  padding-bottom: var(--space-lg);
}

.about-story {
  padding: var(--space-xl) 0 var(--space-2xl);
  border-top: 1px solid var(--color-border);
}
.about-story .section-title {
  margin-bottom: var(--space-lg);
}
.about-timeline {
  max-width: 680px;
  margin: 0 auto;
  padding-left: var(--space-xl);
  border-left: 2px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.about-timeline__item {
  position: relative;
  padding: var(--space-md) 0 var(--space-md) var(--space-md);
}
.about-timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-md) - 5px);
  top: calc(var(--space-md) + 0.3rem);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
}
.about-timeline__year {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}
.about-timeline__item--hollow::before {
  background: var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
}
.about-timeline__text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Continues the green of .page-header--inverse above it; that header supplies the
   band's top padding and the gap down to the pillars. */
.about-vision {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--color-kcc-green);
}
.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.about-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}
.about-pillar__icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.about-pillar__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-on-inverse);
  margin: 0;
}
.about-pillar__text {
  margin: 0;
  color: var(--color-on-inverse-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Photo band on the home page: belief cards over a greyscaled, scrimmed photo.
   Sets the belief-card tokens for its dark context; the cards themselves are neutral. */
.believe-band {
  --belief-card-bg: rgba(255, 255, 255, 0.07);
  --belief-card-border: rgba(255, 255, 255, 0.1);
  --belief-card-title: var(--color-on-inverse);
  --belief-card-text: var(--color-on-inverse-muted);
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}
.believe-band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/home/how-to-read-the-bible.webp");
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  pointer-events: none;
}
.believe-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--scrim-photo-deep);
  pointer-events: none;
}
.believe-band .section-content {
  position: relative;
  z-index: 1;
}
.believe-band .section-title {
  color: var(--color-on-inverse);
}
/* ---- Belief cards ----------------------------------------------------------
   Shared by the home page's What We Believe band and the Statement of Faith page.
   Carries no theme of its own: every colour comes from a --belief-card-* token that
   the surrounding context sets, so the same grid works on a dark photo or on the
   plain page background. */
.belief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}
.believe-band .belief-grid {
  margin-top: var(--space-lg);
}
.belief-card {
  background: var(--belief-card-bg);
  border: 1px solid var(--belief-card-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-md);
}
.belief-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--belief-card-title);
  margin: 0 0 0.45rem;
}
.belief-card__text,
.belief-card__list {
  margin: 0;
  color: var(--belief-card-text);
  font-size: 0.95rem;
  line-height: 1.65;
}
.belief-card__list {
  padding-left: 1.35rem;
}
.belief-card__list li {
  margin-bottom: 0.4rem;
}
.belief-card__list li:last-child {
  margin-bottom: 0;
}

.believe-band__cta {
  text-align: center;
  margin-top: var(--space-xl);
}
.believe-band__cta a {
  color: var(--color-accent-soft);
  border-bottom-color: var(--color-accent-border);
}
.believe-band__cta a:hover {
  color: var(--color-on-inverse);
  border-bottom-color: var(--color-on-inverse);
}

/* Statement of Faith page: the same belief cards on the plain page background.
   Top padding comes from the `.page-header + section` rule. */
.sof-content {
  --belief-card-bg: transparent;
  --belief-card-border: var(--color-border);
  --belief-card-title: var(--color-text);
  --belief-card-text: var(--color-text-muted);
  padding: var(--space-xl) 0;
  background: var(--color-bg);
}
/* One card per row, and no section title above it — the page header carries that. */
.sof-beliefs {
  grid-template-columns: 1fr;
}

.about-leadership {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}
.leader-group__title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--color-text);
  margin: var(--space-xl) 0 var(--space-md);
  text-align: center;
}
.leader-group__title:first-of-type {
  margin-top: var(--space-lg);
}
.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 130px);
  justify-content: center;
  gap: var(--space-lg) var(--space-md);
  max-width: 1100px;
  margin: 0 auto;
}
.leader-grid--pastor {
  grid-template-columns: 130px;
  max-width: 1100px;
  justify-content: center;
  margin-bottom: var(--space-xl);
}
.leader-grid + .leader-grid {
  margin-top: var(--space-xl);
}
.leader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}
.leader-card__photo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
}
.leader-card__photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.leader-card__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-kcc-green);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.leader-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}
.leader-card__role {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ===== Ministries ===== */
.ministries {
  background: var(--color-bg);
}
.ministries-page {
  padding-bottom: var(--space-2xl);
}
.ministry-entry {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}
.ministry-entry:first-child {
  padding-top: 0;
  border-top: none;
}
.ministry-entry__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}
.ministry-entry:nth-child(even) .ministry-entry__video {
  order: 2;
}
.ministry-video-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--color-inverse-elevated);
  aspect-ratio: 16 / 9;
}
/* Click-to-play facade. Nine live <iframe> embeds each pulled a full YouTube player
   bundle, which is what made this page slow to switch to; a thumbnail plus a play
   badge opens the shared sermon player modal instead (initMinistryVideoFacades in
   app.js). The home page has always worked this way — .sermon-play is that badge. */
.ministry-video {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  appearance: none;
  cursor: pointer;
}
.ministry-video__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.ministry-video:hover .ministry-video__thumb,
.ministry-video:focus-visible .ministry-video__thumb {
  transform: scale(1.04);
}
.ministry-video:hover .sermon-play,
.ministry-video:focus-visible .sermon-play {
  background: var(--scrim-overlay);
}
/* The box is far larger than a sermon card, so the shared badge's arrow is scaled up. */
.ministry-video .sermon-play::after {
  border-width: 17px 0 17px 31px;
}
.ministry-entry__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.ministry-entry__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
}
.ministry-entry__title .lang {
  font-size: 0.8em;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 0.3em;
}
.ministry-entry__scripture {
  margin: 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--color-accent);
}
.ministry-entry__scripture p {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}
.ministry-entry__scripture cite {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.02em;
}
.ministry-entry__desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
}
.ministry-entry__contact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ministry-entry__leader {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
  margin: 0;
}

/* ===== Icon Loop ===== */
.icon-loop {
  background: var(--color-inverse);
  border-top: 1px solid var(--color-border-inverse);
  border-bottom: 1px solid var(--color-border-inverse);
  overflow: hidden;
  padding: 0.65rem 0;
}
.icon-loop-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 4rem;
  animation: icon-loop-scroll 45s linear infinite;
}
.icon-loop-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}
.icon-loop-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.icon-loop-item p {
  margin: 0;
  color: var(--color-on-inverse-muted);
  font-size: 0.95rem;
}
@keyframes icon-loop-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Footer ===== */
.site-footer {
  padding: 0;
  text-align: center;
  background: var(--color-inverse);
  color: var(--color-on-inverse-muted);
  font-size: 0.9rem;
}
/* Marquee strip is first child; text block keeps the padded inset the footer used to have */
.site-footer .section-content {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}
.site-footer .section-content > p {
  margin: 0;
}
.footer-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-on-inverse);
}
.footer-tagline {
  color: var(--color-accent-soft);
}

/* ===== Responsive (end of file: wins cascade over same-specificity rules above) ===== */
@media (max-width: 768px) {
  /* Tighter page headers on mobile — the 4rem desktop band pushes the first
     content section too far below the fold on a phone. */
  .page-header {
    padding: var(--space-lg) 0;
  }
  .page-header .page-title {
    margin-bottom: var(--space-xs);
  }
  .icon-loop-item p {
    font-size: 0.75rem;
  }
  .sermon-cards,
  .sermon-loading {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
  }
  /* All Sermons grid: one card per row on mobile. */
  .sermon-cards,
  .sermon-loading {
    grid-template-columns: 1fr;
  }
  .sermon-cards {
    margin-top: 0;
  }
  .all-sermons {
    padding: var(--space-lg) 0;
  }
  /* The banner titles are baked into one edge of the artwork, so crop to that
     edge on narrow screens rather than shrinking the whole 3.6:1 strip. */
  .series-card__art {
    aspect-ratio: 16 / 9;
  }
  .series-card__art--focus-left {
    object-position: left center;
  }
  .series-card__art--focus-right {
    object-position: right center;
  }
  .series-card__body {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }
  .series-card__toggle {
    width: 100%;
  }
  .sermons-load-more-wrap {
    text-align: center;
    margin-top: 0;
  }
  .site-header {
    padding: var(--space-sm);
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 99;
    left: 0;
    right: 0;
    top: calc(var(--site-header-height) - 1px);
    bottom: 0;
    background: var(--scrim-overlay);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }
  .site-header--nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    z-index: 101;
  }
  .logo {
    justify-self: auto;
  }
  .nav-toggle {
    display: flex;
  }
  .nav {
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    top: calc(var(--site-header-height) - 1px);
    bottom: auto;
    max-height: min(70vh, 420px);
    justify-self: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-xs) var(--space-md);
    margin: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-nav);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transition: opacity 0.28s ease, visibility 0.28s ease, transform 0.28s ease;
  }
  .site-header--nav-open .nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav a {
    font-size: 1.05rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav a:last-child {
    border-bottom: none;
  }
  body.nav-open {
    overflow: hidden;
  }
  .hero {
    --hero-pad-top: calc(var(--site-header-height) + var(--space-lg));
    --hero-pad-bottom: var(--space-lg);
    --hero-pad-x: var(--space-md);
    padding: var(--hero-pad-top) var(--hero-pad-x) var(--hero-pad-bottom);
  }
  .hero-content {
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
    overflow-wrap: break-word;
  }
  .hero-verse-wrap {
    max-width: 36rem;
  }
  .hero-name {
    white-space: normal;
  }
  .hero-cta .btn,
  .btn-outline {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  .services {
    padding: var(--space-lg) 0;
  }
  .about-pillars {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
  .belief-grid {
    grid-template-columns: 1fr;
  }
  .about-timeline {
    padding-left: var(--space-lg);
  }
  .leader-grid {
    grid-template-columns: repeat(auto-fit, 120px);
  }
  .ministry-entry__layout {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .ministry-entry:nth-child(even) .ministry-entry__video {
    order: -1;
  }
  .ministry-entry {
    padding: var(--space-lg) 0;
  }
}
@media (max-width: 480px) {
  .about-timeline {
    padding-left: var(--space-md);
    border-left: none;
    padding-top: 0;
  }
  .about-timeline__item {
    padding-left: 0;
    border-left: 3px solid var(--color-accent);
    padding-left: var(--space-sm);
  }
  .about-timeline__item::before {
    display: none;
  }
}
@media (max-width: 640px) {
  .join-grid {
    grid-template-columns: 1fr;
  }
  .map-embed iframe {
    height: 320px;
  }
  .service-cards {
    grid-template-columns: 1fr;
  }
  .service-main,
  .service-mandarin {
    justify-self: center;
  }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .nav-backdrop,
  .nav,
  .nav-toggle-bar {
    transition: none;
  }
}
@media (hover: none), (pointer: coarse) {
  .nav a:hover {
    color: var(--color-text-muted);
  }
  .nav-toggle:hover {
    background: transparent;
    color: var(--color-accent);
  }
  .lang-toggle:hover {
    background: transparent;
    color: var(--color-accent);
  }
  .social-link:hover {
    background: transparent;
    color: var(--color-accent);
  }
  .btn-primary:hover {
    background: var(--color-accent);
    transform: none;
    box-shadow: none;
  }
  .who-we-are .about-faith a:hover {
    color: var(--color-accent-soft);
    border-bottom-color: var(--color-accent-border);
  }
  .join-card a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent-soft);
  }
  .about-faith a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent-soft);
  }
  .site-header--nav-open .nav-toggle,
  .site-header--nav-open .nav-toggle:hover,
  .nav-toggle[aria-expanded="true"],
  .nav-toggle[aria-expanded="true"]:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-on-inverse);
  }
}
@media (prefers-reduced-motion: reduce) {
  .icon-loop-track {
    animation: none;
  }
}
