/* ==========================================================================
   Color themes: light (Calvary Blue) and dark (Midnight)

   Every color on the site comes from these variables, so a theme is just a
   different set of them. The light/dark button in the header
   (src/scripts/theme.ts) sets <html data-theme="midnight"> for dark mode and
   remembers it in a cookie. Calvary Blue is the default.

   Variables
     --c-brand           headings' accents, links, active menu items
     --c-brand-strong    hover and pressed brand
     --c-brand-soft      light tints (chips, hovered menu items)
     --c-cta / --c-on-cta  call-to-action buttons (Give, Play now) and their text
     --c-cta-strong      hovered CTA
     --c-bg / --c-surface / --c-surface-alt  page, cards, tinted sections
     --c-ink / --c-ink-soft / --c-line       text, secondary text, borders
     --c-header-bg / --c-header-ink          header bar
     --c-bar-bg / --c-bar-ink                live/countdown bar under the header
     --c-footer-bg / --c-footer-ink / --c-footer-head  footer, its headings
     --c-logo            the logo's color on the header
     --c-hero-a / --c-hero-b  gradient behind banners and tiles without a picture
     --c-special         special events on the calendar (services use --c-brand)

   A [data-theme] attribute on any element applies that theme inside it.
   ========================================================================== */

:root,
[data-theme="calvary"] {
  color-scheme: light;
  --c-brand: #0080b1;
  --c-brand-strong: #00628a;
  --c-brand-soft: #e2f1f8;
  --c-cta: #00709c;
  --c-cta-strong: #005579;
  --c-on-cta: #ffffff;
  --c-bg: #f3f7fa;
  --c-surface: #ffffff;
  --c-surface-alt: #e8f1f7;
  --c-ink: #13232f;
  --c-ink-soft: #52646f;
  --c-line: #d9e4ec;
  --c-header-bg: #ffffff;
  --c-header-ink: #13232f;
  --c-bar-bg: #0a4e70;
  --c-bar-ink: #ffffff;
  --c-footer-bg: #082f45;
  --c-footer-ink: #e4eef4;
  --c-footer-head: #8dc2e1;
  --c-logo: #0080b1;
  --c-hero-a: #0080b1;
  --c-hero-b: #6fb4dc;
  --c-special: #d9731a;
}

/* Dark blue. */
[data-theme="midnight"] {
  color-scheme: dark;
  --c-brand: #64b5ef;
  --c-brand-strong: #96cdf5;
  --c-brand-soft: #182a40;
  --c-cta: #2f7fc1;
  --c-cta-strong: #2569a1;
  --c-on-cta: #ffffff;
  --c-bg: #0b111c;
  --c-surface: #131c2b;
  --c-surface-alt: #101826;
  --c-ink: #e6edf7;
  --c-ink-soft: #a3b3c8;
  --c-line: #243248;
  --c-header-bg: #0f1724;
  --c-header-ink: #e6edf7;
  --c-bar-bg: #17283f;
  --c-bar-ink: #e6edf7;
  --c-footer-bg: #070b13;
  --c-footer-ink: #c8d4e4;
  --c-footer-head: #64b5ef;
  --c-logo: #e6edf7;
  --c-hero-a: #123257;
  --c-hero-b: #2f7fc1;
  --c-special: #f2a65a;
}

/* ==========================================================================
   Calvary Chapel Bedford — site styles (plain CSS, no framework)

   Laid out after calvarycch.org: a white header with a countdown bar, rounded
   hero and banner panels, link tiles, picture tiles and a dark footer.
   Every color comes from the theme variables in themes.css, so the light/dark
   button in the header can switch the whole site between Calvary Blue and
   Midnight.

   Contents
     1. Settings          8. Home page
     2. Base              9. Content pages and prose
     3. Layout           10. Sermons
     4. Buttons, icons   11. Cards, search, people, connect
     5. Header and menu  12. Church Life and Church History
     6. Countdown bar    13. Live stream
     7. Banner, footer   14. Events and calendar
                         15. Smaller screens, motion
   ========================================================================== */

/* ---------- 1. Settings ---------- */

:root {
  --font-heading: 'Montserrat Variable', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 16px;
  --radius-small: 10px;
  --header-h: 76px;
  --bar-h: 44px;

  --shadow: 0 1px 2px rgba(10, 20, 35, 0.06), 0 8px 24px -12px rgba(10, 20, 35, 0.22);
  --shadow-lift: 0 2px 4px rgba(10, 20, 35, 0.06), 0 22px 44px -18px rgba(10, 20, 35, 0.38);
  --focus: 0 0 0 3px color-mix(in srgb, var(--c-brand) 45%, transparent);

  /* Tints that work in light and dark themes alike. */
  --tint: color-mix(in srgb, var(--c-brand) 10%, var(--c-surface));
  --tint-strong: color-mix(in srgb, var(--c-brand) 18%, var(--c-surface));
  --special-tint: color-mix(in srgb, var(--c-special) 14%, var(--c-surface));
}

/* ---------- 2. Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--bar-h) + 16px);
  background: var(--c-bg);
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s, color 0.3s;
}
main { display: block; flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.2; color: var(--c-ink); }
img, video { max-width: 100%; height: auto; }
img { vertical-align: bottom; border: 0; }
audio { width: 100%; }
svg:not(:root) { overflow: hidden; }
[hidden] { display: none !important; }

a { color: var(--c-brand); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--c-brand-strong); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

input, select, textarea, button { font: inherit; color: inherit; }
input[type="search"], input[type="text"], input[type="email"] {
  min-width: 0;
  padding: 10px 14px;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-small);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus { border-color: var(--c-brand); outline: none; box-shadow: var(--focus); }
::placeholder { color: var(--c-ink-soft); opacity: 0.85; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  font-weight: 700;
  color: var(--c-on-cta);
  background: var(--c-cta);
  border-radius: var(--radius-small);
}
.skip-link:focus { top: 12px; color: var(--c-on-cta); }
.flow-root { display: flow-root; }

/* ---------- 3. Layout ---------- */

.wrap, .wrap-large, .wrap-medium, .wrap-small {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap, .wrap-large { max-width: var(--wrap); }
.wrap-medium { max-width: 1000px; }
.wrap-small { max-width: 860px; }

.content { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 96px); }

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-brand);
}
.eyebrow--light { color: rgba(255, 255, 255, 0.85); }

/* ---------- 4. Buttons, icons, dropdowns ---------- */

.icon { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }

.btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 26px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  color: var(--c-on-cta);
  background: var(--c-cta);
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn .icon { font-size: 1.25em; }
.btn:hover, .button:hover { color: var(--c-on-cta); background: var(--c-cta-strong); transform: translateY(-1px); }
.btn--cta { color: var(--c-on-cta); background: var(--c-cta); }
.btn--brand { color: #fff; background: var(--c-brand); }
[data-theme="midnight"] .btn--brand { color: var(--c-bg); }
.btn--brand:hover { color: #fff; background: var(--c-brand-strong); }
[data-theme="midnight"] .btn--brand:hover { color: var(--c-bg); }
.btn--outline, .button--secondary { color: var(--c-brand); background: transparent; border-color: currentColor; }
.btn--outline:hover, .button--secondary:hover { color: var(--c-surface); background: var(--c-brand); border-color: var(--c-brand); }
.btn--outline-light { color: #fff; background: transparent; border-color: rgba(255, 255, 255, 0.85); }
.btn--outline-light:hover { color: var(--c-ink); background: #fff; border-color: #fff; }
.btn--light { color: var(--c-brand-strong); background: #fff; }
.btn--light:hover { color: var(--c-brand-strong); background: #eef3f7; }
.btn--small { min-height: 38px; padding: 7px 16px; font-size: 13px; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 22px;
  color: var(--c-header-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.icon-button:hover, .icon-button[aria-expanded="true"] { color: var(--c-brand); background: var(--tint); }

/* Small menus that drop down from a button ("Save", "Add to calendar"). */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  padding: 8px;
  font-size: 15px;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-lift);
}
.dropdown__list { margin: 0; padding: 0; list-style: none; }
.dropdown__list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; }
.dropdown__list li:hover { background: var(--tint); }
.dropdown__list .icon { color: var(--c-brand); }
.dropdown__count { margin-left: auto; font-size: 12px; color: var(--c-ink-soft); }

/* ---------- 5. Header and menu ---------- */

.site-header { position: sticky; top: 0; z-index: 50; }
.site-header__bar {
  background: var(--c-header-bg);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow 0.25s, background-color 0.3s;
}
.site-header.is-scrolled .site-header__bar { box-shadow: 0 6px 24px -14px rgba(10, 20, 35, 0.45); }
.site-header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.logo { display: flex; align-items: center; flex: none; padding: 4px 0; }
.logo__mark {
  display: block;
  width: 210px;
  aspect-ratio: 2560 / 474;
  background: var(--c-logo);
  -webkit-mask: url(../../assets/images/logo.cff71623.png) center / contain no-repeat;
  mask: url(../../assets/images/logo.cff71623.png) center / contain no-repeat;
  transition: background-color 0.3s;
}

.main-nav { margin-left: auto; }
.main-menu { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.main-menu > li { position: relative; }
.main-menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-header-ink);
  border-radius: 8px;
}
.main-menu > li > a:hover, .main-menu > li:focus-within > a { color: var(--c-brand); }
.main-menu > li > a.is-current { color: var(--c-brand); font-weight: 700; }
.main-menu > li > a.is-current::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--c-cta);
  border-radius: 2px;
}
.menu-caret { font-size: 16px; transition: transform 0.2s; }
.main-menu > li:hover .menu-caret, .main-menu > li:focus-within .menu-caret { transform: rotate(180deg); }
.submenu-toggle, .main-menu__search, .main-menu__social { display: none; }

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 250px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.main-menu > li:hover > .submenu, .main-menu > li:focus-within > .submenu, .main-menu > li.is-open > .submenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.submenu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--c-ink);
  border-radius: 10px;
}
.submenu a .icon { font-size: 20px; color: var(--c-brand); }
.submenu a:hover { color: var(--c-brand); background: var(--tint); }

.site-header__tools { display: flex; align-items: center; gap: 4px; flex: none; }
.site-header__give { margin-left: 8px; }

.header-search { position: relative; display: flex; align-items: center; }
.header-search__form {
  position: absolute;
  right: 0;
  top: 50%;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(420px, 70vw);
  padding: 6px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  transform: translateY(-50%);
}
.header-search__form input { flex: 1; padding: 8px 14px; border: 0; background: transparent; box-shadow: none; }

/* The light/dark button: a moon in light mode, a sun in dark mode. */
.theme-toggle__sun, [data-theme="midnight"] .theme-toggle__moon { display: none; }
[data-theme="midnight"] .theme-toggle__sun { display: inline-block; }

.menu-button { display: none; }

/* ---------- 6. Countdown bar ---------- */

.live-bar { color: var(--c-bar-ink); background: var(--c-bar-bg); transition: background-color 0.3s; }
.live-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--bar-h); }
.live-bar__label { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--font-heading); font-size: 14px; font-weight: 600; color: inherit; }
.live-bar__label:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.live-bar__label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-bar__dot { flex: none; width: 9px; height: 9px; background: currentColor; border-radius: 50%; opacity: 0.6; }
.live-bar.is-live .live-bar__dot { background: #ff3b30; opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.live-bar.is-live .live-bar__label { font-weight: 800; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 59, 48, 0); } 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.6); } }
.live-bar__end { display: flex; flex: none; align-items: center; gap: 18px; }
.live-bar__clock { display: flex; gap: 6px; flex: none; }
.live-bar__unit {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  text-transform: lowercase;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}
.live-bar__unit b { font-family: var(--font-heading); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 7. Banner and footer ---------- */

.page-banner { padding-top: clamp(16px, 2.5vw, 28px); }
.page-banner__panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: clamp(170px, 22vw, 260px);
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 42%),
    radial-gradient(circle at 10% 110%, rgba(0, 0, 0, 0.22), transparent 50%),
    linear-gradient(120deg, var(--c-hero-a), var(--c-hero-b));
  border-radius: var(--radius);
  isolation: isolate;
}
.page-banner__panel::after {
  /* Faint diagonal lines over the gradient. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 22px);
}
.page-banner__background { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-banner__panel--image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2)); }
.page-banner__content { position: relative; flex: 1; min-width: 0; }
.page-banner__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.page-banner__title--long { font-size: clamp(26px, 3.4vw, 40px); }
.page-banner__portrait img { display: block; width: clamp(110px, 14vw, 180px); aspect-ratio: 1; object-fit: cover; border: 4px solid rgba(255, 255, 255, 0.8); border-radius: 50%; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0 0 14px; font-size: 14px; }
.breadcrumbs a { color: rgba(255, 255, 255, 0.82); }
.breadcrumbs a:hover, .breadcrumbs a[aria-current] { color: #fff; }
.breadcrumbs__separator { font-size: 16px; opacity: 0.6; }

.site-footer { color: var(--c-footer-ink); background: var(--c-footer-bg); transition: background-color 0.3s; }
.site-footer a { color: var(--c-footer-ink); }
.site-footer a:hover { color: var(--c-footer-head); }
.site-footer__social { background: color-mix(in srgb, var(--c-footer-bg) 80%, #fff 6%); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.social-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-top: 34px; padding-bottom: 34px; }
.social-band__title { margin: 0 0 4px; font-size: 26px; font-weight: 800; color: #fff; }
.social-band__text p { margin: 0; font-size: 15px; opacity: 0.85; }
.social-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
/* The networks' own colors, the same in every theme. */
.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 10px 22px 10px 12px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff !important;
  background: var(--social);
  border-radius: 999px;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.social-link:hover { transform: translateY(-3px); filter: brightness(1.08); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.7); }
.social-link .icon { flex: none; width: 44px; height: 44px; padding: 10px; font-size: 24px; background: rgba(255, 255, 255, 0.18); border-radius: 50%; }
.social-link span { display: flex; flex-direction: column; }
.social-link small { font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: 0.02em; opacity: 0.9; }
.social-link--youtube { --social: #e62117; }
.social-link--facebook { --social: #1877f2; }
.social-link--instagram { --social: linear-gradient(45deg, #f9a03f 0%, #e1306c 45%, #833ab4 100%); }

/* Small round icons, in the phone menu. */
.social-icons { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; font-size: 18px; color: #fff; background: var(--social); border-radius: 50%; transition: transform 0.2s, filter 0.2s; }
.social-icons a:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.1); }
.social-icons__youtube { --social: #e62117; }
.social-icons__facebook { --social: #1877f2; }
.social-icons__instagram { --social: linear-gradient(45deg, #f9a03f 0%, #e1306c 45%, #833ab4 100%); }
.site-footer__main { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.site-footer__logo img { display: block; width: 240px; max-width: 100%; height: auto; }
.site-footer__brand p { margin: 20px 0 0; font-size: 15px; line-height: 1.75; opacity: 0.9; }
.site-footer__heading { margin: 0 0 16px; font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-footer-head); }
.site-footer__col ul { margin: 0; padding: 0; list-style: none; }
.site-footer__col li { margin: 0 0 10px; font-size: 15px; font-weight: 500; line-height: 1.45; }
.site-footer__col a { display: inline-flex; gap: 10px; }
.site-footer__col .icon { margin-top: 2px; font-size: 18px; color: var(--c-footer-head); }
.site-footer__bottom { padding-top: 22px; padding-bottom: 28px; font-size: 13.5px; text-align: center; opacity: 0.8; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.site-footer__bottom p { margin: 0; }

/* ---------- 8. Home page ---------- */

.hero { padding-top: clamp(16px, 2.5vw, 28px); }
.hero__card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(380px, 46vw, 560px);
  overflow: hidden;
  background: linear-gradient(120deg, var(--c-hero-a), var(--c-hero-b));
  border-radius: var(--radius);
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media .media { width: 100%; height: 100%; object-fit: cover; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero__slide.is-active { opacity: 1; }
/* Pictures (not videos) drift in slowly while they're on show. */
.hero__slide.is-active .media--image { animation: hero-drift 9s ease-out forwards; }
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 10, 20, 0.82) 0%, rgba(5, 10, 20, 0.55) 45%, rgba(5, 10, 20, 0.15) 100%), linear-gradient(0deg, rgba(5, 10, 20, 0.5), transparent 45%); }
.hero__content { max-width: 720px; padding: clamp(28px, 5vw, 56px); color: #fff; }
.hero__title {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
  text-wrap: balance;
}
.hero__meta { margin: 14px 0 0; font-size: 16px; font-weight: 500; opacity: 0.92; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.section { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.section--tinted { background: var(--c-surface-alt); }
.section__title { margin: 0 0 16px; font-size: clamp(32px, 4.4vw, 54px); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.section__title--center { margin-bottom: clamp(28px, 4vw, 48px); text-align: center; }
.section__lead { max-width: 560px; margin: 0; color: var(--c-ink-soft); }
.section__more { margin: clamp(28px, 4vw, 44px) 0 0; text-align: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; }
.split__col { padding: 0 clamp(20px, 4vw, 56px); }
.split__col:first-child { padding-left: 0; }
.split__col:last-child { padding-right: 0; border-left: 2px solid var(--c-brand); }
.link-tiles { display: grid; gap: 12px; margin: 28px 0 0; padding: 28px 0 0; list-style: none; border-top: 2px solid color-mix(in srgb, var(--c-cta) 35%, transparent); }
.link-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink);
  background: var(--c-surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
}
.link-tile .icon { font-size: 20px; color: var(--c-brand); transition: transform 0.2s; }
.link-tile:hover { color: var(--c-brand); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.link-tile:hover .icon { transform: scale(1.12); }

.welcome { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.welcome__text { font-size: 17px; }
.check-list { margin: 0 0 1.4em; padding: 0; list-style: none; }
.check-list li { position: relative; margin: 0 0 8px; padding-left: 32px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 20px;
  height: 20px;
  background: var(--c-brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z%27/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z%27/%3E%3C/svg%3E") center / contain no-repeat;
}
.pastor-card { overflow: hidden; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.pastor-card__photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; }
.pastor-card__body { padding: 24px 28px 28px; }
.pastor-card__name { margin: 0; font-size: 28px; font-weight: 800; text-transform: uppercase; }
.pastor-card__email { margin: 4px 0 18px; font-size: 15px; }

.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-surface);
  border: 1.5px solid color-mix(in srgb, var(--c-cta) 70%, transparent);
  border-radius: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
/* Pictures are shown whole (never cropped), on a blurred copy of themselves
   that fills the rest of the 16:9 box. The box sits inside the card (95% of
   its width) with its own rounded corners, so the card's corners never cut
   into the picture. */
.news-card__media { position: relative; flex: none; aspect-ratio: 16 / 9; margin: 2% 2% 0; overflow: hidden; background: var(--c-surface-alt); border-radius: 14px; }
.news-card__media .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.news-card__backdrop { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(22px) saturate(1.15); opacity: 0.5; }
.news-card__media .media--youtube { position: static; height: 100%; }
.news-card__media video { background: #000; }
.news-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 22px 26px 24px; }
.news-card__body .news-card__link { margin-top: auto; padding-top: 6px; }
.news-card__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--c-hero-a), var(--c-hero-b));
}
.news-card__date b { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9; }
.news-card__title { margin: 4px 0 6px; font-size: 20px; font-weight: 700; line-height: 1.25; }
.news-card__meta { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--c-brand); }
.news-card__text { font-size: 15px; line-height: 1.6; color: var(--c-ink-soft); }
.news-card__text p { margin: 0 0 8px; }
.news-card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-family: var(--font-heading); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-cta); }
.news-card__link:hover { gap: 10px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 7 / 8;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
  isolation: isolate;
  transition: transform 0.25s, box-shadow 0.25s;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.tile__media { position: absolute; inset: 0; z-index: -2; background: linear-gradient(150deg, var(--c-hero-a), var(--c-hero-b)); }
.tile__media .media { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.tile:hover .tile__media .media { transform: scale(1.05); }
/* A tile without a picture: its icon, large, over the theme's gradient. */
.tile__art { position: absolute; right: -8%; top: -4%; font-size: clamp(170px, 20vw, 260px); line-height: 0; color: #fff; opacity: 0.16; transition: transform 0.6s; }
.tile:hover .tile__art { transform: rotate(-6deg) scale(1.05); }
.tile:nth-child(3n + 2) .tile__media { background: linear-gradient(150deg, var(--c-brand-strong), var(--c-hero-a)); }
.tile:nth-child(3n) .tile__media { background: linear-gradient(150deg, var(--c-hero-b), var(--c-brand-strong)); }
.tile__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 10, 20, 0.78) 0%, rgba(5, 10, 20, 0.25) 50%, transparent 75%); }
.tile__content { padding: 24px; color: #fff; }
.tile__subtitle { margin: 0 0 4px; font-family: var(--font-heading); font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.9; }
.tile__title { margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; line-height: 1.15; color: #fff; }
.tile__title a { color: inherit; }
.tile__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tile__text {
  display: grid;
  grid-template-rows: 0fr;
  font-size: 14.5px;
  line-height: 1.55;
  opacity: 0;
  transition: grid-template-rows 0.3s, opacity 0.3s, margin 0.3s;
}
.tile__text > * { min-height: 0; margin: 0; overflow: hidden; }
.tile:hover .tile__text, .tile:focus-within .tile__text { grid-template-rows: 1fr; margin-top: 8px; opacity: 0.95; }

.location { position: relative; color: #fff; background: linear-gradient(120deg, var(--c-bar-bg), var(--c-brand-strong)); overflow: hidden; }
.location::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12), transparent 40%); }
.location__inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); }
.location__title { margin: 0 0 16px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; line-height: 1.2; color: #fff; }
.location__text p { margin: 0 0 16px; opacity: 0.92; }
.location__times { margin: 0 0 24px; padding: 0; list-style: none; font-size: 15px; }
.location__times li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.location__times span { min-width: 190px; font-weight: 700; opacity: 0.85; }
.location__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.location__link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #fff; }
.location__link:hover { color: #fff; text-decoration: underline; }
.location__map { overflow: hidden; background: #fff; border: 6px solid rgba(255, 255, 255, 0.95); border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.location__map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; }

/* ---------- 9. Content pages and prose ---------- */

/* Hand-written pages (About, Statement of Faith, Giving…): the text on a paper card. */
.entry > .prose, .paper {
  margin-top: 8px;
  padding: clamp(24px, 5vw, 56px);
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.entry__header { margin-bottom: 20px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.entry-meta > li { padding: 6px 14px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px; }
.entry-meta__bold { font-weight: 700; color: var(--c-brand); }

.prose { overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose table { margin: 0 0 1.15em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 1.6em 0 0.6em; font-weight: 700; }
.prose h1 { font-size: 2.1em; }
.prose h2 { font-size: 1.65em; }
.prose h3 { font-size: 1.35em; }
.prose h4 { font-size: 1.2em; }
.prose h5, .prose h6 { font-size: 1.05em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0 0 0.45em; }
.prose li > p { margin: 0; }
.prose li::marker { color: var(--c-brand); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose img { height: auto; border-radius: var(--radius-small); }
.prose figure img { display: block; }
.prose figcaption, .prose .wp-element-caption { margin-top: 8px; font-size: 14px; color: var(--c-ink-soft); text-align: center; }
.prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.prose .aligncenter img { margin: 0 auto; }
.prose blockquote { margin-left: 0; padding: 14px 22px; font-style: italic; background: var(--tint); border-left: 4px solid var(--c-brand); border-radius: 0 var(--radius-small) var(--radius-small) 0; }
.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--c-line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.prose th, .prose td { padding: 8px 12px; text-align: left; border: 1px solid var(--c-line); }
.prose th { background: var(--tint); }
/* Pictures, GIFs and videos in sermon notes. */
.prose iframe { max-width: 100%; border: 0; border-radius: var(--radius-small); }
.prose video { display: block; width: 100%; background: #000; border-radius: var(--radius-small); }
.prose .video-embed, .video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: var(--radius-small); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose--full { font-size: 18px; }
/* Text pasted with its own colors stays readable on dark themes. */
[data-theme="midnight"] .prose [style*="color"] { color: inherit !important; }
[data-theme="midnight"] .prose a[style*="color"] { color: var(--c-brand) !important; }

.media { display: block; }
.media--youtube { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.media--youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.youtube-lite { position: absolute; inset: 0; display: block; width: 100%; padding: 0; background: #000; border: 0; cursor: pointer; }
.youtube-lite img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: opacity 0.2s; }
.youtube-lite:hover img { opacity: 1; }
.youtube-lite__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 46px;
  font-size: 30px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 12px;
  transform: translate(-50%, -50%);
  transition: background-color 0.2s;
}
.youtube-lite:hover .youtube-lite__play { background: #f00; }

/* Previous / Next boxes. */
.nav-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.nav-blocks:not(.nav-blocks--both) .nav-block--right { grid-column: 2; }
.nav-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.nav-block:hover { color: var(--c-ink); border-color: var(--c-brand); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.nav-block--right { justify-content: flex-end; text-align: right; }
.nav-block__arrow { display: flex; flex: none; font-size: 28px; color: var(--c-brand); }
.nav-block__text { display: flex; flex-direction: column; min-width: 0; }
.nav-block__label { font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-ink-soft); }
.nav-block__title { font-family: var(--font-heading); font-size: 17px; font-weight: 700; line-height: 1.3; }

.pagination { margin-top: 36px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 10px;
}
.pagination a:hover { color: var(--c-brand); border-color: var(--c-brand); }
.pagination__current { color: #fff !important; background: var(--c-brand) !important; border-color: var(--c-brand) !important; }
[data-theme="midnight"] .pagination__current { color: var(--c-bg) !important; }
.pagination__dots { border: 0 !important; background: none !important; }

/* ---------- 10. Sermons ---------- */

.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 48px); align-items: start; }
.list-heading { position: relative; margin: 0 0 24px; padding-bottom: 14px; font-size: 28px; font-weight: 800; }
.list-heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 4px; background: var(--c-cta); border-radius: 2px; }

.sermon-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.sermon-row {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 14px;
  background: var(--c-surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.sermon-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.sermon-row__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--c-hero-a), var(--c-hero-b)); border-radius: 10px; }
.sermon-row__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.sermon-row:hover .sermon-row__thumb img { transform: scale(1.05); }
.sermon-row__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; padding: 10px; font-family: var(--font-heading); font-size: 20px; font-weight: 800; text-align: center; text-transform: uppercase; color: #fff; }
.sermon-row__play { position: absolute; left: 10px; bottom: 10px; display: flex; padding: 6px; font-size: 18px; color: #fff; background: rgba(0, 0, 0, 0.6); border-radius: 50%; }
.sermon-row__eyebrow { margin: 0 0 4px; font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-brand); }
.sermon-row__title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; }
.sermon-row__title a { color: var(--c-ink); }
.sermon-row__title a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.sermon-row__title a:hover { color: var(--c-brand); }
.sermon-row__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; font-size: 14px; color: var(--c-ink-soft); }
.sermon-row__meta time { font-weight: 600; color: var(--c-ink); }
.sermon-row__excerpt { display: -webkit-box; margin: 6px 0 0; overflow: hidden; font-size: 14.5px; line-height: 1.55; color: var(--c-ink-soft); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sermon-row__icons { display: flex; gap: 8px; padding-right: 8px; font-size: 20px; color: var(--c-brand); }

.sidebar { position: sticky; top: calc(var(--header-h) + var(--bar-h) + 20px); display: grid; gap: 12px; }
.sidebar__search { display: flex; gap: 8px; padding: 14px; background: var(--c-surface); border-radius: 14px; box-shadow: var(--shadow); }
.sidebar__search input { flex: 1; }
.sidebar__search .btn { min-height: 0; padding: 0 14px; }
.sidebar__group { background: var(--c-surface); border-radius: 14px; box-shadow: var(--shadow); }
.sidebar__group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.sidebar__group summary::-webkit-details-marker { display: none; }
.sidebar__group summary .icon { font-size: 20px; color: var(--c-brand); }
.sidebar__caret { margin-left: auto; transition: transform 0.2s; color: var(--c-ink-soft) !important; }
.sidebar__group[open] .sidebar__caret { transform: rotate(180deg); }
.sidebar__group ul { max-height: 320px; margin: 0; padding: 0 8px 10px; overflow-y: auto; list-style: none; }
.sidebar__group a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; font-size: 15px; color: var(--c-ink); border-radius: 8px; }
.sidebar__group a:hover { color: var(--c-brand); background: var(--tint); }
.sidebar__group a[aria-current] { font-weight: 700; color: var(--c-brand); background: var(--tint); }
.sidebar__count { min-width: 28px; padding: 1px 8px; font-size: 12px; text-align: center; color: var(--c-ink-soft); background: var(--c-surface-alt); border-radius: 999px; }
.sidebar__all { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-family: var(--font-heading); font-weight: 700; color: var(--c-ink); background: var(--c-surface); border-radius: 14px; box-shadow: var(--shadow); }
.sidebar__all .icon { font-size: 20px; color: var(--c-brand); }

.sermon__media { overflow: hidden; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.sermon__media .video-embed, .sermon__media .media--video, .sermon__video { border-radius: 0; }
.sermon__media video { display: block; width: 100%; background: #000; }
.sermon__image { display: block; width: 100%; height: auto; }
.sermon__audio { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; }
.sermon__audio-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-heading); font-weight: 700; color: var(--c-brand); }
.sermon__audio .audio-player { flex: 1; min-width: 220px; height: 44px; }
.dropdown--download { left: auto; right: 0; }
.sermon__details { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 24px 0; }
.sermon__date { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-heading); font-weight: 700; }
.sermon__date .icon { font-size: 20px; color: var(--c-brand); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips__label { display: flex; margin-left: 6px; font-size: 18px; color: var(--c-ink-soft); }
.chips__label:first-child { margin-left: 0; }
.chip { display: inline-flex; padding: 5px 14px; font-size: 14px; font-weight: 500; color: var(--c-brand-strong); background: var(--tint); border-radius: 999px; transition: background-color 0.2s, color 0.2s; }
[data-theme="midnight"] .chip { color: var(--c-brand); }
.chip:hover { color: #fff; background: var(--c-brand); }

/* ---------- 11. Cards, search, people, connect ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { position: relative; background: var(--c-surface); border-radius: 14px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card__sizer { display: none; }
.card__inner { padding: 22px 24px; }
.card__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.card__title a { color: var(--c-ink); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { color: var(--c-brand); }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--c-ink-soft); }
.card__label { display: inline-block; padding: 3px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-brand-strong); background: var(--tint); border-radius: 999px; }
[data-theme="midnight"] .card__label { color: var(--c-brand); }
.card__excerpt { display: -webkit-box; margin: 10px 0 0; overflow: hidden; font-size: 14.5px; line-height: 1.55; color: var(--c-ink-soft); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.search-intro { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.search-intro p { margin: 0; }
.search-form { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.search-form input { width: min(460px, 100%); }

.leaders { display: grid; gap: 32px; }
.leader {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(24px, 4vw, 40px);
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.leader__photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.leader__name { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
.leader__role { display: inline-block; margin: 10px 0 0; padding: 4px 14px; font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-on-cta); background: var(--c-cta); border-radius: 999px; }
.leader__contact { margin: 10px 0 0; }
.leader__bio { margin-top: 18px; }
.leader:not(:has(.leader__photo)) { grid-template-columns: minmax(0, 1fr); }

.connect__intro { max-width: 640px; margin: 0 auto 36px; font-size: 18px; text-align: center; color: var(--c-ink-soft); }
.connect__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.connect-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1.5px solid var(--c-line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.connect-card:hover { color: var(--c-ink); border-color: var(--c-cta); transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.connect-card__photo { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-surface-alt); }
.connect-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.connect-card:hover .connect-card__photo img { transform: scale(1.04); }
.connect-card__body { position: relative; display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 40px 28px 30px; }
/* The round icon sits half over the photo. */
.connect-card__badge { position: absolute; left: 24px; top: -28px; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; font-size: 26px; color: var(--c-on-cta); background: var(--c-cta); border: 4px solid var(--c-surface); border-radius: 50%; }
.connect-card__title { font-family: var(--font-heading); font-size: 26px; font-weight: 800; line-height: 1.15; }
.connect-card__lead { color: var(--c-ink-soft); }
.connect-card__go { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 10px; font-family: var(--font-heading); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-brand); }
.connect-card:hover .connect-card__go .icon { transform: translateX(3px); }
.connect-card__go .icon { transition: transform 0.2s; }
.connect-section { margin-top: clamp(48px, 7vw, 80px); }
.connect-section__title { margin: 0 0 8px; font-family: var(--font-heading); font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; line-height: 1.15; }
.connect-section > .connect-section__title, .connect-section__lead { text-align: center; }
.connect-section__lead { max-width: 560px; margin: 0 auto 28px; font-size: 18px; color: var(--c-ink-soft); }
/* One big tile per network, in its own colors (the same in every theme). */
.social-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.social-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  height: 100%;
  padding: 28px 26px 26px;
  color: #fff !important;
  background: var(--social);
  border-radius: var(--radius);
  box-shadow: 0 18px 36px -24px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}
.social-tile:hover { transform: translateY(-4px); filter: brightness(1.06); box-shadow: 0 24px 40px -22px rgba(0, 0, 0, 0.7); }
.social-tile__icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 8px; font-size: 36px; background: rgba(255, 255, 255, 0.2); border-radius: 50%; }
.social-tile__name { font-family: var(--font-heading); font-size: 26px; font-weight: 800; line-height: 1.1; }
.social-tile__text { font-size: 16px; line-height: 1.5; opacity: 0.92; }
.social-tile__go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; font-family: var(--font-heading); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.social-tile__go .icon { transition: transform 0.2s; }
.social-tile:hover .social-tile__go .icon { transform: translateX(3px); }
.social-tile--youtube { --social: #e62117; }
.social-tile--facebook { --social: #1877f2; }
.social-tile--instagram { --social: linear-gradient(45deg, #f9a03f 0%, #e1306c 45%, #833ab4 100%); }
.connect-app { display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; padding: clamp(28px, 4vw, 44px); background: var(--c-surface-alt); border-radius: var(--radius); }
.connect-app__text { flex: 1; max-width: 560px; }
.connect-app__text p:not(.eyebrow) { margin: 0 0 22px; font-size: 17px; color: var(--c-ink-soft); }
.connect-app__qr { flex: none; margin: 0; padding: 16px 16px 12px; text-align: center; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lift); }
.connect-app__qr img { display: block; width: 170px; height: 170px; image-rendering: pixelated; }
.connect-app__qr figcaption { margin-top: 8px; font-size: 13px; font-weight: 600; color: #3b4651; }

/* ---------- 12. Church Life and Church History ---------- */

/* Church Life: category buttons, then the photos in columns, each whole. */
.church-life__intro, .history__lead { max-width: 640px; margin: 0 auto 28px; font-size: 18px; text-align: center; color: var(--c-ink-soft); }
.chip-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: clamp(24px, 4vw, 40px); }
.chip-filter .chip { padding: 8px 18px; font-family: inherit; font-size: 15px; border: 0; cursor: pointer; }
.chip-filter .chip[aria-pressed="true"] { color: #fff; background: var(--c-brand); }
.life-grid { columns: 3 280px; column-gap: 24px; margin: 0; padding: 0; list-style: none; }
.life-photo { display: block; margin: 0 0 24px; overflow: hidden; break-inside: avoid; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 20px; }
.life-photo[hidden] { display: none; }
.life-photo__open { display: block; width: 100%; padding: 0; overflow: hidden; background: none; border: 0; cursor: zoom-in; }
.life-photo__open img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.life-photo__open:hover img { transform: scale(1.03); }
.life-photo__soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 4 / 3;
  color: #fff;
  background: linear-gradient(135deg, var(--c-hero-a), var(--c-hero-b));
}
.life-photo__soon .icon { font-size: 56px; opacity: 0.95; }
.life-photo__soon span { font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.life-photo__caption { padding: 18px 22px 20px; }
.life-photo__category { margin: 0 0 4px; font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-brand); }
.life-photo__title { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.25; }
.life-photo__text { font-size: 15px; line-height: 1.6; color: var(--c-ink-soft); }
.life-photo__text p { margin: 0; }
.church-life__more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: clamp(24px, 4vw, 40px); text-align: center; }
.church-life__more p { flex-basis: 100%; margin: 0 0 6px; font-size: 18px; }

/* A photo opened large. */
.lightbox { max-width: min(1100px, 94vw); max-height: 94vh; padding: 0; overflow: visible; background: none; border: 0; }
.lightbox::backdrop { background: rgba(4, 12, 20, 0.88); }
.lightbox__figure { margin: 0; }
.lightbox__image { display: block; max-width: 100%; max-height: 84vh; margin: 0 auto; border-radius: 14px; }
.lightbox__caption { margin-top: 12px; font-size: 16px; text-align: center; color: #fff; }
.lightbox__close { position: absolute; top: -50px; right: 0; color: #fff; }
.lightbox__close:hover { color: #fff; background: rgba(255, 255, 255, 0.15); }

/* Church History: the numbers, then the timeline down the middle. */
.history__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); }
.history__stats div { padding: 18px 12px; text-align: center; background: var(--c-surface-alt); border-radius: var(--radius); }
.history__stats dt { font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-ink-soft); }
.history__stats dd { margin: 4px 0 0; font-family: var(--font-heading); font-size: clamp(18px, 2.4vw, 24px); font-weight: 800; color: var(--c-brand); }
.timeline { --timeline-x: 50%; --timeline-fill: 100%; position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before, .timeline::after { position: absolute; top: 0; left: var(--timeline-x); width: 4px; content: ""; border-radius: 4px; transform: translateX(-50%); }
.timeline::before { bottom: 0; background: var(--c-line); }
.timeline::after { height: var(--timeline-fill); background: linear-gradient(180deg, var(--c-brand), var(--c-cta)); }
.timeline__year { position: relative; z-index: 1; display: flex; justify-content: center; margin-bottom: 36px; }
.timeline__year span { padding: 6px 20px; font-family: var(--font-heading); font-size: 18px; font-weight: 800; letter-spacing: 0.06em; color: #fff; background: var(--c-brand); border-radius: 999px; box-shadow: 0 0 0 6px var(--c-bg); }
.timeline__item { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 80px; margin-bottom: 48px; }
.timeline__item--left .timeline__card { grid-column: 1; }
.timeline__item--right .timeline__card { grid-column: 2; }
.timeline__dot { position: absolute; top: 30px; left: var(--timeline-x); z-index: 1; width: 24px; height: 24px; background: var(--c-surface); border: 4px solid var(--c-line); border-radius: 50%; transform: translateX(-50%); transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s; }
.timeline:not(.timeline--live) .timeline__dot, .is-reached > .timeline__dot { background: var(--c-cta); border-color: var(--c-brand); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-brand) 20%, transparent); }
.timeline__card, .timeline__now-card { overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 20px; box-shadow: var(--shadow-lift); }
.timeline--live .timeline__card, .timeline--live .timeline__now-card { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.timeline--live .is-near .timeline__card, .timeline--live .is-near .timeline__now-card { opacity: 1; transform: none; }
.timeline__image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 25%; }
.timeline__body { padding: 20px 24px 24px; }
.timeline__date { margin: 0 0 4px; font-family: var(--font-heading); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-brand); }
.timeline__title { margin: 0 0 8px; font-size: 22px; font-weight: 700; line-height: 1.25; }
.timeline__text { font-size: 16px; line-height: 1.6; color: var(--c-ink-soft); }
.timeline__text p { margin: 0 0 8px; }
.timeline__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-family: var(--font-heading); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-cta); }
.timeline__link:hover { gap: 10px; }
/* Today: a pulsing dot at the end of the line, and a card under it. */
.timeline__now { position: relative; padding-top: 64px; }
.timeline__now .timeline__dot { top: 0; }
/* The line stops at today's dot. */
.timeline__now::before { position: absolute; top: 24px; bottom: 0; left: var(--timeline-x); z-index: 1; width: 8px; content: ""; background: var(--c-bg); transform: translateX(-50%); }
.timeline__dot--now::after { position: absolute; inset: -4px; content: ""; border: 3px solid var(--c-brand); border-radius: 50%; animation: timeline-pulse 2s ease-out infinite; }
@keyframes timeline-pulse { from { opacity: 0.8; transform: scale(1); } to { opacity: 0; transform: scale(2.2); } }
.timeline__now-card { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 24px 28px 28px; text-align: center; }
.timeline__now-card p:not(.timeline__date) { margin: 0 0 18px; color: var(--c-ink-soft); }

/* ---------- 13. Live stream ---------- */

.live-stream__screen { position: relative; margin-bottom: 14px; overflow: hidden; background: linear-gradient(120deg, var(--c-hero-a), var(--c-hero-b)); border-radius: var(--radius); }
.live-stream__player { position: absolute; inset: 0; }
.live-stream__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-stream__message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; color: #fff; }
.live-stream__message p { margin: 0; }
.live-stream__message strong { display: block; margin-bottom: 6px; font-family: var(--font-heading); font-size: clamp(20px, 3vw, 28px); line-height: 1.2; }
.live-stream__message a { color: #fff; text-decoration: underline; }
.live-stream__status { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-family: var(--font-heading); font-weight: 700; }
.live-stream__badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: #d0021b; border-radius: 6px; }
.live-stream__badge::before { content: ""; width: 8px; height: 8px; background: #fff; border-radius: 50%; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.live-stream__back { margin: 0 0 14px; text-align: center; }
.video-gallery__items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.video-gallery__item { position: relative; display: block; overflow: hidden; background: #000; border-radius: 10px; }
.video-gallery__placeholder { aspect-ratio: 16 / 9; background: var(--tint); border-radius: 10px; }
.video-gallery__item img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity 0.25s; }
.video-gallery__title { position: absolute; inset: 0; display: flex; align-items: flex-start; padding: 10px; font-size: 13px; line-height: 1.35; color: #fff; background: rgba(0, 0, 0, 0.62); opacity: 0; transition: opacity 0.25s; }
.video-gallery__item:hover .video-gallery__title, .video-gallery__item:focus .video-gallery__title { opacity: 1; }
.video-gallery__play { position: absolute; top: 50%; left: 50%; width: 44px; height: 32px; margin: -16px 0 0 -22px; background: rgba(0, 0, 0, 0.75); border-radius: 9px; transition: background-color 0.2s; }
.video-gallery__play::after { content: ""; position: absolute; top: 10px; left: 18px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; }
.video-gallery__item:hover .video-gallery__play { background: #f00; }
.video-gallery__item.is-playing { outline: 3px solid var(--c-cta); outline-offset: -3px; }
.video-gallery__footer { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.video-gallery__footer a { display: inline-flex; padding: 9px 18px; font-family: var(--font-heading); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; border-radius: 6px; text-decoration: none; }
.video-gallery__more { background: var(--c-brand); }
.video-gallery__subscribe { background: #cc0000; }
.video-gallery__footer a:hover { color: #fff; opacity: 0.88; }

/* ---------- 14. Events and calendar ---------- */

.event { max-width: 1000px; margin: 0 auto; padding: 8px var(--gutter) 0; }
.content--event { padding-top: 24px; }
.event__back { margin: 0 0 20px; }
.event__back a { font-family: var(--font-heading); font-weight: 700; color: var(--c-ink); }
.event__back a:hover { color: var(--c-brand); }
.event__notice { margin: 0 0 20px; padding: 12px 16px; font-weight: 600; background: var(--special-tint); border-radius: var(--radius-small); }
.event__title { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.15; }
.event__schedule { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 28px; font-size: 17px; font-weight: 600; color: var(--c-brand); }
.event__cost { padding: 2px 12px; font-size: 14px; color: var(--c-on-cta); background: var(--c-cta); border-radius: 999px; }
.event__body { padding: clamp(22px, 4vw, 40px); background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.event__image { margin: 0 0 28px; }
.event__image img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--radius-small); }
.event__description { font-size: 17px; }
.event__description p { margin: 0 0 1em; }
.event__add { margin: 24px 0; }
.event__add-dropdown { position: relative; display: inline-block; }
.event__add-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-brand);
  background: var(--c-surface);
  border: 2px solid var(--c-brand);
  border-radius: 8px;
  cursor: pointer;
}
.event__add-button .icon { font-size: 20px; }
.event__add-caret { transition: transform 0.2s; }
.event__add-button[aria-expanded="true"] .event__add-caret { transform: rotate(180deg); }
.event__add-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 10; min-width: 220px; padding: 8px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-small); box-shadow: var(--shadow-lift); }
.event__add-list ul { margin: 0; padding: 0; list-style: none; }
.event__add-list a { display: block; padding: 8px 12px; font-size: 15px; color: var(--c-ink); border-radius: 8px; }
.event__add-list a:hover { color: var(--c-brand); background: var(--tint); }

.event-meta { display: flex; flex-wrap: wrap; gap: 0 40px; padding-top: 12px; font-size: 15px; border-top: 1px solid var(--c-line); }
.event-meta__group { min-width: 200px; padding: 16px 0; }
.event-meta__title { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-brand); }
.event-meta dl { margin: 0; }
.event-meta dt { margin: 0; font-weight: 700; }
.event-meta dd { margin: 0 0 8px; overflow-wrap: anywhere; }
.event-meta__address { font-style: normal; }
.event-meta__address a { display: inline-block; margin-top: 4px; }
.event-meta__dates { margin: 0; padding: 0; list-style: none; }
.event-meta__dates li { margin: 0 0 6px; }
.event-meta__dates span { display: block; color: var(--c-ink-soft); }
.event-meta__map { flex: 1; min-width: 240px; margin: 16px 0; overflow: hidden; border-radius: var(--radius-small); }
.event-meta__map iframe { display: block; width: 100%; height: 240px; border: 0; }
.event-nav { margin-top: 28px; }
.event-nav ul { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 0; list-style: none; font-family: var(--font-heading); font-weight: 600; }
.event-nav__next { margin-left: auto; text-align: right; }
.event-nav a { color: var(--c-ink-soft); }
.event-nav a:hover { color: var(--c-brand); }

.events-view { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--gutter) clamp(56px, 8vw, 96px); }
.events-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 24px; }
.events-top__title { margin: 0; font-size: 28px; font-weight: 800; }
.events-top__calendar { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 8px 16px; font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--c-brand); background: var(--tint); border-radius: 999px; }
.events-top__calendar:hover { color: #fff; background: var(--c-brand); }
.events-top__nav { display: flex; gap: 6px; }
.events-top__arrow { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; font-size: 24px; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 50%; cursor: pointer; }
.events-top__arrow:hover { color: var(--c-brand); border-color: var(--c-brand); }
.events-top__today { padding: 8px 16px; font-family: var(--font-heading); font-size: 13px; font-weight: 700; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px; cursor: pointer; }
.events-top__today:hover { color: var(--c-brand); border-color: var(--c-brand); }

.events-list { margin: 0; padding: 0; list-style: none; }
.events-list__month { display: flex; align-items: center; margin: 28px 0 14px; }
.events-list__month::after { content: ""; flex: 1; height: 1px; margin-left: 16px; background: var(--c-line); }
.events-list__month h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-brand); }
.events-list__row { display: flex; gap: 20px; margin: 0 0 16px; padding: 20px; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.events-list__date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 76px; height: 76px; color: #fff; background: linear-gradient(135deg, var(--c-hero-a), var(--c-hero-b)); border-radius: 14px; }
.events-list__weekday { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.9; }
.events-list__daynum { font-family: var(--font-heading); font-size: 28px; font-weight: 800; line-height: 1.05; }
.events-list__event { flex: 1; display: flex; gap: 20px; min-width: 0; }
.events-list__details { flex: 1; min-width: 0; }
.events-list__details > * { margin: 0; }
.events-list__time { font-size: 14px; font-weight: 600; color: var(--c-brand); }
.events-list__title { margin-top: 4px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.events-list__title a { color: var(--c-ink); }
.events-list__title a:hover { color: var(--c-brand); }
.events-list__venue { margin-top: 6px; font-style: normal; font-size: 14px; color: var(--c-ink-soft); }
.events-list__excerpt { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--c-ink-soft); }
.events-list__cost { display: inline-block; margin-top: 10px; padding: 2px 10px; font-size: 13px; font-weight: 600; background: var(--tint); border-radius: 999px; }
.events-list__image { flex: none; width: 260px; }
.events-list__image img { display: block; width: 100%; height: auto; border-radius: 10px; }
.events-list__empty { padding: 18px 20px; background: var(--c-surface); border-radius: var(--radius-small); }

.events-month { overflow: hidden; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.events-month table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; }
.events-month th { padding: 12px 0; font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-ink-soft); text-align: center; background: var(--c-surface-alt); }
.events-month td { position: relative; height: 128px; padding: 8px 7px 4px; vertical-align: top; border: 1px solid var(--c-line); }
.events-month tr td:first-child { border-left: 0; }
.events-month tr td:last-child { border-right: 0; }
.events-month tbody tr:last-child td { border-bottom: 0; }
.events-month__day { display: block; min-width: 28px; margin: 0 0 6px; padding: 0 4px; font: inherit; font-family: var(--font-heading); font-size: 15px; font-weight: 700; line-height: 28px; color: var(--c-ink); background: none; border: 0; border-radius: 999px; cursor: default; }
.events-month td.is-other-month { background: var(--c-surface-alt); }
.events-month td.is-other-month .events-month__day, .events-month td.is-past .events-month__day { color: var(--c-ink-soft); opacity: 0.7; }
.events-month td.is-today .events-month__day { width: 28px; padding: 0; color: #fff; text-align: center; background: var(--c-brand); opacity: 1; }
[data-theme="midnight"] .events-month td.is-today .events-month__day { color: var(--c-bg); }
.events-month__event {
  --box: var(--c-brand);
  --box-bg: var(--tint);
  display: block;
  margin: 0 0 5px;
  padding: 4px 7px 5px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-ink);
  background: var(--box-bg);
  border-left: 3px solid var(--box);
  border-radius: 6px;
  overflow-wrap: anywhere;
  transition: background-color 0.15s, color 0.15s;
}
.events-month__event--event { --box: var(--c-special); --box-bg: var(--special-tint); }
.events-month__event:hover, .events-month__event:focus-visible { color: #fff; background: var(--box); }
.events-month__event:hover .events-month__time, .events-month__event:focus-visible .events-month__time { color: inherit; }
.events-month td.is-past .events-month__event, .events-month td.is-other-month .events-month__event { opacity: 0.6; }
.events-month__time { display: block; font-size: 11px; font-weight: 600; color: var(--box); }
.events-month__dots { display: none; }
.events-month__dot { width: 6px; height: 6px; background: var(--c-brand); border-radius: 50%; }
.events-month__dot--event { background: var(--c-special); }

.calendar__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 14px; color: var(--c-ink-soft); }
.calendar__legend li { display: flex; align-items: center; gap: 8px; }
.calendar__swatch { width: 14px; height: 14px; background: var(--tint); border-left: 3px solid var(--c-brand); border-radius: 3px; }
.calendar__swatch--event { background: var(--special-tint); border-color: var(--c-special); }
.calendar__day { display: none; }
.calendar__day-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.calendar__day-list .events-month__event { margin-bottom: 8px; padding: 10px 12px; font-size: 15px; }
.calendar__day-list .events-month__time { font-size: 13px; }
.calendar__day-empty { margin: 0; padding: 14px 16px; font-size: 14px; color: var(--c-ink-soft); background: var(--c-surface); border-radius: var(--radius-small); }
.calendar__weekly { margin-top: 56px; }
.calendar__heading { margin: 0 0 16px; font-size: 26px; font-weight: 800; }
.calendar__weekly-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.calendar__weekly-list li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--c-surface); border-left: 4px solid var(--c-brand); border-radius: 12px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.calendar__weekly-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.calendar__weekly-day { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-brand); }
.calendar__weekly-time { font-size: 14px; color: var(--c-ink-soft); }
.calendar__weekly-name { order: -1; font-family: var(--font-heading); font-size: 17px; font-weight: 700; color: var(--c-ink); }
.calendar__weekly-name::after { content: ""; position: absolute; inset: 0; }
.calendar__weekly-name:hover { color: var(--c-brand); }

.calendar-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 28px 28px 24px; color: var(--c-ink); background: var(--c-surface); border: 0; border-top: 5px solid var(--c-brand); border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.calendar-dialog::backdrop { background: rgba(5, 12, 22, 0.55); }
.calendar-dialog__close { position: absolute; top: 10px; right: 10px; display: flex; padding: 6px; font-size: 22px; color: var(--c-ink-soft); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.calendar-dialog__close:hover { color: var(--c-ink); background: var(--tint); }
.calendar-dialog__when { margin: 0 32px 6px 0; font-size: 14px; font-weight: 700; color: var(--c-brand); }
.calendar-dialog__title { margin: 0 0 6px; font-size: 26px; font-weight: 800; line-height: 1.2; }
.calendar-dialog__repeat, .calendar-dialog__place { margin: 0 0 4px; font-size: 14px; font-style: normal; color: var(--c-ink-soft); }
.calendar-dialog__text { margin-top: 16px; font-size: 15px; line-height: 1.6; }
.calendar-dialog__text > :first-child { margin-top: 0; }
.calendar-dialog__text > :last-child { margin-bottom: 0; }
.calendar-dialog__link { display: inline-flex; align-items: center; gap: 2px; margin-top: 20px; font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--c-brand); }

/* Fade-up on the home page (src/scripts/reveal.ts). */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 15. Smaller screens, motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .timeline--live .timeline__card, .timeline--live .timeline__now-card { opacity: 1; transform: none; }
  .timeline__dot--now::after { display: none; }
}

@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

@media (hover: none) {
  .video-gallery__title { opacity: 1; background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 60%); align-items: flex-end; }
  .tile__text { grid-template-rows: 1fr; margin-top: 8px; opacity: 0.95; }
}

@media (max-width: 1180px) {
  .site-header__give { display: none; }
}

/* Phones and tablets: the menu becomes a panel from the ☰ button. */
@media (max-width: 1080px) {
  :root { --header-h: 64px; }
  .logo__mark { width: 176px; }
  .header-search { display: none; }
  .site-header__tools { margin-left: auto; }
  .site-header__give { display: inline-flex; }
  .live-bar__prefix { display: none; }
  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--c-header-ink);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
  }
  .menu-button__bars { position: relative; display: block; width: 22px; height: 16px; }
  .menu-button__bars span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.25s, opacity 0.2s, top 0.25s; }
  .menu-button__bars span:nth-child(1) { top: 0; }
  .menu-button__bars span:nth-child(2) { top: 7px; }
  .menu-button__bars span:nth-child(3) { top: 14px; }
  .menu-button[aria-expanded="true"] .menu-button__bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
  .menu-button[aria-expanded="true"] .menu-button__bars span:nth-child(2) { opacity: 0; }
  .menu-button[aria-expanded="true"] .menu-button__bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    z-index: 49;
    width: min(400px, 100%);
    margin: 0;
    padding: 12px 20px 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--c-surface);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease, visibility 0.3s;
  }
  .main-nav.is-open { visibility: visible; transform: none; box-shadow: -20px 0 40px -20px rgba(5, 12, 22, 0.5); }
  html.menu-open { overflow: hidden; }
  /* The page behind the open menu dims; the header stays bright (a tap here closes the menu). */
  html.menu-open body::after { content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(5, 12, 22, 0.5); }
  .main-menu { display: block; }
  .main-menu > li { border-bottom: 1px solid var(--c-line); }
  .main-menu > li > a { padding: 14px 48px 14px 4px; font-size: 17px; font-weight: 600; border-radius: 0; }
  .main-menu > li > a.is-current::after { display: none; }
  .main-menu > li > a.is-current { box-shadow: inset 3px 0 0 var(--c-cta); padding-left: 12px; }
  .menu-caret { display: none; }
  .submenu-toggle {
    position: absolute;
    top: 6px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 22px;
    color: var(--c-ink);
    background: var(--c-surface-alt);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
  }
  .submenu-toggle .icon { transition: transform 0.2s; }
  .submenu-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .submenu { position: static; display: none; min-width: 0; margin: 0 0 10px; padding: 4px; box-shadow: none; opacity: 1; visibility: visible; transform: none; border: 0; background: var(--c-surface-alt); }
  .main-menu li > .submenu.is-open { display: block; }
  .main-menu > li:hover > .submenu, .main-menu > li:focus-within > .submenu { display: none; }
  .main-menu > li > .submenu.is-open { display: block; }
  .main-menu__search { display: block; margin-top: 16px; border-bottom: 0 !important; }
  .main-menu__search form { position: relative; }
  .main-menu__search-icon { position: absolute; left: 14px; top: 50%; font-size: 20px; color: var(--c-ink-soft); transform: translateY(-50%); pointer-events: none; }
  .main-menu__search input { width: 100%; padding-left: 44px; }
  .main-menu__social { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; border-bottom: 0 !important; }
  .main-menu__social p { margin: 0; font-family: var(--font-heading); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-ink-soft); }
  .main-menu__social .social-icons a { width: 42px; height: 42px; font-size: 22px; }
}

@media (max-width: 960px) {
  .with-sidebar { grid-template-columns: minmax(0, 1fr); }
  .with-sidebar__side { grid-row: 1; position: static; }
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .pastor-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; }
  .pastor-card__photo { height: 100%; }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
  .news { gap: 18px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .timeline { --timeline-x: 14px; }
  .timeline__item { grid-template-columns: minmax(0, 1fr); margin-bottom: 32px; padding-left: 44px; }
  .timeline__item--left .timeline__card, .timeline__item--right .timeline__card { grid-column: 1; }
  .timeline__dot { top: 22px; width: 22px; height: 22px; }
  .timeline__year { justify-content: flex-start; margin-bottom: 24px; }
  .timeline__now { padding: 0 0 0 44px; }
  .timeline__now .timeline__dot { top: 22px; }
  .timeline__now::before { top: 44px; }
  .timeline__now-card { margin: 0; text-align: left; }
  .history__stats { gap: 8px; }
  .history__stats div { padding: 14px 6px; }
  body { font-size: 16px; }
  .prose--full { font-size: 17px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .split__col { padding: 0 !important; border: 0 !important; }
  .location__inner { grid-template-columns: minmax(0, 1fr); }
  .connect__cards { grid-template-columns: minmax(0, 1fr); }
  .connect-app { flex-direction: column; text-align: center; }
  .connect-app__text { max-width: none; }
  .leader { grid-template-columns: minmax(0, 1fr); }
  .leader__photo { max-width: 260px; }
  .nav-blocks { grid-template-columns: minmax(0, 1fr); }
  .nav-blocks:not(.nav-blocks--both) .nav-block--right { grid-column: 1; }
  .sermon-row { grid-template-columns: 132px minmax(0, 1fr); gap: 14px; }
  .sermon-row__icons { display: none; }
  .sermon-row__excerpt { display: none; }
  .sermon-row__title { font-size: 16.5px; }
  .video-gallery__items { grid-template-columns: repeat(2, 1fr); }
  .events-list__row { flex-direction: column; }
  .events-list__date { flex-direction: row; gap: 8px; width: auto; height: auto; padding: 6px 14px; align-self: flex-start; border-radius: 999px; }
  .events-list__daynum { font-size: 18px; }
  .events-list__event { flex-direction: column; }
  .events-list__image { width: 100%; }
  .event-nav ul { flex-direction: column; }
  .event-nav__next { margin-left: 0; text-align: left; }
  .page-banner__portrait { display: none; }
}

@media (max-width: 640px) {
  :root { --bar-h: 40px; }
  .live-bar__unit { padding: 2px 6px; font-size: 0; }
  .live-bar__unit b { font-size: 14px; }
  .live-bar__unit b::after { font-size: 11px; font-weight: 600; opacity: 0.8; }
  .live-bar__unit:nth-child(1) b::after { content: "d"; }
  .live-bar__unit:nth-child(2) b::after { content: "h"; }
  .live-bar__unit:nth-child(3) b::after { content: "m"; }
  .live-bar__unit:nth-child(4) b::after { content: "s"; }
  .live-bar__label { font-size: 13px; }
  .news { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { aspect-ratio: 16 / 11; }
  .news-card__body { padding: 18px 20px 20px; }
  .pastor-card { grid-template-columns: minmax(0, 1fr); }
  .pastor-card__photo { aspect-ratio: 4 / 3; height: auto; }
  .site-footer__main { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero__buttons .btn { flex: 1; }
  .sermon-row { grid-template-columns: minmax(0, 1fr); }
  .sermon-row__thumb { aspect-ratio: 16 / 7; }
  .video-gallery__items { grid-template-columns: minmax(0, 1fr); }

  /* Social buttons: all three in one row, smaller (icon over the name). */
  .social-links { flex-wrap: nowrap; width: 100%; gap: 8px; }
  .social-links li { flex: 1; min-width: 0; }
  .social-link { flex-direction: column; justify-content: center; gap: 4px; min-width: 0; height: 100%; padding: 10px 6px; font-size: 13px; text-align: center; border-radius: 14px; }
  .social-link small { display: none; }
  .social-link .icon { width: 34px; height: 34px; padding: 7px; font-size: 20px; }
  .social-tiles { gap: 8px; }
  .social-tile { align-items: center; gap: 6px; padding: 14px 6px; text-align: center; border-radius: 14px; }
  .social-tile__icon { width: 44px; height: 44px; margin: 0; font-size: 24px; }
  .social-tile__name { font-size: 14px; }
  .social-tile__text, .social-tile__go { display: none; }

  /* Calendar: dots instead of boxes; tapping a day lists its events below. */
  .events-month th { font-size: 10px; letter-spacing: 0.04em; }
  .events-month td { height: 3.6em; padding: 4px 2px; text-align: center; }
  .events-month td.is-selected { background: var(--tint); box-shadow: inset 0 0 0 2px var(--c-brand); }
  .events-month__day { margin: 0 auto 4px; font-size: 14px; cursor: pointer; }
  .events-month__day::after { content: ""; position: absolute; inset: 0; }
  .events-month td > .events-month__event { display: none; }
  .events-month__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .calendar__day:not([hidden]) { display: block; margin-top: 20px; }
  .calendar__legend { width: 100%; margin-left: 0; }
}

@media (max-width: 420px) {
  .live-bar__clock { display: none !important; }
  .logo__mark { width: 150px; }
  .site-header__give { margin-left: 0; padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 389px) {
  .logo__mark { width: 132px; }
  .site-header__give { padding-left: 10px; padding-right: 10px; }
}

/* The smallest phones: a smaller logo, so the Give button still fits. */
@media (max-width: 359px) {
  .logo__mark { width: 112px; }
  .site-header__give { padding-left: 8px; padding-right: 8px; }
}

@media print {
  .site-header, .site-footer, .live-bar, .nav-blocks, .sidebar, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

