/* =====================================================================
   INDEX · NIVEL A · relato en siete escenas
   Modo base: todo se lee en orden, sin movimiento al desplazarse.
   Modo activo (.es-activo): lo añade index.js salvo que el visitante pida "reducir movimiento";
   entonces las escenas 2, 3 y 4 se quedan fijas y avanzan por pasos al desplazarse.
   ===================================================================== */
.relato { background: var(--azul-950); color: var(--blanco); }
.escena { position: relative; }
.escena__fondo { position: absolute; inset: 0; overflow: hidden; background: var(--azul-900); }
.escena__imagen { width: 100%; height: 100%; object-fit: cover; }
.escena__velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(7 26 49 / 0.55), rgb(7 26 49 / 0.35) 40%, rgb(7 26 49 / 0.85)); }
.escena__contenido { position: relative; z-index: 1; }
.escena__etiqueta { font-size: var(--t-s); font-weight: 600; color: var(--ocre-300); margin-bottom: var(--e-3); }
.escena__titulo { font-size: var(--t-2xl); max-width: 16ch; margin-bottom: var(--e-5); }
.escena__frase { font-family: var(--fuente-titulo); font-size: var(--t-l); max-width: 30ch; margin-bottom: var(--e-4); }
.escena__texto { font-size: var(--t-m); max-width: 36rem; color: #d7e0ec; }

/* ---------- Escena 1 · Portada ---------- */
.escena--portada { min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; padding: calc(var(--alto-cabecera) + var(--e-6)) 0 var(--e-7); }
.escena--portada .escena__fondo { background: linear-gradient(to top, var(--ocre-500) 0%, #8a4f2a 16%, var(--azul-700) 52%, var(--azul-950) 100%); }
.escena--portada:not(.portada--con-foto) .escena__fondo::before,
.escena--portada:not(.portada--con-foto) .escena__fondo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; }
.escena--portada:not(.portada--con-foto) .escena__fondo::before {
  height: 46%; background: var(--azul-700); opacity: 0.55;
  clip-path: polygon(0 62%, 10% 40%, 21% 55%, 35% 18%, 47% 44%, 60% 26%, 73% 52%, 86% 30%, 100% 56%, 100% 100%, 0 100%);
}
.escena--portada:not(.portada--con-foto) .escena__fondo::after {
  height: 30%; background: var(--azul-950);
  clip-path: polygon(0 70%, 14% 46%, 28% 64%, 43% 34%, 57% 60%, 71% 40%, 85% 62%, 100% 44%, 100% 100%, 0 100%);
}
.portada__interior { position: relative; z-index: 1; }
.portada__saludo { color: var(--ocre-300); font-weight: 700; margin-bottom: var(--e-3); }
.portada__saludo span { color: #d7e0ec; font-weight: 400; }
.portada__titulo { font-size: var(--t-3xl); line-height: 0.98; max-width: 11ch; margin-bottom: var(--e-4); }
.portada__texto { font-size: var(--t-m); max-width: 30rem; color: #e6edf6; }
.portada__desliza { display: inline-flex; align-items: center; gap: var(--e-2); margin-top: var(--e-6); color: #fff; text-decoration: none; font-weight: 600; }
.portada__desliza:hover { color: var(--ocre-300); }
.icono--abajo { rotate: 90deg; animation: bajar 1.8s ease-in-out infinite; }
@keyframes bajar { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }

/* Cuenta regresiva del culto */
.culto { margin-top: var(--e-6); display: inline-grid; gap: var(--e-2); padding: var(--e-4) var(--e-5); background: rgb(7 26 49 / 0.62); border: 1px solid rgb(252 248 241 / 0.25); border-radius: var(--r-m); backdrop-filter: blur(6px); }
.culto__titulo { margin: 0; font-family: var(--fuente-titulo); font-size: var(--t-m); }
.culto__subtitulo { margin: 0; color: #d7e0ec; font-size: var(--t-s); }
.culto__reloj { display: flex; gap: var(--e-4); }
.culto__bloque { display: grid; justify-items: center; min-width: 3.25rem; }
.culto__bloque span { font-family: var(--fuente-titulo); font-size: var(--t-xl); line-height: 1; font-variant-numeric: tabular-nums; }
.culto__bloque small { font-size: var(--t-xs); color: var(--ocre-300); }
.culto__vivo { justify-self: start; }

/* ---------- Escenas con pasos (2, 3 y 4): modo base ---------- */
.escena--pin .escena__pin { position: relative; min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--alto-cabecera) + var(--e-6)) var(--e-7); }
.pasos { display: grid; gap: var(--e-4); }
.paso { margin: 0; font-family: var(--fuente-titulo); font-size: var(--t-l); max-width: 28ch; }
.paso--hecho { max-width: 38rem; border-left: 3px solid var(--acento); padding-left: var(--e-4); }
.paso--hecho p { margin: 0 0 var(--e-2); font-family: var(--fuente-texto); font-size: var(--t-base); color: #e6edf6; }
.paso--hecho footer { font-family: var(--fuente-texto); font-size: var(--t-xs); color: var(--ocre-300); }
.escena--raices .escena__fondo { background: linear-gradient(165deg, var(--tierra-700), var(--azul-900) 70%); }

/* Escena 3 · El camino */
.escena--camino .escena__fondo { background: linear-gradient(160deg, var(--azul-900), var(--azul-950)); }
.camino__rejilla { display: grid; gap: var(--e-6); align-items: center; grid-template-columns: 1fr; width: min(100% - 2.5rem, var(--ancho)); }
@media (min-width: 62rem) { .camino__rejilla { grid-template-columns: 1.1fr 0.9fr; } }
.camino__mapa { margin: 0; }
.camino__mapa svg { width: 100%; max-height: 58svh; }
.camino__mapa figcaption { margin-top: var(--e-2); font-size: var(--t-xs); color: #b9c7d9; }
.camino__guia { fill: none; stroke: rgb(252 248 241 / 0.2); stroke-width: 2; stroke-dasharray: 3 8; stroke-linecap: round; }
.camino__ruta { fill: none; stroke: var(--ocre-300); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.camino__nodo { fill: var(--blanco); }
.camino__punto { fill: var(--ocre-500); stroke: var(--blanco); stroke-width: 2; }
.camino__etiqueta { fill: var(--blanco); font-family: var(--fuente-texto); font-size: 15px; font-weight: 700; }

/* Escena 4 · Guayaquil */
.escena--guayaquil .escena__fondo { background: linear-gradient(180deg, var(--azul-950), #0f3a5c 72%, var(--azul-900)); }
.escena--guayaquil .escena__contenido { display: grid; gap: var(--e-6); width: 100%; }
.escena--guayaquil .escena__contenido > .contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.galeria__pista { list-style: none; margin: 0; padding: 0 max(1.25rem, calc((100vw - var(--ancho)) / 2)); display: flex; gap: var(--e-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.galeria__foto { flex: 0 0 min(72vw, 22rem); aspect-ratio: 4 / 5; border-radius: var(--r-img); overflow: hidden; scroll-snap-align: start; background: linear-gradient(160deg, var(--azul-700), var(--tierra-700)); }
.galeria__foto img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Modo activo: las escenas se quedan fijas y avanzan por pasos ---------- */
.relato.es-activo .escena--portada .escena__fondo { transform: scale(calc(1 + var(--p, 0) * 0.1)); }
.relato.es-activo .portada__interior { transform: translateY(calc(var(--p, 0) * -3rem)); opacity: calc(1 - var(--p, 0) * 1.1); }
.relato.es-activo .escena--pin { height: calc(100svh * (var(--pasos, 2) + 1)); }
.relato.es-activo .escena--pin .escena__pin { position: sticky; top: 0; height: 100svh; min-height: 0; overflow: hidden; }
.relato.es-activo .escena--pin .escena__imagen { transform: scale(calc(1 + var(--p, 0) * 0.12)); }
.relato.es-activo .pasos { display: block; position: relative; min-height: 14rem; }
.relato.es-activo .paso { position: absolute; inset: 0 auto auto 0; opacity: 0; transform: translateY(var(--mov-dist)); pointer-events: none; transition: opacity var(--mov-dur) var(--ease), transform var(--mov-dur) var(--ease); }
.relato.es-activo [data-paso="0"] .paso[data-i="0"],
.relato.es-activo [data-paso="1"] .paso[data-i="1"],
.relato.es-activo [data-paso="2"] .paso[data-i="2"] { opacity: 1; transform: none; pointer-events: auto; }
.relato.es-activo .camino__ruta { stroke-dashoffset: calc(1 - var(--p, 0)); }
.relato.es-activo .galeria__pista { overflow: visible; scroll-snap-type: none; transform: translateX(calc(var(--desplazar, 0px) * -1)); will-change: transform; }

/* ---------- Escena 5 · Nuestra fe (luz) ---------- */
.escena--luz { background: var(--blanco); color: var(--tinta); }
.escena--luz .escena__etiqueta { color: var(--tierra-700); }
.escena--luz .escena__texto { color: var(--tinta-suave); }
.fe__rejilla { margin-top: var(--e-7); align-items: stretch; }
.fe__tarjeta { display: flex; flex-direction: column; gap: var(--e-3); }
.fe__tarjeta .boton { align-self: flex-start; margin-top: auto; }
.fe__meta { font-size: var(--t-s); color: var(--tinta-suave); }

/* ---------- Escena 6 · Nuestra misión ---------- */
.escena--oscura { background: var(--azul-900); }
.sedes__provincia { font-family: var(--fuente-texto); font-size: var(--t-s); font-weight: 700; color: var(--ocre-300); margin: var(--e-7) 0 var(--e-4); }
.sedes { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.sede { display: flex; flex-direction: column; overflow: hidden; background: var(--azul-950); border: 1px solid rgb(252 248 241 / 0.14); border-radius: var(--r-m); }
.sede__foto { aspect-ratio: 16 / 10; background: linear-gradient(160deg, var(--azul-700), var(--tierra-700)); }
.sede__foto img { width: 100%; height: 100%; object-fit: cover; }
.sede__cuerpo { display: grid; gap: var(--e-2); align-content: start; padding: var(--e-4) var(--e-5) var(--e-5); }
.sede__tipo { margin: 0; font-size: var(--t-xs); font-weight: 600; color: var(--ocre-300); }
.sede h4 { margin: 0; font-size: var(--t-m); }
.sede ul { list-style: none; margin: 0; padding: 0; font-size: var(--t-s); color: #d7e0ec; }
.sede a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ocre-300); }
.mision__donar { margin-top: var(--e-7); }

/* ---------- Escena 7 · Cierre ---------- */
.escena--cierre { text-align: center; background: radial-gradient(50rem 28rem at 50% 0%, rgb(196 138 44 / 0.28), transparent 70%), var(--azul-950); }
.cierre__interior { display: grid; justify-items: center; }
.cierre__logo { width: 5.5rem; height: 5.5rem; object-fit: contain; margin-bottom: var(--e-4); }
.escena--cierre .escena__titulo { max-width: none; }
.escena--cierre .escena__frase { max-width: 34rem; }
.cierre__versiculo { margin: var(--e-6) 0; padding: var(--e-5) 0; border-block: 1px solid rgb(252 248 241 / 0.2); font-family: var(--fuente-titulo); font-size: var(--t-l); }
.cierre__versiculo p { margin: 0 0 var(--e-2); }
.cierre__versiculo footer { font-family: var(--fuente-texto); font-size: var(--t-s); color: var(--ocre-300); }
.cierre__acciones { justify-content: center; margin-top: var(--e-5); }
.cierre__gracias { margin-top: var(--e-6); color: var(--ocre-300); }
.visitas { font-size: var(--t-s); color: #b9c7d9; }

/* ---------- Índice de escenas, compartir y aviso ---------- */
.escenas-indice { display: none; }
@media (min-width: 62rem) {
  .escenas-indice { display: block; position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%); z-index: 40; }
  .escenas-indice ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
  .escenas-indice a { display: block; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: rgb(252 248 241 / 0.6); box-shadow: 0 0 0 1px rgb(7 26 49 / 0.6); transition: transform 200ms ease, background-color 200ms ease; }
  .escenas-indice a:hover { transform: scale(1.3); }
  .escenas-indice a[aria-current="true"] { background: var(--ocre-500); transform: scale(1.35); }
}
.compartir {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: inline-flex; align-items: center; gap: var(--e-2);
  padding: 0.7rem 1.1rem; border: 0; border-radius: var(--r-pastilla); background: var(--blanco); color: var(--azul-900);
  font: inherit; font-weight: 700; box-shadow: var(--sombra-flotante); cursor: pointer;
  opacity: 0; transform: translateY(1rem); pointer-events: none; transition: opacity 240ms ease, transform 240ms var(--ease);
}
.compartir.es-visible { opacity: 1; transform: none; pointer-events: auto; }
.compartir:hover { background: var(--ocre-300); }
.aviso-flotante { position: fixed; left: 50%; bottom: 4.5rem; transform: translateX(-50%); z-index: 60; margin: 0; padding: 0.6rem 1rem; border-radius: var(--r-s); background: var(--azul-900); color: #fff; font-size: var(--t-s); box-shadow: var(--sombra-flotante); }
