/* ==========================================================================
   FBC Yoakum — layout, components & site chrome
   Built on the design tokens (styles.css). Ports the React primitives
   (Button, Card, Badge, Eyebrow, VerseBlock, EventCard, SermonCard) and the
   SiteChrome header/footer into plain CSS classes for server-rendered pages.
   ========================================================================== */

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--brand-primary); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); font-family: var(--font-body); font-weight: var(--fw-semibold);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; color: #fff; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.section { padding: var(--space-20) 0; }
.section--tight { padding: var(--space-12) 0; }
.stack > * + * { margin-top: var(--space-4); }

/* Inverted brand band — bright logo blue per the design-system website
   mockup (brand-fill-strong carries small white text at AA). Flat field with
   the white dot texture; no glow blobs. */
.section--ink {
  position: relative;
  overflow: hidden;
  background: var(--brand-fill-strong);
  color: #fff;
}
.section--ink::before {
  content: "";
  position: absolute; inset: 0;
  opacity: .09;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 24px 24px;
}
.section--ink .glow { display: none; }
.section--ink > .container { position: relative; z-index: 2; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }

/* ---------- Eyebrow (uppercase label + short gold tick) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: var(--brand-accent-ink);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--brand-accent); }
.section--ink .eyebrow { color: #fff; }

/* ---------- Headings helpers ---------- */
.display-xl { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-display-xl); line-height: var(--lh-tight); }
.display-lg { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-display-lg); line-height: var(--lh-tight); }
.display-md { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-display-md); line-height: var(--lh-snug); }
.lead { font-size: var(--fs-body-lg); color: var(--text-body); max-width: var(--content-measure); line-height: var(--lh-normal); }
.section--ink .lead { color: #fff; }

/* ---------- Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: var(--fs-body-sm); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-primary); color: var(--cream-50); }
.btn--primary:hover { background: var(--brand-primary-hover); color: var(--cream-50); }
.btn--gold { background: var(--gold-500); color: var(--text-on-gold); }
.btn--gold:hover { background: var(--gold-400); color: var(--text-on-gold); }
.btn--secondary { background: transparent; color: var(--brand-primary); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface-sky); color: var(--brand-primary); }
.btn--ghost-on-ink { background: transparent; color: var(--cream-50); border-color: var(--border-on-ink); }
.btn--ghost-on-ink:hover { background: rgba(255,255,255,.08); color: var(--cream-50); }

/* ---------- Card ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__body { padding: var(--space-5) var(--space-6); }
.card--accent-top { border-top: 4px solid var(--gold-500); }
.card--sky { background: var(--surface-sky); border-color: var(--blue-200); }
.card--ink { background: var(--brand-fill-strong); color: #fff; border-color: transparent; }
.card__title { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-display-sm); color: var(--text-heading); }
.card--ink .card__title { color: #fff; }
.card__meta { font-size: var(--fs-body-sm); color: var(--text-muted); margin-top: 2px; }

/* ---------- Badge / pill ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--surface-sky); color: var(--brand-primary);
}
.badge--gold { background: var(--gold-100); color: var(--gold-700); }
.badge--green, .badge--live { background: var(--green-100); color: var(--green-600); }
.badge--blue { background: var(--surface-sky); color: var(--brand-primary); }
.badge--red { background: var(--red-100); color: var(--red-600); }
.badge--neutral { background: var(--cream-100); color: var(--stone-600); }

/* ---------- Verse block (italic serif + small-caps reference) ---------- */
.verse {
  font-family: var(--font-display); font-style: italic; font-weight: var(--fw-medium);
  font-size: var(--fs-title); color: var(--text-heading); line-height: var(--lh-snug);
}
.verse__ref {
  display: block; margin-top: var(--space-3);
  font-family: var(--font-body); font-style: normal; font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--brand-accent-ink); font-variant-caps: small-caps;
}
.section--ink .verse { color: #fff; font-weight: var(--fw-bold); }
.section--ink .verse__ref { color: #fff; font-weight: var(--fw-bold); }

/* ---------- Grid ---------- */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Site chrome — sticky header (90% cream + blur) and brand-blue footer
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,249,244,.90);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-header__logo img { height: 48px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav a {
  font-family: var(--font-body); font-size: var(--fs-body-sm); font-weight: var(--fw-semibold);
  color: var(--text-body); letter-spacing: .02em;
}
.site-nav a:hover { color: var(--brand-primary); }
.site-nav a.is-active { color: var(--brand-primary); }
.site-header__cta { display: flex; align-items: center; gap: var(--space-3); }

/* Hamburger toggle (hidden until the nav collapses) */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; margin: 0;
  background: transparent; border: none; cursor: pointer; color: var(--text-heading);
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle__bars { position: relative; display: block; width: 24px; height: 16px; }
.nav-toggle__bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .25s var(--ease-out), opacity .2s var(--ease-out), top .25s var(--ease-out);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 7px; }
.nav-toggle__bars span:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* Slide-down mobile menu */
.mobile-nav {
  display: none; flex-direction: column; gap: 2px;
  padding: var(--space-3) var(--space-5) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  background: rgba(251,249,244,.98);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  max-height: calc(100vh - 72px); overflow-y: auto;
}
.mobile-nav.is-open { display: flex; animation: navDrop .22s var(--ease-out); }
@keyframes navDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-nav a {
  font-family: var(--font-body); font-size: 17px; font-weight: var(--fw-semibold);
  color: var(--text-heading); padding: 13px 6px; border-bottom: 1px solid var(--border-subtle);
}
.mobile-nav a:hover, .mobile-nav a:active { color: var(--brand-primary); }
.mobile-nav a.is-active { color: var(--brand-primary); }
.mobile-nav__cta { margin-top: var(--space-4); border-bottom: none !important; text-align: center; }
.mobile-nav__cta:hover { color: #fff; }
body.nav-open { overflow: hidden; }

@media (max-width: 980px) {
  .site-nav, .site-header__cta .btn--secondary { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Footer — brand-blue field per the design-system website mockup. */
.site-footer { background: var(--brand-fill-strong); color: #fff; }
.site-footer__inner { padding-block: var(--space-16) var(--space-10); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-10); }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer img.footer-logo { height: 66px; width: auto; display: block; }
.site-footer__address { margin-top: var(--space-5); font-size: var(--fs-body-sm); color: #fff; line-height: 1.6; max-width: 24ch; }
.site-footer h4 {
  font-family: var(--font-body); font-size: 11px; font-weight: var(--fw-bold);
  letter-spacing: .24em; text-transform: uppercase; color: #fff; margin-bottom: var(--space-4);
}
.site-footer a { color: #fff; font-size: var(--fs-body-sm); display: block; padding: 3px 0; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__bar {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-block: var(--space-5); display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #fff;
}
.site-footer__mission {
  font-family: var(--font-display); font-style: italic; font-weight: var(--fw-bold);
  font-size: 19px; color: #fff;
}
@media (max-width: 600px) { .site-footer__bar { flex-direction: column; gap: var(--space-2); } }

/* ---------- Hero (home) ---------- */
.hero { text-align: center; padding-block: var(--space-24); }
.hero .est { font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold); letter-spacing: .4em; text-transform: uppercase; color: var(--gold-500); margin-bottom: var(--space-3); }
.hero h1 { font-size: var(--fs-display-xl); margin: 0; }
.hero .loc { font-size: 13px; font-weight: var(--fw-semibold); letter-spacing: .42em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: var(--space-4); }
.hero .hero-cta { margin-top: var(--space-8); display: inline-flex; gap: var(--space-4); }
@media (max-width: 700px) { .hero h1 { font-size: 52px; } }

/* ---------- Forms ---------- */
.fbc-form { display: flex; flex-direction: column; gap: var(--space-4); }
.fbc-form label {
  display: flex; flex-direction: column; gap: var(--space-2);
  font-family: var(--font-body); font-weight: var(--fw-semibold);
  font-size: var(--fs-body-sm); color: var(--text-heading);
}
.fbc-form input, .fbc-form textarea {
  width: 100%; box-sizing: border-box; font-family: var(--font-body); font-size: var(--fs-body);
  color: var(--text-heading); padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface-card); outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.fbc-form select {
  width: 100%; box-sizing: border-box; font-family: var(--font-body); font-size: var(--fs-body);
  color: var(--text-heading); padding: 12px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface-card); outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B6255' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.fbc-form input:focus, .fbc-form textarea:focus, .fbc-form select:focus { border-color: var(--brand-primary); box-shadow: var(--shadow-ring); }
.fbc-form textarea { resize: vertical; }
/* JS hides the form in place after an AJAX send; `hidden` has to beat the flex. */
.fbc-form[hidden], .form-shell[hidden], .form-success[hidden] { display: none; }

/* Inline validation */
.fbc-form input.is-error, .fbc-form textarea.is-error, .fbc-form select.is-error {
  border-color: var(--red-600); background: var(--red-100);
}
.fbc-form input.is-error:focus, .fbc-form textarea.is-error:focus, .fbc-form select.is-error:focus {
  border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(178, 58, 58, .18);
}
.fbc-form__error {
  margin: 0; font-size: var(--fs-body-sm); font-weight: var(--fw-regular); color: var(--red-600);
}
.fbc-form__error[hidden] { display: none; }

/* Honeypot — off-screen for people, irresistible to bots. */
.fbc-form__hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}

/* Cloudflare Turnstile. In "interaction-only" mode the widget renders nothing
   at all for almost everyone, so this must not reserve space it may not need —
   no min-height, and the gap only appears once there is something to space. */
.fbc-form__turnstile:not(:empty) { display: grid; gap: var(--space-2); }
.fbc-form__turnstile iframe { max-width: 100%; }

/* Privacy toggle (prayer requests) — a choice worth making obvious. */
.fbc-toggle {
  display: flex; flex-direction: row; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4); border: 1px solid var(--blue-200); border-radius: var(--radius-md);
  background: var(--surface-sky); cursor: pointer;
  font-weight: var(--fw-regular); color: var(--text-body);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
/* Beats the column layout `.fbc-form label` gives every other field. */
.fbc-form label.fbc-toggle { flex-direction: row; }
.fbc-toggle:hover { border-color: var(--brand-primary); }
.fbc-toggle:has(input:checked) { border-color: var(--brand-primary); box-shadow: var(--shadow-ring); }
.fbc-toggle:has(input:focus-visible) { box-shadow: var(--shadow-ring); }
.fbc-toggle input[type="checkbox"] {
  flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0;
  accent-color: var(--brand-primary); cursor: pointer;
}
.fbc-toggle__title {
  display: block; font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: 17px; color: var(--blue-900);
}
.fbc-toggle__note { display: block; font-size: var(--fs-body-sm); color: var(--text-body); margin-top: 2px; }

/* Submit button: disabled + spinner while the post is in flight. */
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  vertical-align: -2px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: fbc-spin .6s linear infinite;
}
@keyframes fbc-spin { to { transform: rotate(360deg); } }

/* Success state — checkmark rises first, the words follow. */
.form-success { text-align: center; }
.form-success__mark, .form-success__text > * {
  animation: fbc-rise var(--dur-slow) var(--ease-out) both;
}
.form-success__mark { font-size: 40px; color: var(--green-600); margin-bottom: var(--space-2); }
.form-success__text > *:nth-child(1) { animation-delay: 120ms; }
.form-success__text > *:nth-child(2) { animation-delay: 220ms; }
@keyframes fbc-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
/* Fading the form out before the thank-you fades in (AJAX path). */
.form-shell.is-leaving { animation: fbc-fade-out 180ms var(--ease-out) both; }
@keyframes fbc-fade-out { to { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .form-success__mark, .form-success__text > *, .form-shell.is-leaving { animation: none; }
  .btn.is-loading::before { animation-duration: 2s; }
}

/* The two-column form pages (Visit / Contact / Prayer) stack on phones, with
   the copy above the card. Ratios stay inline per page. */
@media (max-width: 760px) {
  .form-layout { grid-template-columns: 1fr !important; gap: var(--space-8) !important; }
  .form-layout .card__body { padding: var(--space-6) !important; }
}
.staff-photo { width: 100%; height: 236px; object-fit: cover; object-position: center 22%; border-radius: var(--radius-lg); margin-bottom: 14px; }

/* Contact info blocks */
.info-label { font-family: var(--font-body); font-weight: 700; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-accent-ink); margin-bottom: 6px; }
.info-value { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text-heading); line-height: 1.3; white-space: pre-line; }

/* ---------- Filter pills ---------- */
.pill {
  display: inline-block; padding: 7px 16px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 13px; font-weight: var(--fw-semibold);
  color: var(--text-body); background: transparent; border: 1px solid var(--border-strong);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.pill:hover { background: var(--surface-sky); color: var(--brand-primary); }
.pill--active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.pill--active:hover { color: #fff; background: var(--brand-primary-hover); }

/* ---------- Sermon cards / hero ---------- */
.sermon-card__art, .sermon-card__art-fallback { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--blue-650), var(--blue-700)); overflow: hidden; }
.sermon-card__art img { width: 100%; height: 100%; object-fit: cover; }
.sermon-card__art-fallback { display: flex; align-items: center; justify-content: center; }
.play { width: 56px; height: 56px; border-radius: 50%; border: 2px solid #fff; color: #fff; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 18px; }
/* Play glyph centered over a thumbnail image (vs. the flex-centered fallback) */
.play--over { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; width: 48px; height: 48px; font-size: 15px; background: rgba(0,0,0,.32); pointer-events: none; }
.sermon-card__art:hover .play--over { background: rgba(0,0,0,.5); }
.sermon-hero-art { position: relative; min-height: 280px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--blue-650), var(--blue-700)); overflow: hidden; }
.sermon-hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sermon-hero-art .play { position: relative; z-index: 2; width: 68px; height: 68px; }
@media (max-width: 760px) { .card .grid { grid-template-columns: 1fr !important; } .sermon-hero-art { min-height: 200px; } }
/* Any grid given explicit columns inline (page two-column layouts) stacks on phones. */
@media (max-width: 760px) { .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; } }

/* ---------- Video embed (16:9) ---------- */
.video-embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-md); overflow: hidden; background: var(--blue-900); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.sermon-meta { display: flex; gap: var(--space-10); flex-wrap: wrap; margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); }

/* ---------- Event rows ---------- */
.event-row {
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-4) var(--space-5); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); background: var(--surface-card); margin-bottom: var(--space-3);
  text-decoration: none; color: inherit;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.event-row:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.event-date {
  flex: none; width: 60px; text-align: center; border-radius: var(--radius-sm);
  padding: var(--space-2) 0; background: var(--surface-sky); color: var(--brand-primary);
}
.event-date--gold { background: var(--gold-100); color: var(--gold-700); }
.event-date--green { background: var(--green-100); color: var(--green-600); }
.event-date--red { background: var(--red-100); color: var(--red-600); }
.event-date--neutral { background: var(--cream-100); color: var(--stone-600); }
.event-date .dow { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.event-date .dom { display: block; font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1; }
.event-body { flex: 1; }
.event-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--text-heading); }
.event-meta { font-size: var(--fs-body-sm); color: var(--text-muted); margin-top: 2px; }
@media (max-width: 600px) { .event-row .badge { display: none; } }

/* ---------- Regular-event promo cards (EventIndexPage) ---------- */
.regular-events {
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
}
@media (max-width: 680px) { .regular-events { grid-template-columns: 1fr; } }
.regular-event { display: flex; flex-direction: column; overflow: hidden; }
/* The flyers are the church's own printed artwork — show each one whole rather
   than cropping it to a shared aspect ratio. */
.regular-event__art { background: var(--surface-sky); }
.regular-event__art img { display: block; width: 100%; height: auto; }
.regular-event .card__body { display: flex; flex-direction: column; flex: 1; }
.regular-event__text { color: var(--text-body); margin-top: var(--space-3); }
.regular-event__cta { align-self: flex-start; margin-top: var(--space-5); }

/* Service-times strip */
.times { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-5); }
@media (max-width: 760px) { .times { grid-template-columns: 1fr; } }
.times .when { font-family: var(--font-display); font-size: var(--fs-title); color: var(--text-heading); }
.times .what { font-size: var(--fs-body-sm); color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   Hero slider (Swiper) — reusable StreamField block
   ============================================================ */
.hero-slider { position: relative; }
.hero-slider .swiper { width: 100%; height: 100%; }
.hero-slider--standard .swiper, .hero-slider--standard .hero-slide { height: clamp(460px, 72vh, 720px); }
.hero-slider--tall .swiper, .hero-slider--tall .hero-slide { height: clamp(520px, 86vh, 860px); }
.hero-slider--full .swiper, .hero-slider--full .hero-slide { height: calc(100vh - var(--header-h, 72px)); }

.hero-slider .hero-slide { position: relative; display: flex !important; align-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-650), var(--blue-700)); }
.hero-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
/* Legibility overlay over the photo */
/* Overlay scrim: strength (light/medium/dark) × tint (navy/warm/charcoal).
   The tint sets --ov-rgb; the strength tiers build gradients from it. */
.hero-slide { --ov-rgb: 30,52,83; }              /* navy (brand ink) — default */
.hero-slide--tint-warm     { --ov-rgb: 74,46,20; }   /* orangish brown — golden-hour photos */
.hero-slide--tint-charcoal { --ov-rgb: 22,22,26; }   /* neutral dark */
.hero-slide::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hero-slide--ov-none::after  { background: none; }
.hero-slide--ov-light::after { background: linear-gradient(180deg, rgba(var(--ov-rgb),.18), rgba(var(--ov-rgb),.30)); }
.hero-slide--ov-medium::after{ background: linear-gradient(180deg, rgba(var(--ov-rgb),.34), rgba(var(--ov-rgb),.55)); }
.hero-slide--ov-dark::after  { background: linear-gradient(180deg, rgba(var(--ov-rgb),.55), rgba(var(--ov-rgb),.74)); }

.hero-slide__inner { position: relative; z-index: 2; width: 100%; color: var(--cream-50);
  display: flex; flex-direction: column; gap: var(--space-4); }
.hero-slide--center .hero-slide__inner { align-items: center; text-align: center; }
.hero-slide--left .hero-slide__inner   { align-items: flex-start; text-align: left; max-width: 60ch; }
.hero-slide__logo { height: clamp(96px, 11vw, 132px); width: auto; margin-bottom: var(--space-2); }
.hero-slide__eyebrow { font-family: var(--font-body); font-weight: 700; font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--gold-400); }
.hero-slide__heading { font-family: var(--font-display); font-weight: 600; color: var(--cream-50);
  font-size: clamp(36px, 5.4vw, 64px); line-height: 1.04; margin: 0; max-width: 18ch;
  text-shadow: 0 2px 24px rgba(0,0,0,.28); }
.hero-slide--center .hero-slide__heading { margin-left: auto; margin-right: auto; }
.hero-slide__text { font-size: var(--fs-body-lg); color: rgba(255,255,255,.88); max-width: 54ch; margin: 0;
  text-shadow: 0 1px 14px rgba(0,0,0,.30); }
.hero-slide__buttons { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); }
.hero-slide--center .hero-slide__buttons { justify-content: center; }

/* Ken Burns: slow zoom on the active slide's photo */
.hero-slider.is-kenburns .swiper-slide-active .hero-slide__img { animation: kenburns 14s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) {
  .hero-slider.is-kenburns .swiper-slide-active .hero-slide__img { animation: none; }
}

/* Swiper controls in brand colors */
.hero-slider .swiper-button-prev, .hero-slider .swiper-button-next { color: #fff; opacity: .85;
  --swiper-navigation-size: 30px; }
.hero-slider .swiper-button-prev:hover, .hero-slider .swiper-button-next:hover { opacity: 1; }
.hero-slider .swiper-pagination-bullet { background: #fff; opacity: .55; width: 9px; height: 9px; }
.hero-slider .swiper-pagination-bullet-active { background: var(--gold-500); opacity: 1; width: 22px; border-radius: 5px; }

@media (max-width: 600px) {
  .hero-slider .swiper-button-prev, .hero-slider .swiper-button-next { display: none; }
  .hero-slide__buttons .btn { flex: 1 1 auto; text-align: center; }
}

/* Promo graphic hero: finished artwork with its own wording, shown whole at its
   natural shape (never cropped, no scrim). The button strip takes the colour of
   the artwork's bottom edge (set per block) so it reads as part of the graphic. */
.promo-hero { background: var(--promo-strip, #111B3E); }
.promo-hero__img { display: block; width: 100%; height: auto; }
.promo-hero__strip { padding: var(--space-4) 0 var(--space-6); }
.promo-hero__buttons { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; }
@media (max-width: 600px) {
  .promo-hero { background: var(--promo-strip-phone, var(--promo-strip, #111B3E)); }
  /* Hide a light 1px edge some exports leave on the bottom row, so the strip joins seamlessly. */
  .promo-hero__img { clip-path: inset(0 0 1px 0); }
  .promo-hero__buttons .btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- Facebook feed block ---------- */
.fb-feed .fb-post { display: flex; flex-direction: column; height: 100%; }
.fb-post__img { aspect-ratio: 16/9; overflow: hidden; background: var(--surface-muted); }
.fb-post__img img { width: 100%; height: 100%; object-fit: cover; }
.fb-post__meta { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--space-3); }
.fb-post__meta .fb-ico { display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px; background: #1877F2; color: #fff;
  font-family: Georgia, serif; font-weight: 700; font-size: 13px; }
.fb-post__text { color: var(--text-body); font-size: var(--fs-body-sm); line-height: var(--lh-normal);
  margin: 0 0 var(--space-4); }
.fb-post__link { margin-top: auto; font-size: var(--fs-body-sm); font-weight: var(--fw-semibold);
  color: var(--text-link); }

/* ---------- Legacy pages (content carried over from the old WordPress site) ---------- */
.legacy-prose { max-width: 72ch; padding-block: var(--space-6) var(--space-16); }
.legacy-prose h4, .legacy-prose h5, .legacy-prose h6 {
  font-family: var(--font-display); font-weight: var(--fw-semibold); color: var(--text-heading);
  margin: var(--space-10) 0 var(--space-3); line-height: var(--lh-snug);
}
.legacy-prose h4 { font-size: var(--fs-display-sm); }
/* Gold tick above section headings — echoes the eyebrow treatment */
.legacy-prose h4::before {
  content: ""; display: block; width: 28px; height: 2px;
  background: var(--brand-accent); margin-bottom: var(--space-3);
}
/* Scripture reference lists — the site's small-caps gold reference voice */
.legacy-prose .refs {
  font-size: var(--fs-body-sm); line-height: var(--lh-normal);
  color: var(--brand-accent-ink); font-variant-caps: all-small-caps;
  letter-spacing: .02em; margin-top: calc(-1 * var(--space-2));
}
.legacy-prose h5 { font-size: var(--fs-title); }
.legacy-prose p { margin: 0 0 var(--space-4); color: var(--text-body); line-height: var(--lh-normal); }
.legacy-prose ul, .legacy-prose ol { margin: 0 0 var(--space-4) var(--space-6); color: var(--text-body); }
.legacy-prose li { margin-bottom: var(--space-2); line-height: var(--lh-normal); }
.legacy-prose a { color: var(--text-link); text-decoration: underline; }
.legacy-prose a:hover { color: var(--text-link-hover); }
.legacy-prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: var(--space-4) 0; }
.legacy-prose iframe { max-width: 100%; border: 0; margin: var(--space-4) 0; }
.legacy-prose blockquote {
  margin: var(--space-6) 0; padding-left: var(--space-5); border-left: 3px solid var(--gold-500);
  font-family: var(--font-display); font-style: italic; color: var(--text-heading);
}

/* ---------- Month calendar (CalendarPage) ---------- */
/* Page header: a soft sky-to-page wash with a gold tick under the title */
.cal-hero { position: relative; padding: var(--space-16) 0 var(--space-10); background: linear-gradient(180deg, var(--blue-50) 0%, var(--surface-page) 100%); border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--space-10); overflow: hidden; }
.cal-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(224, 184, 76, .10), transparent 70%); pointer-events: none; }
.cal-hero > .container { position: relative; }
.cal-hero h1::after { content: ""; display: block; width: 48px; height: 2px; background: var(--brand-accent); margin: var(--space-4) auto 0; }

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.cal-toolbar__month { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-display-md); color: var(--text-heading); line-height: var(--lh-snug); }
/* Prev / Today / Next as one segmented control */
.cal-toolbar__nav { display: flex; gap: var(--space-1); padding: var(--space-1); background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); box-shadow: var(--shadow-xs); }
.cal-toolbar__nav .pill { border-color: transparent; color: var(--brand-primary-ink); padding: 7px 18px; }
.cal-toolbar__nav .pill:hover { background: var(--surface-sky); color: var(--brand-primary-ink); }
.cal-toolbar__nav .pill:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.cal-toolbar__nav .cal-toolbar__today { background: var(--brand-fill-strong); color: #fff; }
.cal-toolbar__nav .cal-toolbar__today:hover { background: var(--brand-primary-hover); color: #fff; }

/* Grid — reads like a printed wall calendar: ruled cells, numbers top-left */
.cal { background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.cal__head, .cal__week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__head { border-bottom: 2px solid var(--brand-accent-rule); }
.cal__dow { padding: var(--space-3) 0; text-align: center; font-size: 11px; font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--brand-primary-ink); background: var(--surface-sky); }
.cal__dow:first-child, .cal__dow:last-child { color: var(--brand-accent-ink); }
.cal__day { min-height: 124px; padding: var(--space-2) var(--space-2) var(--space-3); border-top: 1px solid var(--border-subtle); min-width: 0; }
.cal__head + .cal__week .cal__day { border-top: 0; }
.cal__week .cal__day + .cal__day { border-left: 1px solid var(--border-subtle); }
.cal__week .cal__day:first-child, .cal__week .cal__day:last-child { background: rgba(244, 239, 230, .35); }  /* weekend tint */
.cal__day--out, .cal__week .cal__day--out:first-child, .cal__week .cal__day--out:last-child { background: var(--surface-muted); }
.cal__day--out .cal__num { color: var(--text-muted); opacity: .6; }
.cal__num { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; margin-bottom: var(--space-1); font-family: var(--font-display); font-size: 19px; font-weight: var(--fw-semibold); color: var(--text-heading); line-height: 1; }
.cal__day--today { background: var(--blue-50) !important; box-shadow: inset 0 3px 0 var(--brand-fill-strong); }
.cal__day--today .cal__num { background: var(--brand-fill-strong); color: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); }

/* Chips: tinted fill + a category-colored left rule; all-day events are solid */
.cal-chip { display: block; margin-top: 3px; padding: 3px 8px; border-radius: var(--radius-sm); border-left: 3px solid var(--brand-primary); font-size: 12px; line-height: 1.35; font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface-sky); color: var(--brand-primary-ink); text-decoration: none; transition: filter var(--dur-fast) var(--ease-out); }
.cal-chip:hover { filter: brightness(.95); }
.cal-chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.cal-chip__t { font-weight: var(--fw-regular); opacity: .8; }
.cal-chip--gold { background: var(--gold-100); color: var(--gold-800); border-left-color: var(--gold-600); }
.cal-chip--green { background: var(--green-100); color: var(--green-700); border-left-color: var(--green-600); }
.cal-chip--red { background: var(--red-100); color: var(--red-600); border-left-color: var(--red-600); }
.cal-chip--neutral { background: var(--cream-100); color: var(--stone-700); border-left-color: var(--stone-500); }
.cal-chip--allday { background: var(--blue-700); color: #fff; border-left-color: var(--blue-800); }
.cal-chip--allday.cal-chip--gold { background: var(--gold-500); color: var(--text-on-gold); border-left-color: var(--gold-700); }
.cal-chip--allday.cal-chip--green { background: var(--green-700); color: #fff; border-left-color: var(--green-700); }
.cal-chip--allday.cal-chip--red { background: var(--red-600); color: #fff; border-left-color: var(--red-600); }
.cal-chip--allday.cal-chip--neutral { background: var(--stone-600); color: #fff; border-left-color: var(--stone-700); }
.cal__more { display: block; margin-top: var(--space-1); padding-left: var(--space-2); font-size: 11px; font-weight: var(--fw-semibold); color: var(--text-link); }

.cal-agenda { display: none; }
.cal-agenda__day { margin: var(--space-6) 0 var(--space-2); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-eyebrow); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--brand-accent-ink); }
.cal-agenda .cal-chip { white-space: normal; margin-top: var(--space-2); padding: var(--space-2) var(--space-3); font-size: var(--fs-body-sm); }

@media (max-width: 720px) {
  .cal { display: none; }
  .cal-agenda { display: block; }
  .cal-toolbar { flex-wrap: wrap; }
  .cal-toolbar__month { font-size: var(--fs-title); }
  .cal-hero { padding: var(--space-10) 0 var(--space-8); margin-bottom: var(--space-6); }
}

/* ---------- Calendar details modal ---------- */
.cal-chip { border-top: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font-family: var(--font-body); cursor: pointer; }

.cal-modal { border: 0; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 0; max-width: 460px; width: calc(100% - 32px); background: var(--surface-card); }
.cal-modal::backdrop { background: rgba(15, 26, 42, .55); }
.cal-modal__body { padding: var(--space-6); }
.cal-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); min-height: 28px; }
.cal-modal__close { border: 0; background: var(--surface-sky); color: var(--brand-primary); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; margin-left: auto; }
.cal-modal__close:hover { background: var(--brand-primary); color: #fff; }
.cal-modal__title { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-title); color: var(--text-heading); margin: 0 0 var(--space-2); }
.cal-modal__when { font-weight: var(--fw-semibold); color: var(--brand-primary); margin: 0 0 var(--space-3); }
.cal-modal__meta { font-size: var(--fs-body-sm); color: var(--text-body); margin: 0 0 var(--space-2); }
.cal-modal__desc { font-size: var(--fs-body-sm); color: var(--text-body); margin: var(--space-3) 0 0; white-space: pre-line; max-height: 40vh; overflow-y: auto; }
.cal-modal__actions { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.cal-modal__actions .btn[hidden] { display: none; }
.cal-modal__actions:not(:has(.btn:not([hidden]))) { display: none; }
.cal-modal__head .badge[hidden] { display: none; }
.cal-modal__label { font-size: 11px; font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--brand-accent-ink); }

/* ---------- Calendar day panel ---------- */
.cal__day[data-iso] { cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.cal__week .cal__day[data-iso]:hover { background: var(--cream-100); }
.cal__day[data-iso]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.cal__day--out { cursor: default; }
.cal-agenda__day[role="button"] { cursor: pointer; }
.cal-agenda__day[role="button"]:hover { color: var(--brand-primary); }

.cal-day-panel { border: 0; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 0; max-width: 420px; width: calc(100% - 32px); background: var(--surface-card); }
.cal-day-panel::backdrop { background: rgba(15, 26, 42, .55); }
.cal-day-panel__body { padding: var(--space-6); }
.cal-day-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border-subtle); }
.cal-day-panel__title::after { content: ""; display: block; width: 36px; height: 2px; background: var(--brand-accent); margin-top: var(--space-2); }
.cal-day-panel__title { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-title); color: var(--text-heading); margin: 0; }
.cal-day-panel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); max-height: 60vh; overflow-y: auto; }
.cal-day-panel__list[hidden] { display: none; }
.cal-day-panel__event { display: flex; align-items: baseline; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4); border: 1px solid var(--border-subtle); border-left: 3px solid var(--brand-primary); border-radius: var(--radius-sm); background: var(--surface-card); font-family: var(--font-body); font-size: var(--fs-body-sm); text-align: left; cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.cal-day-panel__event:hover { background: var(--cream-50); }
.cal-day-panel__event:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.cal-day-panel__event--gold { border-left-color: var(--gold-600); }
.cal-day-panel__event--green { border-left-color: var(--green-600); }
.cal-day-panel__event--red { border-left-color: var(--red-600); }
.cal-day-panel__event--neutral { border-left-color: var(--stone-500); }
.cal-day-panel__time { flex: 0 0 auto; min-width: 64px; color: var(--text-muted); font-weight: var(--fw-regular); white-space: nowrap; }
.cal-day-panel__name { color: var(--text-heading); font-weight: var(--fw-semibold); }
.cal-day-panel__empty { margin: 0; font-style: italic; color: var(--text-muted); }

/* Coming Up rows on the calendar page: category-colored left rule */
.cal-upcoming .container > div:first-child { flex-wrap: wrap; }
.cal-upcoming .event-row { border-left: 4px solid var(--brand-primary); }
.cal-upcoming .event-row--gold { border-left-color: var(--gold-600); }
.cal-upcoming .event-row--green { border-left-color: var(--green-600); }
.cal-upcoming .event-row--red { border-left-color: var(--red-600); }
.cal-upcoming .event-row--neutral { border-left-color: var(--stone-500); }

@media (max-width: 720px) {
  /* Bottom sheet */
  .cal-day-panel { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .cal-day-panel__body { padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom)); }
}

/* Regular-event cards: the "Details" disclosure holding when / where / who. */
.regular-event__more { margin-top: var(--space-4); border-top: 1px solid var(--border-subtle); padding-top: var(--space-3); }
.regular-event__more > summary { cursor: pointer; font-size: var(--fs-body-sm); font-weight: 600;
  color: var(--text-link); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.regular-event__more > summary::-webkit-details-marker { display: none; }
.regular-event__more > summary::after { content: "▾"; font-size: .8em; transition: transform var(--dur-fast) var(--ease-out); }
.regular-event__more[open] > summary::after { transform: rotate(180deg); }
.regular-event__facts { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-4);
  margin: var(--space-3) 0 0; font-size: var(--fs-body-sm); }
.regular-event__facts dt { font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.regular-event__facts dd { margin: 0; color: var(--text-body); }
.regular-event__detailtext { margin-top: var(--space-3); font-size: var(--fs-body-sm); line-height: 1.65; }
