:root {
    --scroll: 0;
}
.objects {
    z-index: -5; /* below cloud */
    opacity: 1;
    
}

.clouds {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;

    height: auto;
    aspect-ratio: 1 / 3; /* adjust to your image */

    background-image: url("images/clouds2.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;

    opacity: 0;
    pointer-events: none;

    transform: translateY(0);
    z-index: 1;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;

    background-image: url("images/background.jpg");
    background-size: cover;
    background-attachment: scroll;
    background-position: center;
    text-align: center;
    position: relative;
}

/* Dark overlay controlled by scroll */
body::before {
    content: "";
    position: fixed;
    inset: 0;

    /* opacity increases with scroll */
    background: rgba(0, 0, 0, calc(var(--scroll) * 1));

    pointer-events: none;
    transition: background 0.1s linear;
    z-index: 2; /*dark overlay index*/
}

  #redOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 0, 0, 0.4);

    opacity: 0;
    pointer-events: none;
    z-index: 3;

    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.content {
    position: relative;
    color: white;
    padding: 100px;
}

.spacer {
    height: 400vh;
}

