/* Agente Limpezas — Animação de entrada (à prova de travamento)
 *
 * Arquitetura em camadas:
 *   1. #intro é display:none por padrão. Só aparece se o script inline do
 *      <head> tiver adicionado html.intro-on. Se o JS quebrar antes disso,
 *      o site aparece normal.
 *   2. Trava de segurança FINAL só com CSS: 8s depois a animação introKill
 *      esconde o overlay (opacity:0 + visibility:hidden + pointer-events:none).
 *      Garante que mesmo sem JS o usuário NUNCA fica preso em tela preta.
 *   3. Scroll travado via html.intro-on. Remover a classe libera. O script
 *      inline do <head> tem setTimeout(10s) que remove a classe mesmo
 *      sem o intro.js, soltando o scroll.
 */

#intro { display: none; }

html.intro-on #intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #02040a;
  animation: introKill 0.5s ease 8s forwards;
}

@keyframes introKill {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

html.intro-on,
html.intro-on body {
  overflow: hidden;
  overscroll-behavior: none;
}

.intro__video {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  background: #02040a;
  display: block;
  pointer-events: none; /* nunca rouba o toque do botão Pular */
}

.intro__skip {
  position: absolute;
  right: 16px;
  bottom: 20px;
  z-index: 10003;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  font: 500 12px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* aparece em 0,5s mesmo que o vídeo não tenha começado */
  opacity: 0;
  animation: introSkipIn 0.3s ease 0.5s forwards;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.intro__skip:hover,
.intro__skip:focus-visible {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  outline: none;
}

@keyframes introSkipIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.intro__fly {
  position: fixed;
  z-index: 10002;
  pointer-events: none;
  transform-origin: top left;
  will-change: transform, opacity;
  transition: transform 1.1s cubic-bezier(.65, 0, .25, 1), opacity 0.18s linear;
  opacity: 1;
}

/* Loader some completamente enquanto a intro roda — a intro É a tela de
   carregamento. Quando a intro acabar, html.intro-on sai e o loader pode
   reaparecer (se o site ainda não carregou) com o fluxo normal. */
html.intro-on #loader,
html.intro-on .loader { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html.intro-on #intro { display: none !important; }
  html.intro-on,
  html.intro-on body { overflow: auto; }
}
