/* ==========================================
   FUTURISTIC REALISTIC 3D CHIP SCENE
   ========================================== */

.hero-3d-scene {
    position: relative;
    width: 100%;
    height: 480px;
    /* Adjusted for better fit */
    perspective: 2000px;
    perspective-origin: 50% 30%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Tech Grid */
.tech-grid {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotateX(60deg) translateZ(-200px);
    animation: gridMove 30s linear infinite;
    mask-image: radial-gradient(circle at center, black 0%, transparent 60%);
}

/* Main Container Platform */
.tech-platform {
    position: relative;
    width: 320px;
    height: 320px;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateZ(45deg) scale(0.85);
    animation: floatingPlatform 6s ease-in-out infinite;
}

/* Base Plate */
.base-plate {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.plate-face {
    position: absolute;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.plate-top {
    width: 320px;
    height: 320px;
    transform: translateZ(20px);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
}

.plate-side-1 {
    width: 320px;
    height: 20px;
    transform: rotateX(-90deg) translateZ(300px);
    background: #0b1120;
}

.plate-side-2 {
    width: 320px;
    height: 20px;
    transform: rotateX(-90deg) translateZ(-20px) rotateY(180deg);
    background: #0b1120;
}

.plate-side-3 {
    width: 20px;
    height: 320px;
    transform: rotateY(90deg) translateZ(300px);
    background: #0b1120;
}

.plate-side-4 {
    width: 20px;
    height: 320px;
    transform: rotateY(-90deg) translateZ(20px);
    background: #0b1120;
}

/* Traces */
.trace {
    position: absolute;
    background: linear-gradient(90deg, transparent, #06b6d4, transparent);
    height: 2px;
    box-shadow: 0 0 8px #06b6d4;
    opacity: 0.7;
}

.trace-1 {
    top: 25%;
    left: 10%;
    width: 35%;
    animation: pulseTrace 3s infinite;
}

.trace-2 {
    top: 75%;
    right: 10%;
    width: 45%;
    animation: pulseTrace 4s infinite 1s;
}

.trace-3 {
    left: 45%;
    top: 10%;
    height: 80%;
    width: 2px;
    background: linear-gradient(180deg, transparent, #a855f7, transparent);
    animation: pulseTraceVertical 5s infinite;
}

.trace-4 {
    right: 25%;
    top: 35%;
    height: 50%;
    width: 2px;
    background: linear-gradient(180deg, transparent, #a855f7, transparent);
    animation: pulseTraceVertical 3s infinite 0.5s;
}

/* Processor Core */
.processor-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110px;
    height: 110px;
    transform: translate(-50%, -50%) translateZ(20px);
    transform-style: preserve-3d;
}

.core-face {
    position: absolute;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1.5px solid rgba(6, 182, 212, 0.8);
}

.core-top {
    width: 110px;
    height: 110px;
    transform: translateZ(30px);
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3), #0f172a);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
}

.logo-glow {
    width: 50px;
    height: 50px;
    background: #06b6d4;
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.9;
    animation: corePulse 2s ease-in-out infinite;
}

.core-side-1 {
    width: 110px;
    height: 30px;
    transform: rotateX(-90deg) translateZ(55px);
}

.core-side-2 {
    width: 110px;
    height: 30px;
    transform: rotateX(-90deg) translateZ(-55px) rotateY(180deg);
}

.core-side-3 {
    width: 30px;
    height: 110px;
    transform: rotateY(90deg) translateZ(55px);
}

.core-side-4 {
    width: 30px;
    height: 110px;
    transform: rotateY(-90deg) translateZ(55px);
}

/* IMPROVED Holographic Service Layers */
.holo-layer {
    position: absolute;
    width: 100px;
    /* Increased size */
    height: 100px;
    transform-style: preserve-3d;
    background: rgba(15, 23, 42, 0.4);
    /* Darker semi-transparent background for contrast */
    border: 1.5px solid rgba(6, 182, 212, 0.7);
    /* Stronger border */
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4), inset 0 0 20px rgba(6, 182, 212, 0.2);
    backdrop-filter: blur(8px);
    /* Stronger blur for "glass" look */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

.holo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotateZ(-45deg) rotateX(-20deg);
    /* Counter-rotation to make them face "up" more clearly */
    width: 100%;
}

.holo-icon {
    font-size: 32px;
    /* Much larger icon */
    color: #06b6d4;
    filter: drop-shadow(0 0 8px #06b6d4);
    margin-bottom: 6px;
}

.holo-label {
    font-size: 13px;
    /* Larger label */
    color: #f1f5f9;
    /* Bright white-slate for better contrast */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Layer Positioning */
.layer-ai {
    top: -60px;
    left: -60px;
    transform: translateZ(120px);
    animation: floatHoloAI 4s ease-in-out infinite;
}

.layer-cloud {
    top: -60px;
    right: -60px;
    transform: translateZ(140px);
    animation: floatHoloCloud 5s ease-in-out infinite 1s;
}

.layer-mobile {
    bottom: -60px;
    right: -60px;
    transform: translateZ(110px);
    animation: floatHoloMobile 4.5s ease-in-out infinite 2s;
}

.layer-web {
    bottom: -60px;
    left: -60px;
    transform: translateZ(130px);
    animation: floatHoloWeb 5.5s ease-in-out infinite 0.5s;
}

/* Animations */
@keyframes floatingPlatform {

    0%,
    100% {
        transform: rotateX(60deg) rotateZ(45deg) scale(0.85) translateZ(0);
    }

    50% {
        transform: rotateX(60deg) rotateZ(45deg) scale(0.85) translateZ(15px);
    }
}

@keyframes corePulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.7;
        filter: blur(15px);
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        filter: blur(25px);
    }
}

/* Specific floating animations for each layer to keep them distinct */
@keyframes floatHoloAI {

    0%,
    100% {
        transform: translateZ(120px) translateY(0);
    }

    50% {
        transform: translateZ(140px) translateY(-5px);
    }
}

@keyframes floatHoloCloud {

    0%,
    100% {
        transform: translateZ(140px) translateY(0);
    }

    50% {
        transform: translateZ(160px) translateY(-8px);
    }
}

@keyframes floatHoloMobile {

    0%,
    100% {
        transform: translateZ(110px) translateY(0);
    }

    50% {
        transform: translateZ(130px) translateY(-4px);
    }
}

@keyframes floatHoloWeb {

    0%,
    100% {
        transform: translateZ(130px) translateY(0);
    }

    50% {
        transform: translateZ(150px) translateY(-6px);
    }
}

@keyframes pulseTrace {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 12px #06b6d4;
    }
}

@keyframes pulseTraceVertical {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 12px #a855f7;
    }
}

@keyframes travelPath1 {
    0% {
        top: 0;
        left: 0;
        opacity: 0;
        transform: translateZ(25px);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        left: 100%;
        opacity: 0;
        transform: translateZ(25px);
    }
}

@keyframes travelPath2 {
    0% {
        top: 100%;
        left: 0;
        opacity: 0;
        transform: translateZ(25px);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 0;
        left: 100%;
        opacity: 0;
        transform: translateZ(25px);
    }
}

@keyframes gridMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 60px 60px;
    }
}

/* Energy Pulses */
.energy-pulse {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    filter: blur(2px);
    box-shadow: 0 0 10px #fff, 0 0 20px #06b6d4;
}

.pulse-1 {
    animation: travelPath1 4s linear infinite;
}

.pulse-2 {
    animation: travelPath2 5s linear infinite;
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .tech-platform {
        width: 280px;
        height: 280px;
        transform: rotateX(60deg) rotateZ(45deg) scale(0.7);
    }

    .hero-3d-scene {
        height: 380px;
    }

    .holo-layer {
        width: 80px;
        height: 80px;
    }

    .holo-icon {
        font-size: 24px;
    }

    .holo-label {
        font-size: 11px;
    }

    /* Mobile-specific side plates */
    .plate-side-1 {
        width: 280px;
        transform: rotateX(-90deg) translateZ(260px);
    }

    .plate-side-2 {
        width: 280px;
        transform: rotateX(-90deg) translateZ(-20px) rotateY(180deg);
    }

    .plate-side-3 {
        height: 280px;
        transform: rotateY(90deg) translateZ(260px);
    }

    .plate-side-4 {
        height: 280px;
        transform: rotateY(-90deg) translateZ(20px);
    }
}

@media (prefers-reduced-motion: reduce) {

    .tech-platform,
    .holo-layer,
    .energy-pulse,
    .tech-grid,
    .logo-glow,
    .trace {
        animation: none !important;
    }
}