/* ========================================================
   NEXUS CAR - DARK CINEMATIC HERO (Lima Toyota Experience)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Chivo+Mono:wght@700;800;900&display=swap');

:root {
  --ink: #fafafa;
  --muted: #a7a6a6;
  --nav: #b6b5b5;
  --strip: #8b8a8a;
  --pill: #ffffff;
  --pill-ink: #050505;
  --brand-red: #f01438;
  --brand-red-hover: #d00f2e;
  --bg-stage: #050505;
  --bg-card: #0d1017;
  --bg-card-subtle: #141824;
  --border-card: #1f2536;
}

body {
  background-color: var(--bg-stage);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Placa font */
.font-plate, #plateInput {
  font-family: 'Chivo Mono', 'Courier New', monospace;
  letter-spacing: 0.16em;
}

/* =========================================
   HERO FULL-BLEED IMAGE & FADES
   ========================================= */
.hero-stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background-color: var(--bg-stage);
}

.plate-video-wrapper,
.plate-image-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.plate-video,
.plate-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.95;
  filter: contrast(1.05) brightness(1.08);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

/* Fades sutiles para mantener la luminosidad del video y asegurar legibilidad */
.plate-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: 
    /* Bottom fade suave únicamente en la base para conectar con el footer */
    linear-gradient(to bottom, 
      rgba(5, 5, 5, 0.35) 0%, 
      transparent 15%, 
      transparent 68%, 
      rgba(5, 5, 5, 0.65) 85%, 
      #050505 100%),
    /* Sutil viñeta lateral izquierda para proteger el texto */
    linear-gradient(to right, 
      rgba(5, 5, 5, 0.65) 0%, 
      rgba(5, 5, 5, 0.35) 35%, 
      transparent 60%);
}

/* Resplandor sutil rojo neón automotriz */
.red-neon-glow {
  position: absolute;
  top: 25%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(240, 20, 56, 0.08) 0%, transparent 70%);
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
}

/* Placa física con relieve */
.plate-outer-frame {
  box-shadow: 0 15px 45px -10px rgba(0, 0, 0, 0.95), 0 0 30px rgba(240, 20, 56, 0.25);
}

/* Laser de escaneo */
.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #f01438;
  box-shadow: 0 0 16px 4px #f01438;
  animation: scanLaser 1.5s ease-in-out infinite alternate;
}

@keyframes scanLaser {
  0% { top: 5%; opacity: 0.7; }
  50% { opacity: 1; }
  100% { top: 92%; opacity: 0.7; }
}

/* ========================================================
   ANIMACIÓN HERO: INVESTIGACIÓN E HISTORIAL VEHICULAR
   ======================================================== */

/* Contenedor del Widget de Investigación */
.investigation-card {
  background: rgba(10, 12, 16, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85), 0 0 40px -15px rgba(229, 9, 32, 0.20);
  transition: all 0.4s ease;
}

/* Placa Peruana Estilizada 3D Sutil */
.plate-peru-stylized {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #fdfdfd;
  color: #11141a;
  border-radius: 10px;
  padding: 6px 16px 8px;
  border: 2px solid #20242c;
  box-shadow: 
    0 6px 18px -2px rgba(0, 0, 0, 0.6), 
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 -2px 0 0 rgba(0, 0, 0, 0.2) inset;
  user-select: none;
  overflow: hidden;
}

.plate-peru-header {
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: #e50920;
  text-transform: uppercase;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plate-peru-number {
  font-family: 'Chivo Mono', monospace;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #0b0d12;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* Línea de escaneo láser sutil */
.plate-scanner-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e50920, transparent);
  box-shadow: 0 0 10px 1px #e50920;
  opacity: 0.85;
  animation: plateScanLoop 2.4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes plateScanLoop {
  0% { top: 2px; opacity: 0.2; }
  50% { opacity: 0.9; }
  100% { top: calc(100% - 4px); opacity: 0.2; }
}

/* Tarjetas de fuentes de investigación */
.investigation-node {
  background: rgba(14, 18, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.investigation-node.node-active {
  border-color: rgba(229, 9, 32, 0.35);
  background: rgba(20, 24, 34, 0.95);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.5);
}

.investigation-node.node-checked {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(12, 24, 20, 0.9);
}

/* Líneas conectoras animadas */
.connecting-path {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-dasharray: 4 4;
  animation: flowLine 20s linear infinite;
}

.connecting-path.path-active {
  stroke: rgba(229, 9, 32, 0.6);
  stroke-dasharray: 6 3;
}

@keyframes flowLine {
  to {
    stroke-dashoffset: -100;
  }
}

/* Línea de tiempo histórica */
.timeline-track {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.timeline-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #e50920, #10b981);
  border-radius: 2px;
  transition: width 1s ease;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #080a0d;
  background: #2a3140;
  transition: all 0.4s ease;
}

.timeline-dot.dot-active {
  background: #e50920;
  box-shadow: 0 0 10px rgba(229, 9, 32, 0.6);
  transform: scale(1.15);
}

.timeline-dot.dot-current {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  transform: scale(1.25);
}

/* Capas del expediente digital */
.dossier-row {
  background: rgba(14, 18, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(6px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dossier-row.dossier-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Stepper Pill Indicators */
.stepper-btn {
  height: 4px;
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.stepper-btn.stepper-active {
  background: rgba(255, 255, 255, 0.25);
}

.stepper-btn .stepper-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #e50920;
  transition: width 0.1s linear;
}

.stepper-btn.stepper-completed .stepper-progress {
  width: 100%;
  background: #10b981;
}


/* Transiciones universales */
button, input, a {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar oscuro */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #050505;
}
::-webkit-scrollbar-thumb {
  background: #1f2637;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f01438;
}

/* Print para reportes PDF */
@media print {
  header, footer, #floatingWhatsappBtn, #searchForm, #precios, #fuentes, #faq, .no-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  #reportSection {
    display: block !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
}
