/* Corto de presentación de Meri y Yunos en la cabecera */
.brand-reveal{max-width:1380px;margin:-6px auto 0;padding:0 5%}
.reveal-stage{position:relative;max-width:660px;margin:auto;aspect-ratio:1280/714}
.reveal-stage>*{position:absolute;inset:0;width:100%;height:100%;display:block}
.reveal-poster{object-fit:contain}
.reveal-stage.is-playing .reveal-poster{visibility:hidden}
@media(max-width:580px){.brand-reveal{padding:0 2%}}

/* Cabecera compacta: el final y las alternativas muestran solo el logotipo. */
header .header-brand{display:block;flex:0 0 190px;width:190px;letter-spacing:normal}
header .header-brand .reveal-stage{display:block;position:relative;width:100%;max-width:none;height:106px;aspect-ratio:1280/714;margin:0}
header .header-brand .reveal-poster{object-fit:contain;padding:14px 0}
@media(max-width:750px){header .header-brand{flex-basis:150px;width:150px}header .header-brand .reveal-stage{height:84px}header .header-brand .reveal-poster{padding:10px 0}}

/* El fotograma final no debe tapar el logotipo al terminar o fallar. */
.reveal-stage>video,.reveal-stage>canvas{visibility:hidden}
.reveal-stage.is-playing>video,.reveal-stage.is-playing>canvas{visibility:visible}

/* Una nube breve cubre el cambio entre el último fotograma y el logo. */
.reveal-stage.is-dissolving {
  isolation: isolate;
}

.reveal-stage.is-dissolving > video,
.reveal-stage.is-dissolving > canvas {
  animation: reveal-video-out 340ms ease-in both;
}

.reveal-stage.is-dissolving:not(.is-playing) > .reveal-poster {
  animation: reveal-logo-in 470ms ease-out both;
}

.reveal-stage.is-dissolving::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 10% 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 29% 58%, #fffaf0 4%, #efe6d4bb 20%, transparent 47%),
    radial-gradient(ellipse at 60% 39%, #fffdf7 7%, #ede4d4c4 25%, transparent 52%),
    radial-gradient(ellipse at 75% 63%, #f9f2e6 6%, #e7decd9c 22%, transparent 47%),
    radial-gradient(ellipse at 48% 69%, #fffdf8 8%, #f5ede0b8 26%, transparent 58%);
  filter: blur(4px);
  animation: reveal-smoke 830ms ease-in-out both;
}

@keyframes reveal-video-out {
  to { opacity: 0; filter: blur(6px); }
}
@keyframes reveal-logo-in {
  from { opacity: 0; filter: blur(4px); }
  to { opacity: 1; filter: blur(0); }
}
@keyframes reveal-smoke {
  0% { opacity: 0; transform: translate(-16%, 14%) scale(0.55); }
  42% { opacity: 0.96; transform: translate(0, 0) scale(1.04); }
  100% { opacity: 0; transform: translate(14%, -17%) scale(1.26); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-stage.is-dissolving::after { display: none; }
  .reveal-stage.is-dissolving > * { animation: none !important; }
}
