/*
 * M.A.K. Galerie — catalogue / atmospheric artwork colour.
 * One ambient field for the whole catalogue, not a halo per thumbnail.
 * The only source is each published artwork's authorized cover-small URL.
 * No canvas processing, network service, tracking or markup duplication.
 * JavaScript is an optional enhancement: without it the page stays white.
 */
.mak-index-page {
    background: #fff;
}
.mak-index-page .mak-index {
    position: relative;
    z-index: 1;
    background: transparent;
}
.mak-index-page .mak-footer {
    position: relative;
    z-index: 1;
    background: #fff;
}
.mak-index-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    overflow: hidden;
    opacity: var(--mak-atmosphere-opacity, 0);
    transition: opacity .8s ease-out;
    background: transparent;
    isolation: isolate;
}
.mak-index-atmosphere__layer {
    position: absolute;
    inset: -20%;
    display: block;
    width: 140%;
    height: 140%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    filter: blur(clamp(30px, 3.2vw, 45px)) hue-rotate(-180deg) saturate(.80);
    transform-origin: center center;
    transition: opacity 1500ms cubic-bezier(.23, .64, .29, 1);
    animation: mak-index-atmosphere-cloud 42s ease-in-out infinite alternate;
}
.mak-index-atmosphere__layer:nth-child(2) {
    animation-direction: alternate-reverse;
    animation-delay: -11s;
}
.mak-index-atmosphere__layer.is-current {
    opacity: .17;
}
/* The colour has no hard boundaries and never stains the gallery footer. */
.mak-index-atmosphere::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 86% 87% at 56% 47%,
            transparent 24%, rgba(255,255,255,.38) 70%, #fff 100%),
        linear-gradient(0deg, #fff 0%, rgba(255,255,255,.65) 8%,
            transparent 29%),
        linear-gradient(180deg, #fff 0%, rgba(255,255,255,.50) 11%,
            transparent 30%);
}
@keyframes mak-index-atmosphere-cloud {
    0%   { transform: translate3d(-1.7%, .9%, 0) scale(1.08); }
    50%  { transform: translate3d(1.4%, -1.1%, 0) scale(1.12); }
    100% { transform: translate3d(-.8%, 1.2%, 0) scale(1.09); }
}
/* On narrow screens, reduced-motion systems or printing, always show
   the original white editorial catalogue. */
@media (max-width: 760px), (prefers-reduced-motion: reduce), print {
    .mak-index-atmosphere {
        display: none !important;
    }
    .mak-index-atmosphere__layer {
        animation: none !important;
        transition: none !important;
    }
}
