/*
Theme Name: BLOOM*IZ TEASER
Author: Fivement
Version: 1.0.0
Text Domain: bloom-iz-teaser
*/

/*--- Reset ---*/

* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
*:before,
*:after {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}
body { 
	background-color: #0d0d0d;
	color: #8e8f90;
	font-family: sans-serif; 
	font-size: 13px;
}

/*--- Loader ---*/

.izone-logo {
	border: 1px solid #0d0d0d;
	width: 120px;
	height: 50px;
	margin-left: 4px;
	opacity: 0;
	overflow: hidden;
	position: fixed;
	transition: opacity 0.5s ease-out;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
}
.izone-logo .logo-mask {
	background-image: url('images/izone-logo-mask.png');
	background-size: contain;
	position: absolute;
	top: 0;
	left: 0;
	width: 120px;
	height: 50px;
	z-index: 2;
}
.izone-logo .logo-gradient {
	background: #e75200;
	background: linear-gradient(90deg, rgba(182,228,188,1) 0%, rgba(231,82,0,1) 70%, rgba(231,82,0,1) 100%);
	width: 1200px;
	height: 50px;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	transition: margin-left 5s cubic-bezier(0.77, 0, 0.175, 1);
}

body.loading .izone-logo {
	opacity: 1;
}
body.init .izone-logo {
	opacity: 0;
}
body.ready .izone-logo {
	display: none;
}
body.loading .izone-logo .logo-gradient,
body.init .izone-logo .logo-gradient,
body.ready .izone-logo .logo-gradient {
	margin-left: -1080px;
}

/*--- Scene ---*/

.scene {
	width: 200px;
	height: 400px;
	opacity: 0;
	perspective: 400px;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	transition: transform 4s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 3s cubic-bezier(0.895, 0.03, 0.685, 0.22);
	z-index: 10;
}

body.init .scene,
body.ready .scene {
	opacity: 1;
}

body.door-opening .scene {
	pointer-events: none;
	transform: translate(-50%, -50%) scale(4);
	opacity: 0;
}
body.door-opened .scene {
	transform: translate(-50%, -50%) scale(4);
	opacity: 0;
}

/*--- Cube ---*/

.cube {
	width: 200px;
	height: 400px;
	position: relative;
	transform-style: preserve-3d;
	transform: translateZ(-100px);
	transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.cube-face {
	position: absolute;
	width: 200px;
	height: 400px;
	font-size: 40px;
	font-weight: bold;
	color: white;
	text-align: center;
	transform-style: preserve-3d;
	backface-visibility: hidden;
}
.cube-face .wall {
	background-image: url('images/object-door-wall.png');
	background-size: 200px 400px;
	display: block;
	position: absolute;
	width: 200px;
	height: 400px;
	top: 0;
	left: 0;
	z-index: 2;
	pointer-events: none;
}
.cube-face .door {
	background-image: url('images/object-door.png');
	background-size: 150px 336px;
	cursor: pointer;
	display: block;
	position: absolute;
	width: 150px;
	height: 336px;
	left: 50%;
	margin-left: -75px;
	bottom: 3px;
	transition: transform 1s;
	transform-origin: 0;
	z-index: 1;
}
.cube-face.rattling .door {
	animation: rattling-door 1s cubic-bezier(.36,.07,.19,.97) both;
	transform: translate3d(0, 0, 0);
}
.cube-face.opened .door {
	transform: rotateY(105deg);
}
.cube-face .back-face {
	background: #200004;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: rotateY(-180deg) translateZ(1px);
}
.cube-face.rattling .back-face {
	display: none;
}
.cube-face-front { 
	transform: rotateY(0deg) translateZ(100px); 
}
.cube-face-right { 
	transform: rotateY( 90deg) translateZ(100px); 
}
.cube-face-back { 
	transform: rotateY(180deg) translateZ(100px); 
}
.cube-face-left { 
	transform: rotateY(-90deg) translateZ(100px); 
}
.cube-face-top { 
	background: #971433; 
	height: 200px; 
	transform: rotateX( 90deg) translateZ(100px); 
}
.cube-face-bottom {
	background: #180003;
	height: 200px;
	transform: rotateX(-90deg) translateZ(299px);
}
.cube-face-top .back-face {
	background: #180003;
}
.cube-face-bottom .front-face .grass {
	background-image: url('images/object-grass.jpg');
	background-size: 300px 300px;
	width: 300px;
	height: 300px;
	position: absolute;
	left: -50px;
	top: -50px;
	transform: translateZ(2px);
}
.cube-face-bottom .back-face {
	background: #180003;
	box-shadow: 0 0 10px rgba(0,0,0,0.9), 0 0 5px rgba(0,0,0,0.9);
	transform: translateZ(1px);
}

@keyframes rattling-door {
  30%, 50% {
    transform: rotateY(2deg);
  }
  
  70% {
	transform: rotateY(1deg);
  }
  
  40%, 60%, 80% {
    transform: rotateY(0);
  }
}

/*--- Controller ---*/

.controller .move-button {
	background-image: url('images/arrow-sprite.png');
	background-size: 160px 40px;
	cursor: pointer;
	width: 40px;
	height: 40px;
	opacity: 0;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0);
	transition: opacity .2s ease-out, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
body.ready .controller .move-button {
	opacity: 0.3;
	transform: translate(-50%, -50%) scale(0.8);
}
body.ready .controller .move-button:hover {
	opacity: 1;
}
.controller .move-right {
	margin-left: 300px;
}
.controller .move-left {
	background-position-x: -40px;
	margin-left: -300px;
}
.controller .move-up {
	background-position-x: -80px;
	display: none;
	margin-top: -300px;
}
.controller .move-down {
	background-position-x: -120px;
	display: none;
	margin-top: 300px;
}

/*--- Browser support ---*/

.browser-not-supported {
	background-color: #0d0d0d;
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.6;
}

/*--- Preload ---*/

.preload-images {
	width: 0;
	height: 0;
	overflow: hidden;
	position: absolute;
	z-index: -1;
}
.preload-images img {
	width: 0;
	height: 0;
}