/* ============================================================
   Módulo 1 · Intro (portada)
   Mismas animaciones y medidas del prototipo aprobado.
   ============================================================ */

.intro { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--negro); }
.intro [hidden] { display: none !important; }

/* Los botones de la intro son más compactos que los del sitio */
.intro .btn2 { height: 44px; padding: 0 20px; font-weight: 400; font-size: 12px; letter-spacing: .1em; }

/* --- Barra superior e inferior ------------------------------ */
.hud { position: absolute; z-index: 9; color: var(--gris); }
.hud-tl { top: 28px; left: 32px; }
.hud-tr { top: 28px; right: 32px; display: flex; gap: 12px; align-items: center; }
.hud-bl { bottom: 28px; left: 32px; }
.hud-br { bottom: 28px; right: 32px; }

/* --- Fases -------------------------------------------------- */
.ph { position: absolute; inset: 0; }
.ph0 { display: flex; flex-direction: column; gap: 24px; padding: 120px 80px; background: var(--panel); }
.ph0 > div { background: var(--linea); }
.ph-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.corte { color: var(--rojo); font-size: 14px; display: flex; gap: 12px; align-items: center; }
.reddot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rojo); animation: pulse .4s infinite; }
.xfer { width: 360px; max-width: 80vw; height: 1px; background: var(--linea); }
.xfer i { display: block; height: 1px; width: 0; background: var(--amarillo); }

/* Carga de energía */
.load { inset: auto 0 72px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 20px; z-index: 3; }
.kva { font-size: clamp(48px, 7vw, 88px); letter-spacing: 0; color: var(--amarillo); line-height: 1; }
.kva small { font-size: 22px; color: var(--gris); }
.load { text-shadow: 0 2px 16px rgba(0,0,0,.85); }
.segs { display: flex; gap: 4px; }
.segs span { display: block; width: 14px; height: 6px; background: var(--linea); }
.segs span.on { background: var(--amarillo); }
.lecturas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; color: var(--gris); }
.lecturas b { color: var(--texto); font-weight: 400; }

/* Sello "Servicio 24/7" */
.b247 { display: inline-flex; align-items: center; gap: 14px; padding: 12px 24px 12px 18px; border: 1px solid var(--amarillo); background: rgba(255,209,0,.08); box-shadow: 0 0 28px rgba(255,209,0,.28), inset 0 0 18px rgba(255,209,0,.08); animation: pop .55s cubic-bezier(.2,.9,.25,1) both; }
.b247 .lb { font-size: 12px; letter-spacing: .16em; color: var(--texto); }
.b247 .nm { font-family: "Archivo", sans-serif; font-variation-settings: "wdth" 125; font-weight: 800; letter-spacing: -.01em; font-size: 40px; line-height: 1; color: var(--amarillo); text-shadow: 0 0 18px rgba(255,209,0,.45); }
.b247 .pd { width: 10px; height: 10px; border-radius: 50%; background: var(--amarillo); animation: ping 1.4s ease-out infinite; }
.final .b247.up1 { animation: up .5s ease-out 1.1s forwards; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 60% { transform: scale(1.08); opacity: 1 } 100% { transform: scale(1); opacity: 1 } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,209,0,.7) } 100% { box-shadow: 0 0 0 12px rgba(255,209,0,0) } }

/* Final: logo + Entrar */
.final { z-index: 5; pointer-events: none; }
.final-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 96px 20px 0; gap: 22px; text-align: center; }
.final .btn { pointer-events: auto; }
.estado { display: flex; gap: 10px; align-items: center; }

/* --- Camión ------------------------------------------------- */
.plant { position: absolute; inset: 0; }
.plant-wrap { position: absolute; inset: 0; transition: transform 1s cubic-bezier(.2,.9,.25,1), filter .8s ease; z-index: 2; }
.scene { position: absolute; inset: 0; }
.fv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; background: var(--negro); }
/* Viñeta: funde el video con el fondo negro y deja legible el contador de abajo */
.fv-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 42%, rgba(11,11,12,0) 55%, rgba(11,11,12,.9) 100%),
              linear-gradient(to top, rgba(11,11,12,.97) 0, rgba(11,11,12,.88) 22%, rgba(11,11,12,.45) 38%, rgba(11,11,12,0) 56%),
              linear-gradient(to bottom, rgba(11,11,12,.7) 0, rgba(11,11,12,0) 18%); }
.floor, .floorglow { display: none; }
.floor { position: absolute; left: 50%; top: 58%; width: 1500px; height: 200px; margin-left: -750px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0,0,0,.95) 0%, rgba(0,0,0,0) 70%); }
.floorglow { position: absolute; left: 50%; top: 50%; width: 1600px; height: 360px; margin-left: -800px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,209,0,.16) 0%, rgba(255,209,0,0) 65%); transition: opacity .6s; }

/* --- Animaciones -------------------------------------------- */
@keyframes flick { 0%,100% { opacity: 1 } 20% { opacity: .15 } 40% { opacity: .9 } 60% { opacity: .05 } 80% { opacity: .6 } }
@keyframes flash { 0% { opacity: 0 } 12% { opacity: 1 } 100% { opacity: 0 } }
@keyframes shake { 0%,100% { transform: translate(0,0) } 15% { transform: translate(-6px,3px) } 30% { transform: translate(5px,-4px) } 45% { transform: translate(-3px,2px) } 60% { transform: translate(2px,-1px) } 75% { transform: translate(-1px,1px) } }
@keyframes crt { 0% { transform: scaleX(0); opacity: 1 } 45% { transform: scaleX(1); opacity: 1 } 100% { transform: scaleX(1) scaleY(60); opacity: 0 } }
@keyframes ring { 0% { transform: translate(-50%,-50%) scale(.1); opacity: 1 } 100% { transform: translate(-50%,-50%) scale(4); opacity: 0 } }
@keyframes slam { 0% { transform: scale(2.4); filter: blur(24px) brightness(3); opacity: 0 } 55% { transform: scale(.94); filter: blur(0) brightness(1.5); opacity: 1 } 75% { transform: scale(1.03); filter: blur(0) brightness(1.15) } 100% { transform: scale(1); filter: blur(0) brightness(1); opacity: 1 } }
@keyframes sweep { 0% { transform: translateX(-140%) skewX(-20deg) } 100% { transform: translateX(520%) skewX(-20deg) } }
@keyframes up { 0% { transform: translateY(16px); opacity: 0 } 100% { transform: translateY(0); opacity: 1 } }
@keyframes vib { 0%,100% { transform: translate(-50%,-50%) } 50% { transform: translate(-50%, calc(-50% - 1px)) } }

.flick { animation: flick .4s steps(2) 1; }
.shake { animation: shake .55s ease-out 1; }
.flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 34%, #EDEBE6 0%, #FFD100 22%, rgba(11,11,12,0) 70%); opacity: 0; animation: flash .7s ease-out forwards; z-index: 8; }
.crt { position: absolute; left: 0; right: 0; top: 34%; height: 1px; background: var(--amarillo); transform: scaleX(0); animation: crt .5s ease-in forwards; z-index: 7; pointer-events: none; }
.ring { position: absolute; left: 50%; top: 34%; width: 280px; height: 280px; border: 1px solid var(--amarillo); border-radius: 50%; opacity: 0; animation: ring 1s ease-out .05s forwards; pointer-events: none; z-index: 7; }
.logo { position: relative; width: min(480px, 80vw); opacity: 0; animation: slam .9s cubic-bezier(.2,.9,.25,1) .15s forwards; }
.logo img { display: block; width: 100%; height: auto; }
.shine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; -webkit-mask-image: url(../img/logo-cj.png); mask-image: url(../img/logo-cj.png); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 18%; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0)); transform: translateX(-140%) skewX(-20deg); animation: sweep 1.1s ease-in-out 1s forwards; }
.up1 { opacity: 0; animation: up .5s ease-out 1.1s forwards; }
.up2 { opacity: 0; animation: up .5s ease-out 1.35s forwards; }

/* --- Celular ------------------------------------------------ */
@media (max-width: 700px) {
  .hud-tl { display: none; }
  .hud-tr { left: 20px; right: 20px; top: 20px; justify-content: flex-end; }
  .hud-bl { left: 20px; bottom: 20px; }
  .hud-br { right: 20px; bottom: 20px; }
  .ph0 { padding: 96px 24px; }
  .load { bottom: 64px; }
  .segs span { width: 10px; }
  .lecturas { gap: 8px 18px; font-size: 10px; }
  .b247 { gap: 10px; padding: 9px 18px 9px 14px; }
  .b247 .lb { font-size: 10px; }
  .b247 .nm { font-size: 30px; }
  .final-in { padding-top: 110px; }
  .fv { inset: auto; left: -30vw; top: 46%; width: 160vw; height: auto; aspect-ratio: 16 / 9; transform: translateY(-50%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 72%, transparent 100%); }
  .fv-shade { background: linear-gradient(to bottom, var(--negro) 0, rgba(11,11,12,0) 30%, rgba(11,11,12,0) 60%, rgba(11,11,12,.6) 75%); }
}

/* --- Si la persona pidió menos movimiento ------------------ */


/* Respaldo: si el celular bloquea el video (bajo consumo), se ve la imagen del camión */
.fv{background:var(--negro) url(../video/intro-flow-poster.webp) 50% 45%/cover no-repeat}
