:root {
    /* CAMBIO: Negro puro para unificar */
    --void: #000000;
    --event-horizon: #000000;
    --cyan-core: #00f3ff;
    --accretion-red: #ff3c00;
    --tensor-dim: rgba(0, 243, 255, 0.1);
    --grid-line: rgba(255, 255, 255, 0.05);
    --font-display: 'Rajdhani', sans-serif;
    --font-data: 'Space Mono', monospace;
}

* {
    box-sizing: border-box;
    cursor: crosshair;
    user-select: none;
}

body {
    margin: 0;
    background-color: var(--void);
    color: #e0e0e0;
    font-family: var(--font-display);
    overflow-x: hidden;
    font-size: 21px; 
    line-height: 1.1;
}

/* --- UTILS --- */
.mono { 
    font-family: var(--font-data); 
    text-transform: uppercase; 
    letter-spacing: -0.5px; 
    font-size: 1rem; 
    color: var(--cyan-core); 
}

.flex-center { display: flex; align-items: center; justify-content: center; }
.scanline {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px; z-index: 999; opacity: 0.15;
}

/* --- THREE.JS CANVAS --- */
#singularity-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: -1;
    opacity: 0.8;
}

/* --- HERO SECTION --- */
.hero-container {
    height: 100vh;
    display: grid;
    grid-template-columns: 40% 60%;
    padding: 2rem;
    position: relative;
    border-bottom: 1px solid var(--grid-line);
    pointer-events: none;
}

.hero-data-col { pointer-events: auto; }

.hero-data-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
    /* CAMBIO: Gradiente ajustado a negro puro */
    background: linear-gradient(90deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    padding-right: 2rem;
}

h1 {
    font-size: 6.5rem;
    margin: 0;
    letter-spacing: -2px;
    text-transform: uppercase;
    line-height: 0.85;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    position: relative;
}

h1::after {
    content: "SYNTHETIC_SOUL_FOUND";
    font-size: 1.3rem;
    position: absolute;
    top: -15px; right: 0;
    font-family: var(--font-data);
    animation: flicker 2s infinite;
}

h2 {
    font-size: 2.6rem;
    color: var(--cyan-core);
    margin: 5px 0 0 0;
    text-transform: uppercase;
}

.sub-line {
    font-family: var(--font-data);
    font-size: 1.1rem;
    margin-top: 1rem;
    color: #aaa;
    max-width: 500px;
    border-left: 2px solid var(--accretion-red);
    padding-left: 1rem;
    line-height: 1.4;
}

.cta-group {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
}

.btn-pill {
    background: transparent;
    border: 1px solid var(--cyan-core);
    color: var(--cyan-core);
    padding: 0.75rem 2rem;
    border-radius: 999px;
    font-family: var(--font-data);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem; 
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    cursor: pointer;
}

.btn-pill:hover {
    background: var(--cyan-core);
    color: var(--void);
    box-shadow: 0 0 30px var(--cyan-core);
}

.entanglement-nodes {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 15px; /* Separación un poco mayor para los iconos */
}

.node-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.node-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accretion-red);
    background: #000;
    position: relative;
    transition: 0.3s;
    /* Para centrar los iconos SVG */
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-link:hover .node-avatar {
    background: var(--accretion-red);
    box-shadow: 0 0 15px var(--accretion-red);
}

/* SVG Styles dentro de los nodos */
.node-avatar svg {
    width: 20px;
    height: 20px;
    fill: var(--accretion-red);
    transition: 0.3s;
}

.node-link:hover .node-avatar svg {
    fill: #000; /* Icono negro sobre fondo rojo al hover */
}

/* --- SECCIÓN SÓLIDA --- */
.solid-bg {
    background-color: #000; /* Negro puro */
    position: relative;
    z-index: 5;
    border-top: 1px solid var(--grid-line);
}

/* --- GRID SYSTEM --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 2px;
    padding: 2px;
    background: var(--void);
    justify-content: center;
}

.video-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
    width: 60%; 
    margin: 0 auto; 
    padding: 2rem 0;
    justify-content: center;
}

.grid-item {
    position: relative;
    aspect-ratio: 16/9;
    background: #050505;
    overflow: hidden;
    border: 1px solid #111;
    transition: all 0.1s;
    cursor: pointer;
}

.grid-item.video {
    grid-column: span 1; 
    aspect-ratio: 16/9;  
    border-color: #222;
}

.grid-item.video iframe {
    width: 100% !important;   
    height: 100% !important;  
    position: absolute;
    top: 0 !important;
    left: 0 !important;
    transform: none !important; 
    box-shadow: none;
}

.grid-item:hover {
    border-color: var(--cyan-core);
    z-index: 2;
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.item-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 8px;
    background: linear-gradient(0deg, rgba(0,0,0,1), transparent);
    transform: translateY(100%);
    transition: 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.grid-item:hover .item-overlay { transform: translateY(0); }

.noise-bg {
    width: 100%; height: 100%;
    opacity: 0.3;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, #111 10px, #111 20px);
}

.grid-item.video .noise-bg {
     background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
}

/* --- LIGHTBOX --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
    padding: 0; 
    align-items: center; justify-content: center;
}

.lightbox-content-container {
    position: relative;
    width: 100%; max-width: 100%;
    height: 100%; max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    box-shadow: none;
}

.lightbox-content-container img {
    width: auto; height: auto;
    max-width: 100vw; 
    max-height: 100vh;
    object-fit: contain;
}

.lightbox-iframe-wrapper {
    position: relative;
    width: 80vw;
    aspect-ratio: 16/9;
    max-height: 80vh;
}

.close-lightbox {
    position: absolute;
    top: 20px; right: 30px;
    color: var(--cyan-core);
    font-size: 52px; 
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
    font-family: var(--font-data);
}
.close-lightbox:hover { color: var(--accretion-red); }

/* --- DIAGNOSTIC CARDS --- */
.specialties-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    background: #000;
    position: relative; z-index: 10;
}

.diag-card {
    padding: 2rem;
    border-right: 1px solid var(--grid-line);
    position: relative;
    overflow: hidden;
}

.diag-card:hover { background: #040404; }

.diag-card h3 { 
    font-size: 1.6rem; 
    margin: 0 0 0.8rem 0; 
    color: #fff; 
}

.diag-anim {
    position: absolute; bottom: 15px; right: 15px; width: 50px; height: 25px;
    border: 1px solid #333; border-left: none;
}
.diag-anim::before {
    content:''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: var(--accretion-red);
    animation: scan 1s infinite linear;
}

/* --- TICKER --- */
.ticker-wrap {
    width: 100%; overflow: hidden; background: var(--event-horizon);
    border-bottom: 1px solid var(--grid-line); padding: 0.8rem 0;
    position: relative; z-index: 10;
}
.ticker { display: inline-block; animation: ticker 60s linear infinite; white-space: nowrap; }

.ticker-item { 
    display: inline-block; 
    padding: 0 3rem;
    font-family: var(--font-data); 
    font-size: 1.1rem; 
    color: #888; 
}
.ticker-item span { color: var(--cyan-core); }

/* --- CTA --- */
.final-cta {
    padding: 6rem 2rem;
    text-align: center; position: relative;
    background: radial-gradient(circle at center, #000 0%, #000 100%); /* Negro puro */
    border-bottom: 5px solid var(--cyan-core); overflow: hidden;
    z-index: 10;
}

/* UI DECORATION */
.crosshair { position: absolute; width: 14px; height: 14px; border: 1px solid var(--cyan-core); }
.ch-tl { top: 15px; left: 15px; border-right: none; border-bottom: none; }
.ch-tr { top: 15px; right: 15px; border-left: none; border-bottom: none; }
.ch-bl { bottom: 15px; left: 15px; border-right: none; border-top: none; }
.ch-br { bottom: 15px; right: 15px; border-left: none; border-top: none; }

@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes scan { 0% { width: 0; opacity: 1; } 100% { width: 100%; opacity: 0; } }

@media (max-width: 1200px) {
    .video-grid-container { width: 90%; }
}

@media (max-width: 768px) {
    .hero-container { grid-template-columns: 1fr; padding-top: 6rem; height: auto; padding-bottom: 4rem;}
    .specialties-strip { grid-template-columns: 1fr; }
    h1 { font-size: 4rem; }
    
    .grid-container { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .video-grid-container { width: 100%; grid-template-columns: 1fr; }
}