/* ===========================================================
   INTRO — InovaExpress (logo reveal cinematográfico, ~4s)
   Aparece 1× por sessão antes do login.
   Fundo preto, motion-design clean: dot → burst → círculo
   vermelho com "i + bolinha" (igual marca Inova) → nome
   → linha → tagline → flourish final → fade out.
   =========================================================== */

.intro-anim {
  position: fixed; inset: 0; z-index: 99999;
  background: radial-gradient(ellipse at center, #1a0505 0%, #050505 70%);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  user-select: none;
  animation: introFadeOut .6s ease-out 4.0s forwards;
}
.intro-anim.skipped { animation: introFadeOut .3s ease-out forwards; }
@keyframes introFadeOut {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ============ SKIP BUTTON ============ */
.intro-skip {
  position: absolute; top: 22px; right: 24px; z-index: 200;
  background: rgba(255,255,255,0.06); color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 9px 18px; border-radius: 30px;
  font: 600 11.5px/1 'Inter', sans-serif;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer;
  transition: all .25s cubic-bezier(.2,1,.3,1);
  opacity: 0; animation: skipFadeIn .5s ease-out 1.4s forwards;
}
.intro-skip:hover { background: rgba(255,31,31,0.85); border-color: #fff; transform: scale(1.05); }
@keyframes skipFadeIn { to { opacity: 1; } }

/* ============ CONTAINER CENTRAL ============ */
.intro-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  /* Pulse sutil no final pra "fechar" a apresentação */
  animation: stageFinal .6s cubic-bezier(.2,.9,.3,1) 3.2s;
  will-change: transform;
}
@keyframes stageFinal {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255,31,31,0)); }
  50%      { transform: scale(1.04); filter: drop-shadow(0 0 30px rgba(255,71,71,0.5)); }
}

/* ============ DOT INICIAL — pulsa e explode (0–0.9s) ============ */
.intro-dot {
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px;
  background: #FF1F1F; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 30px #FF1F1F, 0 0 60px rgba(255,31,31,0.7);
  animation:
    dotIn .35s cubic-bezier(.2,1.4,.3,1) forwards,
    dotPulse .6s ease-in-out .35s 1,
    dotExplode .5s cubic-bezier(.25,.0,.3,1) .9s forwards;
  will-change: transform, opacity;
}
@keyframes dotIn {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes dotPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.4); box-shadow: 0 0 50px #FF1F1F, 0 0 100px rgba(255,31,31,0.9); }
}
@keyframes dotExplode {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(70); opacity: 0; }
}

/* ============ PARTÍCULAS ESPALHANDO (1.0–2.0s) ============ */
.intro-particles {
  position: absolute; top: 50%; left: 50%;
  width: 1px; height: 1px;
  pointer-events: none;
}
.intro-particles span {
  position: absolute; top: 0; left: 0;
  width: 5px; height: 5px;
  background: #FF4747;
  border-radius: 50%;
  box-shadow: 0 0 6px #FF4747;
  opacity: 0;
  will-change: transform, opacity;
}
.intro-particles span:nth-child(1)  { animation: pBurst 1.0s cubic-bezier(.2,.6,.3,1) 1.0s forwards;  --x:  220px; --y: -140px; }
.intro-particles span:nth-child(2)  { animation: pBurst 1.1s cubic-bezier(.2,.6,.3,1) 1.05s forwards; --x: -240px; --y: -120px; }
.intro-particles span:nth-child(3)  { animation: pBurst 1.2s cubic-bezier(.2,.6,.3,1) 1.0s forwards;  --x:  260px; --y:  100px; }
.intro-particles span:nth-child(4)  { animation: pBurst 1.0s cubic-bezier(.2,.6,.3,1) 1.08s forwards; --x: -220px; --y:  160px; }
.intro-particles span:nth-child(5)  { animation: pBurst 1.15s cubic-bezier(.2,.6,.3,1) 1.0s forwards; --x:  110px; --y: -210px; }
.intro-particles span:nth-child(6)  { animation: pBurst .95s  cubic-bezier(.2,.6,.3,1) 1.1s forwards;  --x: -110px; --y: -220px; }
.intro-particles span:nth-child(7)  { animation: pBurst 1.1s  cubic-bezier(.2,.6,.3,1) 1.04s forwards; --x:  170px; --y:  200px; }
.intro-particles span:nth-child(8)  { animation: pBurst 1.0s  cubic-bezier(.2,.6,.3,1) 1.12s forwards; --x: -190px; --y:   60px; }
.intro-particles span:nth-child(9)  { animation: pBurst 1.2s  cubic-bezier(.2,.6,.3,1) 1.02s forwards; --x:  300px; --y:  -50px; }
.intro-particles span:nth-child(10) { animation: pBurst 1.05s cubic-bezier(.2,.6,.3,1) 1.14s forwards; --x: -280px; --y:  -70px; }
.intro-particles span:nth-child(11) { animation: pBurst .9s   cubic-bezier(.2,.6,.3,1) 1.06s forwards; --x:    0px; --y: -260px; }
.intro-particles span:nth-child(12) { animation: pBurst 1.1s  cubic-bezier(.2,.6,.3,1) 1.1s forwards;  --x:    0px; --y:  260px; }
@keyframes pBurst {
  0%   { opacity: 1; transform: translate(0, 0) scale(1.6); }
  70%  { opacity: 0.95; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.3); }
}

/* ============ SÍMBOLO OFICIAL DA MARCA INOVA (1.0s) ============
   Path SVG direto do logo-horizontal.svg — quadrado vermelho com "i"
   inclinado/cutout + bolinha. Tudo num shape só, do jeito da marca. */
.intro-logo-mark {
  display: block;
  width: 160px; height: auto;
  margin: 0 auto 32px;
  filter:
    drop-shadow(0 14px 40px rgba(255,31,31,0.55))
    drop-shadow(0 0 60px rgba(255,71,71,0.3));
  transform: scale(0);
  opacity: 0;
  animation: markIn .8s cubic-bezier(.2,1.4,.3,1) 1.0s forwards;
  will-change: transform, opacity;
}
@keyframes markIn {
  0%   { opacity: 0; transform: scale(0) rotate(-90deg); }
  60%  { opacity: 1; transform: scale(1.18) rotate(0); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ============ NOME "InovaExpress" (1.85s) ============ */
.intro-logo-name {
  font-size: 64px; font-weight: 900;
  color: #fff;
  margin: 0; letter-spacing: -2px;
  text-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 60px rgba(255,71,71,0.35);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: nameIn .7s cubic-bezier(.2,.9,.3,1) 1.85s forwards;
  will-change: transform, opacity;
}
@keyframes nameIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ============ LINHA EMBAIXO (2.4s) ============ */
.intro-logo-line {
  width: min(420px, 70vw); height: 3px;
  background: linear-gradient(90deg, transparent, #FF4747 20%, #FF1F1F 50%, #FF4747 80%, transparent);
  margin: 14px auto 14px;
  transform: scaleX(0); transform-origin: center;
  animation: lineDraw .9s cubic-bezier(.2,.9,.3,1) 2.4s forwards;
  will-change: transform;
}
@keyframes lineDraw { to { transform: scaleX(1); } }

/* ============ TAGLINE (2.8s) ============ */
.intro-logo-tag {
  font-size: 12.5px; color: rgba(255,255,255,0.7);
  letter-spacing: 4.5px; text-transform: uppercase; font-weight: 600;
  margin: 0; text-align: center;
  opacity: 0;
  animation: tagIn .55s ease-out 2.8s forwards;
}
@keyframes tagIn { to { opacity: 1; transform: translateY(-3px); } }

/* ============ BG GLOW PULSE (atmosfera) ============ */
.intro-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,31,31,0.12) 0%, transparent 60%);
  opacity: 0;
  animation:
    glowPulse 2.5s ease-in-out 1.0s,
    glowFinal 1s ease-in-out 3.2s;
  pointer-events: none;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0; }
  40%      { opacity: 1; }
}
@keyframes glowFinal {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; background: radial-gradient(ellipse at center, rgba(255,31,31,0.25) 0%, transparent 60%); }
}

/* ============ MOBILE ============ */
@media (max-width: 700px) {
  .intro-logo-circle { width: 110px; height: 110px; margin-bottom: 22px; }
  .intro-logo-i      { font-size: 70px; margin-top: 12px; }
  .intro-logo-dot    { width: 13px; height: 13px; top: 16px; }
  .intro-logo-name   { font-size: 40px; letter-spacing: -1.5px; }
  .intro-logo-line   { margin: 10px auto; }
  .intro-logo-tag    { font-size: 10px; letter-spacing: 2.5px; padding: 0 16px; text-align: center; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .intro-anim, .intro-anim * {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .intro-anim { animation: introFadeOut .3s ease-out .8s forwards !important; }
}
