/**
 * ConlineWeb — Núcleo interactivo (home, IA y landings).
 * Estilo original con brillo ligeramente reducido.
 */

.visual-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    min-height: 420px;
}

.visual-section:active {
    cursor: grabbing;
}

.nexus-system {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1500px;
    transform-style: preserve-3d;
    will-change: transform;
}

.quantum-orb {
    position: relative;
    width: clamp(200px, 42vmin, 520px);
    height: clamp(200px, 42vmin, 520px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s linear;
    transform-style: preserve-3d;
    will-change: transform;
}

.core-layer {
    position: absolute;
    border-radius: 50%;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.core-inner {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(0, 243, 255, 0.45) 40%,
        rgba(185, 103, 255, 0.38) 70%,
        transparent 90%);
    box-shadow:
        0 0 30px rgba(0, 243, 255, 0.22),
        0 0 52px rgba(185, 103, 255, 0.14),
        inset 0 0 22px rgba(255, 255, 255, 0.22);
    position: relative;
    z-index: 20;
    animation: corePulse 6s ease-in-out infinite;
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
}

.core-inner::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.14) 0%, transparent 70%);
    animation: coreGlow 4s ease-in-out infinite;
}

.core-inner::after {
    content: '';
    position: absolute;
    top: -35px;
    left: -35px;
    right: -35px;
    bottom: -35px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(185, 103, 255, 0.1) 0%, transparent 70%);
    animation: coreGlow 5s ease-in-out infinite reverse;
}

@keyframes corePulse {
    0%, 100% {
        transform: scale(1) rotateX(0deg) rotateY(0deg);
        box-shadow: 0 0 30px rgba(0, 243, 255, 0.22), 0 0 52px rgba(185, 103, 255, 0.14);
    }
    50% {
        transform: scale(1.04) rotateX(2deg) rotateY(2deg);
        box-shadow: 0 0 42px rgba(0, 243, 255, 0.28), 0 0 62px rgba(185, 103, 255, 0.18);
    }
}

@keyframes coreGlow {
    0%, 100% { opacity: 0.22; transform: scale(1); }
    50% { opacity: 0.38; transform: scale(1.04); }
}

.core-middle {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle,
        rgba(0, 243, 255, 0.11) 0%,
        rgba(185, 103, 255, 0.07) 50%,
        transparent 70%);
    border: 2px solid rgba(0, 243, 255, 0.16);
    animation: middleRotate 20s linear infinite;
    transform-style: preserve-3d;
    box-shadow: 0 0 22px rgba(0, 243, 255, 0.14), inset 0 0 16px rgba(185, 103, 255, 0.12);
    will-change: transform;
}

@keyframes middleRotate {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg); }
}

.core-outer {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle,
        rgba(0, 243, 255, 0.07) 0%,
        rgba(0, 255, 157, 0.035) 30%,
        transparent 70%);
    border: 1px solid rgba(0, 243, 255, 0.12);
    animation: outerRotate 25s linear infinite reverse;
    transform-style: preserve-3d;
    box-shadow: 0 0 28px rgba(0, 255, 157, 0.1), inset 0 0 22px rgba(0, 243, 255, 0.1);
    will-change: transform;
}

@keyframes outerRotate {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(-360deg) rotateY(180deg) rotateZ(-360deg); }
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(0, 243, 255, 0.16);
    transform-style: preserve-3d;
    box-shadow: 0 0 14px rgba(0, 243, 255, 0.07);
    will-change: transform;
}

.ring-1 {
    width: 420px;
    height: 420px;
    animation: ringRotate 25s linear infinite;
}

.ring-2 {
    width: 360px;
    height: 360px;
    animation: ringRotate 20s linear infinite reverse;
    border-color: rgba(185, 103, 255, 0.16);
}

.ring-3 {
    width: 300px;
    height: 300px;
    animation: ringRotate 15s linear infinite;
    border-color: rgba(0, 255, 157, 0.16);
}

@keyframes ringRotate {
    0% { transform: rotateX(70deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(70deg) rotateY(360deg) rotateZ(360deg); }
}

.energy-beam {
    position: absolute;
    width: 2px;
    height: 200px;
    background: linear-gradient(to top,
        transparent,
        rgba(0, 243, 255, 0.22),
        rgba(185, 103, 255, 0.14),
        transparent);
    transform-style: preserve-3d;
    opacity: 0.24;
    animation: beamPulse 5s ease-in-out infinite;
    will-change: transform, opacity;
}

@keyframes beamPulse {
    0%, 100% { opacity: 0.16; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(1.08); }
}

.node {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(0, 243, 255, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #00f3ff;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.14);
    cursor: pointer;
    backdrop-filter: blur(2px);
    will-change: transform;
}

.node::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.14) 0%, transparent 70%);
    animation: nodePulse 3s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 0.22; }
    50% { transform: scale(1.25); opacity: 0.38; }
}

.node:hover {
    transform: scale(1.5) !important;
    background: rgba(0, 243, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.28);
    z-index: 100;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00ff9d;
    box-shadow: 0 0 6px rgba(0, 255, 157, 0.45);
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
    opacity: 0.42;
    will-change: transform;
}

.particle-large {
    width: 7px;
    height: 7px;
    background: #00f3ff;
    box-shadow: 0 0 9px rgba(0, 243, 255, 0.4);
    opacity: 0.32;
}

.connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 243, 255, 0.22),
        rgba(185, 103, 255, 0.14),
        rgba(0, 255, 157, 0.14),
        transparent);
    transform-origin: left center;
    opacity: 0.16;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(0, 243, 255, 0.12);
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

.connection:hover {
    opacity: 0.28;
}

.data-stream {
    position: absolute;
    width: 3px;
    height: 250px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(0, 255, 157, 0.2),
        rgba(0, 243, 255, 0.14),
        transparent);
    animation: dataStream 10s linear infinite;
    opacity: 0.14;
    transform-style: preserve-3d;
    filter: blur(0.5px);
    will-change: transform, opacity;
}

@keyframes dataStream {
    0% {
        transform: translateY(-250px) rotateZ(0deg) translateZ(0px);
        opacity: 0;
    }
    20% { opacity: 0.14; }
    80% { opacity: 0.14; }
    100% {
        transform: translateY(250px) rotateZ(180deg) translateZ(70px);
        opacity: 0;
    }
}

.hologram-text {
    position: absolute;
    font-family: 'Poiret One', sans-serif;
    font-size: 1.2rem;
    color: #00ff9d;
    opacity: 0.32;
    text-transform: uppercase;
    letter-spacing: 5px;
    animation: hologramFloat 8s ease-in-out infinite;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.35), 0 0 14px rgba(0, 243, 255, 0.2);
    white-space: nowrap;
    transform-style: preserve-3d;
    pointer-events: none;
    will-change: transform, opacity, text-shadow;
}

@keyframes hologramFloat {
    0%, 100% {
        transform: translateY(0) rotateX(0deg) scale(1);
        opacity: 0.24;
        text-shadow: 0 0 8px rgba(0, 255, 157, 0.3);
    }
    50% {
        transform: translateY(-15px) rotateX(8deg) scale(1.04);
        opacity: 0.4;
        text-shadow: 0 0 12px rgba(0, 255, 157, 0.38), 0 0 18px rgba(0, 243, 255, 0.22);
    }
}

.distortion-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 30;
    transform-style: preserve-3d;
}

.distortion-wave {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 243, 255, 0.1) 0%,
        rgba(185, 103, 255, 0.07) 30%,
        transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 22px rgba(0, 243, 255, 0.14);
    pointer-events: none;
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

@media (max-width: 968px) {
    .visual-section {
        min-height: clamp(300px, 52vw, 400px);
        max-height: none;
        padding: 0.5rem 0 1rem;
        border-radius: 20px;
        background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(0, 243, 255, 0.07) 0%, transparent 72%);
    }

    .quantum-orb {
        width: clamp(220px, 58vw, 380px);
        height: clamp(220px, 58vw, 380px);
    }

    .ring-1 { width: 340px; height: 340px; }
    .ring-2 { width: 300px; height: 300px; }
    .ring-3 { width: 260px; height: 260px; }
    .core-outer { width: 280px; height: 280px; }
    .core-middle { width: 200px; height: 200px; }
    .core-inner { width: 110px; height: 110px; }

    .hologram-text {
        font-size: 1.05rem;
        letter-spacing: 4px;
    }
}

@media (max-width: 768px) {
    .visual-section {
        min-height: clamp(280px, 68vw, 360px);
    }

    .quantum-orb {
        width: clamp(200px, 62vw, 320px);
        height: clamp(200px, 62vw, 320px);
    }

    .core-inner { width: 100px; height: 100px; }
    .core-middle { width: 175px; height: 175px; }
    .core-outer { width: 250px; height: 250px; }
    .ring-1 { width: 300px; height: 300px; }
    .ring-2 { width: 265px; height: 265px; }
    .ring-3 { width: 230px; height: 230px; }

    .hologram-text {
        font-size: 1rem;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .visual-section {
        min-height: clamp(260px, 72vw, 340px);
        margin: 0 -0.15rem;
    }

    .hologram-text {
        font-size: 0.92rem;
        letter-spacing: 2.5px;
    }
}
