@media screen {

    html, body {
        min-height: 100%;
    }

    body {
        margin: 0;
        font-size: 18px;
        font-family: 'PT Sans', Verdana, sans-serif;
        background: #ffffff;
        line-height: 1.4;

        overflow: hidden;
    }

    /*** layout ***/

    .flex-wrapper {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flexbox;
        display: -moz-flex;
        display: -o-flex;
        display: -webkit-flex;
        display: -ms-flex;
        display: flex;
        -moz-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        -o-flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    #page-wrap {
        width: 100%;
        height: 100vh;
        overflow: hidden;
    }

    /*** canvas ***/

    #canvas {
        height: 100vh;
        width: 100vw;

        z-index: 10;

        opacity: 0;
        transition: opacity 0.5s ease-in;
    }

    #back-to-lib-link {
        display: inline-block;
        position: fixed;
        top: 0;
        right: 0;
        padding: 0.25em 0.5em;
        background: #ee6557;
        color: white;
        text-decoration: none;
        z-index: 20;
        font-size: 0.85em;
    }

    #back-to-lib-link:hover {
        background: black;
    }

    #source-code-link {
        display: inline-block;
        position: fixed;
        bottom: 1em;
        right: 1em;
        padding: 0.25em 0.5em;
        background: #ee6557;
        color: white;
        text-decoration: none;
        z-index: 50;
    }

    #source-code-link:hover {
        background: black;
    }

    .video-started #canvas {
        opacity: 1;
    }

    .multi-textures-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 15;
    }

    .multi-textures {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;


        cursor: pointer;
        font-size: 3em;
        color: white;

        justify-content: center;
        align-items: center;
        align-content: center;

        opacity: 0;
        transition: opacity 0.5s ease-in;
    }

    .video-started .multi-textures {
        opacity: 1;
    }

    .multi-textures img, .multi-textures video {
        display: none;
    }


    #enter-site-wrapper {
        justify-content: center;
        align-items: center;
        align-content: center;

        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 30;

        opacity: 0;
        transition: opacity 0.5s ease-in;
    }

    .curtains-ready #enter-site-wrapper {
        opacity: 1;
    }

    .curtains-ready.video-started #enter-site-wrapper {
        opacity: 0;
        pointer-events: none;
    }

    #enter-site {
        padding: 20px;
        color: white;
        background: #ee6557;
        max-width: 200px;
        text-align: center;
        cursor: pointer;
    }

    /*** handling errors ***/

    .no-curtains .multi-textures-wrapper {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .no-curtains #enter-site {
        background: #333;
        pointer-events: none;
    }

}

/*** handling video ratio on error ***/

@media screen and (max-aspect-ratio: 1920/1080) {
    .no-curtains .multi-textures-wrapper {
        height: 100vh;
        width: 177vh;
    }
}

@media screen and (min-aspect-ratio: 1920/1080) {
    .no-curtains .multi-textures-wrapper {
        width: 100vw;
        height: 56.25vw;
    }
}


@media screen and (max-width: 1000px) {

    .multi-textures {
        font-size: 2em;
    }

}
