@import url('https://fonts.googleapis.com/css?family=Dosis:200,300,400');

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: block;
    font-family: 'Dosis', sans-serif;
    background: #bdc3c7;
}

div#wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
}

div#wrapper .box {
    width: calc(50% - 1px);
    height: calc(50% - 1px);
    background: #34495e;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 100;
    transition: all .3s ease-in-out;
}

div#wrapper .box:nth-child(2) {
    left: 50%;
}

div#wrapper .box:nth-child(3) {
    top: 50%;
}

div#wrapper .box:nth-child(4) {
    left: 50%;
    top: 50%;
}

div#wrapper .box.open {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 101;
}

div#wrapper .box .text {
    color: #bdc3c7;
    font-size: 60pt;
    font-weight: 100;
}

div#wrapper .when-closed {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: all .3s ease-in-out;
    background-image: url("empty.png");
    background-size: cover;
}

div#wrapper .when-closed:hover {
    background-image: url(hover-background.gif);
}

div#wrapper .box.open .when-closed {
    display: none;
}

div#wrapper .box .when-open {
    display: none;
}

div#wrapper .box.open .when-open {
    display: block;
}

div#wrapper .box .close {
    color: #bdc3c7;
    font-size: 30pt;
    font-weight: 100;
    position: absolute;
    right: 10px;
    top: 5px;
    cursor: pointer;
}
