/* ==========================================================================
   🛸 1. CHASIS FLOTANTE UNIVERSAL (BARRA SUPERIOR)
   ========================================================================== */
.global-navbar {
  position: fixed;
  top: 0; /* 🚀 Pegada arriba para evitar el hueco transparente raro */

  width: 100%; /* Cubre el ancho completo para unificar el bloque superior */
  max-width: 100%;
  height: 84px;             
  z-index: 100000; /* Por encima del overlay siempre */          
  background: transparent; /* Sutil tinte de vidrio inicial */
 /*
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
    transition: all 0.0001s cubic-bezier(0.16, 1, 0.3, 1);
 */

}

header .global-navbar,
.nav-main-chassis { /* Reemplaza/Asegura que apunte a la clase de tu etiqueta principal de la barra */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  
  /* 🚀 EL CAMBIO MAESTRO: Forzamos a que en reposo la barra mida ÚNICAMENTE sus 64px de alto.
     Ya no invadirá tu Hero ni pondrá un muro invisible sobre la cara de la modelo. */
  height: 84px !important; 
  
  z-index: 200000 !important; /* Capa superior de mandos de hardware */
  
  /* 🚀 FANTASMA PERIMETRAL: La barra ignora el tacto en sus zonas vacías, 
     dejando que el mouse pase directo hacia tu Canvas y coordenadas abajo */
  pointer-events: none !important; 
  
  background: transparent !important; /* Totalmente limpia y aséptica */
  box-sizing: border-box;
}

/* 🛸 Cuando el menú está abierto, la barra se fusiona cromáticamente con la cortina */
.global-navbar.is-open {
  background: rgba(165, 165, 165, 0.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);

  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
 
  pointer-events: auto !important;
}



.navbar-container {
  position: relative;       
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%; /* Mantiene tu contenedor alineado internamente */
  max-width: 1800px;
  height: 100%;             
  margin: 0 auto;
  padding: 0; 
  box-sizing: border-box;
}
/* --- EXTREMO IZQUIERDA --- */
.nav-left-actions-group {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: flex-start;
}


.nav-left-actions-group,
.nav-center-brand-chassis,
.nav-right-actions-group,
.mobile-menu-trigger,
.nav-brand-link,
.btn-logout-nav,
.nav-capsule-item {
  pointer-events: auto !important; /* Tu mano sí puede picarles directo */
  position: relative;
  z-index: 210000 !important;
}

.mobile-menu-trigger.global-hamburger-btn {
  font-family: 'Space Mono', 'Anonymous Pro', monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  z-index: 9999;
}

.icon-mobile-nav {
  width: 1.2rem;
  height: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
}

.hud-menu-icon-text {
  font-family: 'Space Mono', 'Anonymous Pro', monospace;
  font-size: .7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-left: 0.5rem;
}

.mobile-menu-trigger.global-hamburger-btn:hover .hud-menu-icon-text {
  color: #ffffff;
}

/* --- CENTRO: LOGOTIPO CROMADO --- */
.nav-center-brand-chassis {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 100%;
   margin-top: 30px !important; /* Lo bajamos 30px de la cima de la pantalla */
  transition: all 0.3s ease;
}

.nav-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  height: 100%;
}

.extropian-logo.brand-full-logo {
  width: 140px !important; /* Reducimos su tamaño un toque para que se vea más editorial y sofisticado */
  height: auto !important;
}

.brand-isotopo,
.extropian-favicon.brand-isotopo,
.nav-brand-link svg:nth-child(2) {
  display: none;
  width: 0;
  height: 0;
  opacity: 0;
  visibility: hidden;
}


/* El logotipo principal adquiere tu altura micro-editorial premium calibrada */
.extropian-logo.brand-full-logo,
.nav-brand-link svg:first-child {
  display: block !important;
  height: 200% !important; /* Altura fina de alta costura interactiva */
  width: auto !important;
  max-width: 140px !important;
  object-fit: contain !important;
  opacity: 1 !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important; 

  /*  sombras encadenadas originales para dar relieve tridimensional
  filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.4)) 
          drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.1)) 
          drop-shadow(0px 0px 12px rgba(255, 255, 255, 0.05)) !important; */
}

/* Fuerza a que el vector chupe el gradiente líquido de metal que tenías en tus defs */
/*.brand-full-logo path,
.brand-full-logo g,
.extropian-logo path,
.extropian-logo g,
.nav-brand-link svg path { 
  fill: url(#extropianPlatinumLiquid) !important; /* Look cromado texturizado original recuperado 
}
*/
.nav-brand-link:hover .brand-full-logo {
  opacity: 0.85 !important;
  filter: drop-shadow(0px 0px 15px rgba(255, 255, 255, 0.25)) !important;
}

/* --- EXTREMO DERECHO --- */
.nav-right-actions-group {
  display: flex;
  align-items: center;
  flex: 1; 
  justify-content: flex-end;
}

.nav-options {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px; 
  align-items: center;
}

.nav-capsule-item {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-logout-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', 'Anonymous Pro', monospace;
  font-weight: 500;
  font-size: 0.62rem; 
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(226, 240, 99, 0.3);
  border-radius: 50px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;   
  height: 28px;               
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-logout-nav:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.icon-logout {
  height: 12px;
  width: 12px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease;
}

.btn-logout-nav:hover .icon-logout {
  color: #ffffff;
}
/* ==========================================================================
   👽 2. CORTINA OVERLAY GLOBAL (SISTEMA DE MENÚ TÁCTICO UNIFICADO)
   ========================================================================== */

.extropian-global-menu-overlay {
  position: fixed; 
  top: 84px; /* 🚀 Tu posición perfecta abajo de la barra */
  left:0;
  right:0;
  width:auto;
  bottom: 0; 
  height: calc(100vh - 84px); 
  
  /* Tinte esmerilado de alta costura original intacto */
  background: linear-gradient(300deg, rgba(165, 165, 165, 0.86) 0%, rgba(165, 165, 165, 0.2) 50%, rgba(196, 194, 194, 1) 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;

  box-shadow:
  0 -1px 0 rgba(255,255,255,.1),
  0 0 80px rgba(205,250,27,.8);
  
  z-index: 99999; 
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  
  opacity: 0;
  pointer-events: none; 
  
  will-change: opacity, transform;
  
  /* Retorno ultra-fluido de instrumentación analógica */
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.extropian-global-menu-overlay::after{
    content:"";
    position:absolute;
    top:0;
    left:0;
    right:0;
    height:1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    pointer-events:none;
}

/* Evita que la transición pelee con el movimiento en vivo de tu dedo */
.extropian-global-menu-overlay.is-dragging {
  transition: opacity 0.1s linear, transform 0s linear !important;
}

/* 🚀 COMPUERTA LOGICA GOBERNADA POR TU NAVBAR */
.global-navbar.is-open .extropian-global-menu-overlay {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.global-navbar.is-open .nav-center-brand-chassis {
   margin-top: 0px !important;
}

/* FIX SUPREMO APAGA CANVAS */
.global-navbar.is-open ~ #cinematicScreen canvas[data-fluid-refraction-target="canvas"],
.global-navbar.is-open + #cinematicScreen canvas[data-fluid-refraction-target="canvas"] {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ==========================================================================
   🛡️ PROTECTOR DE LEGIBILIDAD EXCLUSIVO (ZONA CENTRAL DE BOTONES)
   ========================================================================== */

/* Cuando la consola está abierta o estamos fuera del home, dotamos al chasis de 
   los links de un cristal denso oscuro para fulminar el ruido tipográfico de atrás */
.is-active-ai-console .overlay-inner-content-tactical,
body:not(.pages-home) .overlay-inner-content-tactical {
 background: rgb(161, 161, 161) !important; /* Tu tono exacto del gradiente, sin transparencia */
  backdrop-filter: none !important; /* Ya no requiere blur porque es una placa sólida limpia */
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2) !important; /* Suavizamos la caída con una sombra profunda */

}


.extropian-global-menu-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(0, 0, 0); 
  will-change: transform;
}

.overlay-inner-content-tactical {
  width: 100%;
  max-width: 100%;
  height: 100%;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.overlay-nav-links-tactical {
  display: flex;
  flex-direction: column;
  gap: 4vh; 
  width: 100%;
  max-width: 290px; 
  margin: 0 0 2rem 0; 
  padding: 0;
  z-index: 5;
  align-items: center; 
  list-style: none;
}

.tactical-plate-li {
  width: 100%;
  list-style: none;
  display: flex;
  justify-content: center; 
}

.tactical-plate-li a {
  display: flex;
  align-items: center;
  justify-content: center; 
  width: 100%; 
  height: 32px; 
  
  font-family: 'Space Mono', 'Anonymous Pro', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase; 
  letter-spacing: 0.22em; 
  text-decoration: none;
  
  /* Acabado Cristal Esmerilado de tu referencia */
  background: #A5A5A5;
background: linear-gradient(180deg, rgba(255, 255, 255, .1) 88%, rgba(205, 250, 27, 0.19) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF; 
  
  border-radius: 0; 
  clip-path: polygon(10px 0%, 100% 0%, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0% 100%, 0% 10px);
  
  transform: none;
  text-shadow: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interacción universal (Hover y Activo) */
.tactical-plate-li.active a,
.tactical-plate-li a:hover {
  background: rgba(255, 255, 255, 0.85); 
  border: 1px solid rgba(255, 255, 255, 0.6); 
  color: #000000; 
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* --- TEXTURAS MARCA DE AGUA --- */
.hud-bg-texture-left, 
.hud-bg-texture-right {
  display: block; 
  position: absolute;
  font-family: 'Space Mono', 'Anonymous Pro', monospace;
  font-size: 0.45rem; 
  line-height: 1.4; 
  color: rgba(255, 255, 255, 0.08); 
  letter-spacing: 0.02em;
  pointer-events: none;
  width: 150px;
  z-index: 1;
}

.hud-bg-texture-left { top: 15%; left: 1.5rem; text-align: left; }
.hud-bg-texture-right { bottom: 22%; right: 1.5rem; text-align: right; }

/* --- CINTURÓN DE CÁPSULAS INFERIORES --- */
.hud-bottom-capsules-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 2rem; 
  width: 100%;
  z-index: 1000;
}

.hud-bottom-capsules-row form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.btn-logout-nav-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', 'Anonymous Pro', monospace;
  font-size: 0.6rem;
  font-weight: 500;
}
/* ==========================================================================
   ⚡ COREOGRAFÍA GLITCH PURA: FILTRO DE DESFASE CROMÁTICO (180MS)
   ========================================================================== */

/* LATENCIA DEL MOUSE COGNITIVA */
.global-navbar.is-transitioning,
.global-navbar.is-transitioning ~ main {
  cursor: none !important;
}

/* 📺 GLITCH CROMÁTICO REAL EN EL VIDEO (ROJO Y CIAN DESFASADOS EN BORDES) */
@keyframes extropianVideoGlitch {
  0% {
    transform: scale(1);
    filter: brightness(1) contrast(1);
  }
  20% {
    transform: scale(1.015);
    /* 🚀 EL TRUCO ÓPTICO: Proyectamos un desfase horizontal de sombras puras de color 
       Cian (-4px) y Rojo (+4px). Esto partirá los bordes de la modelo de forma espectacular */
    filter: brightness(1.2) contrast(1.3) 
            drop-shadow(-4px 0px 0px rgba(0,255,255,0.7)) 
            drop-shadow(4px 0px 0px rgba(255,0,0,0.7));
  }
  45% {
    transform: translateX(3px) skewX(1deg);
    filter: brightness(1.1) contrast(1.1) drop-shadow(2px 0px 0px rgba(255,0,0,0.5));
  }
  70% {
    transform: translateX(-3px) skewX(-1deg);
    filter: brightness(1.1) contrast(1.1) drop-shadow(-2px 0px 0px rgba(0,255,255,0.5));
  }
  100% {
    transform: none;
    filter: brightness(1) contrast(1);
  }
}
.global-navbar.is-transitioning ~ main #cinematicScreen .cinematic-bg-video {
  animation: extropianVideoGlitch 180ms cubic-bezier(.2,.8,.2,1) !important;
}

/* EL HUD SE DIFUMINA PERDIENDO SEÑAL */
@keyframes hudShutdown {
  0%   { opacity: 1; filter: none; }
  40%  { opacity: 0.2; filter: blur(2px); }
  100% { opacity: 0; filter: blur(6px); }
}
.global-navbar.is-transitioning ~ main #cinematicScreen .hud-cinematic-viewport-frame {
  animation: hudShutdown 180ms forwards !important;
}

/* LÍNEAS DE ESCANEO OLED ELEGANTES (CADA 8PX) */
.hud-oled-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 88 !important;
  background: repeating-linear-gradient(180deg, transparent 0px, transparent 7px, rgba(255,255,255,0.06) 8px);
}
@keyframes scanFlash {
  0%   { opacity: 0; transform: translateY(-100%); }
  50%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(100%); }
}
.global-navbar.is-transitioning ~ main #cinematicScreen .hud-oled-scanlines {
  animation: scanFlash 180ms linear !important;
}

/* 🕶️ OVERLAY CON RETRASO DE OPACIDAD AL 60% Y TU REBOTE ELÁSTICO */
.global-navbar.is-open .extropian-global-menu-overlay {
  animation: overlayDropElastic 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards !important;
}
@keyframes overlayDropElastic {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-4%) !important;
    backdrop-filter: blur(0px);
  }
  60% {
    opacity: 0.2;
    backdrop-filter: blur(12px);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(2px) !important; /* Tu micro-rebote de 2px */
    backdrop-filter: blur(32px) contrast(1.15);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) !important; /* Fijo al centro simétrico */
    backdrop-filter: blur(32px) contrast(1.15);
  }
}


/* ==========================================================================
   📱 3. AJUSTES COMPRIMIDOS EXCLUSIVOS PARA MÓVILES (BAJO IMPACTO)
   ========================================================================== */
@media (max-width: 768px) {
  .global-navbar {
    width: 92%; 
    top: 12px;
    height: 48px; /* Reducción milimétrica de la barra */
  }

  .nav-left-actions-group {
    gap: 0.5rem; /* Comprime la separación al lado del menú */
  }

  .extropian-logo.brand-full-logo,
  .nav-brand-link svg:first-child {
    height: 140%; /* Ajuste proporcional del logotipo */
    max-width: 100px;
  }

  .btn-logout-nav {
    font-size: 0.58rem;
    padding: 2px 8px;
    height: 24px;
  }

  .overlay-inner-content-tactical {
    padding: 2rem 1rem; /* Más espacio útil para pantallas compactas */
  }

  @media (max-width: 400px) {
    .hud-menu-icon-text {
      display: none; /* Oculta la palabra "MENU" si el celular es ultra estrecho */
    }
  }
}
