/* =========================================
   VARIABLES GLOBALES Y COLORES DE MARCA
   Define la paleta de colores para toda la página
   ========================================= */
:root {
    --primary: #bc162a;
    --dark: #302325;
    --accent: #ee7f27;
    --bg: #0f1113;
    --glass: rgba(255, 255, 255, 0.04);
    --card-bg: rgba(255, 255, 255, 0.03);
    --text: #e9e7e1;
}

/* =========================================
   ESTRUCTURA BASE Y REINICIOS
   Ajustes a nivel de toda la página
   ========================================= */
* {
    box-sizing: border-box;
}

html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Cierra toda posibilidad de scroll o restauraciones fantasma del navegador */
}

body {
    margin: 0;
    font-family: 'Montserrat', Inter, system-ui, sans-serif;
    background-image: url('../img/background2.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color .25s;
}

/* =========================================
   BARRA SUPERIOR Y SELECTOR DE IDIOMAS
   Controla el botón 'switch' arriba a la derecha
   ========================================= */.topbar {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 20px
}

.brand {
    margin-bottom: 15px;
    text-align: center;
}

.brand-logo {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    display: block;
    margin: 0 auto;
}

.brand h1 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.75)
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    transition: all .25s
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: all .25s
}

.switch input:checked+.slider {
    background: var(--primary)
}

.switch input:checked+.slider:before {
    transform: translateX(20px)
}

/* =========================================
   CONTENIDO PRINCIPAL Y TARJETA (INFOCARD)
   Diseño de la tarjeta en el centro de la página
   ========================================= */
.content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    z-index: 2;
}

.card {
    position: relative;
    width: min(900px, 95%);
    /* Reducir contenido al 95% para mejor responsive margins */
    scale: 0.95;

    /* Fondo muy oscuro y translúcido */
    background: rgba(8, 9, 10, 0.6);
    
    /* Borde con sutil tono neón basado en la paleta de la marca */
    border: 1.5px solid rgba(188, 22, 42, 0.8);
    border-radius: 20px;
    padding: 36px;
    
    /* Resplandor neón exterior oscuro y sombra de caída */
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.7), 
        0 0 25px rgba(188, 22, 42, 0.15),
        inset 0 0 15px rgba(238, 127, 39, 0.05);
    
    z-index: 3;
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease, background .4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.card > * {
    position: relative;
    z-index: 1;
}

.card:hover {
    border-color: rgba(188, 22, 42, 0.6);
    box-shadow: 0 0 40px rgba(188, 22, 42, 0.35);
}

.card-illustration {
    width: clamp(240px, 50%, 400px);
    height: auto;
    display: block;
    margin: 0 0 24px 0;
}

.card h2 {
    margin: 0 0 10px 0;
    font-size: 40px
}

.card p {
    margin: 0 0 18px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    margin-top: 16px;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background-color: #1ebd5c;
    color: white;
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

/* =========================================
   PIE DE PÁGINA (COPYRIGHT Y LEGALES)
   ========================================= */
.site-footer {
    position: relative;
    bottom: 0;
    z-index: 3;
    text-align: center;
    padding: 18px 12px;
    color: rgba(255, 255, 255, 0.5)
}

/* =========================================
   ESTILOS ADAPTATIVOS (RESPONSIVE)
   Reajusta tamaños para dispositivos móviles
   ========================================= */
@media (max-width:900px) {
    .brand-logo {
        width: max(150px, 70%);
        height: auto;
    }   
    .card {
        padding: 10px;
        width: min(98vw, 100%);
    }

    .card h2 {
        font-size: 18px;
    }

    .card p {
        font-size: 14px;    }


    .card-illustration {
        width: 50%;
        margin-bottom: 12px;
    }
}

/* =========================================
   CAPA DE INTRODUCCIÓN CINEMÁTICA (GSAP ANIMATION)
   Todos los elementos visuales que existen solo
   durante los primeros segundos de carga
   ========================================= */

/* Contenedor escénico principal */
.scene {
    z-index: 1;
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Will be animated for zoom effect */
    transform-origin: center center;
}

/* Canvas for dynamic dots and network lines */
#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* DOM UI Layer for logos, text, and effects */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* Standalone Icon */
.icon-node {
    position: absolute;
    width: 110px;
    object-fit: contain;
    opacity: 0;
    mix-blend-mode: multiply; /* Ensures white background perfectly knocks out */
    z-index: 5;
}

/* WiFi Wave Pulses */
.wifi-container {
    position: absolute;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wifi-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0;
}

/* Full Logo & Text Container */
.logo-text-group {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    opacity: 0; /* Hidden initially */
    z-index: 6;
}

.full-logo {
    width: 85%;
    max-width: 420px;
    object-fit: contain;
    mix-blend-mode: multiply; /* Removes white artifacting */
    /* Initial clip-path for wipe effect */
    clip-path: inset(0 100% 0 0); 
}

.red-line {
    height: 2px;
    background-color: var(--primary);
    margin-top: 15px;
    width: 0%; /* Will animate to 100% */
    max-width: 360px;
    border-radius: 2px;
}

.text-container {
    position: relative;
    height: 30px;
    margin-top: 15px;
    width: 100%;
}

.tagline {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 1.15rem;
    color: #d8d8d8;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0;
}

.tagline strong {
    font-weight: 600;
    color: var(--primary);
}

/* Light Sweep Effect */
.light-sweep {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 150px;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: 20;
    opacity: 0;
    filter: blur(8px);
}

/* Contenedor envolvente final
   Esta capa agrupa toda la página principal y está oculta
   hasta que la animación cinemática termine.
*/
.content-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50; /* Superior a la escena de animación */
    display: none; /* Oculto inherentemente durante intro */
    opacity: 0;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

/* Adjust brand spacing specifically when mounted in index.html */
/* (Padding removed to perfectly center the .content block) */