.dmi-opening-video {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #08264e;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 220ms ease;
}
.dmi-opening-video[hidden] { display: none !important; }
.dmi-opening-video.is-closing { opacity: 0; visibility: hidden; pointer-events: none; }
.dmi-opening-video__media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #08264e;
}
html.dmi-opening-active,
html.dmi-opening-active body { overflow: hidden !important; background: #08264e !important; }
@media (min-width: 720px) { .dmi-opening-video__media { object-fit: contain; } }

/* BLOCO: abertura própria do desktop.
   O vídeo mobile nunca chega a aparecer no PC. A marca usa apenas uma fração
   da tela, com entrada curta e sem ampliar a arte até as bordas. */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .dmi-opening-video {
    isolation: isolate;
    background:
      radial-gradient(circle at 50% 46%, rgba(25, 78, 132, .34), transparent 34%),
      linear-gradient(145deg, #03152f 0%, #06254b 52%, #031a38 100%);
  }
  .dmi-opening-video.is-desktop-opening {
    animation: dmiDesktopOpeningLifetime 1750ms linear both;
  }
  .dmi-opening-video__media { display: none !important; }
  .dmi-opening-video::before {
    content: '';
    position: relative;
    z-index: 2;
    width: min(20vw, 280px);
    min-width: 220px;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: url('/assets/brand/dmimobi-opening-desktop.jpeg') center / contain no-repeat;
    box-shadow: 0 22px 60px rgba(0, 8, 24, .34);
    animation: dmiDesktopBrandIn 900ms cubic-bezier(.2,.8,.2,1) both;
  }
  .dmi-opening-video::after {
    content: '';
    position: absolute;
    z-index: 1;
    width: min(25vw, 350px);
    min-width: 270px;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(217, 181, 72, .16);
    border-radius: 30px;
    box-shadow: 0 0 70px rgba(46, 119, 184, .18);
    animation: dmiDesktopHaloIn 1200ms ease-out both;
  }
  .dmi-opening-video.is-closing::before,
  .dmi-opening-video.is-closing::after { transform: translateY(-4px) scale(.985); }
}

@keyframes dmiDesktopBrandIn {
  from { opacity: 0; transform: translateY(10px) scale(.94); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes dmiDesktopHaloIn {
  from { opacity: 0; transform: scale(.86); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes dmiDesktopOpeningLifetime {
  from { background-position: center; }
  to { background-position: center; }
}
@media (prefers-reduced-motion: reduce) { .dmi-opening-video { transition-duration: 80ms; } }
@media (prefers-reduced-motion: reduce) and (min-width: 1024px) {
  .dmi-opening-video.is-desktop-opening { animation-duration: 900ms; }
  .dmi-opening-video::before,
  .dmi-opening-video::after { animation: none; }
}
