/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ==========================================================================
   1. ESTILOS GENERALES Y CONFIGURACIÓN BASE (Fusión Extropian)
   ========================================================================== */



/* ==========================================================================
   ESTILOS DE ESTRUCTURA Y SCROLL (REPARADO)
   ========================================================================== */

body {
  font-family: "Helvetica Neue STL Pro Extended", Helvetica Neue, Helvetica, Arial, sans-serif;
  padding: 0;
  margin: 0;
  color: #ffffff;
  
  /* 🚀 CORRECCIÓN DE SCROLL: Forzamos a que el body permita crecer el layout */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  
  /* 🚀 FONDO REPARADO: El degradado se queda fijo atrás y permite escrolear encima */
  background: #A5A5A5;
  background: linear-gradient(180deg, rgba(165, 165, 165, 1) 23%, rgba(59, 71, 37, 0.68) 98%, rgba(205, 250, 27, 1) 100%);
  background-attachment: fixed; 
}

/* Bloqueo exclusivo de Home (si decides usarlo en el futuro) */
body.pages-home {
   overflow: hidden; 
}

main {
  width: 100%;
  margin: 0 auto;
  flex-grow: 1; /* Empuja el contenido para ocupar todo el espacio disponible */
}

/* Esto solo aplica a tu pantalla de inicio actual */
.hero-screen {
  width: 100%;
  height: 100vh;
  overscroll-behavior: none;
}

.expanded-heading {
  font-family: 'Helvetica Neue STL Pro Extended', 'Helvetica Neue', Arial, sans-serif;
  font-weight: normal;
}

.extended-heading {
  font-family: "Helvetica Neue Extended", "Helvetica Neue LT Std 73 Bold Extended", Arial, sans-serif;
  font-weight: bold;
}

.alert,
.error {
  color: red;
}

.notice {
  color: green;
}



/*.video-hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25vh; /* Región de la transición */
  /* Genera un difuminado sutil que suaviza la entrada de la consola 
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
  z-index: 2;
}*/


/* Capa de contraste traslúcida que tiñe el fondo */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Filtro esmerilado que suaviza la transición de los colores de abajo */
  background-image: radial-gradient(circle at 95% 25%, rgba(255, 255, 0, 0.6) 0%, rgba(100, 111, 0, 0.6) 60%, rgba(0,0,0, 1) 100%);
  z-index: 2; 
}

/* ==========================================================================
   FONDO ABSTRACTO INTEGRADO (Optimizado para GPU - Cero retrasos)
   ========================================================================== */
.video-background-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Capa inferior absoluta */
  overflow: hidden;
}

/* 🚀 LA ANIMACIÓN PURIFICADA: El misterio se resuelve aquí sin capas extras */
.hero-css-animated-bg {
  position: fixed; /* Fixed asegura que cubra toda la pantalla al bajar */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: block;
  z-index: 1; /* Por detrás de tus textos */
  
  /* 🎨 CALIBRACIÓN ACEITE DE OLIVA EXTROPIAN:
     Mezclamos tu verde (#cdfa1b) con capas densas de negro profundo (#08090A) 
     y tonos humo (#121518) para simular el efecto que antes hacían los overlays */
  background: #000000;
  background: linear-gradient(301deg, rgba(0, 0, 0, 1) 0%, rgba(176, 176, 176, 1) 71%, rgba(0, 0, 0, 1) 100%);
  background-size: 320% 100% !important;
  transform: translateZ(-9.7rem);
  will-change: background-position;
  
  /* ⏳ RITMO SILENCIOSO: 22 segundos. Menos velocidad = Más elegancia de laboratorio */
  animation: rainbowBackgroundShift 15s ease infinite !important;

}

 .hero-css-animated-bg::after  {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55vh; /* Región de la transición */
  /* Genera un difuminado sutil que suaviza la entrada de la consola */
background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.5));

  pointer-events: none;
  z-index: 2;
}

/* Tu Botón de WhatsApp Biselado */
.xtr-whatsapp-btn {
  position: absolute !important;
  bottom: 4rem !important;
  right: 4rem !important;
  width: 36px !important;
  height: 36px !important;
  z-index: 99999 !important; 
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* El Contenedor interno de WhatsApp */
.whatsapp-icon-container {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 2 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important; /* 🚀 EL FIX: Fuerza a que el borde no sume tamaño extra */
  
  background-color: rgba(0, 0, 0, 0.6) !important; 
  border: 1px solid rgba(255, 255, 255, 0.12) !important; 
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  
  border-radius: 0% !important; 
  clip-path: polygon(6px 0%, 100% 0%, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0% 100%, 0% 6px) !important;
}


/* Reducción milimétrica del vector inyectado */
.whatsapp-svg {
  width: 16px !important; /* Más pequeño y delicado */
  height: 16px !important;
  display: block !important;
  transform: none !important;
}

.whatsapp-svg path {
  fill: #cdfa1b !important; 
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 🛸 INTERACCIÓN INTERACTIVA RADIAL (HOVER) MANTENIDA */
.xtr-whatsapp-btn:hover .whatsapp-icon-container {
  background-color: #cdfa1b !important; 
  border-color: #cdfa1b !important;
  /* Rotación táctica segura y sutil elevación */
  transform: translateY(-2px) rotate(8deg) !important;
  box-shadow: 0 12px 25px rgba(205, 250, 27, 0.25) !important;
}

.xtr-whatsapp-btn:hover .whatsapp-svg path {
  fill: #000000 !important; 
}

/* ==========================================================================
   📡 ANIMACIÓN DE PULSO DE RADAR BISELADO MIGRADO A MICROESCALA
   ========================================================================== */
.whatsapp-radar-pulse {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
  
  background-color: rgba(205, 250, 27, 0.15) !important; /* Pulso más tenue y sutil */
  border-radius: 0% !important;
  clip-path: polygon(6px 0%, 100% 0%, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0% 100%, 0% 6px) !important;
  
  animation: xtrWhatsappRadar 3.5s cubic-bezier(0.1, 0.8, 0.1, 1) infinite !important; /* Latido ligeramente más pausado */
}

@keyframes xtrWhatsappRadar {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.4); /* Expansión controlada para no invadir el rostro */
    opacity: 0;
  }
}

/* Soporte móvil integrado */
@media (max-width: 768px) {
  .xtr-whatsapp-btn {
    bottom: 2rem !important;
    right: 2rem !important;
    width: 32px !important;
    height: 32px !important;
  }
  .xtr-video-control-btn {
    bottom: 2rem !important;
    right: calc(2rem + 40px) !important;
    width: 32px !important;
    height: 32px !important;
  }
}
/* Cuando la Navbar general se encuentre abierta (.is-open), buscamos al botón 
   de WhatsApp en todo el documento y destruimos su presencia por encima del z-index */
.global-navbar.is-open ~ .xtr-whatsapp-btn,
.global-navbar.mobile-menu-open ~ .xtr-whatsapp-btn,
body:has(.global-navbar.is-open) .xtr-whatsapp-btn {
  
  /* 🚀 EL MAZAZO: Usamos la máxima jerarquía posible para vencer tu z-index: 99999 */
  opacity: 0 !important;
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
}

/* ==========================================================================
   6. CONTENIDO NORMAL INFERIOR 
   ========================================================================== */
.main-page-content {
  position: relative;
  width: 100%;
  z-index: 3;
   margin: 0 !important;
   scroll-margin-top: 0px !important;
  scroll-snap-align: start !important;
  /* Esta transición genera un desvanecimiento exquisito hacia tu negro base */
  background: linear-gradient(to bottom, rgba(8, 9, 10, 0) 0%, #08090A 15vh) !important;
  padding-top: 10vh; /* Margen de aire para que la transición respire */
}

/* ==========================================================================
   7. SECCIÓN TIENDA / DETALLE DE PRODUCTOS 
   ========================================================================== */
section.product {
  display: flex;
  gap: 1rem;
  flex-direction: row;
}

section.product img {
  border-radius: 8px;
  flex-basis: 50%;
  max-width: 50%;
}





/* ==========================================================================
   SCROLL DE IMAN 
   ========================================================================== */

/* 1. EL CONTENEDOR MAESTRO (El que envuelve todo tu home.html.erb) */
.extropian-infinite-canvas-bg {
  height: 100vh;                 /* Obliga al contenedor a medir exactamente la pantalla */
  overflow-y: auto;              /* Permite el scroll vertical aquí dentro */
  scroll-snap-type: y mandatory; /* Activa el imán obligatorio de arriba a abajo */
  scroll-behavior: smooth;       /* Hace que el deslizamiento sea sedoso */
}


/* 3. SECCIÓN 2: TU FORMULARIO Y CONSOLA GPS (Ocupa la pantalla completa y se ancla al inicio) */

.main-page-content {
  position: relative;
  height: 100%;
  width: auto;
  z-index: 3;
  margin: 0 !important;
  
  /* 🚀 DOBLE ANCLAJE DE SEGURIDAD: */
  scroll-margin-top: 0px !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important; /* Obliga al navegador a frenar en seco aquí */
  
  background: linear-gradient(to bottom, rgba(8, 9, 10, 0) 0%, #08090A 15vh) !important;
  padding-top: 0px !important; /* 🚀 REBAJA: Cambiamos 10vh por 0px para destruir el espacio muerto superior */
}



/* ==========================================================================
   PANTALLA DE CARGA PREMIUM (Extropian Ultra-Glass Corregido)
   ========================================================================== */

.extropian-preloader { 
  position: fixed !important; 
  top: 0 !important; 
  left: 0 !important; 
  width: 100vw !important; 
  height: 100vh !important; 
  background: #a1a1a1 !important; /* Gris de Laboratorio */
  z-index: 999999 !important; 
  display: flex !important; 
  align-items: center !important; 
  justify-content: center !important;
  overflow: hidden;
  box-sizing: border-box;
}

.preloader-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100%;
}

/* 🚀 CAJA INTERFAZ PORSCHE CENTRADA */
.preloader-porsche-box {
  width: 280px;
  height: 380px; 
  box-sizing: border-box;
  padding: 2.5rem 2rem;
  
  /* Distribución vertical limpia y automática de los 4 elementos */
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important; 
  
  /* Tu textura ultra-glass aprobada */
  background: rgba(255, 255, 255, 0.02) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-top-color: rgba(255, 255, 255, 0.12) !important;
  border-left-color: rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px; 
  
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}

/* Tipografías Técnicas Flujo Nativo */
.preloader-porsche-box .sidebar-header {
  font-family: 'Helvetica Neue STL Pro Extended', Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #cdfa1b !important; 
  letter-spacing: 0.15em;
  text-align: center;
  width: 100%;
}

.preloader-porsche-box .destination-title {
  font-family: 'Helvetica Neue STL Pro Extended', Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
}

/* 🚀 EL CONTADOR ORIGINAL REPARADO
   Eliminamos el position: absolute que lo mandaba a volar fuera de la caja */
.preloader-counter {
  font-family: 'Helvetica Neue STL Pro Extended', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 100; 
  font-size: 1.5rem;
  color: #cdfa1b !important; 
  letter-spacing: 5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  width: 100%;
  opacity: 0; 
  transform: translateY(15px); /* Desplazamiento inicial sutil hacia abajo */
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Clase de activación manejada por tu JS (Mantiene tu física vertical limpia) */
.preloader-counter.counter-visible-active {
  opacity: 1 !important;
  transform: translateY(0px) !important;
}

/* 🚀 ENVOLTURAS DE ANIMACIÓN INDEPENDIENTES
   Para que 'Float' y 'Pulse' no se anulen en la GPU, aplicamos una animación 
   al contenedor contenedor-padre y la otra directamente al SVG. */
.preloader-logo-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100px;
  
  /* El padre se encarga exclusivamente del rebote vertical flotante */
  animation: extropianFloat 3s infinite ease-in-out;
}

.preloader-svg-logo {
  height: 85px; 
  width: auto;
  display: block;
  
  /* El SVG hijo se encarga exclusivamente del pulso de escala */
  animation: extropianPulse 2s infinite ease-in-out;
  transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

.preloader-svg-logo.fase-inicial {
  height: 60px; 
  opacity: 0.7;
}

/* Animación de salida de la pantalla completa */
.extropian-preloader.preloader-hidden-fade {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}


/* ==========================================================================
   🪐 CRISTAL TÁCTICO DE ALERTAS (CLEAN GLASS + RED MONOSPACE)
   ========================================================================== */

.flash-container {
  position: fixed !important;
  top: 14% !important; /* Suspendido simétricamente entre el logo y la tarjeta */
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 999999 !important;
  
  /* Ancho esbelto que permite que el texto respire sin comprimirse */
  width: 90% !important;
  max-width: 440px !important; 
  pointer-events: none !important;
}

.flash-message {
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1.5rem !important;
  padding: 0.75rem 1.1rem !important;
  border-radius: 2px !important; /* Esquinas ligeramente afiladas coordinadas con el HUD */
  text-align: center;
  /* Sincronización estricta con el mood técnico de tu index */
  font-family: monospace !important; 
  font-size: 0.68rem !important;
  letter-spacing: 0.05em !important; /* Espaciado elegante de caracteres */
  font-weight: 500 !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
  
  /* Cristal Blanco Líquido (Mismo comportamiento que tu Welcome Card) */
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  
  /* Desenfoque de fondo masivo para derretir la imagen con total pulcritud */
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  
  /* Sombra de dispersión suave */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03) !important;
  
  /* Animación de encendido cuántico limpia */
  animation: flashEntradaQuantum 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* --- ADVERTENCIA: TEXTO ROJO NEÓN SOBRE CRISTAL BLANCO --- */
.flash-message.flash-alert,
.flash-message.flash-error {
  color: #ff0037 !important; /* Rojo puro de alta vibración técnica */
}

/* --- AVISO: VERDE NEÓN SOBRE CRISTAL BLANCO --- */
.flash-message.flash-notice,
.flash-message.flash-success {
  color: #cdfa1b !important; /* Tu verde insignia para cierres de sesión exitosos */
    background: rgba(165, 165, 165, 0.7) !important;
}

/* Botón de cierre quirúrgico minimalista (✕) */
.flash-close-btn {
  background: none !important;
  border: none !important;
  color: inherit !important; /* Hereda el color rojo o verde exacto del texto */
  font-size: 0.85rem !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.4 !important;
  transition: opacity 0.2s ease !important;
}

.flash-close-btn:hover { 
  opacity: 1 !important; /* Se ilumina por completo al pasar el puntero */
}

/* --- ANIMACIÓN VECTORIAL ELÁSTICA --- */
@keyframes flashEntradaQuantum {
  0% {
    opacity: 0;
    transform: translateY(-6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   🎯 TUS KEYFRAMES ORIGINALES RECUPERADOS
   ========================================================================== */
@keyframes extropianFloat {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

@keyframes extropianPulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}




@media (min-width: 1024px) {
  
  .hero-container {
    flex-direction: row;
    gap: 6rem;
    padding: 0 4rem;
  }
  
}
@media (max-width: 700px) {
  
  .trusted-brands {
  
    width: 60%;
    margin-top: 7vh;

  }
  .hero-container {
    margin-top: 110%;
    
  }
  .video-hero-section
  {
   padding-bottom: 100%; 
  }
  .hero-css-animated-bg
  {
    height: 200%;
  }
  
}


