/* =========================================================
 * Feria Patronal Barranco Colorado 2026
 * Estilos: diseño móvil primero, luego tablet y escritorio.
 * ======================================================= */

/* ---------- Variables ---------- */
:root {
  /* Paleta de la feria */
  --azul: #0057E6;
  --azul-oscuro: #0047BD;   /* hover de botones */
  --marino: #071B50;
  --celeste: #00BCEB;
  --amarillo: #FFD600;
  --fucsia: #E6007E;
  --fucsia-texto: #B80064;  /* fucsia oscurecido para texto pequeño legible */
  --naranja: #FF7900;
  --blanco: #FFFCF5;
  --gris: #263247;

  --superficie: #FFFFFF;
  --borde: #E7E3D8;

  /* Tipografía inspirada en el logo:
     Lilita One ~ "BARRANCO / Colorado"; Kaushan Script ~ "Feria Patronal" */
  --font-display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-script: "Kaushan Script", "Brush Script MT", cursive;
  /* Titan One ~ letras gruesas y redondeadas de "Colorado" (contador) */
  --font-timer: "Titan One", "Lilita One", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(7, 27, 80, 0.08);
  --gutter: 16px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--blanco);
  color: var(--gris);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

h1, h2, h3 {
  margin: 0;
  color: var(--marino);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

p {
  margin: 0;
}

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

a {
  color: var(--azul);
}

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

[hidden] {
  display: none !important;
}

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

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn--primary {
  background: var(--azul);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 87, 230, 0.28);
}

.btn--primary:hover {
  background: var(--azul-oscuro);
}

@media (prefers-reduced-motion: no-preference) {
  .btn--primary:hover {
    transform: translateY(-2px);
  }
}

/* =========================================================
 * Portada: logo, fecha, cuenta regresiva y botón
 * Fondo: carrusel de fotos con una capa azul marino encima.
 * ======================================================= */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  /* Se ve mientras cargan las fotos o si faltan */
  background:
    radial-gradient(ellipse at 50% 38%, #1466F5 0%, #0A3CB0 32%, var(--marino) 70%),
    var(--marino);
  color: #fff;
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 2.6vh, 1.6rem);
  /* Abajo se reserva espacio para el indicador de desplazamiento */
  padding: 1.5rem var(--gutter) 5rem;
  text-align: center;
}

/* ---------- Indicador de desplazamiento ---------- */
.scroll-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 48px;
  min-height: 48px;
  padding: 0.25rem 0.75rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-shadow: 0 2px 0 var(--marino);
  opacity: 0.9;
}

.scroll-hint:hover {
  opacity: 1;
}

.scroll-hint:focus-visible {
  outline-color: #fff;
}

/* Flecha doble tipo chevron */
.scroll-hint__arrow {
  position: relative;
  width: 22px;
  height: 26px;
}

.scroll-hint__arrow::before,
.scroll-hint__arrow::after {
  content: "";
  position: absolute;
  left: 4px;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--amarillo);
  border-bottom: 3px solid var(--amarillo);
  rotate: 45deg;
}

.scroll-hint__arrow::before { top: 0; opacity: 0.55; }
.scroll-hint__arrow::after  { top: 9px; }

.hero__title {
  margin: 0;
}

/* El logo conserva su proporción: solo se limita su tamaño */
.hero__logo {
  width: min(92vw, 680px, calc(46svh * 1.29));
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(3, 12, 40, 0.6));
}

.hero__title-text {
  display: block;
  max-width: 14ch;
  color: #fff;
  font-size: clamp(2.25rem, 9vw, 4rem);
  font-weight: 400;
  text-shadow: 0 4px 0 var(--marino);
}

/* Fecha de inicio: cinta fucsia como la del logo */
.hero__date {
  padding: 0.45rem 1.4rem 0.5rem;
  border: 2px solid var(--amarillo);
  border-radius: 999px;
  background: linear-gradient(180deg, #FF2E9A 0%, var(--fucsia) 55%, #B0005F 100%);
  box-shadow: 0 4px 0 #5A0030, 0 10px 22px rgba(3, 12, 40, 0.45);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4.4vw, 1.5rem);
  line-height: 1.2;
  text-shadow: 0 2px 0 #6B0038;
}

/* Botón festivo dorado */
.btn--feria {
  min-height: 52px;
  padding: 0.7rem 2rem;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #FFE45C 0%, var(--amarillo) 45%, #FFA800 100%);
  box-shadow: 0 5px 0 #B35A00, 0 12px 24px rgba(3, 12, 40, 0.45);
  color: var(--marino);
  font: inherit;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  cursor: pointer;
}

.btn--feria:hover {
  background: linear-gradient(180deg, #FFEC85 0%, #FFE033 45%, #FFB31A 100%);
}

.btn--feria:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #B35A00, 0 8px 16px rgba(3, 12, 40, 0.45);
}

.btn--feria:focus-visible {
  outline-color: #fff;
  outline-offset: 4px;
}

/* ---------- Fondo animado ---------- */
.hero__fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Carrusel de fotos */
.hero__slides {
  position: absolute;
  inset: 0;
  transition: opacity 1.5s ease;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease;
}

.hero__slide.is-active {
  opacity: 1;
}

/* Capa azul marino: da contraste al logo y a los fuegos artificiales */
.hero__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(7, 27, 80, 0.42) 0%, rgba(7, 27, 80, 0.68) 55%, rgba(4, 13, 45, 0.9) 100%);
}

/* Resplandor cálido detrás del logo */
.hero__glow {
  position: absolute;
  top: 36%;
  left: 50%;
  width: min(90vw, 720px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 0, 0.26) 0%, rgba(255, 121, 0, 0.1) 38%, transparent 68%);
  transition: opacity 1.2s ease;
}

/* Lienzo de los fuegos artificiales */
.hero__fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Destello de la explosión final */
.hero__flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 50% 40%, #FFF6CC 0%, rgba(255, 196, 0, 0.7) 18%, rgba(255, 121, 0, 0.25) 38%, transparent 62%);
  mix-blend-mode: screen;
}

/* Durante la presentación: fotos atenuadas y contenido oculto */
.intro .hero__slides {
  opacity: 0.35;
}

.intro .hero__logo,
.intro .hero__date,
.intro .countdown,
.intro .hero__cta,
.intro .scroll-hint,
.intro .hero__glow {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  /* Acercamiento lento de la foto visible (solo transform: lo mueve la
     tarjeta gráfica; se pausa cuando la portada está cubierta) */
  .hero__slide.is-active {
    animation: acercar calc(var(--intervalo, 7000ms) + 1600ms) linear both;
  }

  /* Al terminar la presentación: logo, fecha, contador y botón, en ese orden */
  .is-revealed .hero__logo {
    animation: logo-entrada 1s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
  }

  .is-boom .hero__flash {
    animation: destello 1.1s ease-out both;
  }

  .is-revealed .hero__date {
    animation: unidad-entrada 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.35) 0.5s both;
  }

  .is-revealed .countdown__unit {
    animation: unidad-entrada 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.35) both;
  }

  .is-revealed .countdown__unit:nth-child(1) { animation-delay: 0.75s; }
  .is-revealed .countdown__unit:nth-child(2) { animation-delay: 0.87s; }
  .is-revealed .countdown__unit:nth-child(3) { animation-delay: 0.99s; }
  .is-revealed .countdown__unit:nth-child(4) { animation-delay: 1.11s; }

  .is-revealed .hero__cta {
    animation: unidad-entrada 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.35) 1.35s both;
  }

  .btn--feria:hover {
    transform: translateY(-2px);
  }

  /* El indicador aparece al final y rebota suavemente */
  .is-revealed .scroll-hint {
    animation: aparecer-suave 0.6s ease-out 1.8s both;
  }

  .scroll-hint__arrow {
    animation: rebotar 1.8s ease-in-out infinite;
  }
}

@keyframes aparecer-suave {
  from { opacity: 0; }
  to   { opacity: 0.9; }
}

@keyframes rebotar {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

@keyframes acercar {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

@keyframes logo-entrada {
  from { opacity: 0; transform: scale(0.35); filter: brightness(3) drop-shadow(0 18px 30px rgba(3, 12, 40, 0.6)); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: none; filter: brightness(1) drop-shadow(0 18px 30px rgba(3, 12, 40, 0.6)); }
}

@keyframes destello {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes unidad-entrada {
  from { opacity: 0; transform: translateY(24px) scale(0.6); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Cuenta regresiva (estilo "Colorado" del logo) ---------- */
.countdown {
  width: 100%;
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.4rem, 2vw, 1rem);
  width: min(100%, 640px);
  margin-inline: auto;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.55rem 0.2rem 0.6rem;
  border: 2px solid rgba(255, 214, 0, 0.85);
  border-radius: 18px;
  /* Sin backdrop-filter: el desenfoque se recalculaba en cada cuadro
     por las fotos y los fuegos que se mueven detrás */
  background: linear-gradient(180deg, rgba(20, 70, 200, 0.72) 0%, rgba(7, 27, 80, 0.88) 100%);
  box-shadow: 0 10px 24px rgba(3, 12, 40, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Relleno degradado amarillo → naranja, contorno blanco y borde azul marino
   con volumen, como las letras de "Colorado" */
.countdown__num {
  padding-inline: 0.12em;
  font-family: var(--font-timer);
  font-size: clamp(2.3rem, 11vw, 4.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFF6B0 0%, #FFD600 32%, #FF9A00 66%, #FF5A00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
    drop-shadow(2px 0 0 #0A1F6B) drop-shadow(-2px 0 0 #0A1F6B)
    drop-shadow(0 2px 0 #0A1F6B) drop-shadow(0 -2px 0 #0A1F6B)
    drop-shadow(0 4px 0 #06144A);
}

.countdown__label {
  margin-top: 0.35rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 3.1vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 var(--marino);
}

.countdown__done:empty {
  display: none;
}

.countdown__done.is-visible {
  font-family: var(--font-timer);
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1.15;
  background: linear-gradient(180deg, #FFF6B0 0%, #FFD600 32%, #FF9A00 66%, #FF5A00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
    drop-shadow(0 4px 0 #0A1F6B);
}

@media (max-width: 339px) {
  .countdown__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
 * Secciones genéricas
 * ======================================================= */
.section {
  padding-block: 3.5rem;
}

.section__header {
  margin-bottom: 2rem;
}

.section__header--center {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  color: var(--azul);
  font-family: var(--font-script);
  font-size: 1.35rem;
}

.section__eyebrow::before {
  content: "";
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: var(--naranja);
}

.section__eyebrow--fucsia {
  color: var(--fucsia-texto);
}

.section__eyebrow--fucsia::before {
  background: var(--fucsia);
}

.section__title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 400;
}

.section__lead {
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

.empty-state {
  padding: 1.5rem;
  border: 2px dashed var(--borde);
  border-left: 5px solid var(--naranja);
  border-radius: var(--radius);
  background: var(--superficie);
  font-size: 1.05rem;
}

.empty-state--center {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  border-left-width: 2px;
}

@media (min-width: 900px) {
  .section {
    padding-block: 5rem;
  }
}

/* =========================================================
 * Noticias
 * ======================================================= */
.news-grid {
  display: grid;
  align-items: start;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-top: 5px solid var(--naranja);
  box-shadow: var(--shadow);
}

.news-card__media {
  margin: 0;
  background: #F3EFE4;
}

/* Afiche completo, sin recortes */
.news-card__zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.news-card__zoom img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.news-card__zoom:focus-visible {
  outline-offset: -4px;
}

.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
}

.news-card__date {
  color: var(--gris);
  font-size: 0.875rem;
  font-weight: 600;
}

.news-card__title {
  font-size: 1.25rem;
}

/* Visor de afiches */
.viewer {
  width: min(92vw, 900px);
  max-height: 92vh;
  padding: 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--superficie);
}

.viewer::backdrop {
  background: rgba(7, 27, 80, 0.85);
}

.viewer__img {
  width: 100%;
  max-height: calc(92vh - 7rem);
  object-fit: contain;
  margin-inline: auto;
}

.viewer__caption {
  margin-top: 0.75rem;
  color: var(--marino);
  font-weight: 700;
  text-align: center;
}

.viewer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 0 0.5rem auto;
  border: 0;
  border-radius: 50%;
  background: var(--marino);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

/* =========================================================
 * Flores de la Feria
 * Inspirado en el afiche de coronación: escenario de noche,
 * reflectores, fucsia y dorado.
 * ======================================================= */
.section--flores,
.section--patrocinadores {
  --oro: #FFC93C;
  --oro-claro: #FFE9A3;
  --oro-oscuro: #C98A0B;
  --noche: #12061C;
  --rosa: #FF2E9A;

  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0, rgba(255, 46, 154, 0.28), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 201, 60, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 35% at 0 70%, rgba(0, 188, 235, 0.12), transparent 70%),
    var(--noche);
  color: #F7EAF3;
}

/* Destellos de fondo (estáticos: la máscara solo se pinta una vez) */
.flores-stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 233, 163, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255, 46, 154, 0.45) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.35) 0 1.5px, transparent 2.5px);
  background-size: 140px 160px, 210px 190px, 90px 110px;
  background-position: 10px 20px, 70px 90px, 40px 5px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
          mask-image: linear-gradient(180deg, #000, transparent 75%);
}

/* Reflectores fijos (sin animación, para cuidar el rendimiento) */
.flores-luces {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: min(100%, 1100px);
  overflow: hidden;
  pointer-events: none;
}

.flores-stage__beam {
  position: absolute;
  top: -10%;
  width: 34%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 233, 163, 0.28), rgba(255, 233, 163, 0.08) 55%, transparent 85%);
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
}

.flores-stage__beam--1 { left: 0; transform: rotate(-22deg); }
.flores-stage__beam--2 {
  left: 33%;
  background: linear-gradient(180deg, rgba(255, 46, 154, 0.3), rgba(255, 46, 154, 0.08) 55%, transparent 85%);
}
.flores-stage__beam--3 { right: 0; transform: rotate(22deg); }

/* ---------- Encabezado con el logo ---------- */
.flores-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  text-align: center;
}

.flores-header__logo {
  width: min(78vw, 340px);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(255, 46, 154, 0.35));
}

.flores-header__title {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
  color: #FFF;
  font-weight: 400;
  line-height: 1.05;
}

.flores-header__kicker {
  font-size: clamp(1.6rem, 6.5vw, 2.75rem);
  text-transform: uppercase;
  text-shadow: 0 3px 0 #5B0A3A, 0 0 18px rgba(255, 46, 154, 0.5);
}

.flores-header__script {
  padding-inline: 0.2em; /* la letra cursiva sobresale: así no se corta el degradado */
  margin-top: 0.35rem;
  background: linear-gradient(180deg, var(--oro-claro) 10%, var(--oro) 50%, #FF9E1B 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  filter: drop-shadow(0 2px 0 #5B0A3A);
}

/* Cinta fucsia, como "BARRANCO COLORADO" en el afiche */
.flores-header__ribbon {
  position: relative;
  margin-top: 1rem;
  padding: 0.35rem 2rem;
  background: linear-gradient(180deg, var(--rosa), var(--fucsia) 55%, #A8005A);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%, 14px 50%);
  color: #FFF;
  font-family: var(--font-display);
  font-size: clamp(1rem, 4vw, 1.35rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Datos de la coronación ---------- */
.coronacion {
  max-width: 880px;
  margin: 0 auto 3rem;
  padding: 1.5rem var(--gutter);
  border: 1px solid rgba(255, 201, 60, 0.45);
  border-radius: var(--radius);
  background: rgba(18, 6, 28, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.08), 0 20px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.coronacion__info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.coronacion__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-inline: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Separadores fucsia entre datos */
.coronacion__item:nth-child(even) {
  border-left: 2px solid var(--fucsia);
}

.coronacion__icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--oro);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Gran baile: pista con luces de fiesta ---------- */
.baile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  max-width: 640px;
  margin: 1.75rem auto 0;
  padding: 1.5rem 1rem 1.75rem;
  border: 1px solid rgba(255, 46, 154, 0.45);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 60% at 50% 115%, rgba(255, 46, 154, 0.4), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(120, 60, 255, 0.35), transparent 70%),
    #0B0414;
  box-shadow: inset 0 0 40px rgba(255, 46, 154, 0.15), 0 0 30px rgba(255, 46, 154, 0.15);
}

/* Reflectores de colores sobre la pista (fijos) */
.baile__luces span {
  position: absolute;
  z-index: -1;
  top: -30%;
  width: 26%;
  height: 160%;
  opacity: 0.4;
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
}

.baile__luces span:nth-child(1) { left: 2%;  background: linear-gradient(180deg, #00E5FF, transparent 80%); transform: rotate(-18deg); }
.baile__luces span:nth-child(2) { left: 26%; background: linear-gradient(180deg, #FF2E9A, transparent 80%); transform: rotate(-6deg); }
.baile__luces span:nth-child(3) { left: 50%; background: linear-gradient(180deg, #8A5BFF, transparent 80%); transform: rotate(6deg); }
.baile__luces span:nth-child(4) { left: 72%; background: linear-gradient(180deg, #FFD600, transparent 80%); transform: rotate(18deg); }

.baile__antes {
  color: var(--oro);
  font-family: var(--font-script);
  font-size: 1.35rem;
  line-height: 1.2;
}

/* "Gran baile" en una cinta fucsia, como en el afiche */
.baile__titulo {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.05em 0.7em 0.15em;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--rosa), var(--fucsia) 60%, #A8005A);
  box-shadow: 0 6px 18px rgba(255, 46, 154, 0.45);
  color: #FFF;
  font-family: var(--font-script);
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  line-height: 1.25;
  text-shadow: 0 2px 0 #7A0042;
  transform: rotate(-3deg);
}

.baile__por {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  color: #FFF;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Ecualizador (fijo) a los lados de "Amenizado por" */
.baile__eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.baile__eq i {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(0deg, #00E5FF, var(--rosa));
  transform-origin: 50% 100%;
  transform: scaleY(0.45);
}

.baile__eq i:nth-child(2) { transform: scaleY(0.8); }
.baile__eq i:nth-child(3) { transform: scaleY(1); }
.baile__eq i:nth-child(4) { transform: scaleY(0.6); }
.baile__eq i:nth-child(5) { transform: scaleY(0.3); }

.baile__grupo {
  position: relative;
  margin-top: 1.1rem;
}

/* Halo detrás del logo */
.baile__grupo::before {
  content: "";
  position: absolute;
  inset: -20% 10%;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 40, 40, 0.45), transparent 65%);
  opacity: 0.8;
}

.baile__logo {
  display: block;
  width: min(100%, 460px);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.baile__grupo-texto {
  color: #FFF;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem);
  text-transform: uppercase;
}

.coronacion__afiche {
  margin-top: 1.5rem;
}

.btn--flor {
  border: 2px solid var(--oro-claro);
  background: linear-gradient(180deg, var(--oro-claro) 0%, var(--oro) 45%, var(--oro-oscuro) 100%);
  color: var(--noche);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  box-shadow: 0 0 22px rgba(255, 201, 60, 0.35);
}

.btn--flor:hover { transform: translateY(-2px); }
.btn--flor:focus-visible { outline-color: var(--oro-claro); }

@media (min-width: 720px) {
  .coronacion__info { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .coronacion__item + .coronacion__item { border-left: 2px solid var(--fucsia); }
}

/* ---------- Candidatas ---------- */
.flores-subtitle {
  margin-bottom: 1.5rem;
  color: var(--oro);
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
  text-align: center;
}

.flores-grupo + .flores-grupo {
  margin-top: 3.5rem;
}

.flores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 300px));
  justify-content: center;
  gap: 1.75rem;
}

/* Marco dorado */
.flor-card {
  padding: 4px;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(160deg, var(--oro-claro), var(--oro) 35%, var(--oro-oscuro) 70%, var(--oro-claro));
  box-shadow: 0 0 28px rgba(255, 46, 154, 0.25);
  text-align: center;
}

.flor-card__media {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #2A0F33;
}

/* Las fotos oficiales traen el nombre impreso: se muestran completas */
.flor-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transition: transform 0.6s ease;
}

.flor-card__zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.flor-card__zoom:focus-visible {
  outline: 3px solid var(--oro-claro);
  outline-offset: -6px;
}

@media (hover: hover) {
  .flor-card__zoom:hover img { transform: scale(1.04); }
}

.flor-card__media.is-placeholder img {
  object-position: 30% 30%;
  opacity: 0.85;
}

/* Banda fucsia, como la de la reina del afiche, entre la foto y el nombre */
.flor-card__sash {
  position: relative;
  z-index: 1;
  width: 78%;
  margin: -1.2rem auto 0;
  padding: 0.35rem 1.25rem;
  border-block: 2px solid var(--oro);
  background: linear-gradient(180deg, var(--rosa), var(--fucsia) 60%, #A8005A);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%, 12px 50%);
  color: #FFF;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.flor-card {
  display: flex;
  flex-direction: column;
}

.flor-card__body {
  flex: 1;
  margin-top: -1rem;
  padding: 1.6rem 1rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--noche);
}

/* Nombre: mismo estilo dorado que los títulos de la sección */
.flor-card__name {
  padding-inline: 0.2em; /* la letra cursiva sobresale: así no se corta el degradado */
  background: linear-gradient(180deg, var(--oro-claro) 10%, var(--oro) 50%, #FF9E1B 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-family: var(--font-script);
  font-size: clamp(1.65rem, 1.1rem + 1.6vw, 2.05rem);
  font-weight: 400;
  line-height: 1.2;
  filter: drop-shadow(0 2px 0 #5B0A3A);
}

.flor-card__text {
  margin-top: 0.5rem;
  color: #E9D7E4;
  font-size: 0.95rem;
}

/* Sin candidatas publicadas: silueta de la reina */
.flores-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  margin-inline: auto;
  text-align: center;
}

.flores-empty__img {
  width: min(70vw, 260px);
  height: auto;
  border-radius: 50%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 35% 20%;
  border: 3px solid var(--oro);
  box-shadow: 0 0 40px rgba(255, 201, 60, 0.35);
}

.flores-empty__text {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

/* ---------- Agradecimiento a la municipalidad ----------
 * Franja final, como la del afiche: escudo + "Con el apoyo de…"
 */
.apoyo {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  max-width: 880px;
  margin: 4.5rem auto 0;
  padding: 2.25rem var(--gutter) 2rem;
  border-block: 2px solid var(--oro);
  background:
    radial-gradient(ellipse at 50% 0, rgba(255, 46, 154, 0.18), transparent 70%),
    linear-gradient(90deg, rgba(255, 201, 60, 0.02), rgba(255, 201, 60, 0.1), rgba(255, 201, 60, 0.02)),
    rgba(18, 6, 28, 0.75);
  text-align: center;
}

/* Rombos dorados sobre los bordes */
.apoyo::before,
.apoyo::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--oro);
  background: var(--noche);
  transform: translateX(-50%) rotate(45deg);
}

.apoyo::before { top: -9px; }
.apoyo::after  { bottom: -9px; }

.apoyo__escudo-marco {
  display: block;
  width: clamp(130px, 34vw, 170px);
}

/* Escudo sin fondo, con un halo dorado */
.apoyo__escudo {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 1px rgba(255, 233, 163, 0.9))
    drop-shadow(0 0 18px rgba(255, 201, 60, 0.35))
    drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.apoyo__texto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.apoyo__antes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--oro-claro);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.apoyo__antes::before,
.apoyo__antes::after {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--oro));
}

.apoyo__antes::after {
  background: linear-gradient(90deg, var(--oro), transparent);
}

.apoyo__nombre {
  padding-inline: 0.2em; /* la letra cursiva sobresale: así no se corta el degradado */
  background: linear-gradient(180deg, var(--oro-claro) 10%, var(--oro) 50%, #FF9E1B 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 1.2rem + 3vw, 2.75rem);
  line-height: 1.25;
  filter: drop-shadow(0 2px 0 #5B0A3A);
}

.apoyo__despues {
  margin-top: 0.25rem;
  color: #FFF;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apoyo__lugar {
  color: #FFF;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.4rem + 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #5B0A3A, 0 0 24px rgba(255, 46, 154, 0.55);
}

.apoyo__mensaje {
  margin-top: 0.9rem;
  color: #E9D7E4;
  font-size: 1rem;
}

@media (min-width: 720px) {
  .apoyo {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2.5rem;
    padding-inline: 2.5rem;
  }

  .apoyo__texto {
    padding-left: 2.5rem;
    border-left: 2px solid var(--fucsia);
  }
}

/* =========================================================
 * Patrocinadores
 * ======================================================= */
.sponsors-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sponsor {
  width: min(100%, 280px);
  text-align: center;
}

/* En teléfonos: dos por fila */
@media (max-width: 599px) {
  .sponsors-grid { gap: 1.5rem 1rem; }
  .sponsor { width: calc(50% - 0.5rem); }
  .sponsor__box { padding: 0.75rem; border-width: 3px; border-radius: 16px; }
  .sponsor__caption { font-size: 1rem; }
}

/* Tarjeta con el color de la marca, borde blanco y brillo suave */
.sponsor__box {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 1.25rem 1.5rem;
  border: 4px solid #FFF;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(255, 255, 255, 0.28), transparent 65%),
    var(--marca, var(--superficie));
  box-shadow: 0 0 0 1px var(--borde), 0 12px 28px rgba(7, 27, 80, 0.14);
  color: var(--marino);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

@media (hover: hover) {
  .sponsor__box:hover {
    transform: translateY(-6px) rotate(-1.5deg);
    box-shadow: 0 0 0 1px var(--borde), 0 20px 36px rgba(7, 27, 80, 0.2);
  }
}

/* Logo completo, sin filtros ni deformación */
.sponsor__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sponsor__caption {
  margin-top: 0.85rem;
  color: var(--marino);
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.2;
}

/* ---------- Patrocinadores sobre el escenario de noche ----------
 * Encabezado con el mismo estilo que el agradecimiento de las Flores
 * (.apoyo__antes, .apoyo__nombre, .apoyo__despues).
 */
.patro-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.patro-header__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-weight: 400;
  line-height: 1.15;
}

.patro-header__title .apoyo__nombre {
  font-size: clamp(2.4rem, 1.4rem + 5vw, 3.6rem);
}

.section--patrocinadores .sponsor__box {
  box-shadow: 0 0 0 1px rgba(255, 201, 60, 0.5), 0 0 26px rgba(255, 46, 154, 0.22), 0 14px 30px rgba(0, 0, 0, 0.45);
}

@media (hover: hover) {
  .section--patrocinadores .sponsor__box:hover {
    box-shadow: 0 0 0 1px var(--oro), 0 0 34px rgba(255, 201, 60, 0.35), 0 20px 36px rgba(0, 0, 0, 0.5);
  }
}

.section--patrocinadores .sponsor__caption {
  color: #FFF;
}

.section--patrocinadores .empty-state {
  border-color: rgba(255, 201, 60, 0.35);
  border-left-color: var(--fucsia);
  background: rgba(18, 6, 28, 0.7);
  color: #F7EAF3;
}

/* ---------- Invitación a patrocinar ---------- */
.patrocinar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 760px;
  margin: 4rem auto 0;
  padding: 2rem var(--gutter);
  border: 2px solid var(--oro);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 0, rgba(255, 46, 154, 0.28), transparent 70%),
    linear-gradient(135deg, #2A0B3D, #12061C);
  box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.1), 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.patrocinar__titulo {
  color: #FFF;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.1rem + 2.5vw, 2.3rem);
  line-height: 1.1;
  text-shadow: 0 3px 0 #5B0A3A, 0 0 18px rgba(255, 46, 154, 0.5);
}

.patrocinar__texto {
  max-width: 52ch;
  color: #E9D7E4;
  font-size: 1.05rem;
}

.btn--whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  border: 2px solid #9DF5BC;
  background: linear-gradient(180deg, #2BC765 0%, #1A9E52 50%, #0E7A3E 100%);
  color: #FFF;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 22px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover { transform: translateY(-2px); }
.btn--whatsapp:focus-visible { outline-color: #9DF5BC; }

.btn__icono {
  flex: none;
}

/* =========================================================
 * Pie de página
 * ======================================================= */
.site-footer {
  --oro: #FFC93C;
  --oro-claro: #FFE9A3;
  --noche: #12061C;

  position: relative;
  /* Mismo fondo de noche que Patrocinadores, con un brillo fucsia abajo */
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(255, 46, 154, 0.22), transparent 70%),
    var(--noche);
  color: #E9D7E4;
  text-align: center;
}

/* Línea dorada con rombo, como la franja de agradecimiento */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(880px, calc(100% - 2 * var(--gutter)));
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--oro), transparent);
  transform: translateX(-50%);
}

.site-footer::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--oro);
  background: var(--noche);
  transform: translateX(-50%) rotate(45deg);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding-block: 3rem 2rem;
}

.site-footer__logo {
  width: min(70vw, 260px);
  height: auto;
  filter: drop-shadow(0 0 26px rgba(255, 46, 154, 0.3));
}

.site-footer__id {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-footer__name {
  margin-bottom: 0.35rem;
  color: #FFF;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.site-footer__patrono {
  color: var(--oro-claro);
  font-family: var(--font-script);
  font-size: 1.2rem;
}

.site-footer__heading {
  margin-bottom: 0.75rem;
  color: var(--oro);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 201, 60, 0.5);
  border-radius: 999px;
  color: #FFF;
  text-decoration: none;
}

.site-footer__link:hover {
  background: rgba(255, 201, 60, 0.12);
}

.site-footer :focus-visible {
  outline-color: var(--oro);
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 201, 60, 0.2);
  color: rgba(233, 215, 228, 0.75);
  font-size: 0.875rem;
}

.site-footer__credito {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.site-footer__credito strong {
  color: #FFF;
  font-weight: 700;
}

.site-footer__credito-logo {
  width: 36px;
  height: 36px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.site-footer__credito:hover strong {
  color: var(--oro-claro);
}

.site-footer__credito:hover .site-footer__credito-logo {
  transform: rotate(-8deg) scale(1.1);
}

/* ---------- Columna de la marca y mapa ---------- */
.site-footer__marca {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.site-footer__patrocinar {
  margin-top: 0;
}

.mapa {
  width: 100%;
  max-width: 560px;
}

.mapa__marco {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--oro);
  border-radius: var(--radius);
  background: #1E0D2B;
  box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.1), 0 0 30px rgba(255, 46, 154, 0.2), 0 20px 40px rgba(0, 0, 0, 0.45);
}

.mapa__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.mapa__abrir {
  margin-top: 0.9rem;
}

@media (min-width: 900px) {
  .site-footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
  }

  .mapa {
    justify-self: center;
  }
}

.site-footer__corazon {
  display: inline-block;
  color: #FF2E9A;
  text-shadow: 0 0 10px rgba(255, 46, 154, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .site-footer__corazon {
    animation: latido-corazon 1.6s ease-in-out 3; /* late 3 veces y se queda quieto */
  }
}

@keyframes latido-corazon {
  0%, 60%, 100% { transform: scale(1); }
  30%           { transform: scale(1.25); }
}

@media (min-width: 720px) {
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* =========================================================
 * Transición entre secciones (js/escenas.js)
 * --salida: 0 → 1 mientras la siguiente sección cubre a esta.
 * --entrada: 0 → 1 mientras esta sección sube a cubrir la anterior.
 * ======================================================= */
main {
  position: relative;
}

/* Los fuegos de la portada se pausan cuando este marcador sale de la
   pantalla: al subir un 40 % ya casi no se ven bajo la sección siguiente */
.portada-sentinela {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 40vh;
  height: 40svh;
  pointer-events: none;
}

.escenas .escena {
  position: relative;
}

/* Fondo sólido para cubrir la escena anterior (sin pisar fondos propios) */
:where(.escenas .escena) {
  background-color: var(--blanco);
}

.escenas .escena--fija {
  position: sticky;
  top: 0; /* js/escenas.js lo ajusta para secciones altas */
}

/* La sección de atrás se oscurece (js/escenas.js cambia su opacidad).
   Color sólido: es lo más barato de componer al desplazarse. */
.escena__velo {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #05020C;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* La portada se aleja (js/escenas.js cambia su transform) */
.escenas .hero__inner {
  transform-origin: 50% 100%;
}

/* Con animation-timeline, el oscurecido y el alejamiento los mueve el
   propio desplazamiento, fuera del hilo principal. js/escenas.js le da a
   cada uno el nombre de la línea de tiempo de la sección que entra;
   "entry" va de 0 % (su borde superior asoma abajo) a 100 % (llega arriba). */
@supports (animation-timeline: view()) {
  .escenas--css .escena__velo {
    animation: escena-velo linear both;
    animation-range: entry 0% entry 100%;
  }

  .escenas--css .hero__inner {
    animation: escena-alejar linear both;
    animation-range: entry 0% entry 100%;
  }
}

@keyframes escena-velo {
  from { opacity: 0; }
  to   { opacity: 0.85; }
}

@keyframes escena-alejar {
  from { transform: none; }
  to   { transform: translate3d(0, -6vh, 0) scale(0.9); }
}

/* La sección nueva sube como una hoja curva (bordes fijos: animarlos
   obligaba a repintar toda la sección en cada cuadro) */
.escenas .escena--entra {
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -18px 40px rgba(5, 2, 12, 0.35);
}

/* Brillo dorado en el borde superior de la hoja de las Flores */
.escenas .section--flores.escena--entra::before,
.escenas .section--patrocinadores.escena--entra::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--oro), var(--rosa), var(--oro), transparent);
  pointer-events: none;
}

/* La flecha "Desliza" se pausa cuando la portada está cubierta o fuera
   (js/escenas.js pone .is-pausada). Selector concreto a propósito: uno
   como ".is-pausada *" recalculaba los estilos de toda la sección justo
   en medio de la transición. */
.escenas .escena.is-pausada .scroll-hint__arrow,
.escenas .escena.is-pausada .hero__slide {
  animation-play-state: paused;
}

/* ---------- Aparición de elementos al entrar en la sección ----------
 * [data-revelar]             sube y aparece
 * [data-revelar="pop"]       crece con rebote
 * [data-revelar="escribir"]  se descubre de izquierda a derecha
 * [data-revelar="desplegar"] se despliega como una cinta
 * [data-revelar="columpio"]  baja balanceándose, como un letrero
 * [data-revelar="voltear"]   se levanta girando en 3D
 * --i: orden dentro del grupo (retraso de 120 ms por paso)
 * --revelado: transformación final, para elementos ya inclinados
 */
.escenas [data-revelar] {
  --rebote: cubic-bezier(0.34, 1.56, 0.64, 1);
  --suave: cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.7s ease,
    transform 0.9s var(--suave),
    clip-path 1.1s var(--suave);
  transition-delay: calc(var(--i, 0) * 120ms);
}

.escenas [data-revelar="pop"] {
  transform: scale(0.55) rotate(-6deg);
  transition-timing-function: ease, var(--rebote), ease;
}

.escenas [data-revelar="escribir"] {
  opacity: 1;
  transform: none;
  clip-path: inset(-30% 100% -30% 0);
}

.escenas [data-revelar="desplegar"] {
  transform: scaleX(0.02); /* no 0: el observador necesita un área visible */
  transition-timing-function: ease, var(--rebote), ease;
}

.escenas [data-revelar="columpio"] {
  transform: translateY(-24px) rotate(-14deg);
  transform-origin: 50% 0;
  transition-timing-function: ease, var(--rebote), ease;
}

.escenas [data-revelar="voltear"] {
  transform: perspective(900px) translateY(56px) rotateX(18deg) scale(0.95);
  transform-origin: 50% 100%;
}

.escenas [data-revelar].is-revelado {
  opacity: 1;
  transform: var(--revelado, none);
}

.escenas [data-revelar="escribir"].is-revelado {
  clip-path: inset(-30% -10% -30% -10%);
}

.baile__titulo {
  --revelado: rotate(-3deg);
}

/* Íconos del evento: rebotan al llegar */
.escenas .coronacion__item.is-revelado .coronacion__icon {
  animation: rebotar-icono 0.7s calc(var(--i, 0) * 120ms + 0.35s) both;
}

@keyframes rebotar-icono {
  0%   { scale: 0; }
  60%  { scale: 1.3; }
  100% { scale: 1; }
}

/* Tarjetas: la banda se despliega y un destello cruza la foto */
.escenas .flor-card .flor-card__sash {
  scale: 0 1;
  transition: scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 120ms + 0.55s);
}

.escenas .flor-card.is-revelado .flor-card__sash {
  scale: 1 1;
}

.escenas .flor-card .flor-card__name {
  opacity: 0;
  translate: 0 12px;
  transition: opacity 0.6s ease, translate 0.6s ease;
  transition-delay: calc(var(--i, 0) * 120ms + 0.8s);
}

.escenas .flor-card.is-revelado .flor-card__name {
  opacity: 1;
  translate: 0 0;
}

.escenas .flor-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 233, 163, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}

.escenas .flor-card.is-revelado .flor-card__media::after {
  animation: destello-foto 1.3s ease calc(var(--i, 0) * 120ms + 0.7s) both;
}

@keyframes destello-foto {
  to { transform: translateX(120%); }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
