/* =========================================================
   Sección 2 — Video de bienvenida
   (usa las variables y clases base de styles.css)
   ========================================================= */

.pantalla--video {
  background: linear-gradient(180deg, #e3f2fd 0%, #f2f9ff 55%, #e6f4fe 100%);
}

/* Las animaciones arrancan recién cuando la sección entra en pantalla */
.pantalla--video:not(.en-vista) *,
.pantalla--video:not(.en-vista) *::before,
.pantalla--video:not(.en-vista) *::after {
  animation-play-state: paused;
}

.nube--v1 { top: 1.5%; left: -9%;  width: 27%; }
.nube--v2 { top: 7%;   right: -7%; width: 20%; opacity: .7; animation-duration: 16s; animation-delay: -5s; }

/* ---------- Encabezado ---------- */
.encabezado {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--azul);
}
.encabezado svg { width: 26px; height: 26px; }

/* ---------- Reproductor ---------- */
.visor {
  position: relative;
  width: 100%;
  margin-top: 18px;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #8fd0f6, #d7eefc);
  box-shadow: 0 0 0 4px #fff, 0 14px 30px rgba(29, 79, 159, .28);
}
.visor__fondo {
  position: absolute;
  left: 50%;
  top: 52%;
  height: 78%;
  width: auto;
  transform: translate(-50%, -50%);
}
.visor video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.visor__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: linear-gradient(180deg, rgba(10, 40, 90, 0) 55%, rgba(10, 40, 90, .38));
  color: var(--azul-boton);
  cursor: pointer;
  transition: opacity .25s ease;
}
.visor__circulo {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 20px rgba(10, 40, 90, .35);
  transition: transform .15s ease;
}
.visor__circulo svg { width: 30px; height: 30px; margin-left: 4px; }
.visor__circulo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9);
  animation: onda 1.8s ease-out infinite;
}
.visor__play:active .visor__circulo { transform: scale(.92); }
.visor__tiempo {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.visor.reproduciendo .visor__play { opacity: 0; pointer-events: none; }

.visor__aviso {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(10, 40, 90, .6);
  pointer-events: none;
}
.visor__aviso[hidden] { display: none; }

/* ---------- Textos ---------- */
.titulo-seccion {
  margin: 26px 0 0;
  text-align: center;
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: clamp(28px, 8.8vw, 37px);
  line-height: 1.12;
  color: var(--azul-oscuro);
}
.texto-seccion {
  max-width: 18em;
  margin: 12px 0 0;
  text-align: center;
  font-weight: 400;
  font-size: clamp(16px, 4.8vw, 19px);
  line-height: 1.4;
  color: var(--azul);
  text-wrap: balance;
}

/* ---------- Tarjeta "Ver video de la invitación" ---------- */
.invitar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  border: 0;
  border-radius: 20px;
  background: #dcecfb;
  box-shadow: inset 0 0 0 1.5px #c6dff6;
  color: var(--azul-oscuro);
  font-family: var(--fuente-texto);
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.invitar:active { transform: scale(.98); background: #cfe5f9; }
.invitar:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; }
.invitar__icono {
  display: grid;
  place-items: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: #b7d8f6;
  color: var(--azul-boton);
}
.invitar__icono svg { width: 30px; height: 30px; }
.invitar strong { display: block; font-weight: 800; font-size: 17px; line-height: 1.2; }
.invitar small { display: block; margin-top: 3px; font-weight: 600; font-size: 14px; opacity: .85; }

/* ---------- Grupo de amigos ---------- */
.grupo {
  position: relative;
  width: 100%;
  height: clamp(190px, 31svh, 240px);
  margin-top: auto;
  padding-top: 0;
}
.pantalla--video .grupo { margin-top: 24px; }

.grupo__payaso {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 100%;
  aspect-ratio: 300 / 420;
  transform: translateX(-50%);
  z-index: 1;
}
.grupo .payaso { width: 100%; height: 100%; animation: flota 3s ease-in-out infinite; }

.amigo {
  position: absolute;
  bottom: 0;
  z-index: 2;
  width: auto;
  transform-origin: 50% 100%;
  animation: salta 2.4s ease-in-out infinite;
}
.amigo--conejita  { left: 0;   height: 54%; }
.amigo--gatita    { left: 19%; height: 44%; animation-duration: 2.8s; animation-delay: -.7s; }
.amigo--chanchito { right: 19%; height: 42%; animation-duration: 2.6s; animation-delay: -1.3s; }
.amigo--osito     { right: 0;  height: 47%; animation-duration: 3s;   animation-delay: -.3s; }

.corazon--g1 { left: 24%;  top: 14%; width: 6%; }
.corazon--g2 { right: 22%; top: 20%; width: 5%;   animation-delay: -1.2s; }
.corazon--g3 { right: 9%;  top: 40%; width: 4.2%; animation-delay: -2.2s; }

.grupo__confeti { position: absolute; inset: 0; z-index: 0; }
.grupo__confeti i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 5px;
  border-radius: 2px;
  background: var(--c);
  transform: rotate(var(--r));
  animation: brilla 3s ease-in-out var(--t) infinite;
}

/* ---------- Animaciones ---------- */
@keyframes onda   { from { transform: scale(1); opacity: .9; } to { transform: scale(1.55); opacity: 0; } }
@keyframes salta  { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes brilla { 0%, 100% { transform: translateY(0) rotate(var(--r)); opacity: .95; } 50% { transform: translateY(-9px) rotate(calc(var(--r) + 40deg)); opacity: .6; } }
