/* ==========================================================================
   Trinity Friends Church — trinity3church.com
   Static stylesheet. No frameworks, no build step.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset, variable) ---------- */
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/worksans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --black: #000000;
  --white: #ffffff;
  --ink: #00131f;
  --text: #696969;
  --heading-light: #eeeffb;
  --muted-light: rgba(255, 255, 255, 0.72);
  --hairline: rgba(255, 255, 255, 0.14);
  --card-line: #eaeaeb;
  --shell: #f4f1e7;

  --radius: 16px;
  --wrap: 1290px;
  --gutter: 20px;

  --font-head: "Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-ui: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --section-y: clamp(56px, 7vw, 96px);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.16;
  margin: 0;
}

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

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #f85c3a;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--white);
  color: var(--black);
  padding: 12px 20px;
  font-family: var(--font-ui);
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
  vertical-align: -0.125em;
}

.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;
}

/* ==========================================================================
   Header
   ========================================================================== */
.topbar {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  padding: 14px 0 12px;
}

.topbar__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topbar__row + .topbar__row { margin-top: 9px; }

.topbar a,
.topbar .topbar__item > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.18s ease;
}
.topbar a:hover { opacity: 0.68; text-decoration: underline; text-underline-offset: 3px; }
.topbar .icon { font-size: 14px; opacity: 0.95; }

.masthead {
  background: var(--black);
  border-top: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 90;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.masthead.is-stuck {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
  padding-block: 14px;
  transition: min-height 0.3s ease, padding 0.3s ease;
}
.masthead.is-stuck .masthead__inner { min-height: 68px; padding-block: 8px; }
.masthead.is-stuck .masthead__title { font-size: clamp(20px, 3vw, 30px); }
.masthead.is-stuck .masthead__logo img { width: 40px; height: 40px; }

.masthead__title,
.masthead__logo img { transition: font-size 0.3s ease, width 0.3s ease, height 0.3s ease; }

.masthead__logo { flex: none; display: block; }
.masthead__logo img { width: 52px; height: 52px; object-fit: contain; }

.masthead__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(24px, 4.2vw, 48px);
  color: var(--heading-light);
  text-align: center;
  margin: 0;
  flex: 1 1 auto;
  letter-spacing: -0.01em;
}
.masthead__title a { text-decoration: none; }

.masthead__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--hairline);
  padding: 11px 20px;
  border-radius: 999px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.masthead__cta:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  padding: 17px 45px;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--white); color: var(--black); }

.btn--light {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn--light:hover { background: transparent; color: var(--white); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  height: min(78vh, 680px);
  min-height: 460px;
  overflow: hidden;
  background: #0b0b0b;
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: 0; }

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero__slide.is-active { opacity: 1; }

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Slow drift on the visible slide gives the banner some life. */
.hero__slide.is-active img { animation: heroDrift 14s ease-out forwards; }
@keyframes heroDrift {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

/* Gradient rather than a flat wash: keeps the photo readable at the top and
   anchors the text at the bottom-left. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.55) 38%, rgba(0,0,0,.2) 70%, rgba(0,0,0,.35) 100%),
    radial-gradient(120% 90% at 15% 85%, rgba(0,0,0,.55), transparent 60%);
}

.hero__caption {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: 40px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 9px 18px;
  border-radius: 999px;
  margin: 0 0 22px;
}

.hero__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f85c3a;
  box-shadow: 0 0 0 0 rgba(248, 92, 58, 0.7);
  animation: heroPulse 2.4s ease-out infinite;
}
@keyframes heroPulse {
  0%   { box-shadow: 0 0 0 0 rgba(248, 92, 58, 0.7); }
  70%  { box-shadow: 0 0 0 11px rgba(248, 92, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 92, 58, 0); }
}

.hero__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(29px, 4.7vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
.hero__title em {
  font-style: normal;
  color: var(--white);
  background: linear-gradient(to bottom, transparent 64%, rgba(248, 92, 58, 0.85) 64%, rgba(248, 92, 58, 0.85) 93%, transparent 93%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 34px 0 0;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.hero__dots {
  position: absolute;
  right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero__dots button {
  width: 30px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.hero__dots button[aria-current="true"] { background: var(--white); width: 48px; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 3;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 99px;
  display: grid;
  justify-items: center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 3px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.9);
  animation: heroScroll 1.9s ease-in-out infinite;
}
@keyframes heroScroll {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(12px); opacity: 0.2; }
}

/* ==========================================================================
   Marquee (scrolling photo strip)
   ========================================================================== */
.marquee {
  background: var(--black);
  overflow: hidden;
  padding-block: var(--tile-gap);
  --tile-gap: 14px;
  --marquee-duration: 60s;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-duration) linear infinite;
}
/* The strip keeps moving on hover. It still pauses on keyboard focus, so a
   tabbing visitor can actually reach the tile they are on. */
.marquee:focus-within .marquee__track { animation-play-state: paused; }

/* margin-right rather than `gap`: it keeps the cloned half exactly 50% of the
   track width, so the loop has no seam. */
.marquee__track > .tile { margin-right: var(--tile-gap); }

.marquee__track img {
  width: 233px;
  height: 350px;
  object-fit: cover;
  display: block;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ==========================================================================
   Clickable image tile (strip + galleries)
   ========================================================================== */
.tile {
  display: block;
  padding: 0;
  border: 0;
  background: #161616;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  flex: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.tile img { transition: transform 0.45s ease, opacity 0.28s ease; }

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='30' height='30' fill='%23fff'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24V232h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H232V120c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H120c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z'/%3E%3C/svg%3E") center / 30px no-repeat;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
.tile:hover, .tile:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section-y); }
.section--dark { background: var(--black); }
.section--shell { background: var(--shell); }

.section--dark h2,
.section--dark h3,
.section--dark .section__title { color: var(--heading-light); }
.section--dark p { color: var(--muted-light); }

/* Cards keep their own light-surface colours even inside a dark section. */
.section--dark .card__title { color: var(--ink); }
.section--dark .card p { color: var(--text); }
.section--dark .card__ref { color: #8a8a8a; }
.section--dark .card__icon { color: var(--black); }

.section__eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f85c3a;
  text-align: center;
  margin: 0 0 12px;
}

.section__title {
  font-size: clamp(30px, 4.2vw, 48px);
  text-align: center;
  margin: 0 0 14px;
  text-wrap: balance;
  letter-spacing: -0.015em;
}

.section__head .section__title::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  border-radius: 99px;
  background: #f85c3a;
  margin: 18px auto 0;
}

.section__lead {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
  font-size: 18px;
}

.section__head { margin-bottom: 44px; }

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 40px 34px 36px;
  text-align: center;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }

.card__icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.055);
  font-size: 26px;
  color: var(--black);
  margin-bottom: 18px;
}

.card__title {
  font-size: 24px;
  margin: 0 0 12px;
  color: var(--ink);
}

.card p { color: var(--text); font-size: 16px; }

.card__ref {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  color: #8a8a8a;
  font-style: italic;
  line-height: 1.6;
}
.card__ref a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.card__ref a:hover { color: var(--black); }

/* ---------- Centred panel (mission statement etc.) ---------- */
.panel {
  max-width: 1000px;
  margin: 64px auto 0;
  text-align: center;
}
.panel .section__title { margin-bottom: 18px; }
.panel p { font-size: 18px; margin-bottom: 30px; }

/* ==========================================================================
   Home — Bring the whole family / small groups
   ========================================================================== */
.family { text-align: center; }
.family p { font-size: 18px; max-width: 62ch; margin-inline: auto; }
.family .btn { margin-top: 28px; }

.groups { margin-top: 72px; text-align: center; }
.groups__intro { max-width: 62ch; margin: 0 auto 40px; font-size: 18px; }

.groups__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 900px;
  margin-inline: auto;
}

.groups__block {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px 28px;
  text-align: left;
}
.groups__block h3 { font-size: 22px; margin-bottom: 10px; }
.groups__block ul { margin: 0; padding-left: 1.1em; }
.groups__block li { margin-bottom: 4px; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.gallery figure { margin: 0; display: block; }
.gallery .tile { width: 100%; }
.gallery img { width: 100%; background: #1a1a1a; }

.gallery--tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gallery--tiles img { aspect-ratio: 3 / 4; object-fit: cover; }

/* Event flyers: landscape artwork, so let the columns flow to the count. */
.gallery.gallery--flyers { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.gallery--flyers img { aspect-ratio: 16 / 10; object-fit: cover; }

/* ==========================================================================
   Upcoming event
   ========================================================================== */
.event {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 42px;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 26px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
}

.event__media { width: 100%; border-radius: 14px; }
.event__media img { width: 100%; display: block; }

.event__body { min-width: 0; }

.event__date {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  padding: 10px 0 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, #f85c3a, #fe8a4f);
  color: #fff;
  margin: 0 0 20px;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(248, 92, 58, 0.32);
}
.event__date span {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.95;
}
.event__date strong {
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 600;
  margin-top: 5px;
}

.event__title {
  font-size: clamp(26px, 3.2vw, 40px);
  color: var(--heading-light);
  margin: 0 0 16px;
  letter-spacing: -0.015em;
}

.event__meta {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-family: var(--font-ui);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 8px;
}
.event__meta .icon { font-size: 15px; margin-top: 4px; color: #f85c3a; }

.event__blurb { margin: 16px 0 20px; font-size: 17px; }

.event__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 26px;
  padding: 0;
}
.event__tags li {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  padding: 7px 15px;
}

.btn__note {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 5px;
  opacity: 0.75;
}

/* Several events stacked in one section. */
.events { display: grid; gap: 26px; }

/* Alternate which side the flyer sits on, for rhythm down the page. */
.event--flip .event__media { order: 2; }
.event--flip .event__body { order: 1; }

/* Recurring events have a cadence instead of a single date. */
.event__repeat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 9px 18px 9px 14px;
  border-radius: 999px;
  background: rgba(248, 92, 58, 0.14);
  border: 1px solid rgba(248, 92, 58, 0.4);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff8b6b;
}
.event__repeat .icon { font-size: 15px; }

/* ==========================================================================
   Winners
   ========================================================================== */
.winners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.winner {
  position: relative;
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 38px 28px 32px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.winner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #f85c3a, #fec458);
}
.winner:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1); }

.winner__icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(248, 92, 58, 0.1);
  color: #f85c3a;
  font-size: 28px;
  margin-bottom: 18px;
}

.winner__name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.winner__prize {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text);
  margin: 0;
}

/* ==========================================================================
   What We Believe
   ========================================================================== */
.beliefs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.refs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.refs__list {
  margin: 20px 0 30px;
  padding-left: 1.2em;
  font-size: 15px;
  line-height: 1.8;
}
.refs__list li { margin-bottom: 8px; }
.refs img { border-radius: var(--radius); }

/* ==========================================================================
   The Good News
   ========================================================================== */
.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin-top: 0; }
.step h3 { font-size: 24px; margin-bottom: 12px; }
.step p { font-size: 17px; }

.checklist {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 680px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 17px;
}
.checklist .icon { font-size: 20px; margin-top: 4px; color: var(--black); }

.prayer {
  border-left: 4px solid var(--black);
  padding: 8px 0 8px 24px;
  margin: 30px 0;
  font-size: 18px;
  font-style: italic;
}

.section--dark .prayer { border-left-color: var(--heading-light); }
.section--dark .checklist .icon { color: var(--heading-light); }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: start;
}

.contact__title { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 16px; }
.contact__lead { font-size: 18px; margin-bottom: 30px; }

.contact__items { list-style: none; margin: 0; padding: 0; }
.contact__item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 0;
  border-top: 1px solid var(--card-line);
}
.contact__item:last-child { border-bottom: 1px solid var(--card-line); }
.contact__item .icon { font-size: 22px; color: var(--black); margin-top: 4px; }
.contact__item h3 { font-size: 18px; margin-bottom: 2px; }
.contact__item a { color: var(--text); text-decoration: none; }
.contact__item a:hover { color: var(--black); text-decoration: underline; }

.form-card {
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 40px;
}

.form-card h2 { font-size: 30px; margin-bottom: 10px; }
.form-card > p { margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 13px 16px;
  border: 1px solid #d9d9dc;
  border-radius: 8px;
  background: var(--white);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus { border-color: var(--black); }

fieldset.field { border: 0; padding: 0; margin-inline: 0; }
fieldset.field > legend {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
  padding: 0;
}

.choices { display: grid; gap: 10px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}
.choice input { margin-top: 5px; flex: none; accent-color: #000; }

.form-status {
  margin-top: 16px;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 8px;
}
.form-status[data-state="sending"] { background: #f1f3f5; color: #3a3a3a; }
.form-status[data-state="ok"] { background: #e8f6ef; color: #0d5c3f; }
.form-status[data-state="error"] { background: #fdecea; color: #8a1c11; }
.form-status:empty { display: none; }


/* ==========================================================================
   Page banner (interior pages)
   ========================================================================== */
.page-banner {
  background: var(--black);
  padding: clamp(46px, 6vw, 78px) 0;
  text-align: center;
}
.page-banner h1 {
  font-size: clamp(32px, 5vw, 56px);
  color: var(--heading-light);
  margin: 0;
}
.page-banner p {
  color: var(--muted-light);
  max-width: 60ch;
  margin: 14px auto 0;
  font-size: 18px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--black);
  color: var(--white);
  padding-top: clamp(50px, 6vw, 78px);
}

.footer__cols {
  display: grid;
  grid-template-columns: 256px 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 46px;
}

.footer__brand img { width: 96px; height: 96px; object-fit: contain; }

.footer__map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
  aspect-ratio: 16 / 9;
  background: #111;
  min-height: 190px;
}
.footer__map iframe { width: 100%; height: 100%; border: 0; display: block; }

.footer__heading {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--heading-light);
  margin: 0 0 18px;
}

.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer__list a {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 300;
  color: var(--white);
  text-decoration: none;
}
.footer__list a:hover { text-decoration: underline; text-underline-offset: 3px; opacity: 0.8; }
.footer__list .icon { font-size: 15px; }

.footer__bar {
  border-top: 1px solid var(--hairline);
  padding: 22px 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 300;
  color: var(--muted-light);
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  font-size: 17px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 60;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #222; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal]:nth-child(2) { transition-delay: 0.08s; }
[data-reveal]:nth-child(3) { transition-delay: 0.16s; }
[data-reveal]:nth-child(4) { transition-delay: 0.24s; }

/* Nothing should be hidden if the script never runs. */
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 54px);
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: zoom-out;
  animation: lbFade 0.25s ease;
}

.lightbox__figure {
  position: relative;
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: lbRise 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: #111;
}

.lightbox__caption {
  margin: 0;
  max-width: 72ch;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}
.lightbox__caption:empty { display: none; }

.lightbox__btn {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.06); }
.lightbox__btn[hidden] { display: none; }

.lightbox__close { top: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px); font-size: 34px; }
.lightbox__prev  { left: clamp(10px, 2.4vw, 30px); top: 50%; margin-top: -25px; padding-bottom: 4px; }
.lightbox__next  { right: clamp(10px, 2.4vw, 30px); top: 50%; margin-top: -25px; padding-bottom: 4px; }

.lightbox__count {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(10px, 2.4vw, 24px);
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
}

@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbRise { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }

body.lb-open { overflow: hidden; }

/* ==========================================================================
   Motion
   ========================================================================== */

/* Hero entrance: the caption rises in a short stagger on first paint. */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero__eyebrow { animation: riseIn 0.7s 0.1s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.hero__title   { animation: riseIn 0.8s 0.22s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.hero__actions { animation: riseIn 0.8s 0.38s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.hero__dots,
.hero__scroll  { animation: riseIn 0.8s 0.55s ease both; }

/* The marker highlight on GOD / JESUS / HOLY SPIRIT wipes in behind the text. */
@keyframes markerWipe { from { background-size: 0 100%; } to { background-size: 100% 100%; } }
.hero__title em {
  background-repeat: no-repeat;
  background-size: 100% 100%;
  animation: markerWipe 0.85s 0.75s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Buttons: a light sweep on hover. */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn > * { position: relative; z-index: 1; }

/* Top-bar and footer links: underline grows from the left. */
.topbar a,
.footer__list a { position: relative; }
.topbar a::after,
.footer__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.topbar a:hover::after,
.footer__list a:hover::after { transform: scaleX(1); }

/* The gradient bar on each winner card drifts. */
@keyframes winnerSheen { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
.winner::before {
  background: linear-gradient(90deg, #f85c3a, #fec458, #f85c3a);
  background-size: 200% 100%;
  animation: winnerSheen 5s linear infinite;
}

/* Section accent rule draws itself in with the heading. */
.section__head .section__title::after { transform-origin: center; transition: transform 0.6s 0.25s ease; }
.section__head[data-reveal]:not(.is-in) .section__title::after { transform: scaleX(0); }

/* The date chip on an upcoming event settles in. */
.event[data-reveal].is-in .event__date { animation: riseIn 0.6s 0.15s cubic-bezier(0.2, 0.8, 0.3, 1) both; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .grid--3, .beliefs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery.gallery--flyers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event { grid-template-columns: 1fr; gap: 28px; }
  .event--flip .event__media { order: 0; }
  .event--flip .event__body { order: 0; }
  .gallery--tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .refs { grid-template-columns: 1fr; gap: 32px; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .masthead__inner { flex-wrap: wrap; justify-content: center; text-align: center; min-height: 0; }
  .masthead__title { order: -1; flex-basis: 100%; }
  .topbar__row { gap: 8px 22px; font-size: 13px; }
}

@media (max-width: 760px) {
  .grid--3, .grid--2, .beliefs, .steps, .groups__grid, .winners { grid-template-columns: 1fr; }
  .gallery.gallery--flyers { grid-template-columns: 1fr; }
  .event { padding: 18px; border-radius: 16px; }
  .events { gap: 18px; }
  .event__repeat { font-size: 12px; padding: 8px 14px 8px 11px; }
  .event__tags li { font-size: 12px; padding: 6px 12px; }
  .masthead { position: static; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery--tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { height: min(74vh, 520px); min-height: 400px; }
  .hero__title { max-width: 17ch; }
  .hero__eyebrow { font-size: 10.5px; letter-spacing: 0.09em; padding: 8px 14px; margin-bottom: 18px; }
  .hero__actions { gap: 10px; margin-top: 26px; }
  .hero__actions .btn { flex: 1 1 100%; padding-inline: 20px; }
  .hero__actions .btn { width: auto; flex: 1 1 auto; }
  .hero__dots { right: 50%; transform: translateX(50%); bottom: 18px; }
  .hero__scroll { display: none; }
  .marquee { --tile-gap: 10px; }
  .marquee__track img { width: 165px; height: 248px; }
  .lightbox__prev, .lightbox__next { width: 44px; height: 44px; font-size: 26px; }
  .lightbox__img { max-height: calc(100vh - 210px); }
  .form-card { padding: 26px 20px; }
  .card { padding: 30px 24px; }
  .footer__cols { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .footer__brand img { margin-inline: auto; }
  .footer__list a { justify-content: center; }
  .groups__block { text-align: center; }
  .groups__block ul { list-style-position: inside; padding-left: 0; }
  .checklist { margin-inline: auto; }
}

@media (max-width: 480px) {
  .gallery--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { padding: 15px 28px; width: 100%; }
  .panel .btn, .family .btn { width: auto; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee__track { animation: none; transform: none; }
  .marquee { overflow-x: auto; }
  .hero__slide { transition: none; }
  .hero__slide.is-active img { animation: none; transform: none; }
  .hero__pulse, .hero__scroll span { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow, .hero__title, .hero__actions, .hero__dots, .hero__scroll,
  .hero__title em, .winner::before, .event .event__date { animation: none; }
  .hero__title em { background-size: 100% 100%; }
  .btn::after { display: none; }
  .topbar a::after, .footer__list a::after { display: none; }
  .section__head .section__title::after { transform: none; transition: none; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .marquee, .to-top, .hero__dots, .hero__scroll, .masthead__cta,
  .lightbox { display: none !important; }
  body { color: #000; }
  .section--dark, .footer, .masthead, .page-banner { background: #fff !important; color: #000 !important; }
  .section--dark h2, .section--dark h3, .page-banner h1, .footer__heading { color: #000 !important; }
  .section--dark p, .footer__bar { color: #333 !important; }
}
