/* ==========================================================================
   --- VARIABLES OFICIALES DE MARCA ---
   ========================================================================== */
:root {
    --color-violeta: #7E3AED;       
    --color-dark-gray: #313131;     /* Fondo oscuro corporativo */
    --color-lima: #C6FF34;          /* Verde lima de alta energía */
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-hueso: #E2E1D0;
    
    /* Tipografías oficiales */
    --font-primary: 'Rubik', sans-serif;
    --font-secondary: 'Host Grotesk', sans-serif;
}

/* ==========================================================================
   --- REESTILIZACIÓN DE NAVBAR (Integración Inmersiva) ---
   ========================================================================== */
.navbar {
    background-color: var(--color-dark-gray) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    box-sizing: border-box;
}

.logo-text {
    font-family: var(--font-primary);
    color: var(--color-white);
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-text small {
    font-family: var(--font-secondary);
    color: var(--color-lima);
    font-weight: 300;
}

.navbar .nav-menu .nav-link {
    font-family: var(--font-secondary);
    color: var(--color-lima) !important; 
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.navbar .nav-menu .nav-link:hover {
    opacity: 0.7;
}

.navbar .nav-menu .nav-link.highlight {
    background-color: transparent;
    border: 1px solid var(--color-lima);
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    height: auto;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}

.navbar .nav-menu .nav-link.highlight:hover {
    background-color: var(--color-lima);
    color: var(--color-black) !important;
    opacity: 1;
}

/* ==========================================================================
   --- SECCIÓN INTERACTIVA "NOSOTROS" (CORREGIDA) ---
   ========================================================================== */
.story-scroll-container {
    position: relative;
    height: 500vh; 
    background-color: var(--color-dark-gray);
}

.story-sticky-view {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1000px;
}

/* Rejilla decorativa sutil */
.story-grid-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

/* Contenedor del Bloque de Texto */
.story-block {
    position: absolute;
    max-width: 1150px; /* Un poco más amplio para que las palabras fluyan mejor lateralmente */
    padding: 0 40px;
    text-align: center;
    z-index: 2;
    opacity: 0;
    transform: scale(0.4) translateZ(-200px);
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease-in-out;
}

.story-block.active {
    opacity: 1;
    transform: scale(1) translateZ(0);
    pointer-events: auto;
}

.story-block.passed {
    opacity: 0;
    transform: scale(1.2) translateZ(100px) translateY(-40px);
}

/* ✨ EL INDICADOR SUPERIOR (CORREGIDO Y ESTILIZADO) */
.story-tag {
    font-family: var(--font-secondary);
    font-size: 1rem; /* Más grande y legible */
    font-weight: 800; /* Extra bold para verse imponente */
    letter-spacing: 3px; /* Tracking expandido estilo diseño industrial */
    color: var(--color-lima); /* ¡Cambiado a Verde Lima para máximo contraste! */
    display: inline-block;
    margin-bottom: 35px; /* Más separación con el título principal */
    text-transform: uppercase;
}

/* ✨ EL TÍTULO PRINCIPAL (CORREGIDO) */
.story-title {
    font-family: var(--font-primary); 
    font-size: clamp(2.6rem, 5.5vw, 4.8rem);
    font-weight: 900;
    line-height: 1.3; /* Aumentado de 1.1 a 1.3 para eliminar lo amontonado */
    color: var(--color-white);
    margin-bottom: 45px; /* Más espacio de separación con el bloque de texto inferior */
    letter-spacing: -0.5px; /* Suavizado para que respire cada carácter */
}

/* Resalte de Texto Interno */
.text-highlight {
    color: var(--color-lima);
    font-weight: 900;
}

/* ✨ EL PÁRRAFO DESCRIPTIVO (CORREGIDO) */
.story-lead {
    font-family: var(--font-secondary); 
    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    line-height: 1.8; /* Mayor espacio entre líneas para una lectura impecable y limpia */
    color: rgba(255, 255, 255, 0.75); /* Un toque más brillante para mejorar legibilidad */
    font-weight: 400;
    max-width: 950px; /* Mayor caja de contención para evitar saltos bruscos */
    margin: 0 auto;
}

/* Barra de progreso de scroll */
.story-progress-indicator {
    position: absolute;
    right: 40px;
    height: 180px;
    width: 2px;
    background-color: rgba(255,255,255,0.05);
    z-index: 10;
}

/* ==========================================================================
   --- EFECTO "ENCIENDE LA CHISPA" (BLOQUE FINAL) ---
   ========================================================================== */
.interactive-closure {
    width: 100%;
}

/* Zona interactiva del Isotipo */
.brain-trigger-zone {
    display: inline-block;
    position: relative;
    width: 100%;
    height: 250px;
    margin: 5px auto;
    background-color: #1a1a1a00; /* Fondo oscuro de contención */
    overflow: hidden;
    cursor: pointer;
    border: none;
    
}

/* Imagen del cerebro base */
.interactive-brain-bg {
    width: 110px;
    height: auto;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15; /* Súper oscuro por defecto, simulando apagado */
    transition: opacity 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%);
    z-index: 2;
}

/* 🔦 LA LUZ SEGUIDORA (Efecto linterna con CSS Radiales) */
.cursor-light-glow {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Crea un círculo de luz verde lima que se difumina hacia los bordes */
    background: radial-gradient(circle 60px at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                                rgba(198, 255, 52, 0.25) 0%, 
                                rgba(198, 255, 52, 0.08) 50%, 
                                transparent 100%);
    pointer-events: none; /* Permite que el clic pase directo al enlace */
    z-index: 3;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Al pasar el mouse por encima de la zona, la linterna se enciende */
.brain-trigger-zone:hover .cursor-light-glow {
    opacity: 1;
}

/* La chispa definitiva: cuando el mouse se posa, el cerebro se ilumina a Full Color */
.brain-trigger-zone:hover .interactive-brain-bg {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 0 25px var(--color-lima));
}

.progress-bar {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 0%;
    background: linear-gradient(to bottom, var(--color-violeta), var(--color-lima));
    transition: height 0.1s linear;
}

/* Ajuste Responsivo Móvil */
@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .story-scroll-container { height: auto; }
    .story-sticky-view { height: auto; padding: 140px 0 60px 0; display: block; }
    .story-block { position: relative; opacity: 1; transform: none; margin-bottom: 90px; pointer-events: auto; padding: 0 24px; }
    .story-block.passed { transform: none; opacity: 1; }
    .story-progress-indicator { display: none; }
    .story-title { line-height: 1.25; margin-bottom: 30px; }

    /* ... otros estilos móviles ... */

    .hamburger span {
       background-color: var(--color-lima) !important;         
        width: 28px;
        height: 3px;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

    #navMenu {
        /* 👇 CAMBIA AQUÍ EL FONDO DEL MENÚ DESPLEGADO */
        background-color: #1a1a1a !important;
    }
    
    #navMenu .nav-link:hover {
        color: var(--color-lima) !important; /* Verde lima al pasar el dedo o hacer clic */
    }
}
