/* Echo Meadows Church of Christ: one stylesheet for every page.
   Plain CSS, no build step.

   Order: tokens, base, type, buttons, navigation, page tops, sheets and
   reveals, then the homepage sections in page order, then the building
   blocks the inner pages share, then the footer and reduced motion. */

:root {
  /* Warm darks from the building's wall in shade, stone from its roof,
     amber from the oak pews. */
  --night: #171110;
  --night-2: #231b19;
  --wall: #4b2b28;
  --stone: #ebe7df;
  --paper: #f6f3ed;
  --ink: #1b1513;
  --bone: #f4f0e8;
  --mute: #6b625a;
  --mute-dark: #bbb1a6;
  --amber: #f5a524;
  --line: rgb(27 21 19 / 0.14);
  --line-dark: rgb(244 240 232 / 0.17);

  --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(1.25rem, 4vw, 3.75rem);
  --edge: max(var(--gutter), calc((100vw - 86rem) / 2)); /* left edge of .wrap */
  --pad: clamp(4.5rem, 10vw, 9rem);
  --radius: clamp(0.9rem, 1.6vw, 1.5rem);
  --sheet: clamp(1.25rem, 2.6vw, 2.5rem); /* rounded top of each section */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --nav-h: 4.75rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--night);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), 86rem); margin-inline: auto; }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.7rem 1rem; border-radius: 0.5rem;
  background: var(--amber); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }
.noscript { position: relative; z-index: 60; margin: 0; padding: 0.9rem var(--gutter); background: var(--amber); color: var(--ink); }

/* ── Type ─────────────────────────────────────────────────────────────── */

.display {
  font-size: clamp(2.5rem, 6.6vw, 6.25rem);
  font-weight: 700;
  letter-spacing: -0.048em;
  line-height: 0.96;
  text-wrap: balance;
}

/* The second voice: an italic serif for asides and quoted lines. */
.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.028em;
}

.aside {
  font: italic 400 clamp(1.25rem, 2vw, 1.7rem)/1.25 var(--serif);
  letter-spacing: -0.01em;
  color: var(--soft, var(--mute));
}

.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  transition: text-decoration-color 0.25s, text-underline-offset 0.25s var(--ease);
}
.link:hover { text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.link-plain { text-decoration: none; }
.link-plain:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* The shared parts (see parts.js) should not add a box of their own. */
em-header, em-footer, em-visit, em-week, em-contact, em-bulletin { display: contents; }

.todo {
  background: #ffe27a; color: #3a2c00;
  padding: 0 0.35em; border-radius: 0.25em;
  font-size: 0.88em; font-weight: 500; letter-spacing: 0;
}

/* ── Buttons, pills, the live dot ─────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: 0 1.45rem;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
  overflow: hidden;
  transition: transform 0.3s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn > span { display: block; transition: transform 0.45s var(--ease); }
/* The label rolls up and its twin rolls in. home.js adds data-label. */
.btn[data-label]::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  transform: translateY(110%);
  transition: transform 0.45s var(--ease);
}
.btn[data-label]:hover > span { transform: translateY(-170%); }
.btn[data-label]:hover::after { transform: translateY(0); }

.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #ffbe4d; }
.btn-ghost { border-color: rgb(244 240 232 / 0.45); color: var(--bone); }
.btn-ghost:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.btn-ink { background: var(--ink); color: var(--bone); }
.btn-ink:hover { background: #000; }

.pill {
  display: inline-block; margin-left: 0.6rem; padding: 0.2rem 0.6rem;
  border-radius: 999px; background: var(--amber); color: var(--ink);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0; line-height: 1.3;
  vertical-align: middle;
}
.pill-quiet { background: none; border: 1px solid var(--line); color: var(--mute); }

.pulse {
  flex: none; display: inline-block;
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--amber);
}
/* It only pulses while a gathering is actually happening. */
.is-live .pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgb(245 165 36 / 0.65); }
  to { box-shadow: 0 0 0 0.75rem rgb(245 165 36 / 0); }
}

/* Film grain, used over photographs. */
.grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.16; mix-blend-mode: overlay;
}

/* ── Navigation ───────────────────────────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem);
  height: var(--nav-h); padding-inline: var(--gutter);
  color: var(--bone);
  transition: transform 0.55s var(--ease);
}
/* After the first scroll the bar becomes a floating glass pill. */
.nav::before {
  content: "";
  position: absolute; z-index: -1;
  inset: 0.5rem calc(var(--gutter) - 1.15rem);
  border: 1px solid var(--line-dark); border-radius: 999px;
  background: rgb(23 17 16 / 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  opacity: 0;
  transition: opacity 0.4s;
}
.nav.is-stuck::before { opacity: 1; }
.nav.is-hidden { transform: translateY(-110%); }
.menu-open .nav::before { opacity: 0; }

.nav-logo { flex: none; }
.nav-logo img { width: auto; height: clamp(1.7rem, 2.4vw, 2.15rem); }

.nav-links {
  display: flex; gap: clamp(1rem, 1.9vw, 1.9rem); margin-left: auto;
  font-size: 0.94rem; font-weight: 500;
}
.nav-links a { position: relative; padding: 0.5rem 0; text-decoration: none; white-space: nowrap; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.25rem; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.nav-links a[aria-current]::after { background: var(--amber); height: 2px; }

.nav-cta { min-height: 2.6rem; padding-inline: 1.15rem; font-size: 0.92rem; }

.nav-toggle {
  display: none; align-items: center; gap: 0.7rem;
  margin-left: auto; min-height: 2.6rem; padding: 0 1rem 0 1.1rem;
  border: 1px solid var(--line-dark); border-radius: 999px;
  background: rgb(23 17 16 / 0.5);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
}
.nav-toggle-icon { position: relative; width: 1.1rem; height: 0.5rem; }
.nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform 0.4s var(--ease);
}
.nav-toggle-icon::before { top: 0; }
.nav-toggle-icon::after { bottom: 0; }
[aria-expanded="true"] .nav-toggle-icon::before { transform: translateY(0.2rem) rotate(45deg); }
[aria-expanded="true"] .nav-toggle-icon::after { transform: translateY(-0.2rem) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  display: grid; align-content: space-between; gap: 2rem;
  padding: calc(var(--nav-h) + 2rem) var(--gutter) 2.25rem;
  background: var(--night); color: var(--bone);
  overflow-y: auto;
  opacity: 0; transition: opacity 0.35s;
}
.menu.is-open { opacity: 1; }
.menu-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); column-gap: 2rem; }
.menu-links a {
  padding: 0.3rem 0;
  font-size: clamp(1.75rem, 7.4vw, 3rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.12;
  text-decoration: none;
  opacity: 0; transform: translateY(1.2rem);
  transition: opacity 0.5s, transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 35ms);
}
.menu.is-open .menu-links a { opacity: 1; transform: none; }
.menu-links a:first-child, .menu-links a[aria-current] { color: var(--amber); }
.menu-next { display: flex; align-items: center; gap: 0.7rem; color: var(--mute-dark); }

@media (max-width: 68rem) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Inside the floating bar the button has no background or blur of its own,
     so it is the same colour as the rest of the bar. */
  .nav.is-stuck .nav-toggle { border-color: transparent; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-right: 0.35rem; }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

/* The hero stays put while the next section slides up over it. */
.hero {
  position: sticky; top: 0; z-index: 0;
  display: grid; align-items: end;
  height: 100vh; height: min(100svh, 75rem); min-height: 34rem;
  background: var(--night); color: var(--bone);
  overflow: clip; isolation: isolate;
  --hp: 0; /* scroll progress through the hero, set by home.js */
}

.hero-media {
  position: absolute; inset: 0; z-index: -3;
  transform: scale(calc(1 + var(--hp) * 0.1));
  will-change: transform;
}
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }

.hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(to bottom, rgb(23 17 16 / 0.62), rgb(23 17 16 / 0) 24%),
    linear-gradient(to top, rgb(23 17 16 / 0.96) 4%, rgb(23 17 16 / 0.6) 34%, rgb(23 17 16 / 0) 64%);
}
/* Darkens as the next section covers it. */
.hero-shade::after {
  content: ""; position: absolute; inset: 0;
  background: var(--night); opacity: calc(var(--hp) * 0.7);
}
.hero .grain { z-index: -1; }

.hero-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 21.5rem;
  align-items: end; gap: clamp(1.5rem, 3vw, 3rem);
  padding-block: calc(var(--nav-h) + 1rem) calc(var(--sheet) + clamp(1.25rem, 3.6vh, 2.75rem));
  transform: translate3d(0, calc(var(--hp) * -9vh), 0);
  opacity: calc(1 - var(--hp) * 1.5);
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 7rem); /* sized so each line fits its column */
  font-weight: 700; letter-spacing: -0.05em; line-height: 0.93;
}
/* Each line is a mask that its text rises out of on load. */
.line { display: block; overflow: hidden; padding: 0.04em 0.12em 0.16em 0; margin-bottom: -0.16em; }
.line-in { display: inline-block; white-space: nowrap; }
.hero-title .serif { font-size: 1.04em; letter-spacing: -0.035em; }

.hero-lede {
  max-width: 31ch; margin-top: clamp(1rem, 2.2vh, 1.6rem);
  font-size: clamp(1.05rem, 1.45vw, 1.3rem); line-height: 1.42;
  color: rgb(244 240 232 / 0.86);
}

.next-card {
  padding: 1.35rem 1.4rem 1.4rem;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgb(23 17 16 / 0.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
}
.next-label { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; font-weight: 500; color: var(--mute-dark); }
.next-what { margin-top: 0.5rem; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
.next-when { margin-top: 0.15rem; font-size: 1.05rem; font-weight: 500; }
.next-count { margin-top: 0.3rem; font: italic 400 1.15rem/1.3 var(--serif); color: var(--mute-dark); }
.next-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.next-actions .btn { flex: 1 1 auto; }

@media (max-width: 76rem) {
  .hero-body { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: min(10.3vw, 7rem); } /* each line still fits on one row */
  .next-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2rem; align-items: center; }
  .next-card > * { grid-column: 1; }
  .next-actions { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
}
/* Phones: the building sits whole at the top and the words start below it.
   The hero scrolls normally here instead of pinning. */
@media (max-width: 44rem) {
  .hero { position: relative; height: auto; min-height: 100svh; }
  .hero-media { inset: 0 0 auto 0; height: 58svh; transform: none; }
  .hero-shade {
    background:
      linear-gradient(to bottom, rgb(23 17 16 / 0.6), rgb(23 17 16 / 0) 9rem),
      linear-gradient(to bottom, rgb(23 17 16 / 0) 30svh, var(--night) 57svh);
  }
  .hero-shade::after { content: none; }
  .hero-body { padding-top: 35svh; transform: none; opacity: 1; }
  .next-card { display: block; }
  .next-actions { margin-top: 1.1rem; }
  .next-what { font-size: 1.35rem; }
}
/* Very short screens: let the hero scroll normally rather than pin. */
@media (max-height: 34rem) {
  .hero { position: relative; height: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-img { animation: hero-in 2.4s var(--ease) both, drift 28s ease-in-out 2.4s infinite alternate; }
  .line-in { animation: rise 1.15s var(--ease) both; }
  .line:nth-child(1) .line-in { animation-delay: 0.25s; }
  .line:nth-child(2) .line-in { animation-delay: 0.38s; }
  .hero-lede { animation: fade-up 1s var(--ease) 0.7s both; }
  .next-card { animation: fade-up 1s var(--ease) 0.85s both; }
  .nav { animation: fade-down 0.9s var(--ease) 0.15s both; }
}
@keyframes hero-in { from { opacity: 0; transform: scale(1.14); } to { opacity: 1; transform: scale(1.02); } }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.09) translate3d(-1%, -1%, 0); } }
@keyframes rise { from { transform: translateY(112%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-1rem); } to { opacity: 1; transform: none; } }

/* ── Sheets: every section has a rounded top that overlaps the last ───── */

.sheet {
  position: relative;
  margin-top: calc(var(--sheet) * -1);
  padding-block: var(--pad) calc(var(--pad) + var(--sheet));
  border-radius: var(--sheet) var(--sheet) 0 0;
  background: var(--stone); color: var(--ink);
  --rule: var(--line); --soft: var(--mute); --accent: #a8640a; /* hairlines, quiet text and accent text on this sheet */
}
.sheet--paper { background: var(--paper); }
.sheet--night { background: var(--night); color: var(--bone); }
.sheet--wall { background: var(--wall); color: var(--bone); }
/* Dark sheets swap the hairline and the quiet text colour. */
.sheet--night, .sheet--wall, .creed, .life, .visit, .coming { --rule: var(--line-dark); --soft: var(--mute-dark); --accent: var(--amber); }
.sheet--wall, .coming { --soft: rgb(244 240 232 / 0.74); }
.sheet--clip { overflow: clip; }

.sec-head { display: grid; gap: 0.9rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

/* ── Reveals (home.js adds .is-in when an element scrolls into view) ──── */

.js [data-reveal="rise"] { overflow: hidden; padding: 0.02em 0.06em 0.14em 0; margin-bottom: -0.14em; }
.js [data-reveal="rise"] > span { display: inline-block; transform: translateY(108%); transition: transform 1.1s var(--ease); }
.js [data-reveal="rise"].is-in > span { transform: none; }

.js [data-reveal="rows"] > * {
  opacity: 0; transform: translateY(1.75rem);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal="rows"].is-in > * { opacity: 1; transform: none; }

.js [data-reveal="up"] { opacity: 0; transform: translateY(2rem); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal="up"].is-in { opacity: 1; transform: none; }

/* The wipe is on the first child, so the observed box itself is never clipped. */
.js [data-reveal="clip"] > :first-child { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1.3s var(--ease); }
.js [data-reveal="clip"].is-in > :first-child { clip-path: inset(0 0 0 0 round var(--radius)); }

/* ── Every week ───────────────────────────────────────────────────────── */

.week-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: start;
}
.week-head { position: sticky; top: calc(var(--nav-h) + 2rem); display: grid; gap: 0.9rem; }
.week-note { max-width: 28ch; margin-top: 0.6rem; color: var(--mute); }

.day {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr);
  padding-block: 1.1rem; border-top: 1px solid var(--line);
}
.day:last-child { border-bottom: 1px solid var(--line); }
.day h3 { padding-top: 1.35rem; font-size: 1rem; font-weight: 600; }
.day h3 .pill { display: block; width: fit-content; margin: 0.45rem 0 0; }

.slot {
  position: relative;
  display: grid; grid-template-columns: clamp(7.5rem, 13vw, 11rem) minmax(0, 1fr);
  gap: 1.25rem; align-items: baseline;
  padding-block: 0.9rem;
}
.slot + .slot { border-top: 1px solid var(--line); }
.slot time {
  font-size: clamp(1.9rem, 3.3vw, 3.1rem); font-weight: 600;
  letter-spacing: -0.05em; line-height: 1;
}
.slot time small { margin-left: 0.28em; font-size: 0.36em; font-weight: 500; letter-spacing: 0; color: var(--mute); }
.slot strong { font-size: 1.22rem; font-weight: 600; letter-spacing: -0.02em; }
.slot p { max-width: 42ch; margin-top: 0.15rem; color: var(--mute); }
/* The kinds of evening a gathering rotates through. */
.slot-kinds { display: grid; gap: 0.3rem; max-width: 42ch; margin-top: 0.5rem; color: var(--mute); }
.slot-kinds li { position: relative; padding-left: 1.05rem; }
.slot-kinds li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--accent, var(--amber)); }
/* The gathering that is next gets the amber marker. */
.slot.is-next::before {
  content: ""; position: absolute; left: -1.15rem; top: 1.75rem;
  width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--amber);
}

@media (max-width: 62rem) {
  .week-grid { grid-template-columns: minmax(0, 1fr); }
  .week-head { position: static; }
}
@media (max-width: 40rem) {
  .day { grid-template-columns: minmax(0, 1fr); }
  .day h3 { padding: 0.6rem 0 0.2rem; }
  .slot { grid-template-columns: 6.6rem minmax(0, 1fr); gap: 0.9rem; }
  .slot.is-next::before { left: -0.85rem; top: 1.5rem; }
}

/* ── Statement and the photo reel ─────────────────────────────────────── */

.creed { background: var(--night); color: var(--bone); overflow: clip; }
.creed > .wrap, .scope-wrap { position: relative; z-index: 1; }

.creed-text, .statement {
  max-width: 19em;
  font-size: clamp(1.85rem, 4.5vw, 4.25rem); font-weight: 500;
  letter-spacing: -0.04em; line-height: 1.06;
  text-wrap: pretty;
}
/* home.js wraps each word; words light up as the paragraph scrolls past. */
.w { opacity: 0.2; transition: opacity 0.35s linear; }
.w.is-on { opacity: 1; }
.creed-more { margin-top: clamp(1.5rem, 3vw, 2.5rem); }

/* Light from the photographs spills onto the dark page behind them. */
.creed-glow {
  position: absolute; left: 0; bottom: 0; z-index: 0;
  width: 50%; height: 38%;
  transform: scale(2); transform-origin: 0 100%;
  filter: blur(34px) saturate(1.6);
  opacity: 0.5; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent);
  mask-image: linear-gradient(to top, #000 30%, transparent);
}
.creed-glow img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.8s ease;
}
.creed-glow img.is-active { opacity: 1; }

.scope-wrap {
  width: min(100% - 2 * var(--gutter), 98rem); margin: clamp(3rem, 7vw, 6rem) auto 0;
  transform: scale(calc(0.86 + var(--p, 1) * 0.14)); transform-origin: 50% 100%;
}
/* A 2.4:1 frame, the shape of a cinema screen and of the church's photos. */
.scope {
  position: relative; aspect-ratio: 2.4 / 1;
  border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: #000;
}
.scope-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.5s ease; }
.scope-slide.is-active { opacity: 1; }
.scope-slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); } /* --focus picks which part of a tall photo shows */
.scope-slide figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* A slow push in. The outgoing photo holds its zoom until it has faded. */
.scope-slide img { transform: scale(1.02); transition: transform 0s linear 1.6s; }
.scope-slide.is-active img { transform: scale(1.12); transition: transform 9s linear; }

.scope-ui {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; align-items: end; justify-content: space-between; gap: 1rem;
  padding: 3.5rem clamp(1rem, 2vw, 1.75rem) clamp(0.9rem, 1.6vw, 1.4rem);
  background: linear-gradient(to top, rgb(0 0 0 / 0.66), rgb(0 0 0 / 0));
}
.scope-caption { font: italic 400 clamp(1.05rem, 1.7vw, 1.45rem)/1.2 var(--serif); }
.scope-controls { display: flex; align-items: center; gap: 0.9rem; }
.scope-ticks { display: flex; gap: 0.35rem; }
.tick { width: clamp(1.4rem, 3vw, 2.6rem); padding: 0.8rem 0; border: 0; background: none; cursor: pointer; }
.tick span { display: block; height: 2px; border-radius: 2px; background: rgb(255 255 255 / 0.32); overflow: hidden; }
.tick span::after {
  content: ""; display: block; height: 100%; background: var(--bone);
  transform: scaleX(0); transform-origin: left;
}
.tick.is-done span::after { transform: scaleX(1); }
.tick.is-active span::after { animation: fill var(--reel-time, 6s) linear both; }
.is-paused .tick.is-active span::after { animation: none; transform: scaleX(1); }
@keyframes fill { to { transform: scaleX(1); } }
.scope-pause {
  padding: 0.3rem 0.75rem; border: 1px solid rgb(255 255 255 / 0.35); border-radius: 999px;
  background: none; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.scope-pause:hover { background: var(--bone); color: var(--ink); }

@media (max-width: 48rem) {
  .scope { aspect-ratio: 3 / 2; }
  .scope-wrap { transform: none; }
  .scope-pause { display: none; }
}

/* ── Your first Sunday ────────────────────────────────────────────────── */

.first { overflow: clip; }
.first-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6.5rem); align-items: start;
}
.first-media { position: sticky; top: max(calc(var(--nav-h) + 1.5rem), calc(50vh - 15rem)); }
.first-frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--night); }
.first-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.1);
  transition: opacity 0.7s ease, transform 1.4s var(--ease);
}
.first-frame img.is-active { opacity: 1; transform: none; }

.step { position: relative; padding-block: clamp(1.6rem, 3vw, 2.4rem); border-top: 1px solid var(--line); }
.step h3 {
  font-size: clamp(1.6rem, 2.7vw, 2.45rem); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.05;
  transition: color 0.4s;
}
.step p { max-width: 40ch; margin-top: 0.7rem; font-size: 1.1rem; color: var(--mute); }
.step-img { display: none; }
.first-more { padding-top: 1.75rem; border-top: 1px solid var(--line); }

/* On wide screens the step nearest the middle of the screen is the active one. */
@media (min-width: 62.01rem) {
  .js .step h3 { color: var(--mute); }
  .js .step.is-active h3 { color: var(--ink); }
  .js .step::before {
    content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 2px;
    background: var(--ink); transform: scaleX(0); transform-origin: left;
    transition: transform 0.7s var(--ease);
  }
  .js .step.is-active::before { transform: scaleX(1); }
}
@media (max-width: 62rem) {
  .first-grid { grid-template-columns: minmax(0, 1fr); }
  .first-media { display: none; }
  .step-img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.25rem; }
}

/* The marquee drifts by itself and speeds up with the scroll. */
.marquee { margin-top: var(--pad); padding-block: clamp(1.25rem, 3vw, 2.5rem); border-block: 1px solid var(--line); overflow: hidden; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group {
  flex: none; display: flex; align-items: center; gap: 0.32em; padding-right: 0.32em;
  font-size: clamp(3rem, 9.5vw, 9rem); font-weight: 700; letter-spacing: -0.055em; line-height: 1.02;
  white-space: nowrap;
}
.marquee-group .serif { font-size: 1.06em; font-weight: 400; letter-spacing: -0.04em; }
.marquee-group i { flex: none; width: 0.42em; height: 0.055em; border-radius: 1em; background: var(--amber); }
.marquee-note { margin-top: 1.4rem; color: var(--mute); }
.marquee-note .aside { color: var(--ink); margin-right: 0.5rem; }

/* ── The rest of the year (a strip that scrolls sideways) ─────────────── */

.life { padding-block: 0; background: var(--night); color: var(--bone); }
.life-sticky { padding-block: var(--pad) calc(var(--pad) + var(--sheet)); }
.life-head { display: grid; gap: 0.9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.life-track {
  display: flex; gap: clamp(1rem, 2vw, 1.75rem);
  padding-inline: var(--edge);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}
.life-track::-webkit-scrollbar { display: none; }

.card { flex: none; display: block; width: min(82vw, 28rem); scroll-snap-align: start; color: inherit; text-decoration: none; }
.card h3 { transition: color 0.35s; }
.card:hover h3 { color: var(--amber); }
.card--past .card-media img { filter: saturate(0.5) sepia(0.14) contrast(0.96); }
.card-media { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
.card-media img {
  width: 116%; max-width: none; height: 100%; margin-left: -8%; object-fit: cover;
  transform: translate3d(calc(var(--cx, 0) * 6%), 0, 0);
}
.card h3 { margin-top: 1.15rem; font-size: clamp(1.4rem, 2vw, 1.8rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
.card p { max-width: 38ch; margin-top: 0.5rem; color: var(--mute-dark); }

.life-foot { display: none; }
.life-bar { height: 2px; background: var(--line-dark); border-radius: 2px; overflow: hidden; }
.life-bar span { display: block; height: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left; }

/* home.js adds .is-pinned on wide screens: the section holds still and
   scrolling down moves the strip sideways. */
.life.is-pinned .life-sticky {
  position: sticky; top: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; align-items: center;
  height: 100vh; height: 100svh;
  padding-block: calc(var(--nav-h) + 3vh) calc(var(--sheet) + 1.75rem);
  overflow: clip;
}
.life.is-pinned .life-head { margin-bottom: 0; }
.life.is-pinned .life-track { width: max-content; overflow: visible; scroll-snap-type: none; will-change: transform; }
.life.is-pinned .card { width: clamp(18rem, min(40vw, 56vh), 35rem); }
.life.is-pinned .life-foot { display: block; }

/* ── Find your people ─────────────────────────────────────────────────── */

.people-list li { border-top: 1px solid var(--line); }
.people-list li:last-child { border-bottom: 1px solid var(--line); }
.people-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 1.5rem;
  padding-block: clamp(0.9rem, 2vw, 1.75rem);
  text-decoration: none;
  transition: color 0.35s, padding-left 0.5s var(--ease);
}
.people-name { font-size: clamp(1.9rem, 5.4vw, 4.75rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.people-meta { color: var(--mute); text-align: right; }
@media (hover: hover) and (pointer: fine) {
  .people-list:hover a { color: var(--mute); }
  .people-list a:hover { color: var(--ink); padding-left: 1.25rem; }
}
@media (max-width: 44rem) {
  .people-list a { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .people-meta { text-align: left; }
}

/* A photo that follows the pointer over the list. Built by home.js. */
.peek {
  position: fixed; left: 0; top: 0; z-index: 40;
  width: clamp(16rem, 24vw, 23rem); aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden;
  pointer-events: none; opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 1.5rem 4rem rgb(27 21 19 / 0.28);
}
.peek.is-on { opacity: 1; }
.peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity 0.35s, transform 0.8s var(--ease); }
.peek img.is-active { opacity: 1; transform: none; }

/* ── Coming up ────────────────────────────────────────────────────────── */

.coming { background: var(--wall); color: var(--bone); }
.events li {
  display: grid; grid-template-columns: clamp(9rem, 20vw, 17rem) minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem); align-items: baseline;
  padding-block: clamp(1.1rem, 2.2vw, 1.75rem);
  border-top: 1px solid var(--line-dark);
}
.events li:last-child { border-bottom: 1px solid var(--line-dark); }
.event-date { font-size: clamp(1.9rem, 4.2vw, 3.5rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--amber); }
.event-title { font-size: clamp(1.3rem, 2.1vw, 1.75rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.event-where { margin-top: 0.35rem; font: italic 400 1.15rem/1.25 var(--serif); color: var(--soft); }
.event-note { max-width: 46ch; margin-top: 0.35rem; color: var(--soft); }
.event-when { color: var(--soft); text-align: right; white-space: nowrap; }
.events-more { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
@media (max-width: 48rem) {
  .events li { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .event-when { text-align: left; }
}

/* ── Watch and give ───────────────────────────────────────────────────── */

.more-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(1rem, 2vw, 1.75rem); }

.watch-card {
  position: relative; display: grid; align-items: end;
  min-height: clamp(22rem, 42vw, 34rem);
  border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: var(--night); color: var(--bone); text-decoration: none;
}
.watch-card > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); transition: transform 1.8s var(--ease); }
.is-in > .watch-card > img, html:not(.js) .watch-card > img { transform: none; }
.watch-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(23 17 16 / 0.92), rgb(23 17 16 / 0.25) 60%, rgb(23 17 16 / 0.1));
}
.is-in > .watch-card:hover > img { transform: scale(1.05); }
.watch-body { display: grid; gap: 0.7rem; padding: clamp(1.4rem, 3vw, 2.5rem); }
.watch-title { font-size: clamp(1.9rem, 4vw, 3.5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.watch-text { max-width: 44ch; color: rgb(244 240 232 / 0.84); }
.watch-play { display: inline-flex; align-items: center; gap: 0.8rem; margin-top: 0.6rem; font-weight: 600; }
.play-icon {
  display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%;
  background: var(--amber);
  transition: transform 0.5s var(--ease);
}
.play-icon::before { content: ""; margin-left: 0.2rem; border-left: 0.85rem solid var(--ink); border-block: 0.52rem solid transparent; }
.watch-card:hover .play-icon { transform: scale(1.14); }

.give-card {
  display: grid; align-content: end; justify-items: start; gap: 0.9rem;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border-radius: var(--radius); background: var(--paper);
}
.give-card h2 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.give-card p { color: var(--mute); }
.give-card .btn { margin-top: 0.5rem; }

@media (max-width: 62rem) {
  .more-grid { grid-template-columns: minmax(0, 1fr); }
  .give-card { min-height: 15rem; }
}

/* ── Visit ────────────────────────────────────────────────────────────── */

.visit { padding-bottom: var(--pad); background: var(--night); color: var(--bone); overflow: clip; }
.visit-title { font-size: clamp(3rem, 11.5vw, 11.5rem); letter-spacing: -0.058em; line-height: 0.9; }
.visit-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: end;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.visit-info > div {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline;
  padding-block: 1.3rem; border-top: 1px solid var(--rule);
}
.visit-info > div:last-child { border-bottom: 1px solid var(--rule); }
.visit-info dt { font: italic 400 1.2rem/1.2 var(--serif); color: var(--soft); }
.visit-info dd { font-size: clamp(1.15rem, 1.7vw, 1.45rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.4; }

.visit-frame { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
.visit-frame img { width: 100%; height: 118%; margin-top: -9%; object-fit: cover; transform: translate3d(0, calc(var(--py, 0) * -7%), 0); }
.visit-photo figcaption { margin-top: 0.9rem; font: italic 400 1.1rem/1.3 var(--serif); color: var(--mute-dark); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }

@media (max-width: 62rem) {
  .visit-grid { grid-template-columns: minmax(0, 1fr); }
  .visit-photo { order: -1; }
}
@media (max-width: 30rem) {
  .visit-info > div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* ── Page tops (every page except the homepage) ───────────────────────── */

/* The same pinned photograph as the homepage hero, a little shorter. */
.hero--page { height: min(82svh, 56rem); min-height: 30rem; }
.hero--page .hero-body { grid-template-columns: minmax(0, 1fr); }
.hero--page .hero-img { object-position: var(--focus, 50% 50%); }

.top-title {
  font-size: clamp(3.25rem, 10.5vw, 10.5rem);
  font-weight: 700; letter-spacing: -0.058em; line-height: 0.9;
}
.top-title .line-in { white-space: normal; }
.top-aside {
  max-width: 31ch; margin-top: clamp(0.9rem, 2vh, 1.4rem);
  font: italic 400 clamp(1.3rem, 2.3vw, 2rem)/1.2 var(--serif); letter-spacing: -0.01em;
  color: rgb(244 240 232 / 0.9);
}

/* A top with no photograph, for the short practical pages. */
.hero--plain { position: relative; height: auto; min-height: 0; }
.hero--plain::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgb(245 165 36 / 0.16), transparent 70%),
    radial-gradient(50rem 28rem at 0% 100%, rgb(75 43 40 / 0.9), transparent 70%);
}
.hero--plain .hero-body {
  padding-block: calc(var(--nav-h) + clamp(3.5rem, 10vw, 8rem)) calc(var(--sheet) + clamp(2.5rem, 6vw, 5rem));
  transform: none; opacity: 1;
}

@media (max-width: 44rem) {
  .hero--page { min-height: 0; }
  .hero--page .hero-media { height: 54svh; }
  .hero--page .hero-shade {
    background:
      linear-gradient(to bottom, rgb(23 17 16 / 0.6), rgb(23 17 16 / 0) 9rem),
      linear-gradient(to bottom, rgb(23 17 16 / 0) 26svh, var(--night) 53svh);
  }
  .hero--page .hero-body { padding-top: 37svh; }
  .hero--plain .hero-body { padding-top: calc(var(--nav-h) + 3rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .top-aside { animation: fade-up 1s var(--ease) 0.6s both; }
}

/* ── Building blocks for the inner pages ──────────────────────────────── */

.h2 { font-size: clamp(2rem, 4.6vw, 4.25rem); font-weight: 700; letter-spacing: -0.046em; line-height: 0.98; text-wrap: balance; }
.h3 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); font-weight: 600; letter-spacing: -0.036em; line-height: 1.08; text-wrap: balance; }
.quiet { color: var(--soft); }
.space { margin-top: clamp(3rem, 7vw, 6rem); }
.space-lg { margin-top: var(--pad); }

/* A heading that holds still while its column of content scrolls past. */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split-head { position: sticky; top: calc(var(--nav-h) + 2rem); display: grid; gap: 0.9rem; justify-items: start; }
.split-head .note { max-width: 30ch; color: var(--soft); }
@media (max-width: 62rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-head { position: static; }
}

/* Long-form text. */
.prose { max-width: 41rem; font-size: clamp(1.06rem, 1.25vw, 1.2rem); line-height: 1.62; }
.prose > * + * { margin-top: 1.05em; }
.prose > h3 { margin-top: 2.2em; }
.prose > h3:first-child { margin-top: 0; }
.prose .lead { font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 500; letter-spacing: -0.026em; line-height: 1.28; text-wrap: pretty; }
.prose ul { display: grid; gap: 0.45em; }
.prose ul li { position: relative; padding-left: 1.6em; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 0.85em; height: 2px; background: var(--amber); }
/* Scripture references sit back a little from the sentence around them. */
.ref { color: var(--soft); font-size: 0.9em; }

/* A serif line set large, for the sentence a section turns on. */
.pull { max-width: 17em; font: italic 400 clamp(2rem, 5.2vw, 4.75rem)/1.04 var(--serif); letter-spacing: -0.032em; text-wrap: balance; }

/* Big rows: a name on the left, the detail on the right. */
.rows > li { border-top: 1px solid var(--rule); }
.rows > li:last-child { border-bottom: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(0.75rem, 4vw, 4rem); align-items: baseline;
  padding-block: clamp(1.4rem, 2.6vw, 2.25rem);
}
.row-name { font-size: clamp(1.6rem, 3.2vw, 2.9rem); font-weight: 600; letter-spacing: -0.046em; line-height: 1.02; text-wrap: balance; }
.row-name small { display: block; margin-top: 0.55rem; font: italic 400 1.15rem/1.2 var(--serif); letter-spacing: 0; color: var(--soft); }
.row-text { max-width: 56ch; font-size: 1.08rem; line-height: 1.6; color: var(--soft); }
.row-text > * + * { margin-top: 0.8em; }
.row-text strong { color: var(--ink); font-weight: 600; }
.sheet--night .row-text strong, .sheet--wall .row-text strong { color: var(--bone); }
@media (max-width: 48rem) {
  .row { grid-template-columns: minmax(0, 1fr); }
}

/* A numbered path, for things that really do happen in order. */
.path { counter-reset: path; }
.path > li {
  counter-increment: path;
  display: grid; grid-template-columns: clamp(2.75rem, 7vw, 6.5rem) minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(0.75rem, 3vw, 3rem); align-items: baseline;
  padding-block: clamp(1.4rem, 2.6vw, 2.25rem); border-top: 1px solid var(--rule);
}
.path > li:last-child { border-bottom: 1px solid var(--rule); }
.path > li::before { content: counter(path); font: italic 400 clamp(1.9rem, 3.6vw, 3.2rem)/1 var(--serif); color: var(--accent); }
@media (max-width: 48rem) {
  .path > li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .path > li > .row-text { grid-column: 2; }
}

/* A photograph beside a few paragraphs. Add .feature--flip to swap sides. */
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.75rem, 5.5vw, 6rem); align-items: center; }
.feature + .feature { margin-top: clamp(4rem, 9vw, 8rem); }
.feature--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature--flip > .feature-media { order: 2; }
.frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
/* The photo is a little taller than its frame, so it has room to drift as the page scrolls. */
.frame img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; transform: translate3d(0, calc(var(--py, 0) * -6%), 0); }
.frame--wide { aspect-ratio: 2.4 / 1; }
.frame--tall { aspect-ratio: 4 / 5; }
/* For a photo that must not be cropped or moved. */
.frame--still { aspect-ratio: 16 / 9; }
.frame--still img { top: 0; height: 100%; transform: none; }
.feature-media figcaption, .caption { margin-top: 0.8rem; font: italic 400 1.05rem/1.3 var(--serif); color: var(--soft); }
.feature-body { display: grid; gap: 1.1rem; justify-items: start; }
.feature-body p { max-width: 46ch; font-size: 1.1rem; line-height: 1.6; color: var(--soft); }
.feature-body p.aside { font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.25; }
@media (max-width: 62rem) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature--flip > .feature-media { order: 0; }
}
@media (max-width: 48rem) {
  .frame--wide { aspect-ratio: 3 / 2; }
}

/* A mosaic of photographs. The g- classes set how many of 12 columns each takes. */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(0.6rem, 1.4vw, 1.25rem); }
.gallery > * { grid-column: span 4; }
.gallery > .g-3 { grid-column: span 3; }
.gallery > .g-5 { grid-column: span 5; }
.gallery > .g-6 { grid-column: span 6; }
.gallery > .g-7 { grid-column: span 7; }
.gallery > .g-8 { grid-column: span 8; }
.shot { position: relative; height: clamp(15rem, 31vw, 29rem); border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); transition: transform 1.6s var(--ease); }
.shot:hover img { transform: scale(1.05); }
.shot figcaption {
  position: absolute; inset: auto 0 0 0; padding: 3rem 1.1rem 0.95rem;
  background: linear-gradient(to top, rgb(0 0 0 / 0.66), rgb(0 0 0 / 0));
  color: var(--bone); font: italic 400 1.08rem/1.2 var(--serif);
}
@media (max-width: 48rem) {
  .gallery > * { grid-column: span 6; }
  .gallery > .g-7, .gallery > .g-8, .gallery > .g-5, .gallery > .g-6 { grid-column: span 12; }
  .shot { height: clamp(11rem, 58vw, 22rem); }
}
/* Things the church used to do: the photographs are quieter. */
.past .shot img { filter: saturate(0.5) sepia(0.14) contrast(0.96); }
.past .shot:hover img { filter: none; }

/* Photo tiles with a title and a sentence over them. */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(0.75rem, 1.6vw, 1.5rem); }
.tile {
  position: relative; grid-column: span 2; display: grid; align-items: end;
  min-height: clamp(20rem, 34vw, 31rem);
  border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: var(--night); color: var(--bone); text-decoration: none;
}
.tile--wide { grid-column: span 3; }
.tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); transition: transform 1.6s var(--ease); }
.tile:hover img { transform: scale(1.06); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(23 17 16 / 0.94), rgb(23 17 16 / 0.4) 52%, rgb(23 17 16 / 0.05)); }
.tile-body { padding: clamp(1.1rem, 2.2vw, 1.75rem); }
.tile h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }
.tile p { max-width: 42ch; margin-top: 0.5rem; color: rgb(244 240 232 / 0.86); }
@media (max-width: 62rem) {
  .tile, .tile--wide { grid-column: span 3; }
}
@media (max-width: 40rem) {
  .tile, .tile--wide { grid-column: span 6; min-height: 19rem; }
}

/* Portraits. Black and white until you point at one, so mixed photos sit together. */
.leaders { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1.75rem, 3vw, 2.75rem) clamp(0.9rem, 2vw, 1.75rem); }
.leaders--few { grid-template-columns: repeat(2, minmax(0, 18rem)); }
.leader-photo { aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--night-2); }
.leader-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1) contrast(1.04); transition: filter 0.7s, transform 1.4s var(--ease); }
.leader:hover img { filter: none; transform: scale(1.04); }
.leader h3 { margin-top: 0.9rem; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
.leader p { margin-top: 0.2rem; color: var(--soft); }
@media (max-width: 62rem) {
  .leaders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leader h3 { font-size: 1.25rem; }
  .leader p { font-size: 0.95rem; line-height: 1.35; }
}

/* Three short columns. */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.75rem, 4vw, 4rem); }
.trio > * { padding-top: 1.3rem; border-top: 2px solid currentColor; }
.trio p { margin-top: 0.85rem; line-height: 1.62; color: var(--soft); }
@media (max-width: 62rem) {
  .trio { grid-template-columns: minmax(0, 1fr); }
}

/* Questions that open. */
.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: 1.5rem;
  padding-block: clamp(1.1rem, 2vw, 1.6rem);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.12;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 1.05rem; height: 1.05rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 0.45s var(--ease);
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details > div { max-width: 58ch; padding-bottom: 1.6rem; font-size: 1.1rem; line-height: 1.6; color: var(--soft); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { padding: 0.42rem 0.95rem; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.98rem; font-weight: 500; }

/* A video that only loads from YouTube once someone presses play. */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: none; color: var(--bone); cursor: pointer; }
.video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: transform 1.6s var(--ease), opacity 0.4s; }
.video-poster:hover img { transform: scale(1.04); opacity: 0.95; }
.video-poster .play-icon { position: relative; width: 5rem; height: 5rem; }
.video-poster:hover .play-icon { transform: scale(1.12); }
.video-label { position: absolute; left: 1.25rem; bottom: 1.05rem; font: italic 400 1.15rem/1.2 var(--serif); text-shadow: 0 1px 12px rgb(0 0 0 / 0.6); }

/* Where to next: two or three large links at the end of a page. */
.onward { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: clamp(0.75rem, 1.6vw, 1.5rem); }
.onward a {
  display: grid; align-content: space-between; gap: 2.5rem;
  min-height: 11.5rem; padding: clamp(1.2rem, 2.4vw, 1.9rem);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none;
  transition: background-color 0.4s, color 0.4s;
}
.sheet--paper .onward a { background: var(--stone); }
.onward a:hover { background: var(--ink); color: var(--bone); }
.sheet--night .onward a:hover, .sheet--wall .onward a:hover { background: var(--amber); color: var(--ink); }
.sheet--night .onward small, .sheet--wall .onward small { color: var(--mute); }
.onward small { font: italic 400 1.15rem/1.2 var(--serif); color: var(--soft); transition: color 0.4s; }
.onward a:hover small { color: var(--mute-dark); }
.onward strong { font-size: clamp(1.7rem, 2.9vw, 2.5rem); font-weight: 700; letter-spacing: -0.046em; line-height: 1; }
@media (max-width: 40rem) {
  .onward a { min-height: 0; gap: 1.25rem; }
}

/* Something from another website, set into the page. */
.embed { min-height: 34rem; border-radius: var(--radius); overflow: hidden; background: #fff; }
.embed iframe { display: block; width: 100%; border: 0; } /* the provider's script sets the height */
/* The plain frame used when a page is opened as a file. It is a fixed height,
   and it is pulled up a little to hide two stray characters at the top of the
   provider's page. */
.embed iframe.embed-plain { height: 84rem; margin-top: -30px; }
/* The contact form. Name and email sit side by side when there is room. */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1.25rem; max-width: 46rem; margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.form-trap { display: none; }
.field { display: grid; gap: 0.5rem; align-content: start; }
.field--wide, .form-foot { grid-column: 1 / -1; }
.field label { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.field input, .field textarea {
  display: block; width: 100%; padding: 0.95rem 1.1rem;
  border: 1px solid rgb(27 21 19 / 0.5); border-radius: 0.85rem;
  background: var(--paper); color: var(--ink);
  font: inherit; line-height: 1.4;
  transition: border-color 0.25s, background-color 0.25s;
}
.field textarea { min-height: 11rem; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--ink); border-radius: 0.85rem; background: #fff; outline-offset: 2px; }
/* Red only after someone has typed something that will not do. */
.field input:user-invalid, .field textarea:user-invalid { border-color: #a3271d; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.5rem; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.form-status { flex: 1 1 16rem; color: var(--soft); }
.form-status:empty { display: none; }
.form-status.is-error { color: #8f2317; font-weight: 500; }
.form-done { display: grid; gap: 0.9rem; justify-items: start; max-width: 36rem; margin-top: clamp(1.75rem, 3vw, 2.5rem); outline: none; }
.form-again { padding: 0; border: 0; background: none; cursor: pointer; }
@media (max-width: 34rem) {
  .form { grid-template-columns: minmax(0, 1fr); }
}
/* A marked gap, for something that still has to be supplied. */
.gap-note { padding: clamp(1.25rem, 3vw, 2rem); border: 2px dashed #c9a227; border-radius: var(--radius); background: #fff4c4; color: #3a2c00; }
.gap-note strong { display: block; margin-bottom: 0.4rem; font-size: 1.2rem; letter-spacing: -0.02em; }

/* The card that says whether worship is streaming right now. */
.live-card {
  display: grid; gap: 0.35rem; justify-items: start;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid var(--rule); border-radius: var(--radius);
}
.live-card .next-what { font-size: clamp(1.7rem, 2.5vw, 2.4rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance; }
.live-card .next-label { color: var(--soft); }
.live-card .next-count { color: var(--soft); }
.live-card .btn { margin-top: 1.1rem; }

/* ── Footer ───────────────────────────────────────────────────────────── */

.foot { position: relative; padding-block: clamp(3rem, 6vw, 5rem) 1.5rem; background: var(--night); color: var(--bone); overflow: clip; isolation: isolate; }
.foot-bg { position: absolute; inset: 0; z-index: -1; }
.foot-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; opacity: 0.6; }
.foot-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--night) 0%, rgb(23 17 16 / 0.55) 55%, rgb(23 17 16 / 0.2)); }

.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.5rem clamp(2rem, 6vw, 5.5rem); }
.foot-nav ul, .foot-social { display: grid; gap: 0.55rem; align-content: start; }
.foot-h { margin: 0 0 0.9rem; font: italic 400 1.15rem/1.2 var(--serif); color: var(--mute-dark); }
.foot a[aria-current] { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--amber); }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--amber); }
.foot-nav a { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.02em; }
.foot-social { color: var(--mute-dark); text-align: right; }
/* The bulletin sign-up sits between the page links and the social links. */
.foot-news { display: grid; gap: 0.9rem; justify-items: start; align-content: start; max-width: 19rem; }
.foot-news .foot-h { margin: 0; }
.foot-news p { color: var(--mute-dark); }
.foot .btn:hover { text-decoration: none; }

.foot-word-wrap { margin-top: clamp(4rem, 12vw, 11rem); }
.foot-word {
  display: inline-block; white-space: nowrap; margin-left: -0.035em;
  font-size: 14.4vw; font-weight: 800; letter-spacing: -0.06em; line-height: 0.8;
}
.foot-base { display: flex; flex-wrap: wrap; gap: 0.2rem 1.75rem; margin-top: 1.6rem; font-size: 0.9rem; color: var(--mute-dark); }
@media (max-width: 44rem) {
  .foot-social { text-align: left; }
}

/* ── Reduced motion: everything is simply there ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .hero-media, .hero-body, .scope-wrap, .visit-frame img, .frame img, .scope-slide img { transform: none !important; }
  .hero-body { opacity: 1; }
  .marquee-track { display: block; width: auto; }
  .marquee-group { flex-wrap: wrap; white-space: normal; font-size: clamp(2rem, 6vw, 4.5rem); padding-inline: var(--gutter); }
}
