/* The drifting field and its small, looking-glass response. */
.bokeh,
.looking-glass-effects {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.looking-glass-effects {
    z-index: -2;
}

.bokeh > .orb {
    position: absolute;
    display: block;
    width: var(--size);
    aspect-ratio: 1;
    animation: orb-drift 16s ease-in-out infinite alternate;
}

.orb-core {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* A textured surface hides the wave beneath each circle, with a soft edge. */
    background: linear-gradient(rgba(20, 38, 34, 0.8), rgba(15, 31, 28, 0.8)), url('../img/dark_mosaic.png') #111817;
    -webkit-mask-image: radial-gradient(circle closest-side, #000 calc(100% - 2px), transparent 100%);
    mask-image: radial-gradient(circle closest-side, #000 calc(100% - 2px), transparent 100%);
}

.bokeh > .orb:nth-child(1) {
    --size: 136px;
    --drift-x: 90px;
    --drift-y: 70px;
    top: 12%;
    left: 13%;
    animation-delay: -4s;
}

.bokeh > .orb:nth-child(2) {
    --size: 92px;
    --drift-x: -70px;
    --drift-y: 100px;
    top: 18%;
    right: 8%;
    animation-delay: -10s;
    animation-duration: 17s;
}

.bokeh > .orb:nth-child(3) {
    --size: 70px;
    --drift-x: 110px;
    --drift-y: -80px;
    bottom: 14%;
    left: 8%;
    animation-delay: -8s;
    animation-duration: 15s;
}

.bokeh > .orb:nth-child(4) {
    --size: 162px;
    --drift-x: -110px;
    --drift-y: -95px;
    bottom: 8%;
    right: 17%;
    animation-delay: -8s;
    animation-duration: 20s;
}

.bokeh > .orb:nth-child(5) {
    --size: 36px;
    --drift-x: 65px;
    --drift-y: -110px;
    top: 58%;
    right: 30%;
    animation-delay: -3s;
    animation-duration: 14s;
}

.glass-effect {
    position: absolute;
    width: 0;
    height: 0;
}

.glass-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--pulse-size);
    aspect-ratio: 1;
    border: 1px solid rgba(81, 187, 166, 0.55);
    border-radius: 50%;
    box-shadow: inset 0 0 28px rgba(81, 187, 166, 0.045), 0 0 22px rgba(81, 187, 166, 0.075);
    opacity: 0;
}

.glass-pulse::before,
.glass-pulse::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid transparent;
    border-top-color: rgba(220, 236, 170, 0.34);
    border-radius: 50%;
    transform: rotate(-30deg);
}

.glass-pulse::after {
    inset: -12px;
    border-top-color: transparent;
    border-bottom-color: rgba(81, 187, 166, 0.25);
    transform: rotate(18deg);
}

.motion-paused .bokeh > .orb { animation-play-state: paused; }

@keyframes orb-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(var(--drift-x), var(--drift-y)); }
}

@media (max-width: 480px) {
    .bokeh > .orb:nth-child(1) { left: -65px; }
    .bokeh > .orb:nth-child(4) { right: -60px; }
}

@media (prefers-reduced-motion: reduce) {
    .bokeh > .orb { animation: none; }
    .looking-glass-effects { display: none; }
}
