/* ============================================================
   PANDORAW · animaciones.css
   Todos los efectos visuales y de movimiento.
   ============================================================ */

/* ---------- CANVAS DE PARTICULAS ---------- */
.particulas{
  position:absolute; inset:0;
  width:100%; height:100%;
  pointer-events:none;
  z-index:1;
}
.hero .particulas{ z-index:1 }

/* ============================================================
   (01/11/2026 · Amber) FONDO DE PARTICULAS DE FUEGO A PANTALLA
   COMPLETA, EN TODAS LAS SECCIONES.
   El motor js/particulas.js (tema "chispas": naranja #ff8c00 +
   amarillo #ffd400, suben con glow) sigue vivo. Lo que se perdio
   fue el <canvas> en el HTML de la pantalla principal y de
   borderlands.html, y en las paginas de juego el canvas si estaba
   pero lo TAPABAN el grano de papel fijo (z-index 80/90) y los
   fondos de body con pseudo-elementos. Aqui se define la capa
   FIJA del canvas y se le da rango para que se vea.
   ============================================================ */
canvas.particulas.particulas-fondo{
  position:fixed !important;   /* movil.css lo trae en @media y gana por orden de carga */
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  display:block !important;
  z-index:1 !important;
  pointer-events:none !important;
  opacity:.72;
}


/* ---------- REVEAL AL SCROLL ---------- */
.reveal{
  opacity:0;
  transform:translateY(34px) scale(.97);
  transition:
    opacity .7s cubic-bezier(.22,1,.36,1),
    transform .7s cubic-bezier(.22,1,.36,1);
  will-change:opacity, transform;
}
.reveal.revelado{
  opacity:1;
  transform:translateY(0) scale(1);
}

/* variantes de entrada */
.reveal-izq{ transform:translateX(-46px) }
.reveal-der{ transform:translateX(46px) }
.reveal-zoom{ transform:scale(.86) }
.reveal-izq.revelado,
.reveal-der.revelado,
.reveal-zoom.revelado{ transform:none }

/* ---------- BARRA DE PROGRESO ---------- */
.barra-progreso{
  position:fixed; top:0; left:0;
  height:3px; width:0%;
  background:linear-gradient(90deg, var(--magenta), var(--purple), var(--cyan));
  box-shadow:0 0 10px rgba(255,42,109,.9), 0 0 22px rgba(5,217,232,.6);
  z-index:9999;
  transition:width .1s linear;
  pointer-events:none;
}

/* ---------- TYPEWRITER ---------- */
.hero .sub.typing{ min-height:1.6em }
.cursor-type{
  display:inline-block;
  margin-left:2px;
  color:var(--cyan);
  text-shadow:var(--glow-c);
  animation:parpadeo .85s steps(2, start) infinite;
}
@keyframes parpadeo{
  0%, 45%{ opacity:1 }
  50%, 100%{ opacity:0 }
}

/* ---------- GLITCH EN EL TITULO ---------- */
.hero h1.glitch{
  position:relative;
}
.hero h1.glitch::before,
.hero h1.glitch::after{
  content:attr(data-texto);
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  background:transparent;
}
.hero h1.glitch.glitching::before{
  opacity:.85;
  color:var(--cyan);
  transform:translate(-3px, 2px);
  text-shadow:-2px 0 var(--cyan);
  clip-path:polygon(0 0, 100% 0, 100% 38%, 0 38%);
  animation:glitchA .26s steps(2) 1;
}
.hero h1.glitch.glitching::after{
  opacity:.85;
  color:var(--magenta);
  transform:translate(3px, -2px);
  text-shadow:2px 0 var(--magenta);
  clip-path:polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  animation:glitchB .26s steps(2) 1;
}
@keyframes glitchA{
  0%{ transform:translate(-3px,2px) }
  50%{ transform:translate(4px,-1px) }
  100%{ transform:translate(-3px,2px) }
}
@keyframes glitchB{
  0%{ transform:translate(3px,-2px) }
  50%{ transform:translate(-4px,1px) }
  100%{ transform:translate(3px,-2px) }
}

/* ---------- CURSOR PERSONALIZADO ---------- */
.cursor-punto,
.cursor-aro{
  position:fixed; top:0; left:0;
  pointer-events:none;
  z-index:9998;
  border-radius:50%;
  will-change:transform;
}
.cursor-punto{
  width:6px; height:6px;
  margin:-3px 0 0 -3px;
  background:var(--cyan);
  box-shadow:0 0 10px var(--cyan), 0 0 20px rgba(5,217,232,.6);
}
.cursor-aro{
  width:34px; height:34px;
  margin:-17px 0 0 -17px;
  border:1.5px solid rgba(255,42,109,.75);
  box-shadow:0 0 14px rgba(255,42,109,.5);
  transition:width .22s, height .22s, margin .22s, border-color .22s, background .22s;
}
.cursor-aro.activo{
  width:54px; height:54px;
  margin:-27px 0 0 -27px;
  border-color:var(--cyan);
  background:rgba(5,217,232,.08);
  box-shadow:0 0 22px rgba(5,217,232,.7);
}
@media (pointer: coarse){ .cursor-punto, .cursor-aro{ display:none } }

/* ---------- BRILLO QUE SIGUE AL MOUSE ---------- */
.tiene-brillo{ position:relative; overflow:hidden }
.tiene-brillo::after{
  content:"";
  position:absolute; inset:0;
  background:radial-gradient(
    circle 140px at var(--mx, 50%) var(--my, 50%),
    rgba(5,217,232,.16),
    transparent 70%
  );
  opacity:0;
  transition:opacity .3s;
  pointer-events:none;
  z-index:1;
}
.tiene-brillo:hover::after{ opacity:1 }

/* ---------- ANIMACIONES DE ENTRADA DEL HERO ---------- */
.hero .logo-hero{
  animation:flotarLogo 5.5s ease-in-out infinite;
}
@keyframes flotarLogo{
  0%, 100%{ transform:translateY(0) }
  50%{ transform:translateY(-12px) }
}

.hero h1{
  animation:entradaTitulo 1s cubic-bezier(.22,1,.36,1) both;
}
@keyframes entradaTitulo{
  from{ opacity:0; transform:translateY(40px) scale(.94); filter:blur(8px) }
  to{ opacity:1; transform:none; filter:blur(0) }
}

.hero .lead{
  animation:entradaTitulo 1s .25s cubic-bezier(.22,1,.36,1) both;
}
.hero-cta{
  animation:entradaTitulo 1s .45s cubic-bezier(.22,1,.36,1) both;
}
.stats{
  animation:entradaTitulo 1s .65s cubic-bezier(.22,1,.36,1) both;
}

/* ---------- PULSO EN LOS BOTONES ---------- */
.btn{ position:relative; overflow:hidden }
.btn::after{
  content:"";
  position:absolute;
  top:0; left:-120%;
  width:60%; height:100%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform:skewX(-20deg);
  transition:left .55s ease;
  pointer-events:none;
}
.btn:hover::after{ left:130% }

/* ---------- LATIDO EN EL LOGO DE LA MARCA ---------- */
.marca img{
  animation:latido 3.4s ease-in-out infinite;
}
@keyframes latido{
  0%, 100%{ filter:drop-shadow(0 0 10px rgba(230,33,41,.65)) }
  50%{ filter:drop-shadow(0 0 20px rgba(230,33,41,.95)) drop-shadow(0 0 34px rgba(255,42,109,.5)) }
}

/* ---------- LINEA QUE RECORRE LOS TITULOS ---------- */
.titulo{
  position:relative;
}
.titulo::after{
  content:"";
  display:block;
  width:0;
  height:2px;
  margin:.9rem auto 0;
  background:linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  box-shadow:0 0 12px rgba(5,217,232,.8);
  transition:width .9s cubic-bezier(.22,1,.36,1);
}
.titulo.revelado::after,
.titulo::after{ width:min(220px, 46%) }

/* ---------- FLOTAR SUAVE EN ICONOS DE JUEGO ---------- */
.juego img{
  animation:flotarIcono 4s ease-in-out infinite;
}
.juego:nth-child(3n) img{ animation-delay:-1.3s }
.juego:nth-child(3n+1) img{ animation-delay:-2.6s }
@keyframes flotarIcono{
  0%, 100%{ transform:translateY(0) }
  50%{ transform:translateY(-5px) }
}
.juego:hover img{
  animation-play-state:paused;
  transform:scale(1.12);
}

/* ---------- SUDOR/GLOW EN LOS MODELOS ---------- */
.modelo::after{
  content:"";
  position:absolute; inset:-1px;
  border-radius:inherit;
  padding:1px;
  background:linear-gradient(135deg, var(--cyan), transparent 40%, transparent 60%, var(--magenta));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  opacity:0;
  transition:opacity .35s;
  pointer-events:none;
}
.modelo:hover::after{ opacity:1 }

/* ---------- AVATARES DEL EQUIPO CON ANILLO GIRATORIO ---------- */
.miembro .avatar{
  position:relative;
  transition:transform .35s;
}
.miembro:hover .avatar{
  transform:scale(1.1) rotate(-4deg);
}
.miembro .avatar::before{
  content:"";
  position:absolute; inset:-6px;
  border-radius:50%;
  border:2px solid transparent;
  border-top-color:var(--cyan);
  border-right-color:var(--magenta);
  opacity:0;
  transition:opacity .3s;
  animation:girar 2.4s linear infinite;
}
.miembro:hover .avatar::before{ opacity:1 }
@keyframes girar{ to{ transform:rotate(360deg) } }

/* ---------- RETRATOS CON ENTRADA ESCALONADA ---------- */
.bl-retrato{
  animation:aparecerRetrato .8s cubic-bezier(.22,1,.36,1) both;
}
@keyframes aparecerRetrato{
  from{ opacity:0; transform:scale(.9) translateY(14px) }
  to{ opacity:1; transform:none }
}

/* ---------- ICONOS ARKHAM CON PULSO ---------- */
.ak-icono{
  animation:pulsoAk 4.5s ease-in-out infinite;
}
@keyframes pulsoAk{
  0%, 100%{ filter:drop-shadow(0 0 16px rgba(74,144,217,.7)) }
  50%{ filter:drop-shadow(0 0 26px rgba(74,144,217,1)) drop-shadow(0 0 44px rgba(255,215,0,.45)) }
}

/* ---------- GALERIA CYBERPUNK CON ENTRADA ---------- */
.cp-galeria img{
  animation:aparecerGaleria .7s cubic-bezier(.22,1,.36,1) both;
}
.cp-galeria img:nth-child(1){ animation-delay:.05s }
.cp-galeria img:nth-child(2){ animation-delay:.1s }
.cp-galeria img:nth-child(3){ animation-delay:.15s }
.cp-galeria img:nth-child(4){ animation-delay:.2s }
.cp-galeria img:nth-child(5){ animation-delay:.25s }
.cp-galeria img:nth-child(6){ animation-delay:.3s }
.cp-galeria img:nth-child(7){ animation-delay:.35s }
.cp-galeria img:nth-child(8){ animation-delay:.4s }
@keyframes aparecerGaleria{
  from{ opacity:0; transform:scale(.82) rotate(-3deg) }
  to{ opacity:1; transform:none }
}

/* ---------- ZONAS CON ENTRADA EN CASCADA ---------- */
.zonas span{
  animation:aparecerZona .5s ease both;
}
@keyframes aparecerZona{
  from{ opacity:0; transform:translateY(10px) scale(.92) }
  to{ opacity:1; transform:none }
}

/* ---------- CHISPAS QUE SUBEN EN BORDERLANDS (CSS puro, sin canvas) ---------- */
.seccion-tematica.bl .tema-titulo{
  animation:parpadeoFuego 3.2s ease-in-out infinite;
}
@keyframes parpadeoFuego{
  0%, 100%{
    text-shadow:
      3px 3px 0 var(--bl-negro), -1px -1px 0 var(--bl-negro),
      1px -1px 0 var(--bl-negro), -1px 1px 0 var(--bl-negro),
      0 0 24px rgba(255,140,0,.85), 0 0 60px rgba(255,140,0,.4);
  }
  50%{
    text-shadow:
      3px 3px 0 var(--bl-negro), -1px -1px 0 var(--bl-negro),
      1px -1px 0 var(--bl-negro), -1px 1px 0 var(--bl-negro),
      0 0 34px rgba(255,212,0,1), 0 0 80px rgba(255,140,0,.65);
  }
}

/* ---------- TITULO ELDEN RING CON BRILLO QUE RESPIRA ---------- */
.seccion-tematica.er .tema-titulo{
  animation:respirarOro 5s ease-in-out infinite;
}
@keyframes respirarOro{
  0%, 100%{
    text-shadow:0 0 8px rgba(212,175,55,.7), 0 0 30px rgba(212,175,55,.4), 0 0 70px rgba(212,175,55,.2);
  }
  50%{
    text-shadow:0 0 14px rgba(240,217,125,.95), 0 0 48px rgba(212,175,55,.65), 0 0 110px rgba(212,175,55,.35);
  }
}

/* ---------- TITULO ARKHAM CON RELAMPAGO ---------- */
.seccion-tematica.ak .tema-titulo{
  animation:relampago 6s ease-in-out infinite;
}
@keyframes relampago{
  0%, 88%, 100%{
    text-shadow:0 0 10px rgba(74,144,217,.9), 0 0 36px rgba(74,144,217,.5);
  }
  90%{
    text-shadow:0 0 18px #fff, 0 0 50px rgba(158,203,255,1), 0 0 90px rgba(74,144,217,.9);
  }
  92%{
    text-shadow:0 0 10px rgba(74,144,217,.9), 0 0 36px rgba(74,144,217,.5);
  }
  94%{
    text-shadow:0 0 18px #fff, 0 0 50px rgba(158,203,255,1), 0 0 90px rgba(74,144,217,.9);
  }
}

/* ---------- TITULO CYBERPUNK CON SCAN ---------- */
.seccion-tematica.cp .tema-titulo{
  animation:scanNeon 3.6s ease-in-out infinite;
}
@keyframes scanNeon{
  0%, 100%{
    text-shadow:2px 2px 0 #00f0ff, -2px -2px 0 #ff003c, 0 0 24px rgba(252,238,10,.75);
  }
  50%{
    text-shadow:3px 3px 0 #00f0ff, -3px -3px 0 #ff003c, 0 0 40px rgba(252,238,10,1), 0 0 70px rgba(0,240,255,.5);
  }
}

/* ---------- SCANLINES QUE BAJAN ---------- */
.cielo::after{
  animation:scanline 9s linear infinite;
}
@keyframes scanline{
  from{ background-position-y:0 }
  to{ background-position-y:100px }
}

/* ---------- RESPETO A REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
  .reveal{ opacity:1 !important; transform:none !important }
  .cursor-punto, .cursor-aro{ display:none !important }
}

/* ---------- MOVIL: menos carga ---------- */
@media (max-width:820px){
  .cursor-punto, .cursor-aro{ display:none }
  .reveal{ transform:translateY(20px) }
  .juego img{ animation:none }
  .hero .logo-hero{ animation:none }
}
