* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    text-decoration: none;
    position: relative;
}

@font-face {
    font-family: "GIL";
    src: url("assets/fonts/GILGOND_.ttf") format("truetype");
}
@font-face {
    font-family: "RAVIOLI";
    src: url("assets/fonts/HolyRavioliNF.ttf") format("truetype");
}
@font-face {
    font-family: "BODY";
    src: url("assets/fonts/Vademecum.otf") format("truetype");
}

.d-flex {
    display: flex;
}
.d-none {
    display: none;
}
button,
a {
    cursor: pointer;
}

/* #region headline */
h1 {
    font-family: "GIL", "sans-serif";
    font-size: min(60px, 64px);
    letter-spacing: 6px;
    text-align: center;
    z-index: 2;
    @media (max-width: 768px) {
        display: none;
    }
    @media (max-height: 480px) {
        display: none;
    }
}

h2 {
    font-family: "RAVIOLI", "sans-serif";
    font-size: 3rem;
    letter-spacing: 6px;
    color: #f4d4a0;
    text-shadow: 5px 2px 8px rgba(0, 0, 0, 0.9);
    text-align: left;
    @media (max-width: 480px) {
        font-size: 2.5rem;
    }
}
/* #endregion */

span {
    font-size: 1.4rem;
    color: black;
    filter: drop-shadow(3px 3px 6px white);

    @media (max-width: 700px) {
        font-size: 1.2rem;
    }
}
/* #region body main wrapper canvas  */
body {
    font-family: "BODY", "sans-serif";
    background: url("assets/img/PolloBG1.jpg") no-repeat top;
    background-size: cover;
    backdrop-filter: saturate(30%);

    main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100dvh;
        width: 100%;
        overflow: hidden;

        #wrapper {
            width: 100%;
            max-width: 720px;
            aspect-ratio: 3 / 2;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            background-color: black;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);

            canvas {
                width: 100%;
                height: 100%;
                display: block;
                z-index: 1;
            }

            &:fullscreen {
                width: 100vw;
                height: 100dvh;
                max-width: none;
                max-height: none;

                #start-screen,
                #end-screen {
                    width: 100%;
                    height: 100%;
                }
            }
        }
    }
    /* #endregion */

    /* #region Start Screen */
    #start-screen {
        background-image: url("./assets/img/9_intro_outro_screens/start/startscreen_1.png");
        background-position: center;
        background-size: cover;
        width: 100%;
        height: 100%;
        max-height: 480px;
        position: absolute;
        top: 0;
        left: 0;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        z-index: 4;
        button {
            background: transparent;
            border: 0;
            img {
                width: 5rem;
                filter: drop-shadow(2px 2px 4px black);
            }
            img:hover {
                width: 8rem;
            }
        }
        button:hover {
            box-shadow: none;
        }
        touch-action: none;
    }
    /* #endregion */

    /* #region End Screen */
    #end-screen {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-height: 480px;
        background: radial-gradient(
            circle,
            rgba(252, 247, 247, 0.5) 0%,
            rgba(0, 0, 0, 0.5) 100%
        );
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        padding: 8% 12%;
        z-index: 10;

        @media (max-width: 1000px) {
            width: 100%;
        }
        img {
            width: 80%;
            height: 65%;
        }
        div {
            display: flex;
            justify-content: center;
            gap: 5rem;
            button {
                font-family: "Bricolage Grotesque", sans-serif;
                font-size: 1.8rem;
                color: yellow;
                background-color: #ffa700;
                border-radius: 10px;
                padding: 2px 8px;
            }
            button:hover {
                box-shadow: rgba(0, 0, 0, 0.3) 0px 3px 6px;
            }
        }
    }
    /* #endregion */

    /* #region Loading Screen */
    #loading-screen {
        position: absolute;
        top: 0;
        left: 0;
        flex-direction: column;
        padding: 5rem;
        gap: 3rem;
        justify-content: center;
        background: url("assets/img/5_background/first_half_background.png");
        background-size: cover;
        width: 100%;
        height: 100%;
        max-height: 480px;
        z-index: 50;

        p {
            font-family: "Bricolage Grotesque", sans-serif;
            font-size: 1.2rem;
            padding: 2rem;
            background: rgba(255, 255, 255, 0.8);
        }

        @media (max-width: 660px) {
            padding: 5rem;
        }

        @media (max-width: 470px) {
            p {
                font-size: 20px;
            }
        }

        @media (max-width: 405px) {
            gap: 1.5rem;
            padding: 2rem;
            h2 {
                font-size: 24px;
            }
            p {
                font-size: 18px;
            }
        }
    }

    .final-button {
        display: flex;
        justify-content: center;
        height: 3rem;
        #final-start-btn {
            width: 20%;
            height: 100%;
            border-radius: 1rem;
            font-size: 1.5rem;
            font-family: 'BODY', sans-serif;
        }
    }
    /* #endregion */

    /* #region Device Rotate Overlay */
    #device-rotate {
        width: 100%;
        height: 100dvh;
        z-index: 100;
        position: absolute;
        top: 0;
        left: 0;
        display: none;
        background-color: black;
        justify-content: center;
        align-items: center;
        flex-direction: column;

        .phone {
            img {
                height: 10rem;
                width: 10rem;
                border-radius: 10px;
                animation: rotate-rect 1.5s ease-in-out infinite alternate;
            }
        }

        .message {
            color: white;
            font-size: 1.6rem;
        }

        @media (max-width: 720px) and (orientation: portrait) {
            display: flex;
        }
        @media (max-width: 720px) and (orientation: landscape) {
            display: none;
        }
    }
    /* #endregion */

    /* #region Footer */
    footer {
        position: absolute;
        bottom: 0;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgba(255, 255, 255, 0.8);
        font-size: 18px;
        height: 5dvh;
        z-index: 10;
        img {
            height: 100%;
        }
        @media only screen and (max-height: 480px) {
            display: none;
        }
    }
    /* #endregion */
}
/* #region Keyframes */
@keyframes rotate-rect {
    0% {
        transform: rotate(0deg);
    }
    50%,
    100% {
        transform: rotate(-90deg);
    }
}
/* #endregion */
