/* ============================================================
   LIBERTY TEMPLE CHURCH: SITE STYLESHEET ("Midnight & Amber")
   ============================================================

   READ ME (for whoever maintains this):

   This is the ONLY stylesheet public pages load. It is organized
   top-to-bottom in the order a page is built:

     1. Fonts            (self-hosted, in /assets/fonts/)
     2. Design tokens    (ALL colors/sizes live here: change once,
                          changes everywhere)
     3. Base styles      (what plain HTML looks like)
     4. Buttons & badges
     5. Navigation + mobile menu
     6. Homepage hero    (the latest-message player)
     7. Video player     ("lite embed": loads YouTube only on tap)
     8. Sections & headings
     9. Message cards, grid, filters (Messages page)
    10. Visit block, tiles, info grids
    11. Forms
    12. Events, FAQ, confirmation screens
    13. Footer
    14. Chatbot + toasts
    15. Animations & reduced motion
    16. Mobile layout (one breakpoint block at the bottom)

   THE GOLDEN RULE: colors are never typed directly into a
   component. They always reference a token like var(--amber).
   To rebrand the whole site, edit section 2 only.
   ============================================================ */


/* ============================================================
   1. FONTS: self-hosted variable fonts (fast; no Google request)
   ============================================================ */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-var-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* ============================================================
   2. DESIGN TOKENS: the entire brand in one place
   ============================================================ */
:root {
  /* ---- Surfaces ---- */
  --bg-dark:    #111210;  /* main dark: nav, heroes, footer, video chrome */
  --bg-dark-2:  #1A1B18;  /* slightly lifted dark: cards on dark */
  --paper:      #F4F1EA;  /* main light: reading sections */
  --paper-2:    #EAE6DB;  /* slightly deeper light: alt cards/sections */

  /* ---- Text ---- */
  --ink:        #15140F;  /* text on light */
  --cloud:      #F4F1EA;  /* text on dark */
  --muted-dark: #A8A69B;  /* secondary text on dark  (7.9:1, passes AA) */
  --muted-light:#6B675C;  /* secondary text on light (5.0:1, passes AA) */

  /* ---- Accent (three tiers; all contrast-checked) ---- */
  --amber:      #E0A33E;  /* on dark backgrounds (9.3:1) */
  --amber-deep: #B97F22;  /* large accents on light (3.0:1, large text only) */
  --amber-ink:  #8F5E12;  /* small text/links on light (4.9:1, passes AA) */

  /* ---- Utility ---- */
  --live:       #E5484D;  /* LIVE badge red */
  --ok:         #3E7C4F;  /* success green */
  --err:        #B3261E;  /* error red (on light) */
  --line-dark:  rgba(244, 241, 234, 0.14);  /* hairlines on dark */
  --line-light: rgba(21, 20, 15, 0.14);     /* hairlines on light */

  /* ---- Type ---- */
  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* ---- Rhythm ---- */
  --pad-x: clamp(1.25rem, 5vw, 3.5rem);   /* page side padding */
  --section-y: clamp(4rem, 9vw, 7.5rem);  /* vertical section padding */
  --wrap: 1280px;                          /* max content width */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);  /* the one easing curve we use */
}

/* ============================================================
   3. BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.25rem; }

img, svg, video, iframe { max-width: 100%; display: block; }

a { color: var(--amber-ink); }

::selection { background: var(--amber); color: var(--bg-dark); }

/* Visible keyboard focus everywhere: accessibility requirement */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* "Skip to content": first thing keyboard/screen-reader users hit */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--amber);
  color: var(--bg-dark);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Generic centered wrapper */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ============================================================
   4. BUTTONS & BADGES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.9375rem 1.625rem;
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;          /* pill buttons */
  cursor: pointer;
  transition: transform 200ms var(--ease), background 200ms, color 200ms, border-color 200ms;
}
.btn:active { transform: scale(0.97); }

/* The main call-to-action: amber, used sparingly (1–2 per screen) */
.btn-amber { background: var(--amber); color: #1A1300; border-color: var(--amber); }
.btn-amber:hover { background: #EBB55A; border-color: #EBB55A; transform: translateY(-2px); }

/* Quiet outline buttons: variant per background */
.btn-ghost-dark  { background: transparent; color: var(--cloud); border-color: var(--line-dark); }
.btn-ghost-dark:hover  { border-color: var(--amber); color: var(--amber); }
.btn-ghost-light { background: transparent; color: var(--ink); border-color: var(--line-light); }
.btn-ghost-light:hover { border-color: var(--amber-ink); color: var(--amber-ink); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Small play triangle used inside buttons */
.btn .play-tri { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }

/* LIVE badge: appears automatically on Sunday mornings */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--live);
  color: #fff;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
}
.badge-live::before {
  content: '';
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* Small uppercase label above headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.on-light .eyebrow, .section .eyebrow { color: var(--amber-ink); }
.on-dark .eyebrow { color: var(--amber); }

/* ============================================================
   5. NAVIGATION (dark, sticky) + mobile menu
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.875rem var(--pad-x);
  background: rgba(17, 18, 16, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  font-family: var(--display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cloud);
  text-decoration: none;
  white-space: nowrap;
}
.nav-logo .mark { color: var(--amber); font-size: 1.375rem; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cloud);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 180ms, border-color 180ms;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--amber); border-bottom-color: var(--amber); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-actions .btn { padding: 0.625rem 1.25rem; font-size: 0.8125rem; }

/* Hamburger: only visible on mobile (see section 16) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  padding: 0 11px;
  background: none;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  cursor: pointer;
}
.burger span { display: block; height: 2px; background: var(--cloud); transition: transform 250ms var(--ease), opacity 200ms; }
.burger.open span:first-child { transform: translateY(4px) rotate(45deg); }
.burger.open span:last-child  { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg-dark);
  padding: 6rem 1.75rem 2.5rem;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 250ms ease, transform 300ms var(--ease);
}
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-family: var(--display);
  font-size: clamp(1.875rem, 7.5vw, 2.5rem);
  font-weight: 600;
  color: var(--cloud);
  text-decoration: none;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.mobile-menu nav a:hover { color: var(--amber); }
.mobile-menu .btn { justify-content: center; margin-top: 2rem; }

/* ============================================================
   5b. SERVICE STRIP: times + address, first thing on the page.
   Lives at the top of the homepage hero so nobody has to scroll
   to find out when and where church happens.
   ============================================================ */
.service-strip {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  max-width: var(--wrap);
  margin: 0 auto clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--display);
  /* Scales with the screen: 15px on phones up to 19px on big monitors */
  font-size: clamp(0.9375rem, 1.05vw, 1.1875rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--cloud);
}
.service-strip strong { color: var(--amber); font-weight: 700; }
.service-strip a { color: var(--amber); font-weight: 700; text-decoration: none; white-space: nowrap; }
.service-strip a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   6. HOMEPAGE HERO: the latest message, playable on the spot
   ============================================================ */
.hero-msg {
  background: var(--bg-dark);
  color: var(--cloud);
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad-x) clamp(3rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
}
/* A soft amber glow behind the player so the dark isn't flat */
.hero-msg::before {
  content: '';
  position: absolute;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  left: -18vw; top: -28vw;
  background: radial-gradient(circle, rgba(224, 163, 62, 0.13) 0%, transparent 62%);
  pointer-events: none;
}

.hero-msg-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
}

.hero-msg-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.hero-msg h1 {
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  color: var(--cloud);
  margin-bottom: 1.25rem;
}

.hero-msg .msg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  color: var(--muted-dark);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}
.hero-msg .msg-meta strong { color: var(--cloud); font-weight: 600; }

.hero-msg .hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ============================================================
   7. VIDEO PLAYER: "lite embed"
   The page shows only a thumbnail + play button (fast).
   The real YouTube player loads ONLY when someone taps play.
   ============================================================ */
.lite-yt {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--bg-dark-2) center / cover no-repeat;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  padding: 0;
}
.lite-yt:hover .lite-yt-btn { background: var(--amber); transform: scale(1.06); }
.lite-yt:hover .lite-yt-btn::after { border-left-color: var(--bg-dark); }

/* Dark gradient at the base so any title overlay stays readable */
.lite-yt::after {
  content: '';
  position: absolute;
  inset: 55% 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(17, 18, 16, 0.72));
  pointer-events: none;
}

.lite-yt-btn {
  position: absolute;
  z-index: 2;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border-radius: 50%;
  background: rgba(17, 18, 16, 0.78);
  border: 2px solid var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms, transform 250ms var(--ease);
}
.lite-yt-btn::after {
  content: '';
  width: 0; height: 0;
  margin-left: 6px;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent var(--amber);
  transition: border-color 200ms;
}

.lite-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }

/* When playing, hide facade bits */
.lite-yt.playing { cursor: default; }
.lite-yt.playing .lite-yt-btn, .lite-yt.playing::after { display: none; }

/* ============================================================
   8. SECTIONS & HEADINGS
   ============================================================ */
.section { padding: var(--section-y) var(--pad-x); }
.section > .inner, .section-dark > .inner { max-width: var(--wrap); margin: 0 auto; }

.section-dark { background: var(--bg-dark); color: var(--cloud); padding: var(--section-y) var(--pad-x); }
.section-dark h2, .section-dark h3 { color: var(--cloud); }
.section-dark p { color: var(--muted-dark); }

.section-alt { background: var(--paper-2); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head h2 { font-size: clamp(1.875rem, 3.8vw, 3rem); }
.section-head .head-link { white-space: nowrap; }

/* The identity statement, the church's "who we are" in huge type.
   Editable from Admin → Homepage Editor. */
.identity { text-align: left; }
.identity h2 {
  font-size: clamp(1.75rem, 4.2vw, 3.375rem);
  line-height: 1.12;
  max-width: 24ch;
  margin-bottom: 1.75rem;
}
.identity h2 em { font-style: normal; color: var(--amber-deep); }
.identity p { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted-light); max-width: 58ch; }

/* Long-form text (About, Privacy, Give explanations) */
.prose { max-width: 68ch; font-size: 1.0625rem; line-height: 1.75; }
.prose h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); margin: 2.75rem 0 1rem; }
.prose h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); margin: 2.25rem 0 0.875rem; }
.prose a { color: var(--amber-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.375rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--amber);
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
}

/* Interior page hero (light). Every non-home page starts with this */
.page-hero { padding: clamp(3.5rem, 7vw, 6rem) var(--pad-x) clamp(2.5rem, 5vw, 4rem); }
.page-hero .inner { max-width: var(--wrap); margin: 0 auto; }
.page-hero h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); max-width: 18ch; margin-bottom: 1.25rem; }
.page-hero .lede { font-size: clamp(1.0625rem, 1.8vw, 1.3125rem); color: var(--muted-light); max-width: 56ch; }
.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-light);
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-light);
}

/* ============================================================
   9. MESSAGES: cards, grid, filters
   ============================================================ */
/* Featured message zone at the top of the Messages page (dark) */
.msg-featured {
  background: var(--bg-dark);
  color: var(--cloud);
  padding: clamp(2rem, 5vw, 4rem) var(--pad-x) clamp(3rem, 6vw, 5rem);
}
.msg-featured .inner { max-width: var(--wrap); margin: 0 auto; }
.msg-featured h1 { color: var(--cloud); font-size: clamp(1.75rem, 3.6vw, 2.875rem); margin: 1.25rem 0 0.75rem; }
.msg-featured .msg-meta { color: var(--muted-dark); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.msg-featured .lite-yt { margin-top: 2rem; }

/* Filter row: search box + series chips */
.msg-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.msg-search {
  flex: 1 1 260px;
  max-width: 420px;
  padding: 0.8125rem 1.125rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line-light);
  border-radius: 999px;
}
.msg-search::placeholder { color: var(--muted-light); }
.msg-search:focus { outline: 2px solid var(--amber-deep); outline-offset: 1px; border-color: transparent; }

.chip {
  padding: 0.5625rem 1.125rem;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  cursor: pointer;
  transition: all 180ms;
}
.chip:hover { border-color: var(--amber-ink); color: var(--amber-ink); }
.chip.active { background: var(--bg-dark); color: var(--amber); border-color: var(--bg-dark); }

/* Message cards */
.msg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2rem 1.75rem;
}

.msg-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.msg-card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-dark-2) center / cover no-repeat;
  border: 1px solid var(--line-light);
}
.msg-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.msg-card:hover .thumb img { transform: scale(1.04); }
.msg-card .thumb .mini-play {
  position: absolute;
  right: 0.75rem; bottom: 0.75rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(17, 18, 16, 0.82);
  border: 1.5px solid var(--amber);
  display: flex; align-items: center; justify-content: center;
  transition: background 200ms;
}
.msg-card .thumb .mini-play::after {
  content: '';
  width: 0; height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--amber);
}
.msg-card:hover .mini-play { background: var(--amber); }
.msg-card:hover .mini-play::after { border-left-color: var(--bg-dark); }

.msg-card h3 { font-size: 1.1875rem; margin: 1rem 0 0.375rem; }
.msg-card .msg-meta { font-size: 0.875rem; color: var(--muted-light); }
.msg-card .series-tag {
  display: inline-block;
  margin-top: 0.625rem;
  font-family: var(--display);
  font-size: 0.71875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-ink);
}

/* On dark sections, card text flips */
.section-dark .msg-card h3 { color: var(--cloud); }
.section-dark .msg-card .msg-meta { color: var(--muted-dark); }
.section-dark .msg-card .series-tag { color: var(--amber); }
.section-dark .msg-card .thumb { border-color: var(--line-dark); }

/* Modal player: opens when a message card is tapped */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(10, 10, 9, 0.88);
  backdrop-filter: blur(6px);
}
.player-modal.open { display: flex; }
.player-modal .player-box { width: min(1080px, 100%); }
.player-modal .lite-yt { border-radius: 14px; }
.player-modal .player-title { color: var(--cloud); font-family: var(--display); font-size: 1.125rem; font-weight: 600; margin: 1rem 0 0; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.player-modal .player-close {
  background: none;
  border: 1px solid var(--line-dark);
  color: var(--cloud);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}
.player-modal .player-close:hover { border-color: var(--amber); color: var(--amber); }
.player-modal .player-share {
  background: none;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms, color 180ms;
}
.player-modal .player-share:hover { background: var(--amber); color: var(--bg-dark); }

/* Empty/loading states */
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--muted-light); }
.loading { display: flex; justify-content: center; padding: 3rem; }
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--line-light);
  border-top-color: var(--amber-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   9b. PHOTO BAND: one wide community photo on the homepage.
   Hidden until staff upload a photo in Admin → Homepage.
   ============================================================ */
.photo-band { padding: 0 var(--pad-x) var(--section-y); }
.photo-band figure { max-width: var(--wrap); margin: 0 auto; }
.photo-band img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line-light);
}
.photo-band figcaption {
  margin-top: 0.875rem;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-light);
}
@media (max-width: 720px) { .photo-band img { aspect-ratio: 4 / 3; } }

/* Optional photo on an event row */
.event-img {
  width: 100%;
  max-width: 520px;
  border-radius: 10px;
  border: 1px solid var(--line-light);
  margin-bottom: 0.75rem;
}

/* Featured event cards (homepage "Coming up" + Events page):
   a midnight band, flyer large on one side, bold amber copy on
   the other. Events are sold big, not buried. */
.event-feature {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: center;
  background: var(--bg-dark);
  color: var(--cloud);
  border-radius: 16px;
  padding: 2.5rem;
}
.event-feature.no-media { grid-template-columns: 1fr; }
/* Banner-shaped flyers: full width on top, copy beneath */
.event-feature.wide-media { grid-template-columns: 1fr; gap: 1.75rem; }
.event-feature + .event-feature { margin-top: 1.75rem; }
.event-feature-media img {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
}
.event-feature-kicker {
  display: block;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.event-feature h3 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.08;
  color: var(--cloud);
  margin-bottom: 0.75rem;
}
.event-feature-when {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 1rem;
}
.event-feature-copy p {
  color: var(--muted-dark);
  margin: 0 0 1rem;
}
.event-feature-copy .hero-ctas { margin-top: 1.5rem; }
/* Homepage cards stay tidy: description clamped to four lines */
#home-events .event-feature-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   10. VISIT BLOCK, TILES, INFO GRID
   ============================================================ */
/* Dark "come see us" band with map */
.visit-band { background: var(--bg-dark); color: var(--cloud); padding: var(--section-y) var(--pad-x); }
.visit-band .inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.visit-band h2 { color: var(--cloud); font-size: clamp(1.875rem, 3.8vw, 3rem); margin-bottom: 1.5rem; }
.visit-band address {
  font-style: normal;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--cloud);
  margin-bottom: 1.75rem;
}
.visit-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 440px;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: 2rem;
}
.visit-times span { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 0.375rem; }
.visit-times strong { font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 600; color: var(--cloud); }

.map-frame { border: 1px solid var(--line-dark); border-radius: 14px; overflow: hidden; }
.map-frame iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; filter: grayscale(1) contrast(1.04) brightness(0.86); }

/* Big link tiles (Kids / Give on the homepage) */
.tile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 240px;
  padding: 2rem;
  background: var(--bg-dark);
  color: var(--cloud);
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 250ms var(--ease);
}
.tile:hover { transform: translateY(-4px); }
.tile::after {
  content: '→';
  position: absolute;
  right: 1.5rem; bottom: 1.25rem;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--amber);
  transition: transform 250ms var(--ease);
}
.tile:hover::after { transform: translateX(5px); }
.tile .tile-kicker { font-family: var(--display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.tile h3 { color: var(--cloud); font-size: clamp(1.5rem, 2.6vw, 2.125rem); }
.tile p { color: var(--muted-dark); font-size: 0.9375rem; margin: 0.5rem 0 0; max-width: 38ch; }

/* Quick facts (Plan-a-Visit, Kids, Contact) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}
.info-grid h4 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber-ink); margin-bottom: 0.5rem; }
.info-grid p { font-family: var(--display); font-size: 1.25rem; font-weight: 500; margin: 0; }

/* Numbered steps (what happens when you visit) */
.steps { display: flex; flex-direction: column; gap: 2.5rem; max-width: 760px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 1.5rem; align-items: start; }
.step-num {
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--amber-ink);
  border-top: 2px solid var(--ink);
  padding-top: 0.75rem;
}
.step h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); margin-bottom: 0.5rem; }
.step p { color: var(--muted-light); margin: 0; }

/* ============================================================
   11. FORMS: used by Plan-a-Visit, Contact, Prayer, Volunteer
   ============================================================ */
.form { max-width: 640px; }

.field { margin-bottom: 1.75rem; }
.field label {
  display: block;
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.field .req { color: var(--err); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  transition: border-color 180ms;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--amber-deep);
  outline-offset: 1px;
  border-color: transparent;
}

.field .hint { display: block; margin-top: 0.5rem; font-size: 0.8125rem; color: var(--muted-light); }
.field-error { display: none; margin-top: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--err); }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error textarea { border-color: var(--err); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--muted-light);
  cursor: pointer;
}
.checkbox input { width: 19px; height: 19px; margin-top: 0.15rem; accent-color: var(--amber-deep); flex-shrink: 0; }

/* Grouped checkboxes/radios (volunteer teams, yes/no) get a real
   fieldset for screen readers; we just unstyle the default box */
fieldset.choice-group { border: 0; padding: 0; margin: 0 0 1.75rem; }
fieldset.choice-group legend {
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.75rem;
}
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1.5rem; }

.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; max-width: 360px; }
.toggle {
  position: relative;
  padding: 0.9375rem;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 180ms;
}
.toggle:has(input:checked) { background: var(--bg-dark); color: var(--amber); border-color: var(--bg-dark); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }

/* ============================================================
   12. EVENTS LIST, FAQ, CONFIRMATION
   ============================================================ */
.event-list { display: flex; flex-direction: column; }
.event-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.75rem;
  align-items: center;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line-light);
}
.event-row:last-child { border-bottom: 1px solid var(--line-light); }
.event-date .day { display: block; font-family: var(--display); font-size: 2.5rem; font-weight: 600; line-height: 1; color: var(--amber-ink); }
.event-date .month { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-light); margin-top: 0.25rem; }
.event-body h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); margin-bottom: 0.375rem; }
.event-body p { color: var(--muted-light); font-size: 0.9375rem; margin: 0 0 0.25rem; }
.event-meta { font-size: 0.8125rem; color: var(--muted-light); }

/* FAQ / sermon notes accordions */
details.faq {
  border-top: 1px solid var(--line-light);
  padding: 1.125rem 0;
}
details.faq:last-of-type { border-bottom: 1px solid var(--line-light); }
details.faq summary {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 1.375rem; color: var(--amber-ink); transition: transform 200ms; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .faq-body { padding-top: 0.875rem; color: var(--muted-light); }

/* After a form submits successfully */
.confirmation { text-align: center; max-width: 560px; margin: 0 auto; padding: 4rem 1.5rem; }
.confirmation .mark { font-family: var(--display); font-size: 4rem; color: var(--amber-deep); line-height: 1; margin-bottom: 1rem; }
.confirmation h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); margin-bottom: 1rem; }
.confirmation p { color: var(--muted-light); font-size: 1.0625rem; margin-bottom: 2rem; }

/* ============================================================
   13. FOOTER (dark)
   ============================================================ */
.footer { background: var(--bg-dark); color: var(--cloud); padding: var(--section-y) var(--pad-x) 2rem; }
.footer-top {
  max-width: var(--wrap);
  margin: 0 auto 3.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand h4 { color: var(--cloud); font-size: clamp(1.5rem, 2.8vw, 2.125rem); max-width: 16ch; margin-bottom: 1rem; }
.footer-brand h4 em { font-style: normal; color: var(--amber); }
.footer-brand p { color: var(--muted-dark); font-size: 0.9375rem; max-width: 38ch; }
.footer-col h5 {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.125rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.625rem; }
.footer-col a { color: var(--cloud); text-decoration: none; font-size: 0.9375rem; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted-dark);
}
.footer-bottom a { color: var(--muted-dark); text-decoration: none; }
.footer-bottom a:hover { color: var(--amber); }

/* ============================================================
   14. CHATBOT + TOASTS
   ============================================================ */
.chatbot-toggle {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 200;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--bg-dark);
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 200ms var(--ease);
}
.chatbot-toggle:hover { transform: scale(1.07); }

/* Chat button steps aside while the mobile menu is open */
body.menu-open .chatbot-toggle, body.menu-open .chatbot-panel { display: none !important; }
.chatbot-toggle svg { width: 24px; height: 24px; }

.chatbot-panel {
  position: fixed;
  right: 1.25rem; bottom: 5.75rem;
  z-index: 200;
  width: min(380px, calc(100vw - 2.5rem));
  max-height: min(560px, 72vh);
  display: none;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}
.chatbot-panel.visible { display: flex; }
.chatbot-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.125rem 1.25rem; background: var(--bg-dark); color: var(--cloud); }
.chatbot-header h4 { color: var(--cloud); font-size: 1rem; margin: 0 0 0.125rem; }
.chatbot-header p { color: var(--muted-dark); font-size: 0.8125rem; margin: 0; }
.chatbot-close { background: none; border: 0; color: var(--cloud); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0; }
.chatbot-messages { flex: 1; overflow-y: auto; padding: 1.125rem; display: flex; flex-direction: column; gap: 0.625rem; }
.chatbot-message { max-width: 85%; padding: 0.6875rem 0.9375rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.5; }
.chatbot-message.bot { background: var(--paper-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.chatbot-message.user { background: var(--bg-dark); color: var(--cloud); align-self: flex-end; border-bottom-right-radius: 4px; }
.chatbot-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.125rem 0.875rem; }
.chatbot-suggestion { font-size: 0.8125rem; padding: 0.4375rem 0.875rem; background: none; border: 1px solid var(--line-light); border-radius: 999px; cursor: pointer; color: var(--muted-light); }
.chatbot-suggestion:hover { border-color: var(--amber-ink); color: var(--amber-ink); }
.chatbot-input-row { display: flex; gap: 0.5rem; padding: 0.875rem 1.125rem; border-top: 1px solid var(--line-light); }
.chatbot-input-row input { flex: 1; padding: 0.6875rem 0.9375rem; font: inherit; font-size: 0.9rem; border: 1px solid var(--line-light); border-radius: 999px; background: #fff; }
.chatbot-input-row button { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--amber); color: var(--bg-dark); display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Toast notifications (form feedback) */
.notification {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  z-index: 400;
  padding: 0.9375rem 1.375rem;
  border-radius: 12px;
  color: #fff;
  font-weight: 500;
  font-size: 0.9375rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: toast-in 250ms var(--ease);
}
.notification-success { background: var(--ok); }
.notification-error { background: var(--err); }
@keyframes toast-in { from { transform: translateX(40px); opacity: 0; } }

/* ============================================================
   15. ANIMATIONS + REDUCED MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 90ms; }
.reveal-d2 { transition-delay: 180ms; }
.reveal-d3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   16. MOBILE: everything below 920px
   ============================================================ */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav .btn-amber { display: none; }   /* CTA moves into the mobile menu */
  .burger { display: flex; }
  .mobile-menu { display: flex; }

  .hero-msg-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero-msg-copy { order: 2; }         /* player first on phones */
  .hero-msg-player { order: 1; }
  .lite-yt-btn { width: 64px; height: 64px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  .visit-band .inner { grid-template-columns: 1fr; }
  .tile-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }

  .event-row { grid-template-columns: 72px 1fr; }
  .event-row .event-actions { grid-column: 2; justify-self: start; }
  .event-date .day { font-size: 1.875rem; }

  .event-feature { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }

  .step { grid-template-columns: 1fr; gap: 0.5rem; }
  .step-num { border-top: 0; padding-top: 0; }
}

/* Very small phones */
@media (max-width: 420px) {
  .msg-grid { grid-template-columns: 1fr; }
  .hero-msg .hero-ctas .btn { width: 100%; justify-content: center; }
}
