/* Fade effect */
.js body {
    opacity: 0;
    transition: opacity 0.6s;
}

.js body.render {
    opacity: 1;
}

.hidden {
    position: absolute;
    overflow: hidden;
    width: 0;
    height: 0;
    pointer-events: none;
}

.demo-4 main {
    position: relative;
    width: 100%;
}

.content {
    position: relative;
    display: grid;
    justify-content: center;
    align-items: center;
    align-content: center;
    margin: 0 auto;
    min-height: 100vh;
}

.content--fixed {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    display: grid;
    align-content: space-between;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: 100vh;
    pointer-events: none;
    grid-template-columns: 50% 50%;
    grid-template-rows: auto auto 4em;
}


/* Header */
.demos {
    position: relative;
    display: block;
    align-self: end;
    text-align: center;
    grid-area: demos;
}

.demo {
    margin: 0 0.15em;
}

.demo:hover,
.demo:focus {
    opacity: 0.5;
}

/* Canvas positions */
.scene {
    position: absolute;
}

.scene--left {
    width: 100vmin;
    height: 100vmin;
    transform: translate3d(-50vmin, 0, 0);
}

.scene--full {
    width: 100%;
    height: 100vh;
}

.scene--up {
    height: 150vmin;
    width: 150vmin;
    top: -50vh;
    left: 50%;
    margin-left: -75vmin;
}

@media screen and (min-width: 55em) {
    .icon--keyboard {
        position: absolute;
        right: 0.55em;
        bottom: -30%;
        display: block;
        width: 54px;
        height: 46px;
        fill: var(--color-link);
    }
    .demos {
        display: flex;
        padding-right: 80px;
        justify-self: end;
    }
    .demo {
        display: block;
        width: 17px;
        height: 17px;
        margin: 0 4px;
        border-radius: 50%;
        background: var(--color-link);
    }
}

@media screen and (max-width: 55em) {
    .content {
        flex-direction: column;
        height: auto;
    }
    .content--fixed {
        position: relative;
        z-index: 1000;
        display: block;
        padding: 0.85em;
    }
    .content:not(.content--fixed) {
        margin-bottom: 6em;
    }
}
