/* Base Layout =====================
====================================*/

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #ddd;
}

.container {
    width: 400px;
    height: 400px;
    perspective: 500px;
}

/* Typography ======================
====================================*/

h4 {
    padding: 6em 1em;
    font-size: 25px;
    text-align: right;
    color: #fff;
    line-height: 1.5em;
    font-weight: 900;
    text-transform: uppercase;
}

p {
    font-size: 16px;
}

/* Card styles =====================
====================================*/

.container-inner {
    position: relative;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 15px rgba(0, 0, 0, .1);
    transition: transform 1s;
    transform-style: preserve-3d;
}

.container:hover .container-inner {
    transform: rotateY(180deg);
    transition: transform 1.5s;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    backface-visibility: hidden;
}

.card-front {
    background: url(../img/man.jpg) no-repeat center/cover;
}
.card-back {
    background: url(../img/woman.jpg) no-repeat center/cover;
}

.card-back {
    transform: rotateY(180deg);
}
