F/* ==================================================
   SOUNDBRIDGE – SUMMER SCENE
   DATEI: summer-scene.css
================================================== */


/* ==================================================
   EFFEKT-LAYER
================================================== */
F
#seasonEffectsLayer {
    position: fixed;
    inset: 0;

    z-index: 20;

    overflow: hidden;
    pointer-events: none;
}


/* ==================================================
   SOMMER-SZENE
================================================== */

.sb-summer-scene {
    position: absolute;
    inset: 0;

    overflow: hidden;
    pointer-events: none;
}


/*
 * Dunkelt die vorhandene Landschaft am Abend
 * und in der Nacht ab.
 *
 * Es wird kein separates NightSky-Bild benötigt.
 */

.sb-summer-scene::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: 1;

    background:
        linear-gradient(
            to bottom,
            rgba(3, 10, 32, 0.08),
            rgba(3, 10, 32, 0.18)
        );

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 1.2s ease,
        background 1.2s ease;
}

.sb-summer-scene.is-evening::after {
    opacity: 1;

    background:
        linear-gradient(
            to bottom,
            rgba(20, 15, 45, 0.20),
            rgba(30, 18, 38, 0.32)
        );
}

.sb-summer-scene.is-night::after {
    opacity: 1;

    background:
        linear-gradient(
            to bottom,
            rgba(2, 8, 28, 0.56),
            rgba(3, 10, 30, 0.68)
        );
}


/* ==================================================
   SANDBANK
================================================== */

.sb-sandbank {
    position: absolute;

    left: 0;
    right: 0;
    bottom: -20px;

    width: 100%;
    height: 220px;

    background-image:
        url("/Bilder/Themes/Summer/Sandbank.png");

    background-repeat: repeat-x;
    background-size: auto 300px;
    background-position:
        center calc(100% + 85px);

    z-index: 2;
}


/* ==================================================
   ALLGEMEINE BODENOBJEKTE
================================================== */

.sb-ground-object {
    position: absolute;

    bottom: 0;

    width: auto;

    object-fit: contain;
    transform-origin: center bottom;

    z-index: 5;

    user-select: none;
    -webkit-user-drag: none;
}


/* ==================================================
   LINKE PALME
================================================== */

.sb-palm-left {
    left: -10%;
    bottom: -55px;

    height: clamp(210px, 34vh, 440px);

    z-index: 4;
}


/* ==================================================
   BEACHBALL
================================================== */

.sb-beachball {
    left: 5.5vw;
    bottom: 8px;

    height: clamp(70px, 10vh, 125px);

    z-index: 7;
}


/* ==================================================
   SONNENSCHIRM
================================================== */

.sb-sunshade {
    left: 10vw;
    bottom: -8px;

    height: clamp(125px, 19vh, 230px);

    z-index: 5;
}


/* ==================================================
   LIEGESTUHL
================================================== */

.sb-deckchair {
    left: 17vw;
    bottom: -6px;

    height: clamp(130px, 20vh, 240px);

    z-index: 7;
}


/* ==================================================
   FLAMINGO
================================================== */

.sb-flamingo {
    right: 22vw;
    bottom: -6px;

    height: clamp(105px, 16vh, 190px);

    z-index: 8;

    animation:
        flamingo-idle 4.5s ease-in-out infinite;
}


/* ==================================================
   BEACHBAR
================================================== */

.sb-beachbar {
    right: 3.5vw;
    bottom: -75px;

    height: clamp(120px, 32vh, 390px);

    z-index: 6;

    transition:
        filter 1s ease;
}


/* ==================================================
   RECHTE PALME
================================================== */

.sb-palm-right {
    right: -8%;
    bottom: -18px;

    height: clamp(220px, 35vh, 455px);

    z-index: 4;

    animation-delay: -2.2s;
}


/* ==================================================
   PALMEN-ANIMATION
================================================== */

.sb-palm-left,
.sb-palm-right {
    animation:
        palm-sway 5.5s ease-in-out infinite;
}

@keyframes palm-sway {
    0%,
    100% {
        transform: rotate(-0.8deg);
    }

    50% {
        transform: rotate(1.2deg);
    }
}


/* ==================================================
   FLAMINGO-ANIMATION
================================================== */

@keyframes flamingo-idle {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform:
            translateY(-4px)
            rotate(1deg);
    }
}


/* ==================================================
   MÖWE
================================================== */

.sb-seagull {
    position: absolute;

    top: clamp(115px, 17vh, 220px);
    right: -240px;

    width: clamp(110px, 11vw, 205px);

    z-index: 8;

    opacity: 1;

    animation:
        seagull-flight 18s linear infinite,
        seagull-bob 1.8s ease-in-out infinite;

    transition:
        opacity 0.8s ease;
}

@keyframes seagull-flight {
    from {
        right: -240px;
    }

    to {
        right: calc(100vw + 260px);
    }
}

@keyframes seagull-bob {
    0%,
    100% {
        margin-top: 0;

        transform:
            rotate(-2deg);
    }

    50% {
        margin-top: -22px;

        transform:
            rotate(3deg);
    }
}


/* ==================================================
   SEGELSCHIFF – TAG
================================================== */

.sb-sailboat {
    position: absolute;

    right: -330px;
    bottom: clamp(105px, 15vh, 185px);

    width: clamp(170px, 18vw, 330px);

    z-index: 3;

    opacity: 1;

    animation:
        sailboat-crossing 34s linear infinite,
        sailboat-rocking 3.5s ease-in-out infinite;

    transition:
        opacity 0.8s ease;
}

@keyframes sailboat-crossing {
    from {
        right: -330px;
    }

    to {
        right: calc(100vw + 350px);
    }
}

@keyframes sailboat-rocking {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-1deg);
    }

    50% {
        transform:
            translateY(7px)
            rotate(1.5deg);
    }
}


/* ==================================================
   DELFIN
================================================== */

.sb-dolphin {
    position: absolute;

    left: 44%;
    bottom: clamp(95px, 14vh, 170px);

    width: clamp(90px, 8vw, 150px);

    z-index: 7;

    transform-origin: center;

    animation:
        dolphin-jump 8.5s ease-in-out infinite;

    transition:
        opacity 0.8s ease;
}

@keyframes dolphin-jump {
    0%,
    12% {
        opacity: 0;

        transform:
            translate(-50%, 85px)
            rotate(-18deg)
            scale(0.72);
    }

    18% {
        opacity: 1;
    }

    38% {
        opacity: 1;

        transform:
            translate(-50%, -130px)
            rotate(-10deg)
            scale(1);
    }

    55% {
        opacity: 1;

        transform:
            translate(-50%, -205px)
            rotate(-95deg)
            scale(1.05);
    }

    72% {
        opacity: 1;

        transform:
            translate(-50%, -80px)
            rotate(-185deg)
            scale(0.96);
    }

    84% {
        opacity: 1;

        transform:
            translate(-50%, 75px)
            rotate(-240deg)
            scale(0.86);
    }

    90%,
    100% {
        opacity: 0;

        transform:
            translate(-50%, 125px)
            rotate(-270deg)
            scale(0.72);
    }
}


/* ==================================================
   STERNE
================================================== */

.sb-summer-stars {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    z-index: 2;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 1.2s ease;
}


/* ==================================================
   MOND
================================================== */

.sb-summer-moon {
    position: absolute;

    top: 40px;
    right: 90px;

    width: clamp(120px, 14vw, 220px);
    height: auto;

    z-index: 3;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 1.2s ease,
        filter 1.2s ease;
}




/* ==================================================
   ABEND-YACHT
================================================== */

.sb-night-yacht {
    position: absolute;

    right: -360px;
    bottom: clamp(60px, 9vh, 105px);

    width: clamp(180px, 19vw, 350px);
    height: auto;

    z-index: 3;

    opacity: 0;

    pointer-events: none;

    animation:
        night-yacht-crossing 38s linear infinite,
        night-yacht-rocking 4s ease-in-out infinite;

    transition:
        opacity 0.8s ease,
        filter 1s ease;
}

.sb-night-yacht-back {
    z-index: 2;

    animation:
        night-yacht-crossing 38s linear infinite,
        night-yacht-rocking 4s ease-in-out infinite,
        night-yacht-back-pass 76s steps(1, end) infinite;
}

.sb-night-yacht-front {
    z-index: 4;

    animation:
        night-yacht-crossing 38s linear infinite,
        night-yacht-rocking 4s ease-in-out infinite,
        night-yacht-front-pass 76s steps(1, end) infinite;
}

@keyframes night-yacht-back-pass {
    0%,
    49.999% {
        visibility: visible;
    }

    50%,
    100% {
        visibility: hidden;
    }
}

@keyframes night-yacht-front-pass {
    0%,
    49.999% {
        visibility: hidden;
    }

    50%,
    100% {
        visibility: visible;
    }
}

@keyframes night-yacht-crossing {
    from {
        right: -360px;
    }

    to {
        right: calc(100vw + 380px);
    }
}

@keyframes night-yacht-rocking {
    0%,
    100% {
        transform:
            translateY(0)
            rotate(-0.8deg);
    }

    50% {
        transform:
            translateY(6px)
            rotate(1.2deg);
    }
}



/* ==================================================
   MORGEN
================================================== */

.sb-summer-scene.is-morning .sb-summer-stars,
.sb-summer-scene.is-morning .sb-summer-moon,
.sb-summer-scene.is-morning .sb-lighthouse,
.sb-summer-scene.is-morning .sb-night-yacht {
    opacity: 0;
}

.sb-summer-scene.is-morning .sb-sailboat,
.sb-summer-scene.is-morning .sb-seagull,
.sb-summer-scene.is-morning .sb-dolphin {
    opacity: 1;
}


/* ==================================================
   TAG
================================================== */

.sb-summer-scene.is-day .sb-summer-stars,
.sb-summer-scene.is-day .sb-summer-moon,
.sb-summer-scene.is-day .sb-lighthouse,
.sb-summer-scene.is-day .sb-night-yacht {
    opacity: 0;
}

.sb-summer-scene.is-day .sb-sailboat,
.sb-summer-scene.is-day .sb-seagull,
.sb-summer-scene.is-day .sb-dolphin {
    opacity: 1;
}


/* ==================================================
   ABEND
================================================== */

.sb-summer-scene.is-evening .sb-summer-stars {
    opacity: 0.45;
}

.sb-summer-scene.is-evening .sb-summer-moon {
    opacity: 0.55;

    filter:
        drop-shadow(
            0 0 18px
            rgba(255, 239, 178, 0.45)
        );
}

.sb-summer-scene.is-evening .sb-lighthouse {
    opacity: 1;

    filter:
        drop-shadow(
            0 0 12px
            rgba(255, 221, 130, 0.45)
        );
}

.sb-summer-scene.is-evening .sb-night-yacht {
    opacity: 1;

    filter:
        drop-shadow(
            0 0 10px
            rgba(255, 224, 155, 0.40)
        );
}

.sb-summer-scene.is-evening .sb-sailboat,
.sb-summer-scene.is-evening .sb-seagull,
.sb-summer-scene.is-evening .sb-dolphin {
    opacity: 0;
}

.sb-summer-scene.is-evening .sb-beachbar {
    filter:
        brightness(0.82)
        drop-shadow(
            0 0 13px
            rgba(255, 192, 92, 0.42)
        );
}


/* ==================================================
   NACHT
================================================== */

.sb-summer-scene.is-night .sb-summer-stars {
    opacity: 1;
}

.sb-summer-scene.is-night .sb-summer-moon {
    opacity: 1;

    filter:
        drop-shadow(
            0 0 26px
            rgba(235, 242, 255, 0.72)
        );
}

.sb-summer-scene.is-night .sb-lighthouse {
    opacity: 1;

    filter:
        drop-shadow(
            0 0 18px
            rgba(255, 221, 130, 0.68)
        );
}

.sb-summer-scene.is-night .sb-night-yacht {
    opacity: 1;

    filter:
        drop-shadow(
            0 0 14px
            rgba(255, 224, 155, 0.60)
        );
}

.sb-summer-scene.is-night .sb-sailboat,
.sb-summer-scene.is-night .sb-seagull,
.sb-summer-scene.is-night .sb-dolphin {
    opacity: 0;
}

.sb-summer-scene.is-night .sb-beachbar {
    filter:
        brightness(0.68)
        drop-shadow(
            0 0 18px
            rgba(255, 176, 70, 0.62)
        );
}


/* ==================================================
   MOBILE ANPASSUNGEN
================================================== */

@media (max-width: 768px) {

    .sb-sandbank {
        height: 120px;
    }

    .sb-ground-object {
        bottom: 0;
    }

    .sb-palm-left {
        left: -12vw;
        bottom: -35px;

        height: 190px;
    }

    .sb-palm-right {
        right: -13vw;
        bottom: -12px;

        height: 195px;
    }

    .sb-beachball {
        left: 3vw;

        height: 58px;
    }

    .sb-sunshade {
        left: 12vw;

        height: 105px;
    }

    .sb-deckchair {
        left: 27vw;

        height: 108px;
    }

    .sb-flamingo {
        right: 28vw;

        height: 92px;
    }

    .sb-beachbar {
        right: -2vw;
        bottom: -28px;

        height: 165px;
    }

    .sb-seagull {
        top: 110px;

        width: 105px;
    }

    .sb-sailboat {
        bottom: 95px;

        width: 155px;
    }

    .sb-dolphin {
        left: 48%;
        bottom: 80px;

        width: 125px;
    }

    .sb-summer-moon {
        top: 70px;
        right: 18px;

        width: 115px;
    }

    .sb-lighthouse {
        left: 3vw;
        bottom: 82px;

        height: 145px;
    }

    .sb-night-yacht {
        bottom: 92px;

        width: 160px;
    }
}


/* ==================================================
   REDUZIERTE BEWEGUNG
================================================== */

@media (prefers-reduced-motion: reduce) {

    .sb-seagull,
    .sb-sailboat,
    .sb-night-yacht,
    .sb-dolphin,
    .sb-palm-left,
    .sb-palm-right,
    .sb-flamingo {
        animation: none;
    }
}