/* ================================================================
 * DM STUDIO AI — HOMEPAGE PIXEL 3D
 * Destination: assets/css/home-pixel-3d.css
 *
 * Scoped to the existing hero; all other homepage sections stay intact.
 * Original WebP Pixel image remains as the WebGL/error fallback.
 * ================================================================ */

/*
 * When WebGL2 is available, the tiny classic preload script marks the
 * document before the hero image is parsed. Visibility:hidden preserves
 * the image's dimensions so the 3D frame layout does not collapse.
 * On success the renderer takes over; on failure it removes this class.
 * Without JS or WebGL2 the original artwork is displayed normally.
 */
html.dm-pixel-3d-loading
.hero-image.hero-studio:not(.dm-pixel-3d-ready)
.pixel-robot-image {
    opacity: 0 !important;
    visibility: hidden !important;
}

.hero-image.hero-studio .pixel-image-frame {
    position: relative;
    isolation: isolate;
    overflow: visible;
}

.hero-image.hero-studio .dm-home-pixel-3d {
    position: absolute;
    inset: -13%;
    z-index: 4;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms ease;
}

.hero-image.hero-studio .dm-home-pixel-3d canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

.hero-image.hero-studio .pixel-robot-image {
    transition: opacity 280ms ease, visibility 280ms ease;
}

.hero-image.hero-studio.dm-pixel-3d-ready .dm-home-pixel-3d {
    opacity: 1;
}

.hero-image.hero-studio.dm-pixel-3d-ready .pixel-robot-image {
    opacity: 0;
    visibility: hidden;
}

/* =====================================================
   DM STUDIO AI — BRIGHT FUTURISTIC ORBIT RINGS
   ===================================================== */

.hero-image.hero-studio.dm-pixel-3d-ready .pixel-ring {
    opacity: 1;
}

/* Bright glowing balls attached to the rotating rings */
.hero-image.hero-studio.dm-pixel-3d-ready
.pixel-ring-one::before,

.hero-image.hero-studio.dm-pixel-3d-ready
.pixel-ring-two::after {

    opacity: 1;

    background: radial-gradient(
        circle at 35% 30%,
        #FFFFFF 0%,
        #BFFFFF 35%,
        #00E5FF 75%,
        #00AFFF 100%
    );

    box-shadow:
        0 0 8px 3px rgba(255,255,255,0.95),
        0 0 18px 7px rgba(0,229,255,0.85),
        0 0 32px 10px rgba(0,180,255,0.50);
}

.hero-image.hero-studio.dm-pixel-3d-ready .pixel-image-shine {
    opacity: 0.18;
    pointer-events: none;
}

/* The existing status chip and six labels remain visible and clickable. */
.hero-image.hero-studio .pixel-feature-cards,
.hero-image.hero-studio .pixel-status {
    z-index: 8;
}

@media (max-width: 700px) {
    .hero-image.hero-studio .dm-home-pixel-3d {
        inset: -9%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-image.hero-studio .dm-home-pixel-3d,
    .hero-image.hero-studio .pixel-robot-image {
        transition: none;
    }
}

/* =====================================================
   DM STUDIO AI — PERMANENT DARK PIXEL CIRCLE
   ===================================================== */

body.route-home .hero-image.hero-studio .pixel-image-frame {
    background: radial-gradient(
        circle at center,
        #1B2B50 0%,
        #101D3D 65%,
        #060D20 100%
    ) !important;

    border: 5px solid #69C7E8 !important;

    box-shadow:
        0 0 12px rgba(0, 210, 255, 0.35),
        0 0 30px rgba(98, 88, 220, 0.22),
        inset 0 0 20px rgba(0, 200, 255, 0.08)
        !important;
}