/*
 * M.A.K. Galerie — chromatic atmosphere drawn ONLY from the authorized cover.
 * The original image remains crisp and uncropped in the foreground.
 *
 * The blurred photographic duplicate lives in the sticky artwork column;
 * the gradient dissolves into the notice-white at the left and into the
 * gallery-white near the bottom. No color extraction API, canvas or external
 * request is necessary. No restricted/withdrawn work ever gets this layer.
 */
@media (min-width: 861px) {
    .mak-artwork-page .mak-desktop-visual:has(> .mak-artwork-aura) {
        isolation: isolate;
        overflow: hidden;
        background: #fff;
    }

    .mak-artwork-page .mak-desktop-visual > .mak-artwork-aura {
        position: absolute;
        z-index: 0;
        inset: 0;
        overflow: hidden;
        pointer-events: none;
        user-select: none;
        background: #fff;
        contain: paint;
    }

    /* More legible colour structures: a deliberately much lighter blur
       (18–36px). The original artwork stays perfectly sharp. */
    .mak-artwork-page .mak-artwork-aura__image {
        position: absolute;
        display: block;
        inset: -18%;
        width: 136%;
        height: 136%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        object-position: center;
        opacity: .64;
        filter: blur(clamp(18px, 2.5vw, 36px)) saturate(.87) hue-rotate(-180deg);
        transform: translate3d(0, 0, 0) scale(1.10);
        transform-origin: center;
        animation: mak-artwork-aura-drift 32s ease-in-out infinite alternate;
        backface-visibility: hidden;
    }

    /* A two-dimensional fade keeps the typographic rail untouched and lets
       the bottom of the first screen return quietly to white. */
    .mak-artwork-page .mak-artwork-aura::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(
                90deg,
                #fff 0%,
                rgba(255,255,255,.98) 6%,
                rgba(255,255,255,.76) 19%,
                rgba(255,255,255,.18) 46%,
                transparent 70%
            ),
            linear-gradient(
                0deg,
                #fff 0%,
                rgba(255,255,255,.90) 8%,
                rgba(255,255,255,.35) 28%,
                transparent 57%
            );
        pointer-events: none;
    }

    .mak-artwork-page .mak-desktop-visual > .mak-artwork-figure {
        position: relative;
        z-index: 1;
    }
}

/* A single, slow compositor-only drift: no animated filter and no flashes.
   The image overfills the masked panel, so the motion never exposes an edge. */
@keyframes mak-artwork-aura-drift {
    0%   { transform: translate3d(-1.3%, .5%, 0) scale(1.10); }
    50%  { transform: translate3d(1.4%, -1.1%, 0) scale(1.14); }
    100% { transform: translate3d(-.6%, 1.0%, 0) scale(1.11); }
}

@media (prefers-reduced-motion: reduce) {
    .mak-artwork-page .mak-artwork-aura__image {
        animation: none !important;
        transform: scale(1.10);
    }
}

/* The mobile layout must remain a plain white reading surface. It already
   provides the artwork inline, not in a sticky illustration column. */
@media (max-width: 860px) {
    .mak-artwork-aura {
        display: none !important;
    }
}

@media print {
    .mak-artwork-aura {
        display: none !important;
    }
}
