html, body {
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: black;
    color: white;
}

#home {
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -ms-flex-pack: distribute;
        justify-content: space-around;
}

#logo {
    width: 100vw;
    max-width: calc(100vh * 0.4);
    height: calc(100vh * 0.4);
    max-height: 100vw;

    -webkit-box-shadow: 0px 0px 20px 15px white;
            box-shadow: 0px 0px 20px 15px white;
}

#puzzle-carousel {
    width: 100vw;
    height: calc(100vh * 0.4);
	
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: horizontal;
	-webkit-box-direction: normal;
	    -ms-flex-direction: row;
	        flex-direction: row;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    
    -webkit-perspective: 500px;
            perspective: 500px;
    overflow: hidden;

    -ms-touch-action: none;
        touch-action: none;
}

#left-arrow {
    background-image: url('img/LArrow.png');
}
#right-arrow {
    background-image: url('img/RArrow.png');
}

.arrow {
    width: calc(100vw * 0.05);
    max-width: calc(100vh * 0.4);
    height: calc(100vh * 0.4);
    /* max-height: calc(100vw * 0.1); */
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

#puzzle-container {
    -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;
    -webkit-transition: -webkit-transform 0.5s;
    transition: -webkit-transform 0.5s;
    -o-transition: transform 0.5s;
    transition: transform 0.5s;
    transition: transform 0.5s, -webkit-transform 0.5s;

    width: calc(100vw * 0.6);
    max-width: calc(100vh * 0.4);
    height: calc(100vh * 0.4);
    max-height: calc(100vw * 0.6);
}

.puzzle {
    width: 100%;
    height: 100%;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;

    background-size: contain;
	background-position: top; 
    background-repeat: no-repeat;
    background-origin: content-box;
}
.puzzle:not(:first-of-type) {
    position: absolute;
    left: 0;
    top: 0;
}

#back-to-home {
    position: fixed;
    top: -5px;
    right: 5px;
    font-size: 300%;
    cursor: pointer;
    z-index: 999;
}
  
#container {
    width: 100%;
    height: 100%;

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -ms-flex-pack: distribute;
        justify-content: space-around;

    -ms-touch-action: none;
        touch-action: none;
}

.row-layout {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
}

.column-layout {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

#table, #cards {
    background: lightyellow;
}

.horizontal-responsive {
    width: calc(100vw * 0.45);
    max-width: 100vh;
    height: 100vh;
    max-height: calc(100vw * 0.45);
}

.vertical-responsive {
    width: 100vw;
    max-width: calc(100vh * 0.45);
    height: calc(100vh * 0.45);
    max-height: 100vw;
}

table {
    width: 100%;
    height: 100%;
}

td {
    width: 25%;
    height: 25%;
    position: relative;
    background: mediumpurple;
    background-size: contain !important;
}

td.logo {
    background: transparent;
}

td.matrix-header {
    background: silver;
}

td.dropzone.active {
    background: gold;
}

#cards {
    position: relative;
}

.card {
    width: 22%;
    height: 22%;
    position: absolute;
    right: -50%;
    bottom: -50%;
    background-size: cover;
    border-radius: 10%;
    -webkit-box-shadow: 2px 2px 10px 1px rgba(0,0,0,0.5);
            box-shadow: 2px 2px 10px 1px rgba(0,0,0,0.5);
}

.card-sliding {
    -webkit-transition: all 500ms ease-in-out;
    -o-transition: all 500ms ease-in-out;
    transition: all 500ms ease-in-out;
}

.draggable.active {
    pointer-events: none;
}

footer {
    width: 100vw;
    height: 100vh;

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;

    background-color: rgba(0,0,0,0.8);   
}

#congrats {
    font-family: "Comic Sans MS", cursive, sans-serif;
    font-size: calc(100vw / 12);
    font-weight: bold;
    font-variant: small-caps;
    letter-spacing: 5px;
    color: lemonchiffon;
    text-shadow: 0 0 5vw gold, 0 0 2vw red;
}
#congrats:first-letter {
    padding-left: 2vw;
}

#recommendation {
    width: calc(100vmin * 0.3);
    max-width: calc(100vmin * 0.3);
    height: calc(100vmin * 0.3);
    max-height: calc(100vmin * 0.3);

    position: relative;
}


/* ANIMATIONS */

.persp {
	position: relative;
	width: 100%;
	height: 100%;
	-webkit-perspective: 1200px;
	        perspective: 1200px;
}

.page {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	visibility: hidden;
	overflow: hidden;
	-webkit-backface-visibility: hidden;
	        backface-visibility: hidden;
	-webkit-transform: translate3d(0, 0, 0);
	        transform: translate3d(0, 0, 0);
	-webkit-transform-style: preserve-3d;
	        transform-style: preserve-3d;
}

.page-current {
	visibility: visible;
}

.page-flipOutTop {
	-webkit-transform-origin: 50% 50%;
	    -ms-transform-origin: 50% 50%;
	        transform-origin: 50% 50%;
	-webkit-animation: flipOutTop .5s both ease-in;
	        animation: flipOutTop .5s both ease-in;
}

.page-flipInBottom {
	-webkit-transform-origin: 50% 50%;
	    -ms-transform-origin: 50% 50%;
	        transform-origin: 50% 50%;
	-webkit-animation: flipInBottom .5s both ease-out;
	        animation: flipInBottom .5s both ease-out;
}

.page-delay500 {
	-webkit-animation-delay: .5s;
	        animation-delay: .5s;
}

.wrong-placement {
    -webkit-animation: wrongPlacement 0.5s 2;
            animation: wrongPlacement 0.5s 2;
}

.splash {
    position: fixed;
    top: 0;
    left: 0;    
}

.splash-in {
    -webkit-animation: splashIn 0.75s both cubic-bezier(0.7,0.3,.5,1.3);
            animation: splashIn 0.75s both cubic-bezier(0.7,0.3,.5,1.3);
}

.splash-out {
    -webkit-animation: splashOut 0.5s both cubic-bezier(0.7,0.3,.5,1.3);
            animation: splashOut 0.5s both cubic-bezier(0.7,0.3,.5,1.3);
}

.speed-in {
    -webkit-animation: speedInX 1s both, speedInSkew 1s both;
            animation: speedInX 1s both, speedInSkew 1s both;
    -webkit-animation-delay: 1s;
            animation-delay: 1s;
}

.speed-out {
    -webkit-animation: speedOutX 1s ease-in both, speedOutSkew 1s both ease-in;
            animation: speedOutX 1s ease-in both, speedOutSkew 1s both ease-in;
}

.pulse {
    -webkit-animation: pulse 0.5s ease-in-out infinite alternate;
            animation: pulse 0.5s ease-in-out infinite alternate;
    -webkit-animation-delay: 0.4s;
            animation-delay: 0.4s;
}

@-webkit-keyframes flipOutTop {
	from { }
	to { -webkit-transform: translateZ(-1000px) rotateX(90deg); transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}

@keyframes flipOutTop {
	from { }
	to { -webkit-transform: translateZ(-1000px) rotateX(90deg); transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}

@-webkit-keyframes flipInBottom {
	from { -webkit-transform: translateZ(-1000px) rotateX(-90deg); transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}

@keyframes flipInBottom {
	from { -webkit-transform: translateZ(-1000px) rotateX(-90deg); transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}

@-webkit-keyframes wrongPlacement {
    0%, 100% {
      background-color: mediumpurple;
    }
    50% {
      background-color: red;
    }
}

@keyframes wrongPlacement {
    0%, 100% {
      background-color: mediumpurple;
    }
    50% {
      background-color: red;
    }
}

@-webkit-keyframes splashIn {
    from { -webkit-transform: scale(0); transform: scale(0); background-color: rgba(0,0,0,0) }
	to { -webkit-transform: scale(1); transform: scale(1); background-color: rgba(0,0,0,0.8) }
}

@keyframes splashIn {
    from { -webkit-transform: scale(0); transform: scale(0); background-color: rgba(0,0,0,0) }
	to { -webkit-transform: scale(1); transform: scale(1); background-color: rgba(0,0,0,0.8) }
}

@-webkit-keyframes splashOut {
	from { -webkit-transform: scale(1); transform: scale(1); background-color: rgba(0,0,0,0.8) }
    to { -webkit-transform: scale(0); transform: scale(0); background-color: rgba(0,0,0,0) }
}

@keyframes splashOut {
	from { -webkit-transform: scale(1); transform: scale(1); background-color: rgba(0,0,0,0.8) }
    to { -webkit-transform: scale(0); transform: scale(0); background-color: rgba(0,0,0,0) }
}

@-webkit-keyframes speedInX {
    0% { left: -70vw; }
    100% { left: 0vw; }
}

@keyframes speedInX {
    0% { left: -70vw; }
    100% { left: 0vw; }
}

@-webkit-keyframes speedOutX {
    0% { left: 0vw; }
    100% { left: 100vw; }
}

@keyframes speedOutX {
    0% { left: 0vw; }
    100% { left: 100vw; }
}

@-webkit-keyframes speedInSkew {
    0% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
    15% { -webkit-transform: skewX(20deg); transform: skewX(20deg); }
    30% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
    50% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
    75% { -webkit-transform: skewX(-10deg); transform: skewX(-10deg); }
    100% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
}

@keyframes speedInSkew {
    0% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
    15% { -webkit-transform: skewX(20deg); transform: skewX(20deg); }
    30% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
    50% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
    75% { -webkit-transform: skewX(-10deg); transform: skewX(-10deg); }
    100% { -webkit-transform: skewX(0deg); transform: skewX(0deg); }
}

@-webkit-keyframes speedOutSkew {
    to { -webkit-transform: skewX(20deg); transform: skewX(20deg);  }
}

@keyframes speedOutSkew {
    to { -webkit-transform: skewX(20deg); transform: skewX(20deg);  }
}

@-webkit-keyframes pulse {
    0% { -webkit-transform: scale(1); transform: scale(1); }
    100% { -webkit-transform: scale(0.9); transform: scale(0.9); }    
}

@keyframes pulse {
    0% { -webkit-transform: scale(1); transform: scale(1); }
    100% { -webkit-transform: scale(0.9); transform: scale(0.9); }    
}