:root {
    --bg-black: #000000;
    --text-white: #ffffff;
    --accent-cyan: #00f2ff;
    --font-main: "Gruppo", sans-serif;
}

body,
html {
    margin: 0;
    padding: 0;
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-main);
    scroll-behavior: smooth;
    /* Desplazamiento suave entre secciones */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Utilidad para accesibilidad y SEO (Oculto visualmente) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* SECTION 1: HERO & MATRIX (Entrada scramble) */
.section-hook {
    position: relative;
    height: 100vh;
    /* Ocupa toda la pantalla */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Fondo negro por defecto ya que quitamos el video */
    background-color: var(--bg-black);
}

.section-hook h2 {
    font-size: 2.0rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
    max-width: 800px;
    line-height: 1.2;
}

.section-hook .content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
}

/* Color para los caracteres aleatorios del efecto scramble */
.dud {
    color: #555;
    /* Gris oscuro para que resalte el texto real */
    opacity: 0.7;
}

/* Interferencia Fuerte (Sect 1) - Micro-Glitch */
.text-interference {
    position: relative;
    display: inline-block;
    color: var(--text-white);
    /* Animación más lenta y pausada */
    animation: interference-anim 5s infinite linear;
}

/* Interferencia Suave (Sect 2) - Micro-Glitch Muy Sutil */
/* Interferencia Suave (Sect 2) - Micro-Glitch Muy Sutil */
.text-interference-soft {
    position: relative;
    display: inline-block;
    color: var(--text-white);
    /* Animación eliminada por solicitud de limpieza */
    animation: none;
}

/* Efecto de Entrada "Mala Señal" - Scramble controlado por JS */
.signal-entrance {
    opacity: 0;
    /* Inicia invisible hasta que JS arranque */
    font-family: 'Gruppo', sans-serif;
    /* Forzamos la fuente del sitio */
}

/* JS le quitará esta clase o cambiará estilo al terminar, 
   pero por ahora definimos que al terminar vuelva a la fuente normal si se desea, 
   aunque el prompt pide "Matrix minimalista", monospace queda bien durante el efecto. 
   El JS se encargará de restaurar la fuente o dejarla si es la deseada.
   Por defecto, dejaremos que el JS maneje la opacidad.
*/

/* Sombra duplicada para efecto glitch - Solo visible en momentos específicos */
.text-interference::before,
.text-interference::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
    display: none;
    /* Se activa en los keyframes */
}

/* Definición de Keyframes Refinados */

/* Micro-Glitch visible pero no intrusivo */
@keyframes interference-anim {

    0%,
    45% {
        text-shadow: none;
        transform: translate(0);
        opacity: 1;
    }

    46% {
        text-shadow: 1px 0 rgba(255, 0, 0, 0.4), -1px 0 rgba(0, 242, 255, 0.4);
        transform: translate(-1px, 0);
    }

    47% {
        text-shadow: -1px 0 rgba(255, 0, 0, 0.4), 1px 0 rgba(0, 242, 255, 0.4);
        transform: translate(1px, 0);
    }

    48% {
        text-shadow: none;
        transform: translate(0);
    }

    /* Pausa larga */
    80% {
        transform: translate(0);
    }

    81% {
        text-shadow: 1px 0 rgba(255, 0, 0, 0.3);
        transform: skewX(2deg);
    }

    82% {
        transform: skewX(0);
        text-shadow: none;
    }

    100% {
        transform: translate(0);
        opacity: 1;
    }
}

/* Efecto Hover para interactividad */
.text-interference:hover {
    animation: interference-anim 0.5s infinite linear;
    /* Acelera al pasar el mouse */
}

/* SECTION 2: HOOK (Inestabilidad) */
/* Estilo para el párrafo de la segunda sección */
.text-wide {
    font-size: 2.0rem;
    max-width: 950px;
    line-height: 1.5;
    margin: 0 auto;
    padding: 0 20px;
}



/* RESPONSIVE SECCIÓN HOOK (Corregido) */
@media (max-width: 768px) {
    .section-hook {
        height: auto;
        /* Permite que la sección se estire con el texto */
        min-height: 100vh;
        /* Asegura que al menos ocupe toda la pantalla */
        padding: 100px 20px;
        /* Espacio para que el texto no toque los bordes ni el video */
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        /* Para que el video absoluto se mantenga de fondo */
    }

    /* Ajustamos el contenedor de texto */
    .section-hook .content {
        position: relative;
        z-index: 2;
        /* Por encima del video */
        width: 100%;
    }

    /* Ajustamos los títulos H2 de la primera parte del Hook */
    .section-hook h2 {
        font-size: 1.5rem;
        /* Un poco más pequeño que el H1 */
        line-height: 1.3;
        margin-bottom: 20px;
        text-align: center;
    }

    /* Ajustamos el texto largo (text-wide) */
    .text-wide {
        font-size: 1.1rem;
        /* Tamaño unificado para párrafos en móvil */
        line-height: 1.6;
        text-align: center;
        padding: 0;
        /* El padding ya lo tiene el contenedor padre */
        max-width: 100%;
    }
}



/* SECTION 3: CONCEPTO MESH (Video Izquierda) */
.section-mesh-concept {
    padding: 100px 0;
    background-color: var(--bg-black);
    display: flex;
    justify-content: center;
}

.container-split {
    display: flex;
    align-items: center;
    max-width: 1250px;
    width: 100%;
    gap: 10px;
    justify-content: center;
}

/* Texto a la izquierda */
.mesh-text-side {
    flex: 0 0 auto;
    /* El texto ocupa solo su ancho necesario */
    margin-left: 0;
    /* Ajusta este número (ej: -80px) para correrlo más a la izquierda */
    padding-right: 0;
    /* Evita que el texto se pegue demasiado al video de la derecha */
}

.mesh-text-side p {
    font-size: 1.7rem;
    line-height: 1.4;
    text-align: left;
    color: var(--text-white);
    max-width: 300px;
    /* Limita el ancho para que el texto sea más elegante y legible */
}

/* Contenedor visual a la derecha */
.mesh-visual-side {
    flex: 0 0 auto;
    /* El video también se ajusta a su tamaño máximo sin "flotar" */
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.visual-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.video-behind {
    position: relative;
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Mantiene la proporción del video 1920x1080 */
    z-index: 1;
}


/* Responsivo para móviles */
@media (max-width: 770px) {
    .container-split {
        flex-direction: column;
        /* Cambia a disposición vertical */
        text-align: center;
        gap: 40px;
        /* Añade espacio entre el texto y el video */
    }

    .mesh-text-side {
        margin-left: 0 !important;
        /* ¡FUNDAMENTAL! Resetea el margen negativo que usamos en desktop */
        padding: 0 10px;
        /* Evita que el texto toque los bordes del celular */
        order: 1;
        /* Asegura que el texto aparezca primero (opcional) */
    }

    .mesh-text-side p {
        text-align: center;
        font-size: 1.25rem;
        /* Un pelín más pequeño para mejor legibilidad en pantallas angostas */
        line-height: 1.5;
    }

    .mesh-visual-side {
        order: 2;
        /* El video aparece debajo del texto */
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .visual-wrapper {
        aspect-ratio: 16 / 9;
        /* Mantenemos la proporción del video */
        overflow: visible;
        /* Permite que el efecto de la red se vea bien */
    }
}

/* SECTION 4: CHECKLIST (Lo que NO es - Tachado dinámico) */
.section-checklist {
    padding: 100px 20px;
    background-color: var(--bg-black);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Centra el encabezado */
}

.container-checklist {
    max-width: 900px;
    width: 100%;
}

.section-checklist h2 {
    font-size: 2.0rem;
    margin-bottom: 50px;
    letter-spacing: 2px;
    color: var(--text-white);
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    display: inline-block;
    /* Para que la línea del h2 no cruce toda la pantalla */
}

.no-list {
    list-style: none;
    padding: 0;
    display: inline-block;
    /* Permite que el bloque de la lista se centre como conjunto */
    text-align: left;
    /* Mantiene el texto de los ítems alineado a la izquierda */
}

.no-list li {
    position: relative;
    /* Necesario para el tachado absoluto */
    font-size: 1.7rem;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    color: #ccc;
    transition: color 0.5s ease;
    /* Eliminamos text-decoration antiguo */
    text-decoration: none;
}

/* Línea de tachado dinámica */
.no-list li::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0%;
    /* Inicia sin ancho */
    height: 2px;
    background-color: rgba(119, 119, 119, 0.5);
    /* Semitransparente para legibilidad */
    transition: width 1.5s ease-out;
    /* Animación más lenta y relajada */
    transition-delay: 4s;
    pointer-events: none;
}

.no-list li.is-active {
    color: #777;
    /* Texto se apaga un poco */
}

/* Al activarse, la línea crece al 100% */
.no-list li.is-active::after {
    width: 100%;
}

.icon-x {
    font-size: 1.1rem;
    /* Más pequeña */
    font-weight: bold;
    margin-right: 45px;
    /* Más separación del texto */
    min-width: 20px;
    display: inline-block;
}

/* RESPONSIVE ESPECÍFICO DE SECCIÓN CHECKLIST */
@media (max-width: 768px) {
    .section-checklist {
        padding: 60px 20px;
    }

    .section-checklist h2 {
        font-size: 1.8rem;
    }

    .no-list li {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .icon-x {
        font-size: 1rem;
        margin-right: 25px;
        /* Menos separación en móviles */
    }
}

/* SECTION 5: CONCEPTO MESH 2 (Video de fondo) */
.section-critical-layer {
    position: relative;
    height: 100vh;
    /* Ocupa toda la pantalla */
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Separa los bloques de texto */
    background-color: var(--bg-black);
}

.section-critical-layer .video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.5);
    /* Oscurece el video para resaltar el texto */
}

.overlay-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 80px 10%;
    /* Espaciado interno para que el texto no toque los bordes */
}

.top-text-block {
    align-self: flex-end;
    /* Lo mueve a la derecha */
    max-width: 500px;
    text-align: right;
}

.bottom-text-block {
    align-self: flex-start;
    /* Lo mueve a la izquierda */
    max-width: 500px;
    text-align: left;
}

.section-critical-layer p {
    font-size: 1.7rem;
    line-height: 1.3;
    color: var(--text-white);
    letter-spacing: 1px;
}

.middle-text-block {
    align-self: center;
    text-align: center;
    max-width: 600px;
}

.middle-text-block p {
    font-size: 1.4rem;
    font-style: italic;
    opacity: 0.9;
}

/* RESPONSIVE ESPECÍFICO CAPA CRÍTICA */
@media (max-width: 768px) {
    .overlay-content {
        padding: 40px 20px;
        justify-content: space-between;
        height: 100%;
    }

    .top-text-block,
    .bottom-text-block {
        align-self: center;
        text-align: center;
        max-width: 100%;
    }

    .section-critical-layer p {
        font-size: 1.3rem;
    }

    .middle-text-block p {
        font-size: 1.1rem;
    }
}

/* SECTION 6: INTEGRATIONS (Línea de tiempo/nodos) */
.integrations-section {
    --espacio-superior: 100px;
    --distancia-texto: 10px;
    --altura-lista: 300px;

    height: auto;
    background-color: #000;
    padding-top: var(--espacio-superior);
    padding-bottom: 0;
}

.integrations-section p {
    margin-bottom: 0;
    padding-bottom: 0;
}

.integrations-sticky {
    position: sticky;
    top: 0;
    min-height: 50vh;
    /* Reducción segura para acercar footer sin romper */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* overflow: hidden; Removed per request */
}

.integrations-intro {
    color: #fff;
    font-size: 1.7rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
    /* Agregamos 30px abajo para que no choquen */
    padding: 0 20px;
    z-index: 10;
}

/* El Split de pantalla */
.integrations-split {
    display: flex;
    width: 70%;
    flex: 1;
    /* Ocupa el resto de la pantalla */
    margin-top: 0;
}

/* Columna de Textos */
.labels-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.labels-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: var(--altura-lista);
    /* Usa tu variable de altura */
    margin-right: -100px;
    position: relative;
    top: -11px;
}

.label-item {
    color: #fff;
    font-size: 1.8rem;
    text-align: right;
    padding: 0;
    margin: 0;
    line-height: 1.2;
    opacity: 0;
    /* Lo maneja el JS con la clase .show */
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.label-item.show {
    opacity: 1;
    transform: translateX(0);
}

/* Columna de Timeline (Derecha) */
.timeline-container {
    flex: 1;
    height: 500px;
    /* Restauramos a 500px para corregir alineación desktop */
    position: relative;
}

/* Timeline CSS pura (Reemplazo de video) */
.css-timeline {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.timeline-line {
    position: absolute;
    right: 15%;
    top: 0;
    width: 2px;
    height: 85%;
    /* Acortamos la línea un poco, principalmente de abajo */
    background: #fff;
}

.nodes-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: var(--altura-lista);
    margin-top: 0;
    position: absolute;
    right: 15%;
    top: 50%;
    transform: translate(50%, -50%);
}

.node {
    width: 25px;
    height: 25px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.node.show {
    opacity: 1;
}

/* --- RESPONSIVE AJUSTADO --- */
@media (max-width: 768px) {
    .integrations-section {
        /* CAMBIO CLAVE: Cambiamos 100vh por auto para que la sección termine donde termina el contenido */
        height: auto;
        min-height: auto;
        padding-top: 40px;
        /* Reducimos el padding inferior para que la siguiente sección se acerque */
        padding-bottom: 0px;
        /* Quitamos espacio extra antes del footer mobile */
    }

    .integrations-sticky {
        /* CAMBIO CLAVE: Quitamos el sticky en móvil para que no reserve un espacio de pantalla completa innecesario */
        position: relative;
        height: auto;
        min-height: auto;
        /* CRITICO: Elimina la altura mínima heredada de 80vh que causaba el hueco */
    }

    .integrations-intro {
        font-size: 1.3rem;
        /* Aumentado para igualar la capa crítica */
        margin: 0 auto 15px auto;
        /* Acercamos el párrafo a los nodos */
    }

    .integrations-split {
        flex-direction: row;
        width: 100%;
        margin-top: 0;
        align-items: flex-start;
        /* Asegura que ambos contenedores empiecen arriba */
    }

    .labels-container {
        align-items: flex-start;
        /* CRITICO: Evita el centrado vertical automático que bajaba el texto */
        padding-top: 0;
    }

    .labels-list {
        /* Sincronizamos la altura para que las palabras calcen con los nodos */
        height: 32vh;
        margin-right: -25px;
        margin-top: 40px;
        /* Bajamos 5px el texto para centrar con nodo */
        /* CRITICO: Reset de posición desktop */
        top: 0;
    }

    .label-item {
        font-size: 1.2rem;
        line-height: 1.2;
        margin-top: 0;
        /* Quitamos el margen negativo hack */
    }

    .video-container {
        height: 60vh;
        /* IMPORTANTE: Debe ser igual al margin-top de .labels-list para que no haya desfase */
        margin-top: 20px;
    }

    .timeline-container {
        height: 45vh;
        /* Reducido de 60vh para eliminar espacio vacío */
        /* IMPORTANTE: Debe ser igual al margin-top de .labels-list para que no haya desfase */
        margin-top: 20px;
    }

    .nodes-wrapper {
        height: 32vh;
        margin-top: 20px;
        right: 10%;
        /* Reset de posicionamiento desktop para que funcione el margin-top */
        top: 0;
        transform: translateX(50%);
    }

    .timeline-line {
        right: 10%;
    }

    .node {
        width: 18px;
        height: 18px;
    }
}

/* --- SECCIÓN FINAL: CONTACTO --- */
.section-footer {
    position: relative;
    height: 100vh;
    /* Mantiene la sección ocupando toda la pantalla */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-black);
    /* Fondo negro puro */
    text-align: center;
    padding: 20px;
}

.footer-content {
    max-width: 800px;
    color: var(--text-white);
    z-index: 2;
}

.cta-text {
    font-size: 1.7rem;
    line-height: 1.4;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.email-link {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--text-white);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: 60px;
    font-weight: lighter;
}

.email-link:hover {
    border-bottom: 1px solid var(--text-white);
    opacity: 0.8;
}

.social-footer p {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.social-footer a {
    color: var(--text-white);
    font-weight: bold;
    text-decoration: none;
}

.social-sub {
    font-size: 1.1rem;
    color: #ffffff;
    letter-spacing: 1px;
}

.linkedin-link {
    color: var(--text-white);
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* Espacio entre el icono y la palabra LinkedIn */
    transition: opacity 0.3s ease;
}

.linkedin-link svg {
    width: 1.4rem;
    /* Tamaño equivalente */
    height: 1.4rem;
    color: #ffffff;
    /* Color blanco puro */
    fill: currentColor;
    /* Asegura que el SVG tome el color */
}

.linkedin-link:hover {
    opacity: 0.7;
    /* Efecto sutil al pasar el mouse */
}

/* RESPONSIVE FINAL - CORRECCIÓN DE CENTRADO */
@media (max-width: 768px) {
    .section-footer {
        height: auto;
        min-height: 100vh;
        padding: 80px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .footer-content {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Centra horizontalmente todo el bloque */
        text-align: center;
    }

    .cta-text {
        font-size: 1.2rem;
        margin-bottom: 30px;
        width: 100%;
    }

    .email-link {
        font-size: 1.1rem;
        margin-bottom: 50px;
        word-break: break-all;
    }

    /* Forzamos a que el contenedor de redes también sea un flex centrado */
    .social-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .social-footer p {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .social-sub {
        display: block;
        /* CRÍTICO: Permite que funcione el max-width */
        margin: 0 auto;
        /* Centra el bloque de texto */
        font-size: 0.9rem;
        line-height: 1.4;
        max-width: 250px;
        /* Un poco más estrecho para forzar el balance visual */
        color: #888;
    }

    .linkedin-link svg {
        width: 1.2rem;
        height: 1.2rem;
    }
}

/* Fix para iOS: Ocultar botón de play y controles nativos */
video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

/* Asegurar que el video no sea interactuable */
#video-hook,
#video-hook-2,
.video-behind,
.video-bg {
    pointer-events: none;
}