@import url(https://fonts.googleapis.com/css?family=Raleway:400,6700);

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
/*********************************************************************/

body {
    font: 400 16px "Raleway", sans-serif;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body * {
    box-sizing: border-box;
}

.background {
    position: absolute;
    left: -100%; top: -100%; bottom: -100%; right: -100%;
    margin: auto;
}

h1 {
    position: absolute;
    bottom: 20px; right: 20px;
    font-size: 3.5em;
    color: rgba(113, 113, 113, 0.6);
    line-height: 1em;
}

a {
    position: absolute;
    bottom: 20px;
    right: 192px;
    font-size: 1.75em;
    font-weight: 600;
    color: rgba(113,113,113,0.6);
    text-decoration: none;
    opacity: 0;
}

.hints {
    position: relative;
    height: 20%;
}

/* basic card styling */
.puzzle {
    width: 100%;
    height: 80%;
    perspective: 800px;
}

.piece {
    display: inline-block;
    vertical-align: top;
    width: 25%;
    height: 33.3333%;
    transition: all 0.5s;
    box-shadow: 0 2px 3px 0 rgba(0,0,0,0);
    transform-origin: 50% 50%;
    transform-style: preserve-3d;
    position: relative;
}

.piece[flipped="true"] {
    transform: rotateX(180deg);
}

.piece div {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    backface-visibility: hidden;
}

.piece .back {
    transform: rotateX(180deg);
    transform-origin: 50% 50%;
}

.piece:not([flipped="true"]):hover {
    transform: rotateX(10deg);
    box-shadow: 0 2px 3px 0 rgba(0,0,0,0.5);
}
.piece[flipped="true"]:hover {
    transform: rotateX(190deg);
    box-shadow: 0 2px 3px 0 rgba(0,0,0,0.5);
}

/****************************** memory **************************/
.memory-puzzle .piece .front {
    background: url('../assets/field.jpg') no-repeat;
    background-size: 100vw 80vh;
    transform-origin: 50% 50%;
}

.memory-puzzle .piece .back {
    font-size: 10em;
    text-align: center;
}
.memory-puzzle .piece .back:before {
    content: '';
    width: 0;
    height: 100%;
    vertical-align: middle;
    display: inline-block;
}
.memory-puzzle .piece .back i {
    display: inline-block;
    vertical-align: middle;
}

.memory-puzzle .col-1 .front {
    background-position-x: 33.3333%;
}
.memory-puzzle .col-2 .front {
    background-position-x: 66.6667%;
}
.memory-puzzle .col-3 .front {
    background-position-x: 100%;
}

.memory-puzzle .row-1 .front {
    background-position-y: 50%;
}
.memory-puzzle .row-2 .front {
    background-position-y: 100%;
}

/************************** combination **************************/
.combination .piece .back {
    font-size: 10em;
    text-align: center;
}
.combination .piece .back:before {
    content: '';
    width: 0;
    height: 100%;
    vertical-align: middle;
    display: inline-block;
}
.combination .piece .back i {
    display: inline-block;
    vertical-align: middle;
}

.hints.combination div {
    display: inline-block;
    vertical-align: top;
    margin: 30px 0 0 30px;
    font-size: 2em;
    transition: opacity 0.5s;
}

.hints.combination .invisible {
    opacity: 0;
}

/************************** clock **************************/
.hints.clock {
    padding: 5px;
    width: 20vh;
}
.hints.clock:before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid #222;
    border-radius: 50%;
    background-image: url('../assets/clockface.svg');
    background-size: cover;
}

.hints.clock .time {
    font-size: 2em;
    border: 1px solid #222;
    height: 1.1em;
    line-height: .9em;
    width: 90px;
    text-align: center;
    margin: auto;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: white;
    box-shadow: inset 2px 2px 2px 0 rgba(0,0,0,0.3);
}

.clock .piece .back {
    background: white;
    width: 100%;
    height: 100%;
}
.clock .piece:first-child .front:before,
.clock .piece:last-child .front:before {
    height: 50%;
}
.clock .piece:first-child .front:before {
    width: 13.333vh;
    border-radius: 50%;
}
.clock .piece:last-child .front:before {
    width: 25%;
}
.clock .piece:first-child .front:after,
.clock .piece:last-child .front:after {
    content: '';
    width: 50%;
    height: 25%;
    position: absolute;
    top: 0; bottom: 0;
    margin: auto 0;
    background: black;
}
.clock .piece:first-child .front:after {
    right: 0;
}
.clock .piece:last-child .front:after {
    left: 0;
}

.clock .piece .front:before {
    content: '';
    width: 100%;
    height: 25%;
    background: black;
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    margin: auto;
    display: block;
}

.clock .piece:nth-child(4) .front:before,
.clock .piece:nth-child(5) .front:before{
    width: 62.5%;
    height: 25%;
    margin: auto 0;
}
.clock .piece:nth-child(4) .front:before {
    right: auto;
}
.clock .piece:nth-child(5) .front:before {
    left: auto;
}
.clock .piece:nth-child(4) .front:after,
.clock .piece:nth-child(5) .front:after{
    content: '';
    width: 25%;
    height: 50%;
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    margin: 0 auto;
    background: black;
}

.clock .piece:nth-child(8) .front:before,
.clock .piece:nth-child(9) .front:before {
    height: 50%;
    width: 25%;
    top: 0;
    margin: 0 auto;
}
.clock .piece:nth-child(8) .front:after,
.clock .piece:nth-child(9) .front:after {
    content: '';
    width: 62.5%;
    height: 25%;
    position: absolute;
    top: 0; bottom: 0;
    margin: auto 0;
    background: black;
}
.clock .piece:nth-child(8) .front:after {
    left: 0;
}
.clock .piece:nth-child(9) .front:after {
    right: 0;
}

/************************** Lights Out **************************/
.lightsOut .piece .front {
    background-color: #00a379;
}