:root {
    --background-color: #141b36;
    background-color: var(--background-color);
    font-family: serif;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
  }

body {
    background-color: var(--background-color);
    margin: 0px;
    animation: fadeIn 2s;
}



#menu {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menu-items {
    text-shadow: 0 0 3px black;
    z-index: 2;
}

#welcome-text {
    color: white;
    position: absolute;
    display: flex;
    justify-content: center;
    z-index: 1;
    position: absolute;
    top: -30%;
    width: 100vw;
    height: 100vh;
    align-items: center; /** Y-axis align **/
    justify-content: center; /** X-axis align **/
    font-size: clamp(3rem, 8vw, 8rem);
    transition: 800ms;
    text-shadow: 0 0 3px black;
}


#menu[data-active-index="0"] > #menu-background-pattern {
    background-position: 0% -25%;
}

#menu[data-active-index="1"] > #menu-background-pattern {
    background-position: 0% -50%;
}

#menu[data-active-index="2"] > #menu-background-pattern {
    background-position: 0% -75%;
}
  

#menu-background-pattern{
    height: 100vh;
    width: 100vw;

    background-image: radial-gradient(rgba(2255, 255, 255, 0.1) 10%, transparent 9%);
    background-image: url("/media/csm_Wappen_Langwedel_farbig_klein_e8f051dc2b.png");
    background-position: 0% 0%;
    background-size: 34vmin 34vmin;

    left: 0px;
    position: absolute;
    top: 0px;
    opacity: 0%;

    transition: opacity 800ms ease, 
                background-size 800ms ease, 
                background-position 800ms ease;
    width: 100vw;
    z-index: 1;
}

#menu-items:hover ~ #menu-background-pattern {
    background-size: 40vmin 40vmin;
    opacity: 0.15;
}

#menu-items:hover > .menu-item {
    opacity: 0.3;
    transition: 0.3s;
    
}

#menu-items:hover > .menu-item:hover {
    opacity: 1;
    transition: 0.3s;
    text-shadow: 0 0 5px white;
    font-size: clamp(3rem, 8.5vw, 8rem);
}




.menu-item {
    color: white;
    font-size: clamp(3rem, 8vw, 6rem);


    display: block;
    text-decoration: None;
    padding: clamp(0.25rem, 0.5vw, 48rem) 0rem;
    text-align: center;
    transition: 0.8s;
    position: relative;
    opacity: 50%;
}

#menu-background-image {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 0;
    box-shadow: inset 0px 20px 400px 10px #000000;
    opacity: 0.95;
    background-position: center 40%;
    background-size: 150vmax;

    transition: opacity 800ms ease, background-size 800ms ease, background-position 800ms ease, background-image 400ms ease;
    z-index: 0;
}

#menu-items:hover ~ #menu-background-image {
    background-size: 100vmax;
    opacity: 0.3;
}

#menu[data-active-index="0"] > #menu-background-image {
    background-position: center 20%;
}

#menu[data-active-index="1"] > #menu-background-image {
    background-position: center 40%;
}

#menu[data-active-index="2"] > #menu-background-image {
    background-position: center 60%;
}



.menu-item:after {
    content: "";
    position: absolute;
    display: block;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: rgb(255, 255, 255);
    border-radius: 15px;
    box-shadow: 0 0 10px white;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-item:hover:after {
    transform: scaleX(1);
}

#menu-items:hover ~ #welcome-text {
    top: -40%;
    opacity: 0%;
    transition: 400ms;
}

.preloaded {
    display: block;
    width: 50vw;
    height: 50vh;
    position: absolute;
    opacity: 0%;
}

#fallback-image {
    display: block;
    width: 50vw;
    height: 50vh;
    position: absolute;
    opacity: 0%;
    background-image: url("media/scotland/1.jpeg");
}
