@font-face {
  font-family: "Apfel";
  src: url("../fonts/ApfelGrotezk-Regular.otf") format("opentype");
  font-weight: 100;
}

@font-face {
  font-family: "Apfel";
  src: url("../fonts/ApfelGrotezk-Mittel.otf") format("opentype");
  font-weight: 200;
}

@font-face {
  font-family: "Apfel";
  src: url("../fonts/ApfelGrotezk-Fett.otf") format("opentype");
  font-weight: 300;
}

@font-face {
  font-family: "Apfel";
  src: url("../fonts/ApfelGrotezk-Satt.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
}

@keyframes rainbow {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

body {
    margin: 0;
    overflow-x: hidden;
    font-smooth: always;
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        -ms-text-size-adjust: 100%;
        -webkit-touch-callout: none;
        -moz-text-size-adjust: none;
        -webkit-text-size-adjust: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge alt */

    &::-webkit-scrollbar {
        display: none;            /* Chrome, Safari, neue Edge */
    }

    &::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index:2;
        background: rgba(0, 0, 0, 0.5);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        touch-action: none;
        transition: opacity 0.4s ease-in-out;
    }

    &.menu-open {
        overflow: hidden !;

        &::before {
            opacity: 1;
            pointer-events: auto;
        }

        .bild-wrapper {
            overflow: hidden !important;
            touch-action: none;
        }
    }
}

a, a:visited{
    color: blue;
    cursor: pointer;
    text-decoration: none;
}

.about {
    -webkit-user-select: none;
    user-select: none; 
    cursor: pointer;

    position: fixed;
    top: 10px;
    left: 15px;
    height: 25px;
    width: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;

    font-family: "Apfel", sans-serif;
    font-size: 1.2rem;
    font-weight: 200;
    letter-spacing: 0.02em; 
    color: rgba(255, 255, 255, 1);   
    text-shadow: rgba(0, 0, 0, 0.338) 0.5px 0.5px 1px;
    paint-order: stroke fill;
    stroke-linejoin: round;

    background-color: rgb(191, 252, 171);
    border-radius: 5px;
    box-shadow: inset -4px -4px 8px rgba(0,0,0,0.25), inset 4px 4px 8px rgba(255,255,255,0.6), 0.5px 1px 2px rgba(0,0,0,0.15);
    transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);

    animation: rainbow 30s linear infinite;

    &:hover { transform: scale(1.05); }
}

.overlay {
    position: fixed;
    top: 45px;
    left: 15px;
    z-index: 3;
    width: 35vw;
    height: auto;
    visibility: hidden;
    border-radius: 2px;
    background-color: rgb(222, 222, 222);
    padding: 0.7rem;
    font-family: "Apfel";
    font-weight: 200;

    .imprint-link{
        color: grey;
        cursor: pointer;
        padding-top: 0.5rem;
        font-size: 0.7rem;
    }

    .imprint-text {
        font-size: 0.7rem;
        line-height: 0.9rem;
        font-weight: 100;
    }

    &.open {
        visibility: visible;
    }
}



#snapping-button {
    position: fixed;
    top: 10px;
    left: 150px;
    width: 25px;
    height: 25px;
    z-index:3;
    
    border-radius: 50%;
    background-color: rgb(191, 252, 171);
    box-shadow:
        inset -4px -4px 8px rgba(0,0,0,0.25),
        inset 4px 4px 8px rgba(255,255,255,0.6),
        0.5px 1px 2px rgba(0,0,0,0.15);   
    cursor: pointer;
    animation: rainbow 20s linear infinite;
    transform: scale(1); 
        
    &:hover {transform: scale(1.1);}
    #carousel {display: none;}

    &.is-open {
        position: fixed;
        top: 50%;
        left: 50%;
        width: 25px;
        height: 25px;
        
        animation: none;

        #carousel {display: block;}

        &:hover {transform: none;}
    }       
}

#carousel {
    pointer-events: none;
    position: relative;
    top:50%;
    left: 50%;
    
    ul {
        display: flex;
        position: absolute;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;        
        list-style: none;
    }

    li {
        position: absolute;
        width: 600px; 
        /* transform-origin: center center;  */
    }  
    
    a {
        display: inline-block;
        pointer-events: auto;
        
        text-decoration: none;
        color: rgba(255, 255, 255, 1); 
        font-family: "Inter", sans-serif;
        font-weight: 400;
        font-size: 1rem;
        letter-spacing: 0.02em;  
        paint-order: stroke fill;
        stroke-linejoin: round;
        
        transform: translateX(300px);
        opacity: 0.5;

        transition: all 0.3s ease;
    }

    li.active a {
        font-weight: 800;
        font-size: 1.5rem;
        opacity: 1;
    }
}






.bild-wrapper img, 
.bild-wrapper video {
    height: auto;
    width: auto;
    object-fit: cover;
}

.unterseite{
    height: 100vh;
    width: 100vw;
    display: flex; 
    flex-direction: column;


    position: absolute;
    right: 0;
    top: 0;
    z-index:1;

    pointer-events: none;

    visibility: hidden;
    will-change: opacity;   
    
    &.active {

        visibility: visible;
        pointer-events: auto;
    }

    .bild-wrapper {  
        display: flex;
        flex-direction: row;
        width: 100%;
        height: 100%;
        min-height: 10%; 
        overflow: auto;

        -webkit-user-select: none;
        -ms-user-select: none;
        user-select: none;
        scrollbar-width: none;
        -ms-overflow-style: none;

        &::-webkit-scrollbar {
            display: none; 
        }
    }
    .text-container {
        width: 100%;
        height: auto;
        padding: 10px; 
        background-color: white;

        font-family: "Apfel", sans-serif;
        font-size: 1.1rem;
        line-height: 1.3rem;
        font-weight: 200;
        letter-spacing: 0.02em; 

        em{
            color: grey;
            font-style: normal;
            font-size: 0.7rem;
        }
    }
}


#color-study-green video, 
#sfvr video, 
#extc video{
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover; 
}




@media (max-width: 768px) {

body{
        overflow-x: hidden;
        overflow-y: auto;
}

    /* Overlay nimmt fast die volle Breite ein */
    .overlay {
        width: 80vw;
        left: 15px;
        right: 15px;

        .imprint-text {
            font-size: 0.6rem;
            line-height: 0.8rem;
            font-weight: 100;
        }
    }


    #snapping-button {
    &.is-open {
        position: fixed;
        top: 50%;
        left: -10%;
    }
}

    #carousel {

        li {
            width: 550px; 
        }  
        
        a {
            font-size: 0.8rem;
        }

        li.active a {
            font-size: 1.2rem;
        }
    }


    /* Unterseite scrollt vertikal statt horizontal */
    .unterseite {
        height: 100%;
        width: 100vw;
        min-height: unset;
        overflow-y: auto;

        /* Text oben, Bilder unten */
        .text-container {
            order: -1;
            padding-top: 50px;
            width: 90vw;
        }

        .bild-wrapper {
            flex-direction: column;  /* Bilder/Videos untereinander */
            height: auto;
            overflow: visible;       /* kein horizontales Scrollen mehr */
            order: 1;
        }

        /* Jedes Kind (img / video / div) nimmt volle Breite ein */
        .bild-wrapper > * {
            width: 100% !important;
            height: auto !important;
            flex-shrink: 0;
        }

        .bild-wrapper img,
        .bild-wrapper video {
            width: 100%;
            height: auto;
            object-fit: cover;
        }
    }

    /* Video-Elemente: volle Breite, proportionale Höhe */
    #color-study-green video,
    #sfvr video,
    #extc video {
        width: 100%;
        min-width: unset;
        min-height: unset;
        height: auto;
    }
}  