/* =========================================================
   Bubble background — sticks to the viewport while the
   underwater wrapper is on screen, so bubbles always rise
   through the currently visible section.
   ========================================================= */

.bubble-background {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    margin-bottom: -100vh;
    overflow: hidden;
    pointer-events: none;
    /* No z-index here: keeps the sticky layer at "auto" stacking so
       that sections (later siblings) paint on top of the bubbles. */
}

.bubble {
    position: absolute;
    bottom: -220px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    box-shadow:
        0 20px 30px rgba(0, 0, 0, 0.18),
        inset 0px 10px 30px 5px rgba(255, 255, 255, 0.85);
    opacity: 0.55;
    pointer-events: auto;
    cursor: pointer;
    will-change: margin-top, margin-left;
}

.bubble::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0) 70%
    );
    box-shadow: inset 0 20px 30px rgba(255, 255, 255, 0.3);
}

@keyframes bubbleVertical {
    0%   { margin-top: 0; }
    100% { margin-top: calc(-100vh - 400px); }
}

@keyframes bubbleHorizontal {
    0%   { margin-left: 0; }
    100% { margin-left: 50px; }
}

@media (prefers-reduced-motion: reduce) {
    .bubble-background {
        display: none;
    }
}
