/* css/hero-orbital.css - Orbital Catalog Animation */

:root {
    --orbit-speed-front: 45s;
    --orbit-speed-mid: 65s;
    --orbit-speed-back: 85s;
    --glow-primary: rgba(0, 243, 255, 0.4);
    --color-azul-celeste: #00f3ff;
}

/* ========================================= 
   CONTENEDOR VISUAL DERECHO
   ========================================= */
.hero-visual-area {
    position: relative;
    flex: 1;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* CLAVE: recortar las órbitas para que no invadan el texto */
    perspective: 2000px;
}


.orbital-system {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    z-index: 5; /* Below orbital-center (z-index: 50) but above hero-visuals */
    opacity: 1 !important;
}

/* Central Elements */
.orbital-center {
    position: relative;
    width: 540px; 
    height: 540px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    /* Transformation is now 0 because it's no longer inside the tilted parent */
    transform: rotate(0deg) !important;
    /* Force 2D rendering for maximum sharpness */
    transform-style: flat;
}

.center-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulseGlow 4s infinite ease-in-out;
}

.monitor-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 55;
    /* Animation removed per user request for a fixed, stable look */
}

.hero-center-img {
    max-width: 540px;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(0, 243, 255, 0.4));
    position: relative;
    z-index: 100;
    opacity: 1 !important;
    transform: none !important;
    image-rendering: -webkit-optimize-contrast; /* Focus on sharpness */
}

.monitor-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 280px;
    background: var(--color-azul-celeste);
    filter: blur(60px);
    opacity: 0.4;
    border-radius: 50%;
    z-index: 50;
}

/* Orbit Layers */
.orbital-orbit {
    position: absolute;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 1s ease;
    will-change: transform;
    /* Reduced tilt to make circles feel more natural and 'circular' */
    transform-style: preserve-3d;
}

/* Orbit sizes now match JS radii × 2 (50% smaller than before) */
.orbit-back {
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 1; /* Behind orbital-center (z-index: 50) */
    animation: rotateOrbit var(--orbit-speed-back) linear infinite;
    transform: rotateX(45deg) rotateY(-10deg);
}

.orbit-mid {
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    z-index: 2; /* Behind orbital-center (z-index: 50) */
    animation: rotateOrbit var(--orbit-speed-mid) linear infinite reverse;
    transform: rotateX(45deg) rotateY(10deg);
}

.orbit-front {
    width: 560px;
    height: 560px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 3; /* Behind orbital-center (z-index: 50) */
    animation: rotateOrbit var(--orbit-speed-front) linear infinite;
    transform: rotateX(45deg) rotateY(-5deg);
}

/* Hover logic removed per user request */

/* Game Covers (Mini Portadas) - NO MARCOS, NO DECORATION */
.orbit-item {
    position: absolute;
    width: 67px; /* -20% from 84px */
    height: 42px; /* -20% from 52px */
    overflow: visible;
    background: transparent;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    will-change: transform, filter, opacity;
}

/* Adjust size and effects per depth */
.orbit-back .orbit-item {
    width: 50px; /* -20% from 63px */
    height: 30px; /* -20% from 38px */
    filter: blur(4px) grayscale(0.8);
    opacity: 0.25;
}

.orbit-mid .orbit-item {
    width: 73px; /* -20% from 91px */
    height: 45px; /* -20% from 56px */
    filter: blur(2px) grayscale(0.4);
    opacity: 0.5;
}

.orbit-front .orbit-item {
    width: 144px; /* -20% from 180px */
    height: 88px;  /* -20% from 110px */
    filter: blur(1.5px) grayscale(0.1);
    opacity: 0.8;
}

.orbit-game-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* Apply counter-rotation to keep upright */
    animation: counterRotate var(--orbit-speed-front) linear infinite;
}

.orbit-mid .orbit-game-image { animation-duration: var(--orbit-speed-mid); animation-direction: reverse; }
.orbit-back .orbit-game-image { animation-duration: var(--orbit-speed-back); }

/* Interaction removed per user request */

/* Animations */
@keyframes rotateOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

@keyframes floatMonitor {
    0%, 100% { transform: translateY(0) rotate(0); }
    33% { transform: translateY(-10px) rotate(2deg); }
    66% { transform: translateY(5px) rotate(-2deg); }
}

/* Counter-rotation logic moved directly to the image class above */
@keyframes counterRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .orbital-system {
        height: 500px;
        transform: scale(0.7); /* Slightly smaller base */
        margin-top: -30px;
    }
    
    .orbit-front { width: 650px; height: 480px; }
    .orbit-mid { width: 480px; height: 380px; }
    .orbit-back { width: 320px; height: 280px; }

    .orbit-item {
        width: 60px !important;
        height: 40px !important;
    }
}

@media (max-width: 600px) {
    .orbital-system {
        transform: scale(0.5); /* Significant scale reduction to clear center */
        height: 350px;
        margin-top: -50px;
        margin-bottom: 20px;
    }
    
    .orbit-front { width: 700px; height: 500px; } /* Expand orbits to move items OUT */
    
    /* Hide some items on very small mobile to reduce noise */
    .orbit-mid .orbit-item:nth-child(even),
    .orbit-back .orbit-item:nth-child(3n) {
        display: none;
    }

    .hero-content {
        position: relative;
        z-index: 100; /* Ensure text is ALWAYS on top */
    }

    .hero-center-img {
        max-width: 320px; /* Scaled for mobile */
    }

    .monitor-glow {
        width: 220px;
        height: 160px;
    }
}
