/*
 * DiviniGen 4.3.5 — Dream Leonardo living triangle correction
 * Scope: Dream main page only.
 * Corrects legacy black centre overlay, restores the shared homepage-family
 * living universe behind the Dream entry scene, and adds restrained sphere-family
 * breathing/float/halo motion while preserving the proven 4.2.3 fragment canvas.
 */

/* The shared universe must remain visible behind the Dream entry scene. */
.dg-page-shell.dg-universe-active-v43 .dg-dream-v40.dg-dream-entry-v41 {
    background: transparent !important;
}

.dg-page-shell.dg-universe-active-v43 .dg-dream-v40.dg-dream-entry-v41::before {
    content: none !important;
    display: none !important;
}

/* Remove the legacy dark circular centre from the pre-Leonardo Dream construction. */
.dg-dream-entry-v41 .dg-dream-metal-surface-v42::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* The Leonardo artwork already contains the approved central symbol. */
.dg-dream-entry-v41 .dg-dream-centred-core-v423 {
    display: none !important;
}

/* Keep the triangle itself calm; motion comes from the existing 4.2.3 variables. */
.dg-dream-entry-v41 .dg-dream-metal-surface-v42 {
    transform:
        translate(-50%, -50%)
        translate3d(0, var(--dg-dream-v435-float, 0px), 0);
    transform-origin: 50% 54%;
    will-change: transform, opacity, filter;
}

.dg-dream-entry-v41 .dg-dream-leonardo-triangle-v433 {
    transform:
        translate3d(var(--dg-dream-metal-parallax-x), var(--dg-dream-metal-parallax-y), 0)
        scale(calc(var(--dg-dream-metal-breath) * var(--dg-dream-v435-breath, 1)));
    transform-origin: 50% 54%;
    filter:
        brightness(.96)
        contrast(1.08)
        saturate(.90)
        drop-shadow(0 0 18px rgba(205,225,234,.10));
    animation: dgDreamTriangleBreathV435 7.8s ease-in-out infinite;
}

/* Soft sphere-family halo. It must never cover the artwork. */
.dg-dream-entry-v41 .dg-dream-prism-stage-live-v42::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 53%;
    width: 82%;
    height: 72%;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(220,235,242,.10) 0%,
        rgba(155,184,198,.055) 30%,
        rgba(78,100,113,.02) 52%,
        transparent 72%
    );
    transform: translate(-50%, -50%) scale(1);
    filter: blur(10px);
    opacity: .68;
    pointer-events: none;
    animation: dgDreamHaloBreathV435 7.8s ease-in-out infinite;
}

/* Preserve the existing fragment/spike canvas, but keep it elegant around the art. */
.dg-dream-entry-v41 .dg-dream-prism-stage-live-v42 .dg-dream-entry-prism-canvas-v42 {
    z-index: 5;
    opacity: calc(var(--dg-dream-particle-opacity) * .66);
    mix-blend-mode: screen;
    filter:
        drop-shadow(0 0 14px rgba(214,231,239,.12))
        drop-shadow(0 5px 12px rgba(0,0,0,.14));
}

.dg-dream-entry-v41 .dg-dream-metal-sheen-v42 {
    z-index: 6;
    opacity: calc(var(--dg-dream-metal-sheen-opacity) * .78);
}

@keyframes dgDreamTriangleBreathV435 {
    0%, 100% {
        --dg-dream-v435-breath: 1;
        --dg-dream-v435-float: 0px;
    }
    50% {
        --dg-dream-v435-breath: 1.014;
        --dg-dream-v435-float: -5px;
    }
}

@keyframes dgDreamHaloBreathV435 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(.96);
        opacity: .48;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: .72;
    }
}

@media (max-width: 767px) {
    .dg-dream-entry-v41 .dg-dream-prism-stage-live-v42::after {
        width: 78%;
        height: 69%;
        filter: blur(8px);
    }

    .dg-dream-entry-v41 .dg-dream-prism-stage-live-v42 .dg-dream-entry-prism-canvas-v42 {
        opacity: calc(var(--dg-dream-particle-opacity) * .54);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dg-dream-entry-v41 .dg-dream-leonardo-triangle-v433,
    .dg-dream-entry-v41 .dg-dream-prism-stage-live-v42::after {
        animation: none !important;
    }

    .dg-dream-entry-v41 .dg-dream-leonardo-triangle-v433 {
        transform: none !important;
    }

    .dg-dream-entry-v41 .dg-dream-prism-stage-live-v42::after {
        transform: translate(-50%, -50%) !important;
        opacity: .5;
    }
}
