body{
    user-select: none;
}

#lean, #main, #cookies{
    position:fixed;
    left:0;
    right:0;
    top:0;
    bottom:0;
    height:100%;
    width:100%;
}

#cookies{
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#lean{
    z-index:1;
    background-color:white;
    overflow:hidden;
    visibility:hidden;
}
#lean.visible{
    visibility:visible;
}

#lean canvas, cookies{
    width:100%;
    height:100%;
    position:absolute;
}

#logoanim{
    user-select:none;
    opacity:0;
}

#logoanim > img{
    transform:translateY(-50%) translateX(-50%);
    position:fixed;
    top:50%;
}

#logoanim > img[data-side="left"]{
    z-index:92;
}
#logoanim > img[data-side="right"]{
    z-index:91;
}






/**/
#main{
    height: 100%;
    z-index:auto;
    font-family:sans-serif;
}

#topbar{
    top:0;
    display: flex;
    justify-content: space-between;
    width:100%;
    height:3em;
    border-bottom:3px solid black;
    box-sizing: border-box;
    background-color: rgb(90,57,134);
}

#topbar > nav{
    flex-grow: 1;
    display:flex;
    justify-content: right;
    align-items: stretch;
    font-weight: bold;
}

#topbar > nav > a{
    flex-grow: 1;
    text-align: center;
}
#topbar > nav > a > span{
    display:initial;
}
#topbar > nav > a > span.tiny{
    display:none;
}

a{
    color: #eee;
    text-decoration: none;
    display:block;
    margin:auto;
}

a:hover{
    text-decoration: underline;
}

#sections{
    height:calc(100% - 3em);
    overflow-y: auto;
    /*scroll-behavior: smooth;*/
    padding: 0 2%;
    background-color: black;
    transition:background-color 800ms ease-in;
}

#sections > section{
    width:100%;
    height:100%;
    overflow:hidden;

    padding: 0 3%;

    display: flex;
    align-items: center;

    box-sizing: border-box;
}

#sections > section > *{
    height: 80%;
}

#sections > section:nth-child(2n){
    flex-direction: row;
}
#sections > section:nth-child(2n) aside{
    padding-right: 10%;
}
#sections > section:nth-child(2n+1){
    flex-direction: row-reverse;
}
#sections > section:nth-child(2n+1) aside{
    padding-left: 10%;
}

#sections > section > figure{
    margin: 0;
    flex-basis: 50%;
    min-width: min(646px, 100%);
    overflow-y: hidden;
    position: relative;

    display: flex;
    flex-wrap: wrap;

    border:3px solid black;
    box-sizing: border-box;
}

#sections > section > figure > img{
    width: auto;
    height: auto;
    min-width: 100%;
    min-height: 100%;
}

#sections > section > figure > figcaption{
    position: sticky;
    bottom: 0;
    width: 100%;
    padding: 2em 2em 1em 2em;
    box-sizing: border-box;
    margin-top:-3em;

    text-align: center;
    font-size: 120%;
    line-height:50%;
    color: black;

    font-family: monospace;

    background-image: linear-gradient(to bottom, transparent 0%, transparent .5em, rgba(200,0,255, 0.2) .6em, rgba(222, 191, 255, 1), 1em, rgba(222, 191, 255, 1) 100%);
    
    display: none;
}

#sections > section > aside{
    flex-basis: 50%;
    flex-grow: 1;
    color:white;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    text-align:left;

    z-index: 1;
}

#sections > section:nth-child(2n) > aside{
    align-items:flex-end;
    text-align: right;
}

#sections > section:last-of-type > aside{
    align-items: center;
    padding: 0;
}

#sections > section > aside > *{
    background-color: rgb(90,57,134);
    width:auto;
    line-height:100%;
    padding:.3em .5em;
    color:white;
    word-break: break-word;
    max-width: 100%;
    text-align: inherit;
}

#sections > section > aside > h1{
    font-size:300%;
    text-transform:uppercase;
    margin-right: -1em;
    margin-left:-1em;
}

#sections > section > aside > h2{
    font-size:180%;
    font-variant:small-caps;
}



@media (max-width: 1292px){

    #topbar > nav > a > span{
        display:none;
    }
    #topbar > nav > a > span.tiny{
        display:initial;
    }

    #sections{
        padding: 0;
        scroll-snap-type: y mandatory;
    }

    #sections section{
        display: block;
        padding: 0;
        position: relative;
        scroll-snap-stop: always;
        scroll-snap-align: start;
    }

    #sections > section > figure{
        width: 100%;
        height: 100%;
        margin: 0;
    }

    #sections > section > aside{
        background-color: rgba(0,0,0,.2);
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        padding: 0 !important;
    }

    #sections > section > aside > *{
        background-color: black;
    }

    #sections > section > aside > h1{
        font-size:150%;
        margin-left: auto;
        margin-right: auto;
    }

    #sections > section > aside > h2{
        font-size:120%;
        margin-left: 1em;
        margin-right: 1em;
    }
}