/* Kingdom Life Kraków — warm sanctuary
   Cream · deep burgundy · soft gold · human church feel */

:root {
  --ink: #2a1516;
  --black: #2a1516;
  --white: #ffffff;
  --paper: #F7F1E6;
  --paper-2: #efe6d6;
  --paper-deep: #e8dcc8;
  --card: #fbf7ef;
  --forest: #5C1A1B;
  --leaf: #5C1A1B;
  --ember: #C4A35A;
  --ember-soft: #d4b86e;
  --mute: #6b5448;
  --muted: #6b5448;
  --rule: #d9cbb4;
  --line: #d9cbb4;
  --footer: #3a1213;
  --gold: #C4A35A;
  --brass: #C4A35A;
  --jewel: #5C1A1B;
  --on-gold: #2a1516;
  --void: #efe6d6;
  --glass-top: rgba(247, 241, 230, 0.82);
  --glass-dock: rgba(92, 26, 27, 0.88);
  --max: 70rem;
  --measure: 38rem;
  --space-xl: 3.5rem;
  --dock-pad: 0px;
  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Figtree", "Segoe UI", sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
  font-size: 1.0625rem;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  padding-bottom: var(--dock-pad);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.02;
  contain: strict;
  background-image: var(--grain);
}

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

a {
  color: var(--leaf);
  text-underline-offset: 0.18em;
  overflow-wrap: break-word;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--forest); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

::selection { background: #e8c4ad; color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
  color: var(--ink);
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.hero-lede,
.lede,
.section .wrap > p,
.verse-box p,
.faq p { max-width: var(--measure); }

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.muted { color: var(--mute); }
.small { font-size: 0.9rem; }

.kicker {
  margin: 0 0 0.85rem;
  color: var(--ember);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0.8rem;
  top: -3.5rem;
  z-index: 120;
  background: var(--card);
  color: var(--ink);
  padding: 0.6rem 0.85rem;
  font-weight: 600;
}
.skip:focus { top: 0.65rem; }

/* —— Topbar —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--forest);
  color: #f3eee6;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.5rem 0;
  border-bottom: 0;
  box-shadow: none;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.topbar .wrap > * { min-width: 0; max-width: 100%; }
.topbar a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.topbar a:hover { color: var(--gold); }

/* —— Header —— */
.site-header {
  position: sticky;
  top: var(--topbar-h, 0px);
  z-index: 70;
  background: var(--glass-top);
  border-bottom: 1px solid rgba(207, 197, 182, 0.7);
  box-shadow: none;
  color: var(--ink);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.site-header::before { display: none; }

.nav-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.logo img { height: 42px; width: auto; }
.logo-campus {
  margin-top: 0.12rem;
  color: var(--ember);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem 1.2rem;
  min-width: 0;
}

.nav-here {
  display: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ember);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.1rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.35rem 0;
  background: none;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--forest); }

.nav-links a.nav-join,
.nav-links a.nav-join:hover,
.nav-links a.nav-join[aria-current="page"] {
  color: #fff !important;
  background: var(--forest) !important;
  border-color: var(--forest) !important;
}

.nav-join,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: var(--forest);
  color: #fff !important;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-join { padding: 0.55rem 1rem !important; min-height: 42px; }
.nav-join:hover,
.btn:hover {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff !important;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
}
.menu-btn:hover { background: rgba(36, 70, 58, 0.08); }

/* —— Dock (phones/tablets only) —— */
.dock {
  display: none;
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(0.55rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(36rem, calc(100% - 0.9rem));
  padding: 0.35rem;
  gap: 0.15rem;
  border-radius: 1.15rem;
  background: rgba(26, 24, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 32px rgba(20, 18, 16, 0.3);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  color: #f4efe7;
}
.dock-item {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  min-width: 0;
  padding: 0.35rem 0.12rem;
  border-radius: 0.8rem;
  color: #f4efe7;
  text-decoration: none;
  font-size: clamp(0.58rem, 2.6vw, 0.72rem);
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.01em;
  transition: background 0.2s var(--ease);
  overflow-wrap: anywhere;
}
.dock-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.dock-item[aria-current="page"] {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.dock-join {
  background: rgba(184, 91, 50, 0.92);
  color: #fff;
}
.dock-join:hover,
.dock-join[aria-current="page"] {
  background: var(--ember-soft);
  color: #fff;
}

/* —— Hero: full-bleed photography —— */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(92svh, 52rem);
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #f7f3ec;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.04);
  animation: hero-ken 28s var(--ease) infinite alternate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(20, 18, 16, 0.78) 0%, rgba(20, 18, 16, 0.5) 42%, rgba(20, 18, 16, 0.22) 70%, rgba(20, 18, 16, 0.38) 100%),
    linear-gradient(0deg, rgba(20, 18, 16, 0.55) 0%, transparent 48%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  padding-top: clamp(5rem, 14vw, 8rem);
  padding-bottom: clamp(2.25rem, 6vw, 3.75rem);
}
.hero-copy {
  display: block;
  max-width: 34rem;
  width: 100%;
  margin: 0;
  padding: 0;
}
.hero-crown {
  width: 3.25rem;
  height: auto;
  margin: 0 0 1rem;
  filter: drop-shadow(0 2px 14px rgba(196, 163, 90, 0.45));
  animation: crown-fade 1.4s var(--ease) both;
}
.hero .kicker { color: #e8d4a0; }
.hero h1 {
  max-width: 14em;
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  font-weight: 600;
  line-height: 1.12;
  margin-bottom: 1rem;
  color: #f7f3ec;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.25);
}
.hero-lede {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(247, 243, 236, 0.9);
  margin-bottom: 1.5rem;
}
.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 0.25rem;
}
.hero .btn.ghost {
  background: rgba(20, 18, 16, 0.2);
  color: #f7f3ec !important;
  border-color: rgba(247, 243, 236, 0.55);
}
.hero .btn.ghost:hover {
  background: rgba(247, 243, 236, 0.14);
  color: #fff !important;
  border-color: #f7f3ec;
}
.hero-photo { display: none; }
.tagline { display: none; }

.hero-meta {
  padding-top: 1.25rem;
  padding-bottom: 0.5rem;
}
.hero-meta p { margin-bottom: 0.4rem; max-width: 36rem; }
.hero-note { margin-bottom: 0.4rem; }

@keyframes hero-ken {
  0% { transform: scale(1.04) translate3d(0, 0, 0); }
  100% { transform: scale(1.1) translate3d(-1.2%, -0.8%, 0); }
}
@keyframes crown-fade {
  0% { opacity: 0; transform: translateY(0.55rem) scale(0.94); filter: drop-shadow(0 0 0 transparent); }
  55% { opacity: 1; transform: translateY(0) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: drop-shadow(0 2px 14px rgba(196, 163, 90, 0.45)); }
}

@keyframes gallery-rise {
  from { opacity: 0; transform: translateY(1.25rem) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* —— Sunday strip (never clobber .wrap centering) —— */
.wrap.bulletin-band,
.bulletin-band.wrap {
  margin: 0 auto var(--space-xl);
  padding-top: 0.5rem;
}
.bulletin-band:not(.wrap) {
  margin: 0 0 var(--space-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.bulletin {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: transparent;
}
.bulletin > div {
  min-width: 0;
  padding: 1.45rem 1.35rem 1.5rem 0;
}
.bulletin > div + div {
  padding-left: 1.35rem;
  border-left: 1px solid var(--rule);
}
.bulletin-label {
  margin: 0 0 0.45rem;
  color: var(--ember);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bulletin strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.bulletin p { margin: 0; color: var(--mute); }

.home-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  padding: 1rem 0 0.15rem;
}
.home-jump a {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--mute);
  text-decoration: none;
  border: 0;
}
.home-jump a:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* —— Sections —— */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.page-mast {
  padding: calc(clamp(2.8rem, 6vw, 4.5rem) + var(--chrome-h, 0px) * 0) 0 1.4rem;
  background: transparent;
}
.page-mast .wrap::after,
.ornament {
  content: "";
  display: block;
  width: 3.5rem;
  height: 1px;
  margin-top: 1.4rem;
  background: var(--ember);
}
.page-mast h1 {
  max-width: 14em;
  font-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.6rem);
  margin-bottom: 0.9rem;
}
.lede {
  color: var(--mute);
  font-size: 1.1rem;
}
.section-gap { margin-top: clamp(2rem, 4vw, 3rem); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.split > * { min-width: 0; }

.welcome-split .split > div:first-child {
  border-right: 1px solid var(--rule);
  padding-right: clamp(1rem, 3vw, 2.5rem);
}

.steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
  min-width: 0;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ember);
}
.steps h3 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.steps p { color: var(--mute); margin: 0; }

/* —— Team —— */
.gallery-intro { margin-bottom: 1.2rem; }
.team-pastors,
.team-deacons,
.team-roster {
  display: grid;
  gap: 1.2rem 1.1rem;
}
.team-pastors { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.4rem 0 1.8rem; }
.team-deacons,
.team-roster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.team-deacons { margin-bottom: 2.5rem; }
.team-roster { margin: 1.2rem 0 2rem; }
.team-card { margin: 0; min-width: 0; background: transparent; border: 0; padding: 0; }
.team-photo {
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 0.7rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.photo-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  color: inherit;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.55s var(--ease);
}
.team-card:hover .team-photo img { transform: scale(1.04); }
.team-card h3 { font-size: 1.05rem; margin: 0; font-weight: 600; }
.team-role,
.team-mail {
  margin: 0.28rem 0 0;
  color: var(--mute);
  font-size: 0.9rem;
}
.team-mail a { word-break: break-word; }

.life-heading { margin: 0.5rem 0 1.1rem; }
.life-heading h2 { margin-bottom: 0.25rem; }

/* —— Photo mosaic —— */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
  columns: unset;
}
.photo-tile {
  margin: 0;
  min-width: 0;
  break-inside: unset;
}

@media (prefers-reduced-motion: no-preference) and (min-width: 1040px) {
  .js .reveal:not(.is-visible) .photo-tile {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  .js .reveal.is-visible .photo-tile {
    animation: gallery-rise 0.8s var(--ease) both;
  }
  .js .reveal.is-visible .photo-tile:nth-child(1) { animation-delay: 0.05s; }
  .js .reveal.is-visible .photo-tile:nth-child(2) { animation-delay: 0.1s; }
  .js .reveal.is-visible .photo-tile:nth-child(3) { animation-delay: 0.15s; }
  .js .reveal.is-visible .photo-tile:nth-child(4) { animation-delay: 0.2s; }
  .js .reveal.is-visible .photo-tile:nth-child(5) { animation-delay: 0.25s; }
  .js .reveal.is-visible .photo-tile:nth-child(6) { animation-delay: 0.3s; }
  .js .reveal.is-visible .photo-tile:nth-child(7) { animation-delay: 0.35s; }
  .js .reveal.is-visible .photo-tile:nth-child(8) { animation-delay: 0.4s; }
  .js .reveal.is-visible .photo-tile:nth-child(n+9) { animation-delay: 0.48s; }
}

.photo-tile:nth-child(3n) { margin-top: 0.85rem; }
.photo-tile:nth-child(5n) { margin-top: 0; }
.photo-tile--wide {
  grid-column: span 2;
  margin-top: 0;
}
.photo-tile--wide .photo-frame { aspect-ratio: 16 / 10; }
.photo-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  box-shadow: none;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s var(--ease);
}
.photo-tile:hover .photo-frame img { transform: scale(1.05); }
.added-links { margin-top: 1.2rem; }
.added-links a { display: block; margin: 0.25rem 0; }
.gallery-note { margin-top: 1rem; }

/* —— Worship —— */
.worship-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.85fr);
  gap: 0.9rem 1.2rem;
  align-items: start;
  margin-top: 1.25rem;
}
.worship-filters,
.worship-tools { grid-column: 1 / -1; }
.worship-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.worship-filters button,
.worship-list button,
.lightbox button,
.player-poster { font: inherit; cursor: pointer; }
.worship-filters button {
  min-height: 40px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
}
.worship-filters button:hover {
  border-color: var(--forest);
  color: var(--forest);
}
.worship-filters button[aria-pressed="true"] {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
.worship-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.7rem 1rem;
}
.worship-search {
  display: grid;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  flex: 1 1 16rem;
}
.worship-count { margin: 0; color: var(--mute); font-weight: 600; }
.player {
  position: relative;
  grid-column: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid var(--rule);
}
.player iframe,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.player-poster { padding: 0; background: #1a1816; }
.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}
.player-poster span {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.5rem 0.85rem;
  background: var(--forest);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: var(--radius);
}
.worship-now { grid-column: 1; margin: 0.2rem 0 0; }
.worship-now strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}
.worship-who {
  display: block;
  margin-top: 0.2rem;
  color: var(--mute);
  font-size: 0.88rem;
}
.worship-list {
  position: relative;
  grid-column: 2;
  grid-row: 3 / span 2;
  list-style: none;
  margin: 0;
  padding: 0 0 1.75rem;
  max-height: min(68vh, 32.5rem);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  scrollbar-gutter: stable;
}
.worship-list::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 2.5rem;
  margin: -2.5rem 0 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 243, 236, 0), var(--card));
}
.worship-group {
  padding: 0.85rem 0.85rem 0.25rem;
  font-family: var(--serif);
  font-style: normal;
  font-size: 1.05rem;
  color: var(--ember);
}
.worship-list button {
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0.85rem;
  transition: background 0.15s var(--ease);
}
.worship-list button:hover { background: rgba(228, 221, 210, 0.65); }
.worship-list button[aria-current="true"] {
  background: rgba(36, 70, 58, 0.08);
  box-shadow: inset 3px 0 0 var(--forest);
}
.worship-title { display: block; font-weight: 600; }
.worship-empty { grid-column: 1 / -1; margin: 0; }

/* —— Quotes / verse / people —— */
.quotes {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr);
  gap: 1.6rem 2.5rem;
  align-items: start;
}
.quote {
  margin: 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 2px solid var(--ember);
}
.quote p { margin-bottom: 0.75rem; }
.quote-lead p:first-child {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem);
  line-height: 1.3;
}
.quote-side {
  display: grid;
  gap: 1.4rem;
  border-top: 0;
  padding-top: 0;
}
.verse-box {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--forest);
  border-left: 1px solid var(--rule);
  padding: 1.5rem 1.4rem;
}
.verse-box blockquote {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 1.1rem + 0.9vw, 1.6rem);
  line-height: 1.35;
  color: var(--ink);
}
.verse-feature blockquote {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
}
.people {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ember);
  padding: 1.25rem 1.4rem;
}
.people > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.find-photos img {
  width: auto;
  max-width: min(100%, 375px);
  border: 1px solid var(--rule);
}
.caption {
  margin-top: 0.4rem;
  color: var(--mute);
  font-size: 0.86rem;
}
.map-wrap iframe {
  width: 100%;
  height: clamp(18rem, 48vh, 30rem);
  border: 1px solid var(--rule);
}
.facts {
  display: grid;
  grid-template-columns: minmax(8rem, auto) minmax(0, 1fr);
  gap: 1rem 1.2rem;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.35rem;
}
.facts dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
}
.facts dd { margin: 0; }

.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.85rem 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ember);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; }

.library-index,
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.2rem 0 0.3rem;
}
.library-index a,
.socials a {
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  font-size: 0.9rem;
  border-radius: var(--radius);
}
.library-index a:hover,
.socials a:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.shelf { margin-top: 2.5rem; }
.shelf-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem 1rem;
  align-items: baseline;
  margin-bottom: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}
.shelf-num {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ember);
}
.shelf-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
}
.shelf-head p { margin: 0.2rem 0 0; color: var(--mute); }

.cover-grid,
.grid-3,
.grid-2 {
  display: grid;
  gap: 1.4rem 1.1rem;
  align-items: start;
}
.cover-grid { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.cover-grid figure,
.event-card { margin: 0; min-width: 0; }
.cover-grid img,
.event-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.cover-grid figcaption { padding-top: 0.7rem; }
.cover-grid h3,
.event-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}
.cover-grid p,
.event-card p { margin: 0 0 0.5rem; color: var(--mute); }
.event-card {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.event-card img { margin-bottom: 0.75rem; }

/* Poster mat — art-direct saturated event art */
.poster-mat {
  margin: 1rem 0 0;
  width: min(70%, 22rem);
  padding: 0.7rem;
  background: var(--card);
  border: 1px solid var(--rule);
}
.poster-mat img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  display: block;
}

.table-hint { display: none; }
.table-scroll { overflow-x: auto; margin: 0.5rem 0 1.2rem; }
table.meetings {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--rule);
}
table.meetings th,
table.meetings td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}
table.meetings th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}

.btn.ghost {
  background: transparent;
  color: var(--forest) !important;
  border-color: var(--forest);
}
.btn.ghost:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff !important;
}
.btn.wa {
  background: #145c45;
  border-color: #145c45;
  color: #fff !important;
}
.btn.wa:hover {
  background: #0e4636;
  border-color: #0e4636;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: none;
}

form label {
  display: block;
  margin: 0.9rem 0 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}
form input,
form textarea,
form select,
.worship-search input {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
form textarea { min-height: 9rem; resize: vertical; }
form input:focus-visible,
form textarea:focus-visible,
form select:focus-visible,
.worship-search input:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 1px;
  border-color: var(--ember);
}
::placeholder { color: #7a746c; }
address { font-style: normal; }

/* —— Footer —— */
.site-footer {
  background: var(--footer);
  color: #c8c0b4;
  border-top: 0;
  padding: 2.8rem 0 1.4rem;
  font-size: 0.95rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--ember-soft); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.8rem 2rem;
}
.site-footer .logo img { height: 40px; }
.site-footer .logo-campus { display: none; }
.legal {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid #2a2520;
  color: #8a8378;
  font-size: 0.85rem;
}
.foot-quiet { margin-top: 0.9rem; font-size: 0.86rem; }
.foot-quiet a { color: #8a8378; }

.lightbox {
  width: min(96vw, 72rem);
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.lightbox::backdrop { background: rgba(26, 24, 22, 0.55); }
.lightbox img {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  background: var(--paper-2);
}
.lightbox-bar,
.lightbox-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
}
.lightbox-nav { justify-content: space-between; }
.lightbox button {
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8rem;
}
.lightbox button:hover { background: rgba(36, 70, 58, 0.08); }
.lightbox-cap {
  margin: 0;
  padding: 0 0.85rem 0.35rem;
  color: var(--mute);
}

.btn:focus-visible,
.nav-join:focus-visible,
.dock-item:focus-visible,
.player-poster:focus-visible,
.lightbox :focus-visible { outline-color: var(--ember); }

.js .reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Anime.js: never hide content in CSS — JS animates from values only */
.anime-scroll .js .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
.anime-scroll .hero-bg {
  overflow: hidden;
}
.anime-scroll .hero-bg img {
  will-change: transform;
}
.anime-scroll main {
  overflow-x: clip;
}
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  margin: 0;
  padding: 0;
  border: 0;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold, #C4A35A), var(--forest, #5C1A1B));
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img { animation: none; transform: scale(1.04); }
  .hero-crown { animation: none; }
  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-progress { display: none; }
  .team-photo img,
  .photo-frame img { transition: none; }
  .team-card:hover .team-photo img,
  .photo-tile:hover .photo-frame img { transform: none; }
}

[id] { scroll-margin-top: calc(var(--chrome-h, 5.6rem) + 0.8rem); }

/* —— Phones & tablets: bottom dock only (no top Menu nav) —— */
@media (max-width: 1039px) {
  :root { --dock-pad: 6.4rem; }
  .dock { display: flex; }

  /* Remove top navbar / Menu — navigation lives only in the dock */
  .menu-btn,
  .nav-here,
  .nav-links,
  .nav-end { display: none !important; }
  .site-header .nav-row {
    justify-content: flex-start;
  }
  .site-header {
    position: sticky;
    top: 0;
  }

  /* Content must stay fully visible on phones */
  .js .reveal,
  .js .reveal.is-visible,
  .reveal,
  .bulletin > *,
  .home-jump a,
  .team-card,
  .photo-tile,
  .steps > li,
  .quote,
  .faq details,
  .split > div,
  .site-footer,
  .foot-grid > div,
  .legal,
  .hero-copy,
  .hero-copy .kicker,
  .hero-copy h1,
  .hero-copy .hero-lede,
  .hero-copy .hero-actions,
  .hero-crown {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
  .scroll-progress { display: none !important; }

  /* Dock clearance inside hero so secondary CTA stays visible */
  .hero-inner {
    padding-bottom: calc(var(--dock-pad) + 1.25rem);
  }
  .hero {
    min-height: min(78svh, 40rem);
  }
  .site-footer {
    padding-bottom: calc(var(--dock-pad) + 1.5rem);
  }

  .photo-grid,
  .team-pastors,
  .team-deacons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.15rem 0.1rem 0.65rem;
  }
  .photo-grid .photo-tile,
  .photo-grid .photo-tile--wide,
  .team-pastors .team-card,
  .team-deacons .team-card {
    flex: 0 0 min(82vw, 17.5rem);
    width: min(82vw, 17.5rem);
    max-width: 17.5rem;
    grid-column: auto;
    margin: 0;
    scroll-snap-align: center;
  }
  .photo-grid .photo-tile--wide {
    flex-basis: min(90vw, 20rem);
    width: min(90vw, 20rem);
    max-width: 20rem;
  }
  .photo-frame { aspect-ratio: 3 / 4; }
  .photo-tile:nth-child(3n) { margin-top: 0; }
}

@media (max-width: 900px) {
  .quotes,
  .foot-grid { grid-template-columns: 1fr; }
  /* Keep welcome border-right while columns are still side-by-side */
}

@media (max-width: 800px) {
  .topbar .wrap { flex-direction: column; align-items: flex-start; }
  .split,
  .steps,
  .team-roster { grid-template-columns: 1fr 1fr; }
  .team-deacons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-hint { display: block; }
}

/* Stack welcome columns + swap border only here (kills orphan hairline) */
@media (max-width: 560px) {
  .wrap,
  .hero-inner { width: min(100% - 1.8rem, var(--max)); }
  .welcome-split .split,
  .split,
  .bulletin,
  .steps,
  .team-pastors,
  .team-roster { grid-template-columns: 1fr; }
  .welcome-split .split > div:first-child {
    border-right: 0;
    padding-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.5rem;
  }
  .bulletin > div,
  .bulletin > div + div {
    padding: 1.1rem 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .bulletin > div:first-child { border-top: 0; }
  .people { grid-template-columns: 7.2rem minmax(0, 1fr); gap: 0.95rem; padding: 1rem; }
  .worship-stage,
  .worship-list,
  .player,
  .worship-now { grid-column: 1; grid-row: auto; }
  .worship-list { max-height: 50vh; }
  .hero {
    min-height: min(86svh, 40rem);
  }
  .hero h1 { font-size: clamp(1.8rem, 7.2vw, 2.35rem); }
  .hero-crown { width: 2.75rem; }
  .hero-actions .btn,
  .actions .btn { flex: 1 1 12rem; }
  .logo img { height: 38px; }
  .section { padding: 2.8rem 0; }
  .poster-mat { width: min(100%, 22rem); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-tile--wide { grid-column: span 2; }
}

@media (max-width: 380px) {
  .hero-actions .btn,
  .actions .btn { flex-basis: 100%; }
  .dock {
    width: calc(100% - 0.6rem);
    padding: 0.28rem;
    gap: 0.1rem;
  }
  .dock-item {
    min-height: 2.4rem;
    font-size: 0.55rem;
    padding: 0.28rem 0.08rem;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  :root { --dock-pad: 4.8rem; }
  .dock-item { min-height: 38px; font-size: 0.58rem; }
  .hero { min-height: 0; }
  .hero-inner { padding-top: 3rem; padding-bottom: calc(var(--dock-pad) + 0.75rem); }
  .hero h1 { font-size: 1.9rem; }
}

@media (prefers-contrast: more) {
  :root { --rule: var(--ink); }
  .btn, .menu-btn, .nav-join,
  form input, form textarea, form select { border-width: 2px; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar { background-color: var(--forest); }
  .dock { background-color: #1a1816; }
  .site-header { background: var(--paper); }
}

@media (max-width: 1039px) {
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav-links { background-color: var(--paper); }
  }
}

@media print {
  .topbar, .site-header, .dock, .menu-btn, .home-jump, .worship-stage, .hero-actions, .actions { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  .hero { display: block; min-height: 0; color: #000; }
  .hero-bg, .hero::after { display: none; }
  .hero h1, .hero-lede { color: #000; }
  a { text-decoration: underline; }
  .site-footer { background: #fff; color: #000; }
  .site-footer a { color: #000; }
}
