/* ReachOut Ministries — site styles
   Palette from the church logo: deep navy, royal blue and gold.
   Newsreader carries headings and scripture; Figtree carries everything you read and click. */

:root {
  --navy: #0e2245;
  --royal: #1c4185;
  --royal-ink: #163670;
  --gold: #f0b300;
  --gold-soft: #fff4d1;
  --sky: #edf2fa;
  --line: #d6deeb;
  --ink: #15203a;
  --muted: #56617a;
  --paper: #ffffff;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  --step-5: clamp(2.75rem, 1.8rem + 4.6vw, 5.25rem);

  --wrap: 1180px;
  --read: 42rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 7vw, 6rem);
  --radius: 10px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--royal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--royal-ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--gold); color: var(--navy); padding: .6rem 1rem; border-radius: 6px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.preview-bar { background: var(--gold); color: var(--navy); text-align: center; padding: .5rem 1rem; font-weight: 600; position: relative; z-index: 60; }
.preview-bar a { color: var(--navy); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-read { max-width: calc(var(--read) + 2 * var(--gutter)); }
.wrap-media { max-width: calc(960px + 2 * var(--gutter)); }

.block { padding: var(--space) 0; }
.block:not(.band) + .block:not(.band) { padding-top: 0; }

/* ---------- Type ---------- */
.section-head { margin-bottom: 2rem; max-width: var(--read); }
.section-title {
  font: 500 var(--step-4)/1.08 var(--serif);
  letter-spacing: -0.015em;
  color: var(--navy);
  margin-bottom: .5em;
}
.section-title.small { font-size: var(--step-3); }
.section-intro { color: var(--muted); font-size: var(--step-1); line-height: 1.55; margin: 0; }
.prose { font-size: var(--step-0); }
.prose > :last-child { margin-bottom: 0; }
.prose h2, .prose h3 { font-family: var(--serif); font-weight: 500; color: var(--navy); margin: 1.6em 0 .5em; }
.prose h2 { font-size: var(--step-3); }
.prose h3 { font-size: var(--step-2); }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--royal); }
.prose .lead { font: 400 var(--step-3)/1.3 var(--serif); color: var(--navy); margin-bottom: 1.25em; }
.prose blockquote {
  margin: 0 0 1.5em;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--gold);
  font: italic 400 var(--step-1)/1.55 var(--serif);
  color: var(--ink);
}
.prose blockquote p { margin: 0 0 .35em; }
.prose blockquote cite { font: normal 600 var(--step--1)/1.4 var(--sans); color: var(--royal); letter-spacing: .02em; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.align-center .btn-row { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--royal); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-accent { background: var(--gold); color: var(--navy); }
.btn-accent:hover { background: #ffc82e; color: var(--navy); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--gold-soft); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--royal); border-color: currentColor; }
.btn-ghost:hover { background: var(--sky); color: var(--navy); }
.btn-lg { min-height: 56px; padding: .9rem 2rem; font-size: 1.125rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  color: #fff;
  transition: background-color .25s, box-shadow .25s;
}
.has-overlay-header .site-header { position: fixed; left: 0; right: 0; background: transparent; }
.has-overlay-header .site-header.is-scrolled,
.has-overlay-header .site-header.nav-open { background: var(--navy); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.header-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter);
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: flex; align-items: center; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand:hover { color: #fff; }
.brand-logo { height: 54px; width: auto; }
@media (max-width: 600px) { .brand-logo { height: 44px; } }
.brand-word { font: 600 1.45rem/1 var(--serif); letter-spacing: -.01em; }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  display: block; padding: .55rem .8rem; border-radius: 6px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem; letter-spacing: .01em;
}
.nav-link:hover { color: var(--gold); }
.nav-item.is-active > .nav-link { color: var(--gold); }
.sub-toggle { display: none; }
.has-sub > .nav-link { padding-right: 1.45rem; }
.has-sub > .nav-link::after {
  content: ""; position: absolute; right: .55rem; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: .8;
}
.sub-list {
  list-style: none; margin: 0; padding: .5rem;
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 18px 40px -12px rgba(14,34,69,.35), 0 0 0 1px rgba(14,34,69,.06);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.sub-list::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.has-sub:hover > .sub-list, .has-sub:focus-within > .sub-list {
  opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s;
}
.sub-list a { display: block; padding: .55rem .8rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 500; }
.sub-list a:hover, .sub-list a[aria-current] { background: var(--sky); color: var(--royal); }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem;
    background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff;
    border-radius: 999px; padding: .5rem 1rem; font: 600 .95rem var(--sans); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--navy); overflow-y: auto;
    padding: 1rem var(--gutter) 3rem;
    display: none;
  }
  .nav-open .site-nav { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav-link { flex: 1; padding: 1rem 0; font-size: 1.2rem; }
  .has-sub > .nav-link { padding-right: 0; }
  .has-sub > .nav-link::after { display: none; }
  .sub-toggle {
    display: grid; place-items: center; width: 48px; height: 48px;
    background: transparent; border: 0; color: #fff; cursor: pointer;
  }
  .sub-toggle span { width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
  .sub-toggle[aria-expanded="true"] span { transform: rotate(-135deg); margin-top: 4px; }
  .sub-list {
    position: static; width: 100%; min-width: 0; background: transparent; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; padding: 0 0 .75rem .75rem; display: none;
  }
  .has-sub:hover > .sub-list { display: none; }
  .has-sub.sub-open > .sub-list { display: block; }
  .sub-list a { color: rgba(255,255,255,.85); padding: .6rem .5rem; }
  .sub-list a:hover, .sub-list a[aria-current] { background: rgba(255,255,255,.08); color: var(--gold); }
  body.nav-locked { overflow: hidden; }
}

/* ---------- Hero (page banner) ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff; background: var(--navy);
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 4rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero-medium { min-height: min(68vh, 620px); }
.hero-large { min-height: min(88vh, 820px); }
.hero-small { min-height: 360px; }
.hero-plain { min-height: 0; padding-top: calc(var(--header-h) + 3.5rem); }
body:not(.has-overlay-header) .hero { padding-top: 4rem; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,34,69,.55) 0%, rgba(14,34,69,0) 30%),
    linear-gradient(90deg, rgba(14,34,69,.92) 0%, rgba(14,34,69,.7) 45%, rgba(14,34,69,.2) 100%);
}
.hero-inner { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.hero-title {
  font: 500 var(--step-5)/1 var(--serif); letter-spacing: -0.025em;
  max-width: 16ch; margin-bottom: 1.25rem;
}
.hero-verse, .slide-sub {
  max-width: 38rem; margin: 0;
  font: 400 var(--step-1)/1.55 var(--sans); color: rgba(255,255,255,.88);
}
.hero-verse.is-scripture, .slide-sub.is-scripture {
  font: italic 400 clamp(1.2rem, 1rem + .8vw, 1.55rem)/1.5 var(--serif); color: #fff;
}
.ref {
  display: block; margin-top: .75rem;
  font: normal 600 .95rem/1.3 var(--sans); letter-spacing: .03em; color: var(--gold);
}

/* ---------- Slider ---------- */
.slider { position: relative; padding: 0; background: var(--navy); color: #fff; overflow: hidden; isolation: isolate; }
.slider .slides { position: relative; }
.slider-full .slides { height: 100vh; height: 100svh; min-height: 560px; max-height: 1000px; }
.slider-large .slides { height: min(82vh, 760px); min-height: 520px; }
.slider-medium .slides { height: min(60vh, 560px); min-height: 440px; }
.slider .slide {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s;
}
.slider .slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease; }
.slide-media { position: absolute; inset: 0; z-index: 0; }
.slide-media img { width: 100%; height: 100%; object-fit: cover; }
.slide-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,34,69,.6) 0%, rgba(14,34,69,0) 28%),
    linear-gradient(0deg, rgba(14,34,69,.9) 0%, rgba(14,34,69,.45) 42%, rgba(14,34,69,0) 75%);
}
.slide-inner {
  z-index: 2 !important;
  position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: 0 var(--gutter) clamp(6rem, 12vh, 8.5rem);
}
.slide-title { font: 500 var(--step-5)/.98 var(--serif); letter-spacing: -0.03em; max-width: 14ch; margin-bottom: 1.1rem; }
.slider-full .slide-title { font-size: clamp(3rem, 1.6rem + 6.5vw, 7rem); }
.slide-sub { white-space: normal; }
.slide-sub:not(.is-scripture) { font-size: var(--step-1); }
.slider-controls {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(1.5rem, 4vh, 2.5rem);
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 1rem;
}
.slider-arrow {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff; cursor: pointer;
}
.slider-arrow:hover { background: rgba(255,255,255,.25); }
.slider-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.slider-dots { display: flex; gap: .5rem; }
.slider-dot { width: 34px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.35); cursor: pointer; position: relative; }
.slider-dot::before { content: ""; position: absolute; inset: -10px 0; }
.slider-dot.is-active { background: var(--gold); }

/* ---------- Slideshow overlay animations ---------- */
.slider-controls { z-index: 3; }
.slider-fx {
  --cx: 74%; --cy: 34%;
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.fx-mode-rays, .fx-mode-glory { --cx: 50%; --cy: -14%; }
.fx-rays {
  position: absolute; left: var(--cx); top: var(--cy);
  width: 180vmax; height: 180vmax; transform: translate(-50%, -50%);
  mix-blend-mode: screen; opacity: .9;
  -webkit-mask: radial-gradient(closest-side, #000 0%, rgba(0,0,0,.55) 35%, transparent 72%);
          mask: radial-gradient(closest-side, #000 0%, rgba(0,0,0,.55) 35%, transparent 72%);
}
.fx-rays::before, .fx-rays::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,232,160,0) 0deg 6deg, rgba(255,232,160,.11) 8deg 9deg, rgba(255,232,160,0) 11deg 17deg);
  animation: fx-turn 90s linear infinite;
}
.fx-rays::after {
  background: repeating-conic-gradient(from 4deg, rgba(255,255,255,0) 0deg 10deg, rgba(255,255,255,.06) 12deg 14deg, rgba(255,255,255,0) 16deg 27deg);
  animation: fx-turn 140s linear infinite reverse, fx-breathe 9s ease-in-out infinite;
}
.fx-halo {
  position: absolute; left: var(--cx); top: var(--cy); width: min(46vmin, 420px); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,200,.55) 0%, rgba(240,179,0,.22) 30%, rgba(240,179,0,0) 68%);
  mix-blend-mode: screen; opacity: 0;
  animation: fx-halo-in 2.4s ease-out 1.6s forwards, fx-pulse 7s ease-in-out 4s infinite;
}
.fx-cross {
  position: absolute; left: var(--cx); top: var(--cy); height: 50%; width: auto; aspect-ratio: 2 / 3;
  transform: translate(-50%, -31.6%); overflow: visible; opacity: .72;
}
.fx-beam { fill: none; stroke: #fff7dc; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.fx-beam-v { animation: fx-draw 2.2s cubic-bezier(.6,0,.2,1) .4s forwards; }
.fx-beam-h { animation: fx-draw 1.4s cubic-bezier(.6,0,.2,1) 1.9s forwards; }
.fx-cross g { animation: fx-pulse 7s ease-in-out 4s infinite; }
.fx-light {
  position: absolute; bottom: -20px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #fffbe8 0%, rgba(255,214,102,.75) 40%, rgba(255,214,102,0) 72%);
  box-shadow: 0 0 calc(var(--s) * 2) rgba(255,214,102,.45);
  opacity: 0; animation: fx-rise var(--d) linear var(--delay) infinite;
}
@keyframes fx-turn { to { transform: rotate(360deg); } }
@keyframes fx-breathe { 50% { opacity: .45; } }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
@keyframes fx-halo-in { to { opacity: 1; } }
@keyframes fx-pulse { 50% { opacity: .62; } }
@keyframes fx-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: .85; }
  70% { opacity: .55; }
  100% { transform: translate(var(--drift), -105vh); opacity: 0; }
}
@media (max-width: 760px) {
  .slider-fx { --cx: 50%; --cy: 24%; }
  .fx-cross { height: 38%; opacity: .55; }
  .fx-halo { width: 60vmin; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-rays::before, .fx-rays::after, .fx-cross g, .fx-halo { animation: none !important; }
  .fx-halo { opacity: 1; }
  .fx-beam { animation: none !important; stroke-dashoffset: 0; }
  .fx-light { display: none; }
}

/* ---------- Text ---------- */
.text-block.bg-tint { background: var(--sky); }
.text-block.bg-navy { background: var(--navy); color: rgba(255,255,255,.9); }
.text-block.bg-navy .section-title, .text-block.bg-navy .prose h2, .text-block.bg-navy .prose h3 { color: #fff; }
.text-block.bg-navy a { color: var(--gold); }

/* ---------- Image + text ---------- */
.image-text-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.image-right .image-text-media { order: 2; }
.image-text-media img { width: 100%; border-radius: var(--radius); }
@media (max-width: 760px) { .image-text-grid { grid-template-columns: 1fr; } .image-right .image-text-media { order: 0; } }

/* ---------- Scripture ---------- */
.scripture blockquote { margin: 0; }
.scripture blockquote p { font: italic 400 var(--step-4)/1.2 var(--serif); color: var(--navy); margin: 0; letter-spacing: -.01em; }
.scripture figcaption { margin-top: 1.25rem; font-weight: 600; color: var(--royal); }
.scripture figcaption::before { content: ""; display: inline-block; width: 2.5rem; height: 2px; background: var(--gold); vertical-align: middle; margin-right: .75rem; }

/* ---------- Video ---------- */
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #0b1a36; border-radius: var(--radius); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { color: var(--muted); margin-top: 1rem; }
.video-grid-list { display: grid; gap: 2rem 1.5rem; }
.video-grid-list.cols-2 { grid-template-columns: repeat(2, 1fr); }
.video-grid-list.cols-3 { grid-template-columns: repeat(3, 1fr); }
.video-item { margin: 0; }
.video-item figcaption { margin-top: .75rem; font-weight: 600; }
@media (max-width: 860px) { .video-grid-list.cols-2, .video-grid-list.cols-3 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem 1.75rem; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; } }
.card { position: relative; display: flex; flex-direction: column; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--sky); margin-bottom: 1.1rem; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-title { font: 600 var(--step-2)/1.2 var(--serif); color: var(--navy); margin-bottom: .4rem; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card-title a { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.card-text-p { color: var(--muted); margin: 0; }
.card-cta { display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--royal); border-bottom: 2px solid var(--gold); padding-bottom: 2px; align-self: flex-start; }
/* text-only cards (e.g. statements of belief) */
.card.card-text { padding-top: 1.25rem; border-top: 2px solid var(--navy); }
.card.card-text .card-title { font-size: var(--step-2); margin-bottom: .6rem; }
.card.card-text .card-text-p { color: var(--ink); }

/* ---------- Library (documents & links) ---------- */
.library-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 1rem 3rem; align-items: end; margin-bottom: 1.5rem; }
.library-head .section-head { margin-bottom: 1rem; }
@media (max-width: 860px) { .library-head { grid-template-columns: 1fr; } }
.library-search { padding-bottom: 1rem; }
.library-search label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: .4rem; color: var(--muted); }
.library-search input {
  width: 100%; min-height: 52px; padding: .75rem 1rem .75rem 2.75rem;
  border: 2px solid var(--line); border-radius: 999px; font: 400 1rem var(--sans); color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356617a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 1rem 50% / 18px;
}
.library-search input:focus { border-color: var(--royal); outline: none; box-shadow: 0 0 0 3px rgba(28,65,133,.15); }
.library-count { margin: .5rem 0 0 1rem; font-size: var(--step--1); color: var(--muted); min-height: 1.4em; }
.library-group + .library-group { margin-top: 3rem; }
.library-group-title { font: 500 var(--step-3)/1.15 var(--serif); color: var(--navy); margin-bottom: 1rem; display: flex; align-items: baseline; gap: .75rem; }
.library-n { font: 600 var(--step--1) var(--sans); color: var(--muted); }
.library-list { list-style: none; margin: 0; padding: 0; }
.library-empty { padding: 2rem 0; color: var(--muted); font-size: var(--step-1); }

/* index style: a table-of-contents with dotted leaders */
.library-index .library-list { columns: 2 22rem; column-gap: 3.5rem; }
.library-index .library-list li { break-inside: avoid; }
.library-index .library-list a {
  display: flex; align-items: baseline; gap: .5rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; line-height: 1.4;
}
.library-index .lib-title { flex: 0 1 auto; }
.library-index .library-list a::after {
  content: ""; order: 1; flex: 1 1 1.5rem; min-width: 1.5rem;
  border-bottom: 2px dotted #b7c2d6; transform: translateY(-.3em);
}
.library-index .lib-kind { order: 2; flex: none; font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--royal); }
.library-index .library-list a:hover .lib-title { color: var(--royal); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* tiles style */
.library-tiles .library-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.library-tiles .library-list a {
  display: flex; flex-direction: column; justify-content: space-between; gap: .75rem; height: 100%;
  padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.35;
  transition: border-color .15s, background-color .15s;
}
.library-tiles .library-list a:hover { border-color: var(--royal); background: var(--sky); }
.library-tiles .lib-kind { font-size: .78rem; font-weight: 600; color: var(--royal); }

/* ---------- Gallery ---------- */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.gallery-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--sky); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-grid a:hover img { transform: scale(1.04); }
.gallery-show { position: relative; }
.gallery-show .slides { position: relative; aspect-ratio: 3 / 2; background: #0b1a36; border-radius: var(--radius); overflow: hidden; }
.gallery-show .slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility 0s .6s; }
.gallery-show .slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s; }
.gallery-show .slide img { width: 100%; height: 100%; object-fit: contain; }
.gallery-show figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1.25rem 1rem; color: #fff; background: linear-gradient(0deg, rgba(14,34,69,.85), transparent); }
.gallery-show .slider-controls { position: static; padding: 1rem 0 0; justify-content: center; }
.gallery-show .slider-arrow { background: var(--sky); border-color: var(--line); color: var(--navy); }
.slider-counter { margin: 0; min-width: 5rem; text-align: center; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8,18,38,.94); display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 4rem 1rem 1.5rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 80vh; max-width: min(1200px, 100%); width: auto; object-fit: contain; border-radius: 4px; }
.lightbox p { color: #fff; margin: 1rem 0 0; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; width: 48px; height: 48px; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; }
.lightbox .lb-next { right: 1rem; top: 50%; }

/* ---------- Schedule ---------- */
.schedule { background: var(--sky); }
.schedule-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.schedule-grid.no-video { grid-template-columns: minmax(0, 1fr); max-width: calc(var(--read) + 2 * var(--gutter)); }
@media (max-width: 900px) { .schedule-grid { grid-template-columns: 1fr; } }
.times { margin: 0; }
.times-day { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.times-day:last-child { border-bottom: 1px solid var(--line); }
.times dt { font: 600 var(--step-1)/1.4 var(--serif); color: var(--navy); grid-row: span 3; }
.times dd { margin: 0; display: flex; justify-content: space-between; gap: 1rem; line-height: 1.5; padding: .1rem 0; }
.times time { font-weight: 600; color: var(--royal); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 480px) { .times-day { grid-template-columns: 1fr; } .times dt { margin-bottom: .25rem; } }
.schedule-where { margin: 1.25rem 0 0; }

/* ---------- Events ---------- */
.event-list { list-style: none; margin: 0; padding: 0; }
.event {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: center;
  padding: 1.5rem 0; border-top: 1px solid var(--line);
}
.event:last-child { border-bottom: 1px solid var(--line); }
.event.has-image { grid-template-columns: 9rem 11rem minmax(0, 1fr) auto; }
.event-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.event-when p { margin: 0; }
.event-date { font: 600 var(--step-1)/1.3 var(--serif); color: var(--navy); }
.event-date.tba { font: 500 var(--step--1)/1.4 var(--sans); color: var(--muted); }
.event-time { color: var(--muted); font-size: var(--step--1); }
.event-title { font: 600 var(--step-2)/1.2 var(--serif); color: var(--navy); }
.event-body p { margin: .4rem 0 0; color: var(--muted); }
@media (max-width: 760px) {
  .event, .event.has-image { grid-template-columns: 1fr; gap: .5rem; }
  .event .btn { justify-self: start; margin-top: .5rem; }
}

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.15rem 0; font: 500 var(--step-1)/1.35 var(--serif); color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover span { color: var(--royal); }
.faq-item summary i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sky); position: relative; }
.faq-item summary i::before, .faq-item summary i::after { content: ""; position: absolute; left: 8px; right: 8px; top: 13px; height: 2px; background: var(--royal); transition: transform .2s; }
.faq-item summary i::after { transform: rotate(90deg); }
.faq-item[open] summary i::after { transform: rotate(0); }
.faq-item .prose { padding: 0 0 1.5rem; color: var(--ink); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: stretch; }
.contact-grid.no-map { grid-template-columns: 1fr; max-width: calc(var(--read) + 2 * var(--gutter)); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { margin: 0; }
.contact-list > div { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.contact-list dt { font-weight: 600; color: var(--muted); font-size: var(--step--1); padding-top: .2rem; }
.contact-list dd { margin: 0; }
.contact-map { min-height: 380px; border-radius: var(--radius); overflow: hidden; background: var(--sky); }
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Giving ---------- */
.giving-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem; align-items: center;
  background: var(--navy); color: rgba(255,255,255,.88);
  border-radius: 18px; padding: clamp(2rem, 5vw, 4rem);
  max-width: calc(var(--wrap) - 2 * var(--gutter));
}
.giving .wrap.giving-panel { padding-left: clamp(2rem, 5vw, 4rem); padding-right: clamp(2rem, 5vw, 4rem); }
.giving-panel.no-qr { grid-template-columns: 1fr; }
.giving-panel .section-title { color: #fff; }
.giving-panel a { color: var(--gold); }
.giving-qr { margin: 0; background: #fff; padding: 1rem; border-radius: 12px; text-align: center; color: var(--muted); font-size: var(--step--1); }
.giving-qr img { width: 170px; height: auto; margin: 0 auto .5rem; }
@media (max-width: 760px) {
  .giving .wrap.giving-panel { width: calc(100% - 2 * var(--gutter)); }
  .giving-panel { grid-template-columns: 1fr; }
  .giving-qr { justify-self: start; }
}

/* ---------- Embed ---------- */
.embed-frame iframe { width: 100%; height: var(--embed-h, 600px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.78); font-size: var(--step--1); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 4rem var(--gutter) 2.5rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem 4rem;
}
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-name { font: 500 1.75rem/1.1 var(--serif); color: #fff; margin-bottom: .5rem; }
.footer-pastors { color: var(--gold); font-weight: 600; }
.footer-text { max-width: 30rem; }
.footer-h { font: 600 .95rem var(--sans); color: #fff; margin-bottom: 1rem; }
.site-footer address { font-style: normal; line-height: 1.7; margin-bottom: 1rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.footer-times { list-style: none; padding: 0; margin: 0; }
.footer-times li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .35rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.footer-times strong { color: #fff; font-weight: 600; margin-right: .25rem; }
.footer-times time { white-space: nowrap; color: #fff; }
.footer-links ul { list-style: none; padding: 0; margin: 0 0 1rem; line-height: 2; }
.footer-textline { color: rgba(255,255,255,.65); }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); }
.footer-base p { max-width: var(--wrap); margin: 0 auto; padding: 1.25rem var(--gutter); color: rgba(255,255,255,.55); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
