html {
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;

    background: 
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), /* darkens background */
        url('patterns/paper2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    font-family: 'crimson text';;
    
    h1 {
        grid-area: title;
        margin: 0;
        margin-bottom: -2rem;
        padding: 2rem 1rem 0rem 1rem;
        text-align: center;
        font-family: 'bebas neue';
        font-size: 3.7rem;
        color: #bebebe;

        @media screen and (min-width: 1090px) {
            font-size: 8rem;
        }
    }

    h2 {
        grid-area: subtitle;
        width: 80%;
        margin: 0;
        margin-top: 4rem; /* to keep it under nav on pages except index */
        padding: 0 0.5rem 2rem 0.5rem;
        text-align: center;
        font-family: 'bebas neue';
        font-weight: 500;
        font-size: 2rem;
        color: #01717b;

        @media screen and (min-width: 1090px) {
            font-size: 3rem;
        }
    }
    h3 {
        color: #01717b;
        font-family: 'special elite';
        margin: 0;
        margin-top: 2.5rem;
        margin-bottom: 1.5rem;
        font-size: 1.5rem;

        @media screen and (min-width: 1090px) {
            font-size: 2rem;
        }
    }

    h4 {
        color: #000000;
        font-family: 'crimson text';
        font-size: 1.2rem;
        margin: 3rem 0 3rem 0;
        padding: 0.3rem;
        background-color: #bebebe;
        width:max-content;

        @media screen and (min-width: 1090px) {
            font-size: 1.5rem;
        }
    }

    footer p, figcaption{
        color: #bebebe;
        font-family: 'crimson text';
        font-size: 0.8rem;
        margin-bottom: 0.5rem;

        @media screen and (min-width: 1090px) {
            font-size: 1rem;
        }
    }

    p, form, span, .impressum ul {
        color: #bebebe;
        line-height: 1.5;
        margin-bottom: 0.6rem;

        @media screen and (min-width: 1090px) {
            font-size: 1.2rem;
        }
    }
}

header {
    display: grid;
    place-items: center;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "title"
        "subtitle"
        "nav";
    width: 100%;
    padding: 0;
    margin: 0 0 2rem 0;
    background:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
        url('images/corridor1.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;

    nav {
        grid-area: nav;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        background-color: #011a1d7c;

        &.fixed{
            position: fixed;
            top: 0;
            z-index: 1000;
            transition: 0.3s;
        }

        .burger {
            display: flex;
            flex-direction: column;
            align-items: center;
            font-size: 2rem;
            background: none;
            border: none;
            color: #bebebe;
            padding: 0;

            .iconText{
                font-size: 0.5rem;
                padding: 0;
                margin-bottom: -0.5rem;
                margin-top: 0.5rem;
                line-height: 1;
            }

            @media screen and (min-width: 1090px) {
                display: none;
            } 
        }

        .navHeader {
            display: flex;
            justify-content: end;
            align-items: center;
            column-gap: 1rem;
            row-gap: 0;
            width: 95%;
            padding: 0.5rem 0;
            font-family: 'special elite';
            font-size: 1.2rem;
            color: #bebebe;
        }


        ul.navLinks {
            display: flex;
            flex-direction: column;
            max-height: 0;
            overflow: hidden; /* hide menu text when folded */
            width: 100%;
            margin: 0;
            padding: 0;
            justify-content: center;
            align-items: center;
            row-gap: 2rem;
            font-family: 'special elite';
            font-size: 1rem;
            list-style: none;
            transition: 0.5s;

            @media screen and (min-width: 1090px) {
                font-size: 1.2rem;
            } 
        
            a {
                color: #bebebe;
                text-decoration: underline;
                display: inline-block; /* transform does not work without this */

                &.current {
                    color: black;
                    padding: 0.2rem;
                    font-weight: bold;
                    background-color: #bebebe;
                    text-decoration: none;
                }
            }
            
            &.open {
                max-height: 500px;
                padding: 2rem 0;
            }
            
            @media screen and (min-width: 1090px) {
                display: flex !important;
                flex-direction: row;
                max-height: none;
                column-gap: 4rem;
                position: static;
                padding-bottom: 1rem;
                padding-top: 0.5rem;
                
                a {
                    text-decoration: none;
                    
                    &:hover {
                        text-decoration: underline;
                        transition: 0.5s;
                        transform: scale(1.2, 1.2);
                    }   
                    
                }
            }
        }
    }
}

main {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.intro{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-self: center;
    padding: 0 5%;
    margin: 2rem 0;

    p{
        color: #bebebe;
        font-family: 'special elite';
        line-height: 1.5;
        text-align: left;
        margin: 0;
    }
}

.textContainer {
    display: flex;
    flex-direction: column;
    align-content: space-around;
    background-color: #00000047;
    margin-bottom: 4rem;
    padding: 0 5%;
    padding-bottom: 2rem;
    border-top: 1px solid #bebebe;
    border-bottom: 1px solid #bebebe;
}

.reference{
    font-size: 0.9rem;
    text-align: end;
    margin: 1rem 5% 1.7rem 5%;
    padding: 0;

    a{
        color: #bebebe;
        background-color: #000000;
        border: solid #bebebe;
        border-width: 0.1rem;
        font-family: 'special elite';
        padding: 0.3rem;

        &:hover{
            color: #000000;
            background-color: #bebebe;
            border: solid #000000;
            transform: scale(1.2, 1.2);
        }
    }

}

.character{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;   
    height: max-content;
    margin-bottom: 4rem;

    &.Subject{
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas: 
            "text"
            "image";
    }

    .characterText{
        grid-area: text;
        display: flex;
        flex-direction: column;
        min-width: 300px;
        margin-bottom: 1rem;

        h4{
            margin: 0;
            margin-top: 1rem;
        }
    }

    img{
        grid-area: image;
        max-width: 15rem;
        height: auto;
        margin: 0;
        justify-self: center;
        align-self: center;
    }

    @media screen and (min-width: 660px) {
        display: flex !important;
        flex-direction: row;

        .characterText{
            margin-right: 2rem;
        }

        .characterText.Subject{
            margin: 0;
            margin-left: 2rem;
        }
    } 
}

footer{
    color: #bebebe;
    font-size: 0.8rem;
    justify-content: center;
    margin: 1rem 5% 3rem 5%;

    .termsBlock{
        display: flex;
        margin-top: 3rem;
    }

    .terms{
        margin:0;
        padding: 0;
        border-left: solid;
        border-width: 0.1rem;
        padding-left: 3%;
        margin-right: 3%;
        height: fit-content;

        a{
            text-decoration: none;
            color: #bebebe;
            margin: 0;
            padding: 0;

            &:hover{
                text-decoration: underline;
            }
        }
    }
}

footer{
    margin-top: 3rem;
}



/* Impressum Styles */
.impressum{
    margin: 5%;
    margin-top: 2.5rem;
    p{
        margin-left: 8%;
        margin-bottom: 3rem;
    }

    ul{
        color: #bebebe;
        list-style: none;
        line-height: 2rem;
        margin: 0;
        margin-left: 8%;
        padding: 0;
        padding-bottom: 3rem;
    }
}



/* Story Styles */
.warningContainer{
    display: flex;
    flex-direction: column;
    background-color: #ff000047;
    width: 100%;

    font-family: 'bebas neue';
    font-size: 1.5rem;
    letter-spacing: 0.1rem;
    word-spacing: 0.4rem;

    .warningLabel{
        display: flex;
        column-gap: 10%;
        background-color: #bebebe;
        padding: 0;
        margin: 0;
        overflow-x: hidden;

        h4{
            margin: 0;
            padding: 0;
            color: #6c0b0b;
        }
    }

    .warning{
        padding: 0 5%;
        text-align: center;

        @media screen and (min-width: 1090px) {
            font-size: 2.5rem;
        } 
    }

    &.cleared{
        display: none;
    }
}

.scan{
    margin: 2rem;
    display: flex;
    flex-direction: column;
    align-self: center;

    .clearanceTap, .clearanceClick{
        background: #757575;
        border-radius: 10%;
        width: 60vw;
        height: 45vw;
        max-width: 18rem;
        max-height: 12rem;
        border: none;
        border-style: outset;

        span{
            font-family: 'bebas neue';
            color: #bebebe;
            font-size: 1.5rem;

            @media screen and (min-width: 1090px) {
                font-size: 2.5rem;
            } 
        }

        &:active{
            background-color: #565656;
        }
    }

    .clearanceClick{
        display: none;
    }

    @media screen and (min-width: 1090px) {
        .clearanceClick{
            display: block 
        }  

        .clearanceTap{
            display: none;
        }
    } 

    span{
        font-size: 1rem;
        margin: 0;
        padding: 0;
    }

    icon{
        font-size: 4rem;
    }
  
    &.cleared{
        display: none;
    }
}

.accessGranted{
    display: none;
    font-family: 'bebas neue';
    font-size: 1.5rem;
    text-align: center;
    background-color: #01717b;
    width: 100%;
    
    p{
        padding: 0;

        @media screen and (min-width: 1090px) {
            font-size: 2.5rem;
        } 
    }

    &.cleared{
        display: block;
    }
}

.reportCarousel{
    display: none;
    position: relative;
    
    &.cleared{
        display: block;
    }

    .protocol{
        display: flex;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100vw;
        height: max-content;
        overflow: scroll;
    }
    
    .page{
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        flex-shrink: 0;
        scroll-snap-align: center;
        overflow: hidden;

        margin: 4rem 1rem 0.5rem 1rem;
        padding: 1.5rem;
        width: 75vw;
        max-width: 400px;
        height: 550px;
        font-family: 'special elite';
        font-size: 0.8rem;

        @media screen and (min-width: 1090px) {
            max-width: 600px;
            height: 750px;
        } 
        
        background-image:
            linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
            url(patterns/paper1.jpg);
        background-size: cover;

        .pageCount{
            display: flex;
            width: 100%;
            justify-content: end;
            align-self: flex-end;
            margin: 0;
            padding: 0;
        }

        p{
            padding: 0;
            margin: 0;
            height: fit-content;
        }
    }
}

.reference.scroll{
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    column-gap: 1rem;

    button{
        color: #bebebe;
        background-color: #000000;
        border: solid #bebebe;
        font-family: 'special elite';
        font-size: 0.8rem;
        padding: 0.2rem;
        width: 8rem;

        &:hover{
            color: #000000;
            background-color: #bebebe;
            border: solid #000000;
        }
    }
} 



/* Making Styles */
.makingContainer{
    width: 90%;
    align-self: center;

    h3{
        margin: 0;
        margin: 4rem 0;
    }

    h4{
        margin: 0;
        margin-bottom: 2rem;
    }
}

.imageScroller{
    display: flex;
    overflow: scroll;
    scroll-snap-type: x mandatory;
    width: 100%;

    img{
        min-width: 300px;
        max-width: 500px;
        margin-right: 1rem;
        scroll-snap-align: start;
    }
}

.reference.scroll.making{
    display: flex;
    margin: 2rem 0 4rem 0;
    justify-content: center;


    button{
        width: 4rem;
    }

    p{
        margin: 0;
        font-family: 'special elite';
        text-align: center;
    }
}

figure{
    height: auto;
    scroll-snap-align: start;
    justify-self: left;
    margin: 0;
    margin-right: 1rem;
    width: min-content;

    img{
        width: 300px;
        height: auto;
        scroll-snap-align: start;
    }
}

.screenshots{
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    img{
        width: 90vw;
        max-width: 30rem;
        height: auto;
    }
}



/*form styles*/
.formContainer{
    width: fit-content;

    form {
        /* display: grid;
        grid-template-columns: [labels] auto [controls] auto;
        grid-gap: 2rem;
        grid-auto-flow: rows;
        justify-self: center; */

        display: flex;
        flex-direction: column;

        border: solid #bebebe;
        border-width: 0.1rem;
        padding: 2rem;

        label{
            text-align: left;
            margin-top: 2rem;
        }

        input:invalid {
            border: solid red;
        }
    }
}

form > input[type=submit] {
    margin-top: 2rem;
    grid-column: controls;
}