/* ═══════════════════════════════════════════════════════════
   Iglesia Central Adventista — styles.css
   Design system: navy + gold, editorial layout, Gilroy display
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Tokens ─────────────────────────────────────────── */
:root {
  color-scheme: light;
  accent-color: #c8a54b;

  /* brand — taken from the steeple logo */
  --navy-900: #071528;
  --navy-800: #0b1c36;
  --navy-700: #12294f;
  --navy-600: #1b3a6b;
  --navy-500: #2a5490;
  --gold-600: #a8842f;
  --gold-500: #c8a54b;
  --gold-400: #ddc078;
  --gold-100: #f3e7c9;

  --paper:    #fffdf9;
  --cream:    #f6f1e8;
  --cream-2:  #ece4d6;
  --ink:      #14181f;
  --ink-2:    #3d454f;
  --muted:    #6b7480;
  --line:     rgba(11, 28, 54, .12);
  --line-light: rgba(255, 255, 255, .16);

  --font-display: 'Gilroy', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Gilroy', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --wrap: 1220px;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  /* Vertical rhythm for every section. Kept deliberately tight so the
     page reads as a few dense screens instead of a long scroll. */
  --sec-y: clamp(3rem, 5.5vw, 5rem);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --sh-sm: 0 1px 2px rgba(7, 21, 40, .05), 0 6px 16px -10px rgba(7, 21, 40, .22);
  --sh-md: 0 14px 40px -18px rgba(7, 21, 40, .30);
  --sh-lg: 0 34px 80px -30px rgba(7, 21, 40, .45);

  --ease: cubic-bezier(.22, .68, .28, 1);

  /* tiling film grain — keeps the large navy blocks from reading as flat ink */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* Applied through spare pseudo-elements on the dark sections; each one's
   .wrap is lifted above it so the grain never sits over the content. */
.week::after,
.scripture::after,
.ftr::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--grain);
  opacity: .05;
  pointer-events: none;
  z-index: 0;
}
.week .wrap,
.scripture .wrap,
.ftr .wrap { position: relative; z-index: 1; }

/* ── 2. Reset & base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Fallback only. script.js takes over in-page links and measures the header
     for real, because this can't: the header is 79px wide-screen, 61px on a
     phone and 93px around 1024px where it wraps. Sized here for the tallest
     of those so a no-JS jump still clears it. */
  scroll-padding-top: 116px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, .97rem + .16vw, 1.075rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.028em;
}

::selection { background: var(--gold-400); color: var(--navy-900); }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none;
}

.skip-link {
  position: fixed; top: -100px; left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--navy-800); color: #fff;
  padding: .8rem 1.4rem; border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

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

/* ── 3. Shared type & components ───────────────────────── */
.eyebrow {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: .85rem;
}
.eyebrow i {
  font-style: normal;
  font-size: .68rem;
  padding: .28rem .5rem;
  border: 1px solid currentColor;
  border-radius: 99px;
  letter-spacing: .08em;
  opacity: .85;
}
.eyebrow--light { color: var(--gold-400); }

.sec-head { max-width: 720px; margin-bottom: clamp(1.8rem, 3vw, 2.6rem); }
.sec-title {
  font-size: clamp(1.9rem, 1.25rem + 2.4vw, 3rem);
  margin-bottom: .65rem;
  text-wrap: balance;
}
.sec-lead {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 56ch;
  text-wrap: pretty;
}
.sec-head--light .sec-title { color: #fff; }
.sec-head--light .sec-lead { color: rgba(255, 255, 255, .68); }
.sec-head--split {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}

.statement {
  text-wrap: balance;
  font-size: clamp(1.6rem, 1.05rem + 2.2vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.12;
  max-width: 20ch;
}
.statement em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.04em;
  letter-spacing: -.01em;
  color: var(--gold-600);
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.005em;
  padding: .95rem 1.6rem;
  border-radius: 99px;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease),
              box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 1.05em; height: 1.05em; }

.btn--gold  { background: var(--gold-500); color: var(--navy-900); box-shadow: 0 10px 26px -12px rgba(168, 132, 47, .9); }
.btn--gold:hover { background: var(--gold-400); }
.btn--navy  { background: var(--navy-800); color: #fff; }
.btn--navy:hover { background: var(--navy-700); }
.btn--ghost { border-color: rgba(255, 255, 255, .38); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn--outline { border-color: var(--line); color: var(--ink); }
.btn--outline:hover { border-color: var(--navy-700); background: var(--navy-800); color: #fff; }
.btn--sm { padding: .62rem 1.1rem; font-size: .85rem; }
.btn--lg { padding: 1.1rem 2rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.link-underline {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--navy-700);
  padding-bottom: 3px;
  background-image: linear-gradient(var(--gold-500), var(--gold-500));
  background-size: 100% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .3s var(--ease), color .25s var(--ease);
}
.link-underline:hover { color: var(--gold-600); background-size: 40% 1.5px; }
.link-underline .ico { transition: transform .25s var(--ease); }
.link-underline:hover .ico { transform: translateX(4px); }

/* scroll progress */
.scroll-progress {
  position: fixed; inset: 0 auto auto 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  z-index: 1200;
  transition: width .1s linear;
}

/* ── 4. Header ─────────────────────────────────────────── */
.hdr {
  position: fixed; inset: 0 0 auto 0;
  z-index: 1000;
  padding: clamp(.6rem, 1.4vw, 1.1rem) 0;
  transition: background .35s var(--ease), box-shadow .35s var(--ease),
              padding .35s var(--ease), backdrop-filter .35s var(--ease);
}
.hdr__inner {
  width: 100%; max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}

.hdr.is-stuck {
  background: rgba(255, 253, 249, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -24px rgba(7, 21, 40, .5);
}

.brand { display: flex; align-items: center; gap: .75rem; margin-right: auto; }
/* the logo is navy + gold, so it needs to go monochrome-white
   while the header sits over the dark hero */
.brand__mark {
  width: 38px; height: auto; flex: none;
  filter: brightness(0) invert(1);
  transition: filter .35s var(--ease);
}
.hdr.is-stuck .brand__mark { filter: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.02rem;
  letter-spacing: -.02em;
  color: #fff;
  transition: color .35s var(--ease);
}
.brand__sub {
  font-size: .68rem; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, .6);
  transition: color .35s var(--ease);
}
.hdr.is-stuck .brand__name { color: var(--navy-800); }
.hdr.is-stuck .brand__sub { color: var(--muted); }

.hdr__nav { display: flex; gap: .3rem; }
.hdr__nav a {
  position: relative;
  padding: .5rem .8rem;
  font-size: .92rem; font-weight: 600;
  color: rgba(255, 255, 255, .82);
  border-radius: 99px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.hdr__nav a::after {
  content: ''; position: absolute;
  left: .8rem; right: .8rem; bottom: .28rem;
  height: 1.5px; background: var(--gold-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.hdr__nav a:hover { color: #fff; }
.hdr__nav a:hover::after, .hdr__nav a.is-current::after { transform: scaleX(1); }
.hdr.is-stuck .hdr__nav a { color: var(--ink-2); }
.hdr.is-stuck .hdr__nav a:hover, .hdr.is-stuck .hdr__nav a.is-current { color: var(--navy-800); }

.hdr__actions { display: flex; align-items: center; gap: .7rem; }

.live-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .85rem .45rem .7rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 99px;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .85);
  transition: all .3s var(--ease);
}
.hdr.is-stuck .live-pill { border-color: var(--line); color: var(--ink-2); }
.live-pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: .55;
  flex: none;
}
.live-pill.is-live {
  background: #d5372f; border-color: #d5372f; color: #fff;
}
.hdr.is-stuck .live-pill.is-live { background: #d5372f; border-color: #d5372f; color: #fff; }
.live-pill.is-live .live-pill__dot {
  background: #fff; opacity: 1;
  animation: pulse 1.7s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.hdr__toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: #fff;
}
.hdr.is-stuck .hdr__toggle { border-color: var(--line); color: var(--navy-800); }
.hdr__toggle .ico { width: 20px; height: 20px; }

/* ── 5. Drawer ─────────────────────────────────────────── */
.drawer {
  position: fixed; inset: 0;
  z-index: 1100;
  background: rgba(7, 21, 40, .55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.drawer.is-open { opacity: 1; }
.drawer__panel {
  position: absolute; inset: 0 0 0 auto;
  width: min(420px, 100%);
  background: var(--navy-800);
  color: #fff;
  padding: 1.4rem var(--gutter) 2rem;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .38s var(--ease);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__close {
  align-self: flex-end;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line-light); border-radius: 50%;
  color: #fff;
}
.drawer__nav { display: flex; flex-direction: column; margin-top: 1.5rem; }
.drawer__nav a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em;
  transition: color .2s var(--ease), padding-left .25s var(--ease);
}
.drawer__nav a span {
  font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; color: var(--gold-500);
}
.drawer__nav a:hover { color: var(--gold-400); padding-left: .4rem; }
.drawer__foot { margin-top: auto; padding-top: 1.6rem; }
.drawer__cta { margin-bottom: 1.2rem; }
.drawer__foot p { font-size: .85rem; color: rgba(255, 255, 255, .6); margin-bottom: 1rem; }
.drawer__social { display: flex; gap: .6rem; }
.drawer__social a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line-light); border-radius: 50%;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.drawer__social a:hover { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.drawer__social .ico { width: 18px; height: 18px; }

/* ── 6. Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  /* fills the device viewport; svh keeps mobile browser chrome from clipping it */
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  background: var(--navy-800);
  color: #fff;
  padding: clamp(6.5rem, 11vh, 8.5rem) 0 clamp(4rem, 8vh, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}

/* The church photo is the hero background. It is graded rather than erased:
   held back to a warm near-monochrome so it still reads as *this* building
   (brick, gable, steeple) instead of grey texture, then scrimmed hardest on
   the left where the headline sits. The building is framed right-of-centre
   so the steeple lands in the open column beside the copy. */
.hero__bg {
  position: absolute; inset: 0;
  z-index: -3;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 64% 62%;
  filter: grayscale(82%) sepia(16%) contrast(1.14) brightness(.82);
  opacity: .62;
  /* overscaled so the scroll parallax in script.js never exposes an edge */
  transform: scale(1.08);
  will-change: transform;
}
/* golden-hour bloom from the top right — the warmth the grade holds back,
   put back deliberately and only where there is no text */
.hero__bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 55% at 82% 12%, rgba(221, 192, 120, .22), transparent 68%);
  z-index: 1;
}
.hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 2;
  background:
    linear-gradient(102deg, rgba(7, 21, 40, .94) 0%, rgba(7, 21, 40, .8) 34%, rgba(7, 21, 40, .42) 66%, rgba(7, 21, 40, .2) 100%),
    linear-gradient(to bottom, rgba(7, 21, 40, .82) 0%, rgba(7, 21, 40, 0) 30%, rgba(7, 21, 40, .35) 72%, rgba(7, 21, 40, .92) 100%),
    /* vignette: pulls the corners down so the photo sits inside the frame */
    radial-gradient(ellipse 96% 88% at 50% 46%, transparent 42%, rgba(7, 21, 40, .55) 100%);
}
.hero::before {
  content: '';
  position: absolute; inset: -30% -10% auto -30%;
  height: 90%;
  background: radial-gradient(ellipse at 30% 40%, rgba(43, 84, 144, .45), transparent 62%);
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 5%, transparent 72%);
  opacity: .35;
  z-index: -1;
  pointer-events: none;
}

.hero__grid {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
}

/* Plain text, no badge — block flow so the phone-only <br> inside it works
   (a <br> in a flex container is inert). */
.hero__copy .eyebrow { display: block; }

/* Entrance: the hero is the only thing on screen at load, so it gets a real
   staggered reveal instead of the scroll-triggered one the sections use. */
.hero__copy > *,
.hero .nextcard {
  opacity: 0;
  animation: hero-in .9s var(--ease) both;
}
.hero__copy > *:nth-child(1) { animation-delay: .10s; }
.hero__copy > *:nth-child(2) { animation-delay: .18s; }
.hero__copy > *:nth-child(3) { animation-delay: .28s; }
.hero__copy > *:nth-child(4) { animation-delay: .36s; }
.hero__copy > *:nth-child(5) { animation-delay: .44s; }
.hero .nextcard { animation-delay: .52s; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.hero__title {
  text-wrap: balance;
  font-size: clamp(2.7rem, 1.4rem + 5.4vw, 5rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .98;
  margin-bottom: 1.1rem;
}
.hero__title-em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -.02em;
  color: var(--gold-400);
}

/* Rotating word. The host animates its width to the incoming word so
   "para ti." glides instead of snapping; script.js measures the width with
   the hidden ghost below, which carries the identical type. */
/* The width transition is deliberately the same length as rot-out: the host
   has finished resizing by the time the new word fades in, so the incoming
   word never overlaps "para ti.". */
.hero__rotator {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  transition: width .4s var(--ease);
}
.hero__rotator [data-rot-word] { display: inline-block; }
.hero__rotator [data-rot-word].is-out { animation: rot-out .4s var(--ease) forwards; }
.hero__rotator [data-rot-word].is-in  { animation: rot-in  .5s  var(--ease) both; }
.hero__rotator-ghost {
  position: absolute; left: 0; top: 0;
  visibility: hidden; pointer-events: none;
  white-space: nowrap;
}
@keyframes rot-out {
  to { opacity: 0; transform: translateY(-.32em); filter: blur(5px); }
}
@keyframes rot-in {
  from { opacity: 0; transform: translateY(.32em); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.hero__lead {
  font-size: clamp(1.02rem, .97rem + .3vw, 1.14rem);
  color: rgba(255, 255, 255, .8);
  max-width: 44ch;
  margin-bottom: 1.6rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.8rem; }

.hero__facts {
  display: flex; flex-wrap: wrap;
  gap: .9rem clamp(1.5rem, 3.5vw, 3rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-light);
}
.hero__facts dt {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-400);
  margin-bottom: .25rem;
}
.hero__facts dd { font-weight: 600; font-size: .98rem; }

/* next-service card — a pane of the hero itself, not a white card dropped on
   top of it: smoked glass, gold hairline, same type colours as the copy. */
.nextcard {
  position: relative;
  justify-self: end;
  width: min(340px, 100%);
  /* a touch more opaque than the rest of the glass: the photo now shows
     through strongest on this side of the hero */
  background:
    linear-gradient(165deg, rgba(27, 58, 107, .62), rgba(7, 21, 40, .74));
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  color: #fff;
  border: 1px solid var(--line-light);
  border-radius: var(--r-lg);
  padding: 1.3rem 1.35rem 1.2rem;
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
/* the gold rule reads as an accent on the glass rather than a card border */
.nextcard::before {
  content: '';
  position: absolute; inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), rgba(200, 165, 75, 0));
}
.nextcard__label {
  display: flex; align-items: center; gap: .5rem;
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-400);
  margin-bottom: .55rem;
}
.nextcard__pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-500); flex: none;
  animation: pulse-gold 2.4s infinite;
}
@keyframes pulse-gold {
  0%   { box-shadow: 0 0 0 0 rgba(200, 165, 75, .65); }
  70%  { box-shadow: 0 0 0 8px rgba(200, 165, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 165, 75, 0); }
}
.nextcard__name {
  font-family: var(--font-display);
  font-size: 1.28rem; font-weight: 800; letter-spacing: -.028em;
  line-height: 1.15;
  /* event titles off the calendar are longer than the service names */
  text-wrap: balance;
}
.nextcard__when { font-size: .88rem; color: rgba(255, 255, 255, .62); margin-bottom: 1rem; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.countdown__unit {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-sm);
  padding: .5rem .2rem .4rem;
  text-align: center;
}
.countdown__unit b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.22rem; font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.countdown__unit span {
  font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5); font-weight: 600;
}
/* is-now = the thing on the card has already begun, so there is nothing left
   to count down to. is-live is narrower: a service being broadcast. */
.nextcard.is-now .countdown { display: none; }
.nextcard.is-live::before { background: #d5372f; height: 3px; }
.nextcard__live {
  display: flex; align-items: center; gap: .55rem;
  background: #d5372f; color: #fff;
  border-radius: var(--r-sm);
  padding: .6rem .8rem;
  font-weight: 700; font-size: .9rem;
}
/* An event simply happening today is not a broadcast: same shape, in the
   card's own gold instead of the livestream red. */
.nextcard__live--soft {
  background: rgba(200, 165, 75, .16);
  border: 1px solid rgba(200, 165, 75, .42);
  color: var(--gold-400);
}
/* While we are on the air the bar is a link into the player, so it has to
   look pressable rather than like a label that happens to be red. */
.nextcard__live--go {
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.nextcard__live--go:hover,
.nextcard__live--go:focus-visible { background: #e8433a; transform: translateY(-1px); }
.nextcard__live-go {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-left: auto;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  opacity: .85;
}
.nextcard__live-go .ico { width: .9em; height: .9em; transition: transform .25s var(--ease); }
.nextcard__live--go:hover .nextcard__live-go .ico { transform: translateX(3px); }
.nextcard__link {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .95rem; padding-top: .85rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  width: 100%;
  font-size: .82rem; font-weight: 700;
  color: var(--gold-400);
  transition: color .25s var(--ease);
}
.nextcard__link:hover { color: #fff; }
.nextcard__link .ico { width: .95em; height: .95em; transition: transform .25s var(--ease); }
.nextcard__link:hover .ico { transform: translateX(3px); }

.hero__scroll {
  position: absolute;
  left: 50%; bottom: clamp(1rem, 3vh, 1.8rem);
  transform: translateX(-50%);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  color: rgba(255, 255, 255, .65);
  backdrop-filter: blur(6px);
  animation: bob 2.6s var(--ease) infinite;
  z-index: 2;
}
.hero__scroll:hover { color: #fff; border-color: rgba(255, 255, 255, .55); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
/* a short viewport has no room for the cue */
@media (max-height: 700px) { .hero__scroll { display: none; } }

/* ── 7. Marquee ────────────────────────────────────────── */
.marquee {
  position: relative;
  background: var(--gold-500);
  color: var(--navy-900);
  overflow: hidden;
  padding: .7rem 0;
  border-block: 1px solid rgba(7, 21, 40, .1);
}
/* Soft edges so words enter and leave instead of being cut off. Painted as
   two gradients rather than a mask over the whole bar: a mask makes the
   browser re-composite the moving strip every frame, and on a phone that
   showed up as a stutter whenever anything else touched the main thread. */
.marquee::before,
.marquee::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: clamp(28px, 6%, 90px);
  z-index: 1;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg,  var(--gold-500), rgba(200, 165, 75, 0)); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--gold-500), rgba(200, 165, 75, 0)); }

.marquee__track {
  display: flex; align-items: center;
  width: max-content;
}
/* The strip only starts moving once script.js has duplicated it and measured
   a duration from the loaded fonts. Before that it holds still instead of
   sliding at the placeholder speed and snapping when the real one lands —
   which is also the no-JS fallback: one still row, the same height. */
.marquee.is-ready .marquee__track {
  will-change: transform;
  animation: slide var(--marquee-dur, 48s) linear infinite;
}
/* Spacing is a trailing margin, NOT flex `gap`. The loop translates exactly
   -50%, and a gap only sits *between* children — so half the track is one
   half-gap narrower than one full repetition and the seam jumps every lap.
   A margin after every child (including the last) makes the halves identical. */
.marquee__track > * { margin-inline-end: 2.2rem; }
.marquee:hover .marquee__track { animation-play-state: paused; }
/* reduced motion: centred and wrapping, never a stranded left-aligned strip.
   Nothing scrolls in behind the last item, so its trailing ✦ is dropped. */
.marquee.is-static .marquee__track {
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.6rem;
  animation: none;
}
.marquee.is-static .marquee__track > * { margin-inline-end: 0; }
.marquee.is-static .marquee__track > :last-child { display: none; }
.marquee__track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__track i { font-style: normal; opacity: .55; font-size: .7rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ── 8. Quiénes somos ──────────────────────────────────── */
.about {
  background: var(--paper);
  padding-block: var(--sec-y);
}
.about__head { margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
  padding-bottom: clamp(1.8rem, 3.5vw, 2.8rem);
}
/* the rule above each pillar draws itself in when the block reveals */
.pillar { position: relative; padding-top: 1.1rem; }
.pillar::before {
  content: '';
  position: absolute; inset: 0 0 auto 0;
  height: 2px;
  background: var(--navy-800);
  transform: scaleX(0); transform-origin: left;
  transition: transform .9s var(--ease) .15s;
}
.pillar.is-in::before { transform: scaleX(1); }
.pillar__ico {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--gold-600);
  margin-bottom: .75rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.pillar:hover .pillar__ico { background: var(--navy-800); color: var(--gold-400); }
.pillar__ico .ico { width: 21px; height: 21px; }
.pillar h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.pillar p { color: var(--muted); font-size: .94rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat {
  position: relative;
  background: var(--cream);
  padding: clamp(1.15rem, 2vw, 1.55rem) clamp(1rem, 2vw, 1.5rem);
}
/* gold rule drawing in — a deliberate variation on the navy rule above each
   pillar, so the two bands read as the same system rather than a repeat */
.stat::before {
  content: '';
  position: absolute; inset: 0 0 auto 0;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--ease);
}
.stats.is-in .stat::before { transform: scaleX(1); }
.stats.is-in .stat:nth-child(2)::before { transition-delay: .09s; }
.stats.is-in .stat:nth-child(3)::before { transition-delay: .18s; }
.stats.is-in .stat:nth-child(4)::before { transition-delay: .27s; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
  margin-bottom: .3rem;
}
/* --muted on cream sits just under AA at this size; --ink-2 clears it */
.stat span { font-size: .82rem; color: var(--ink-2); font-weight: 500; line-height: 1.4; display: block; }

/* ── 9. Planea tu visita ───────────────────────────────── */
.visit {
  background: var(--cream);
  padding-block: var(--sec-y);
  border-block: 1px solid var(--line);
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  counter-reset: step;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.3rem 1.25rem;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.step:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-md);
  border-color: rgba(200, 165, 75, .55);
}
.step__n {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy-800); color: var(--gold-400);
  font-family: var(--font-display); font-weight: 800; font-size: .85rem;
  margin-bottom: .8rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.step p { font-size: .9rem; color: var(--muted); margin-bottom: .9rem; }
.step__tag {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: .45rem;
  align-self: flex-start;
  font-size: .76rem; font-weight: 700;
  letter-spacing: .02em;
  color: var(--gold-600);
  background: var(--gold-100);
  padding: .35rem .7rem;
  border-radius: 99px;
}
.step__tag .ico { width: 14px; height: 14px; }

.visit__cta {
  margin-top: clamp(1.5rem, 3vw, 2.2rem);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.2rem;
  background: linear-gradient(120deg, var(--paper) 0%, var(--gold-100) 100%);
  border: 1px solid rgba(200, 165, 75, .5);
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 2.5vw, 1.8rem) clamp(1.4rem, 3vw, 2rem);
}
.visit__cta p {
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(1rem, .97rem + .3vw, 1.15rem);
  letter-spacing: -.02em;
  max-width: 40ch;
}

/* ── 10. Horarios + En vivo (one section) ──────────────── */
.week {
  background: var(--navy-800);
  color: #fff;
  padding-block: var(--sec-y);
  position: relative;
  overflow: hidden;
}
.week::before {
  content: '';
  position: absolute; inset: auto -20% -60% auto;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(200, 165, 75, .16), transparent 66%);
}
.week .wrap { position: relative; }
.week .sec-head { margin-bottom: clamp(1.4rem, 2.5vw, 2rem); }
.week .sec-lead { max-width: 34ch; }

.week__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.week__slots { display: flex; flex-direction: column; gap: 1rem; }

.slot {
  border: 1px solid var(--line-light);
  border-radius: var(--r-lg);
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  background: rgba(255, 255, 255, .03);
  display: flex; flex-direction: column;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.slot:hover { border-color: rgba(200, 165, 75, .45); background: rgba(255, 255, 255, .055); }
.slot__day {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1rem;
}
.slot__day b {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em;
}
.slot__day > span {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-400);
}
.slot__day > .slot__badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem;
  border-radius: 99px;
  background: var(--gold-500); color: var(--navy-900);
  letter-spacing: .1em;
}
.slot__badge .ico { width: 14px; height: 14px; }

.slot__rows { display: flex; flex-direction: column; flex: 1; }
.slot__row {
  display: flex; align-items: center; gap: .85rem;
  padding: .6rem 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.slot__row:first-child { border-top: 0; padding-top: 0; }
.slot__row > .ico { width: 19px; height: 19px; color: var(--gold-400); }
.slot__row > div { flex: 1; min-width: 0; }
.slot__row strong { display: block; font-weight: 700; font-size: .98rem; letter-spacing: -.01em; }
.slot__row span { font-size: .82rem; color: rgba(255, 255, 255, .58); }
.slot__time {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--gold-400);
  white-space: nowrap;
}
.slot--online { border-color: rgba(200, 165, 75, .4); }
.slot__foot {
  display: flex; align-items: center; gap: .55rem;
  margin-top: .9rem; padding-top: .8rem;
  border-top: 1px solid var(--line-light);
  font-size: .86rem; color: rgba(255, 255, 255, .6);
}
.slot__foot .ico { width: 17px; height: 17px; color: var(--gold-400); }
.slot__foot a { color: var(--gold-400); font-weight: 600; }
.slot__foot a:hover { text-decoration: underline; }

/* ── 11. Reproductor en vivo ───────────────────────────── */
.week__live { display: flex; flex-direction: column; gap: .8rem; }

.player {
  border: 1px solid var(--line-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--navy-900);
}
.player__tabs {
  display: flex;
  gap: .25rem;
  padding: .4rem;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid var(--line-light);
  overflow-x: auto;
}
.ptab {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 99px;
  font-size: .86rem; font-weight: 700;
  font-family: var(--font-display);
  color: rgba(255, 255, 255, .62);
  white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease);
}
/* .ptab sets its own display, which would otherwise win over the UA rule for
   [hidden] — and hiding the dark platforms during a broadcast depends on it. */
.ptab[hidden] { display: none; }
.ptab:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.ptab.is-active { background: var(--gold-500); color: var(--navy-900); }
.ptab .ico { width: 17px; height: 17px; }

.player__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy-900);
  display: grid; place-items: center;
}
.player__stage iframe { width: 100%; height: 100%; border: 0; }

.poster {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .7rem;
  text-align: center;
  padding: 1.5rem;
  color: #fff;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(43, 84, 144, .55), transparent 62%),
    var(--navy-900);
}
.poster__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700;
  padding: .3rem .75rem;
  border: 1px solid var(--line-light);
  border-radius: 99px;
  color: var(--gold-400);
}
.poster__badge.is-live { background: #d5372f; border-color: #d5372f; color: #fff; }
.poster__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + .8vw, 1.7rem);
  font-weight: 800; letter-spacing: -.03em;
}
.poster__sub { color: rgba(255, 255, 255, .62); font-size: .9rem; max-width: 42ch; }
.poster__play {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-top: .2rem;
  padding: .75rem 1.4rem;
  border-radius: 99px;
  background: var(--gold-500); color: var(--navy-900);
  font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.poster__play:hover { transform: translateY(-2px); background: var(--gold-400); }
.poster__note { font-size: .76rem; color: rgba(255, 255, 255, .42); }

.live__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}
.linkcard {
  display: flex; align-items: center; gap: .7rem;
  padding: .75rem .9rem;
  border: 1px solid var(--line-light);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .03);
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.linkcard:hover {
  border-color: var(--gold-500);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-2px);
}
.linkcard > .ico { width: 20px; height: 20px; color: var(--gold-400); }
.linkcard span {
  display: flex; flex-direction: column; min-width: 0;
}
.linkcard b {
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 700; letter-spacing: -.02em; color: #fff;
}
.linkcard i {
  font-style: normal;
  font-size: .74rem;
  color: rgba(255, 255, 255, .55);
}

/* ── 12. Eventos: riel horizontal ──────────────────────── */
.agenda {
  background: var(--cream);
  padding-block: var(--sec-y);
  border-block: 1px solid var(--line);
}
.agenda__actions { display: flex; align-items: center; gap: .6rem; }

.rail__nav { display: flex; gap: .4rem; }
.rail__nav[hidden] { display: none; }
.rail__btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--navy-800);
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), opacity .25s var(--ease);
}
.rail__btn:hover:not(:disabled) { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.rail__btn:disabled { opacity: .32; cursor: default; }
.rail__btn .ico { width: 18px; height: 18px; }
.rail__btn-back { transform: scaleX(-1); }

/* The track is full-bleed but its first tile lines up with .wrap, so
   cards can scroll off the right edge instead of stopping at a gutter. */
.rail {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  /* without this the first tile snaps to the viewport edge and eats the gutter */
  scroll-padding-inline-start: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
/* right-edge fade that disappears once the rail is scrolled to the end */
.rail:not(.is-end) {
  mask-image: linear-gradient(to right, #000 calc(100% - 60px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 60px), transparent 100%);
}
.rail__track {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding-block: .35rem 1rem;
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}

.evcard {
  flex: 0 0 clamp(230px, 74vw, 275px);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 1.1rem 1.2rem 1rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.evcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
  border-color: rgba(200, 165, 75, .55);
}
.evcard__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: .6rem;
  margin-bottom: .8rem;
}
.evcard__date {
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--cream);
  padding: .4rem .55rem;
  line-height: 1;
}
.evcard__month {
  font-size: .62rem; letter-spacing: .13em; font-weight: 700;
  color: var(--gold-600); margin-bottom: .25rem;
}
.evcard__day {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em;
  color: var(--navy-800);
}
.evcard__badge {
  display: inline-flex; align-items: center;
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700;
  padding: .28rem .6rem;
  border-radius: 99px;
  background: var(--navy-800); color: var(--gold-400);
  white-space: nowrap;
}
.evcard__badge--today { background: #d5372f; color: #fff; }
.evcard--today .evcard__date { border-color: var(--gold-500); background: var(--gold-100); }

.evcard__title {
  font-size: 1.08rem;
  text-wrap: pretty;
  line-height: 1.2;
  margin-bottom: .5rem;
  /* long calendar titles stay two lines so every tile is the same height */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.evcard__when,
.evcard__loc {
  display: flex; align-items: center; gap: .4rem;
  font-size: .82rem; color: var(--muted);
  margin-bottom: .3rem;
}
.evcard__when .ico, .evcard__loc .ico { width: 14px; height: 14px; color: var(--gold-600); }
.evcard__loc { overflow: hidden; }
.evcard__loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evcard__add {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: auto; padding-top: .8rem;
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 700;
  color: var(--navy-700);
}
.evcard__add .ico { width: 14px; height: 14px; }
.evcard__add:hover { color: var(--gold-600); }

.evcard--msg { flex-basis: min(420px, 82vw); justify-content: center; }
.evcard__msgtitle {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1rem;
  letter-spacing: -.02em;
  color: var(--ink-2);
  margin-bottom: .6rem;
}
.evcard--skeleton {
  min-height: 190px;
  border-style: dashed;
  background: linear-gradient(100deg, var(--cream-2) 18%, var(--cream) 38%, var(--cream-2) 58%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -120% 0; } }
/* ── 13. Versículo ─────────────────────────────────────── */
.scripture {
  background: var(--navy-900);
  color: #fff;
  padding-block: clamp(2.6rem, 4.5vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.scripture::before {
  content: '“';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -42%);
  font-family: var(--font-serif);
  font-size: clamp(12rem, 24vw, 20rem);
  line-height: 1;
  color: rgba(200, 165, 75, .055);
  pointer-events: none;
  user-select: none;
}
.scripture .eyebrow { justify-content: center; }
.scripture blockquote { position: relative; max-width: 900px; margin-inline: auto; }
.scripture__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, .95rem + 1.3vw, 1.85rem);
  line-height: 1.36;
  letter-spacing: -.015em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.scripture__ref {
  font-family: var(--font-display);
  font-style: normal;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-400);
}

/* ── 14. Creencias ─────────────────────────────────────── */
.beliefs { background: var(--paper); padding-block: var(--sec-y); }
.accordion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  align-content: start;
  border-top: 1px solid var(--line);
  position: relative;
}
/* hairline down the gutter so the two columns read as one deliberate table */
.accordion::before {
  content: '';
  position: absolute; inset: 0 auto 0 50%;
  width: 1px;
  background: var(--line);
}
.belief { border-bottom: 1px solid var(--line); align-self: start; }
.belief summary {
  display: flex; align-items: center; gap: clamp(.8rem, 1.8vw, 1.2rem);
  padding: clamp(.85rem, 1.6vw, 1.1rem) 0;
  cursor: pointer;
  list-style: none;
  transition: color .25s var(--ease);
}
.belief summary::-webkit-details-marker { display: none; }
.belief summary:hover { color: var(--gold-600); }
.belief:not([open]) summary:hover .belief__ico {
  border-color: var(--gold-500);
  background: var(--gold-100);
  color: var(--gold-600);
}
.belief__n {
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 700;
  letter-spacing: .1em;
  color: var(--gold-600);
  flex: none;
}
.belief__t {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, .95rem + .55vw, 1.4rem);
  font-weight: 800; letter-spacing: -.032em;
}
.belief__ico {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform .3s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.belief[open] .belief__ico {
  transform: rotate(45deg);
  background: var(--navy-800); color: #fff; border-color: var(--navy-800);
}
.belief__ico .ico { width: 15px; height: 15px; }
.belief__body {
  padding: 0 0 1.1rem;
  max-width: 68ch;
}
.belief__body p { color: var(--muted); font-size: .93rem; }
.belief[open] .belief__body { animation: fadeDown .35s var(--ease); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } }
.beliefs__more { margin-top: 1.6rem; }

/* ── 15. Liderazgo ─────────────────────────────────────── */
.leaders {
  background: var(--cream);
  padding-block: var(--sec-y);
  border-block: 1px solid var(--line);
}
.leaders__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.leader {
  background: var(--paper);
  padding: clamp(1.3rem, 2.5vw, 1.9rem);
  display: flex; flex-direction: column;
  position: relative;
  transition: background .3s var(--ease);
}
.leader::before {
  content: '';
  position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold-500);
  transform: scaleY(0); transform-origin: top;
  transition: transform .4s var(--ease);
}
.leader:hover::before { transform: scaleY(1); }
.leader--alt { background: var(--navy-800); color: #fff; }
.leader__role {
  font-size: .66rem; letter-spacing: .17em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-600);
  margin-bottom: .6rem;
}
.leader--alt .leader__role { color: var(--gold-400); }
.leader__name {
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem);
  margin-bottom: .6rem;
}
.leader__bio { color: var(--muted); font-size: .92rem; margin-bottom: 1.1rem; }
.leader--alt .leader__bio { color: rgba(255, 255, 255, .68); }
.leader .link-underline { margin-top: auto; align-self: flex-start; font-size: .88rem; }
.leader--alt .link-underline { color: #fff; }
.leader--alt .link-underline:hover { color: var(--gold-400); }

/* ── 16. Ofrendar ──────────────────────────────────────── */
.give { background: var(--paper); padding-block: var(--sec-y); }
.give__panel {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 55%, var(--gold-600) 100%);
  border-radius: var(--r-xl);
  padding: clamp(1.6rem, 3.5vw, 2.8rem);
  color: var(--navy-900);
  position: relative;
  overflow: hidden;
}
.give__panel::before {
  content: '';
  position: absolute; inset: -50% -20% auto auto;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 65%);
  pointer-events: none;
}
.give__copy { position: relative; }
.give__copy .eyebrow { color: rgba(7, 21, 40, .62); }
.give__title {
  font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.4rem);
  margin-bottom: .7rem;
}
.give__copy > p { max-width: 48ch; margin-bottom: 1.2rem; color: rgba(7, 21, 40, .78); font-size: .97rem; }
.give__methods { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.1rem; }
.give__methods li {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .86rem; font-weight: 600;
  color: rgba(7, 21, 40, .72);
}
.give__methods .ico { width: 15px; height: 15px; }
.give__aside {
  position: relative;
  border-left: 2px solid rgba(7, 21, 40, .2);
  padding-left: clamp(1.2rem, 2.5vw, 2rem);
}
.give__verse {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 300;
  font-size: clamp(1.1rem, .95rem + .8vw, 1.5rem);
  line-height: 1.45;
  margin-bottom: .8rem;
}
.give__aside cite {
  font-family: var(--font-display);
  font-style: normal;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: rgba(7, 21, 40, .6);
}

/* ── 17. Contacto ──────────────────────────────────────── */
.contact {
  background: var(--cream);
  padding-block: var(--sec-y);
  border-top: 1px solid var(--line);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.infoblock { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.infoblock__label {
  display: flex; align-items: center; gap: .5rem;
  font-size: .68rem; letter-spacing: .17em; text-transform: uppercase;
  font-weight: 700; color: var(--muted);
  margin-bottom: .55rem;
}
.infoblock__label .ico { width: 15px; height: 15px; color: var(--gold-600); }
.infoblock__value {
  font-family: var(--font-display);
  font-size: 1.14rem; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.35;
}
.infoblock__value a:hover { color: var(--gold-600); }
.infoblock__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  font-size: .82rem; font-weight: 600;
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.chip:hover { border-color: var(--navy-700); background: var(--navy-800); color: #fff; }
.chip .ico { width: 14px; height: 14px; }

.map {
  margin-top: 1.2rem;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 8;
  background: var(--cream-2);
}
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(35%); }

.cform {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.3rem, 2.5vw, 1.9rem);
  box-shadow: var(--sh-sm);
}
.cform__title { font-size: 1.35rem; margin-bottom: .3rem; }
.cform__note { font-size: .86rem; color: var(--muted); margin-bottom: 1.2rem; }

.field { position: relative; margin-bottom: .8rem; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 1.45rem .95rem .6rem;
  font-size: .98rem;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field select { padding-top: 1.5rem; appearance: none; cursor: pointer; }
.field textarea { resize: vertical; min-height: 104px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold-500);
  background: var(--paper);
}
.field label {
  position: absolute;
  left: 1rem; top: .95rem;
  font-size: .95rem; color: var(--muted);
  pointer-events: none;
  transition: all .2s var(--ease);
}
.field label span { opacity: .6; }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field .field__static {
  top: .45rem;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-600);
}
.field select + label { top: .45rem; }
.field input.is-invalid, .field textarea.is-invalid { border-color: #d5372f; }

.cform__status {
  margin-top: 1rem;
  font-size: .9rem; font-weight: 600;
  min-height: 1.4em;
}
.cform__status.is-ok { color: #1f7a4d; }
.cform__status.is-err { color: #d5372f; }

/* ── 18. Footer ────────────────────────────────────────── */
.ftr {
  position: relative;
  background: var(--navy-900);
  color: rgba(255, 255, 255, .7);
  padding-top: clamp(2.2rem, 4vw, 3.2rem);
  overflow: hidden;
}
.ftr__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(1.5rem, 3vw, 2.4rem);
  padding-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
.ftr__mark { width: 40px; margin-bottom: .7rem; filter: brightness(0) invert(1); opacity: .92; }
.ftr__name {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.028em;
  color: #fff; margin-bottom: .35rem;
}
.ftr__addr { font-size: .88rem; margin-bottom: 1rem; }
.ftr__social { display: flex; gap: .55rem; }
.ftr__social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  transition: all .25s var(--ease);
}
.ftr__social a:hover { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.ftr__social .ico { width: 18px; height: 18px; }

.ftr__col { display: flex; flex-direction: column; gap: .55rem; }
.ftr__col h4 {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-400);
  margin-bottom: .6rem;
}
.ftr__col a { font-size: .92rem; transition: color .2s var(--ease); width: fit-content; }
.ftr__col a:hover { color: var(--gold-400); }
.ftr__col p { font-size: .89rem; }
.ftr__col p b { color: #fff; font-weight: 700; }

.ftr__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line-light);
  font-size: .82rem;
  color: rgba(255, 255, 255, .45);
}

/* ── 19. To-top ────────────────────────────────────────── */
.totop {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy-800); color: #fff;
  box-shadow: var(--sh-md);
  z-index: 900;
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: all .3s var(--ease);
}
.totop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { background: var(--gold-500); color: var(--navy-900); }
.totop .ico { width: 20px; height: 20px; }

/* ── 20. Reveal ────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Phone-only line breaks: the break is inert on wide screens, and the "·"
   that joins the two halves there disappears once the break takes over. */
.br-m { display: none; }

/* ── 21. Responsive ────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .nextcard { justify-self: start; }
  .week__grid { grid-template-columns: 1fr; }
  .accordion { grid-template-columns: 1fr; }
  .accordion::before { display: none; }
  .give__panel { grid-template-columns: 1fr; }
  .give__aside { border-left: 0; border-top: 2px solid rgba(7, 21, 40, .2); padding-left: 0; padding-top: 1.5rem; }
  .contact__grid { grid-template-columns: 1fr; }
  .ftr__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hdr__nav, .hdr__cta { display: none; }
  .hdr__toggle { display: flex; }
}

@media (max-width: 640px) {
  /* stacked columns already make the page long — tighten the rhythm further */
  :root { --sec-y: 2.4rem; }
  html { scroll-padding-top: 98px; }   /* header is 61px here — see above */
  .live-pill { display: none; }
  .brand__sub { display: none; }
  .br-m { display: block; }
  .sep-m { display: none; }

  /* hero still fills the screen, just with a tighter stack inside it */
  .hero { padding-top: 5.4rem; padding-bottom: 3.6rem; }
  .hero__grid { gap: 1.15rem; }
  /* The tracking is what made this line too wide for a phone: at .19em the
     church name wrapped on its own before reaching the break below it. */
  .hero__copy .eyebrow {
    margin-bottom: .6rem;
    font-size: .64rem;
    letter-spacing: .11em;
  }
  .hero__title { font-size: clamp(2.5rem, 11.5vw, 3.3rem); margin-bottom: .9rem; }
  /* On a phone the longest words ("esperanza", "descanso") would push
     "para ti." onto a third line and the headline height would jitter with
     every swap. Give the rotating word its own line so the block is always
     three lines tall, whatever word is showing. */
  .hero__rotator { display: block; }
  .hero__lead { font-size: .98rem; margin-bottom: 1.1rem; }
  .hero__cta { gap: .55rem; margin-bottom: 1.1rem; }
  .hero__cta .btn { flex: 1 1 8rem; padding: .85rem 1rem; font-size: .9rem; }
  /* Both facts stay side by side. An even split leaves ~150px per column,
     just short of "Escuela Sabática 9:15", so the times column gets the
     wider share and the values scale down with the viewport. */
  .hero__facts {
    display: grid; grid-template-columns: 1fr 1.25fr;
    gap: .7rem .6rem;
    padding-top: .85rem;
  }
  .hero__facts dd { font-size: clamp(.82rem, 3.4vw, .98rem); }

  /* The card is the one block in the hero built out of chrome — a label row,
     a name, a when, four countdown tiles and a footer link — so it is where
     a phone can win back real height. Everything below tightens it; the
     countdown tiles do most of the work by going to one line each. */
  .nextcard { width: 100%; padding: .85rem .95rem .8rem; border-radius: var(--r-md); }
  .nextcard__label { font-size: .62rem; letter-spacing: .13em; margin-bottom: .3rem; }
  .nextcard__name { font-size: 1.1rem; }
  .nextcard__when { font-size: .82rem; margin-bottom: .6rem; }
  /* Number and unit sit side by side instead of stacked: same four tiles,
     roughly half the height. "días" is the longest label and still leaves
     room to spare in a quarter of a 390px screen. */
  .countdown { gap: .3rem; }
  .countdown__unit {
    display: flex; align-items: baseline; justify-content: center; gap: .2rem;
    padding: .32rem .2rem;
  }
  .countdown__unit b { font-size: 1rem; }
  .countdown__unit span { font-size: .58rem; letter-spacing: .04em; }
  .nextcard__live { padding: .45rem .7rem; font-size: .85rem; }
  .nextcard__link { margin-top: .55rem; padding-top: .5rem; font-size: .78rem; }

  /* No edge fade on a phone: the bar is only three or four words wide, so the
     fade ate the words instead of softening them — and dropping it takes the
     two extra gradient layers off the scrolling strip. */
  .marquee::before, .marquee::after { display: none; }

  /* two-up beats a single long column on a phone */
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: .9rem 1rem; }
  .pillars { gap: 1.1rem; }

  .week__grid { gap: .8rem; }
  .player__stage { aspect-ratio: 4 / 3; }
  .live__links { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .linkcard { flex-direction: column; text-align: center; gap: .35rem; padding: .7rem .4rem; }
  .linkcard span { align-items: center; }
  .linkcard i { display: none; }
  .linkcard b { font-size: .82rem; }

  .agenda__actions { width: 100%; justify-content: space-between; }
  .visit__cta { flex-direction: column; align-items: flex-start; }
  .scripture::before { font-size: 11rem; }

  .ftr__top { grid-template-columns: 1fr 1fr; }
  .ftr__brand,
  .ftr__col:last-child { grid-column: 1 / -1; }
  .ftr__col { gap: .4rem; }
  .ftr__bottom { flex-direction: column; gap: .3rem; }
}

/* very narrow phones: keep the two-up grids from squeezing */
@media (max-width: 380px) {
  .live__links { grid-template-columns: 1fr; }
  .linkcard { flex-direction: row; text-align: left; padding: .7rem .9rem; }
  .linkcard span { align-items: flex-start; }
  .linkcard i { display: block; }
}

/* ── 22. Motion & print ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__copy > *, .hero .nextcard { opacity: 1; animation: none; }
  .hero__bg img { transform: scale(1.08); }
  .pillar::before, .stat::before { transform: scaleX(1); }
  .evcard--skeleton { animation: none; }
  /* the ticker can't scroll, so centre it rather than leaving a stranded
     left-aligned strip (this also holds if script.js never runs) */
  .marquee .marquee__track {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.6rem;
  }
  .marquee__track > * { margin-inline-end: 0; }
  .marquee__track > :last-child { display: none; }
}

@media print {
  .hdr, .drawer, .totop, .scroll-progress, .marquee, .player, .map, .rail__nav { display: none !important; }
  body { background: #fff; color: #000; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__copy > *, .hero .nextcard { opacity: 1; animation: none; }
}
