/* Main styles */
body {
	height: 100%;
	font-family: Arial, sans-serif;
	margin: 0px;
	padding: 0px;
	overflow: hidden;
}
#overlay { z-index: 1; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; background: rgba(0, 0, 0, .56); }
#flash { z-index: 4; pointer-events: none; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; background: white; opacity: 0; }
#scene1 { display: none; }
#camera { background: rgba(0, 0, 0, .5); }
#camera, #record_light { z-index: 2; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; display: table; text-align: center;}
#camera .lens, #record_light .blink { position: relative; display: table-cell; vertical-align: middle; }
#scene2 { z-index: 3; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; display: table; }
#modal_container {  display: table-cell; vertical-align: middle; }
#modal {
	position: relative;
	margin: 0px auto;
	width: 675px;
	height: 599px;
	border-radius: 10px;
	background-image: url(images/background.png);
	background-position: 0px 0px;
	background-size: 100% auto;
	box-shadow: 0px 3px 20px rgba(0, 0, 0, .4);
	-webkit-transform: translate3d(0,0,0);
	-moz-transform: translate3d(0,0,0);
	-ms-transform: translate3d(0,0,0);
	-o-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0);
}
#modal #close {
	z-index: 9001;
	position: absolute;
	right: 0px;
	top: 0px;
	padding: 5px 10px;
	background-color: black;
	color: white;
	text-decoration: none;
	opacity: .4;
	-webkit-border-top-right-radius: 10px;
	-webkit-border-bottom-left-radius: 10px;
	-moz-border-radius-topright: 10px;
	-moz-border-radius-bottomleft: 10px;
	border-top-right-radius: 10px;
	border-bottom-left-radius: 10px;
}
#modal #close:hover {
	opacity: .5;
}
#modal #houses_back {
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	border-radius: 10px;
	background-image: url(images/houses_back.png);
	background-position: 0px 0px;
	background-size: 100% auto;
	background-repeat: repeat-x;
	-webkit-transform: translate3d(0,0,0);
	-moz-transform: translate3d(0,0,0);
	-ms-transform: translate3d(0,0,0);
	-o-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0);
	
}
#modal #houses_front {
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	border-radius: 10px;
	background-image: url(images/houses_front.png);
	background-position: 0px 0px;
	background-size: 100% auto;
	background-repeat: repeat-x;
	border-bottom: 6px solid #0d1d30;
	-webkit-transform: translate3d(0,0,0);
	-moz-transform: translate3d(0,0,0);
	-ms-transform: translate3d(0,0,0);
	-o-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0);
}
#modal #content {
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	padding: 30px 35px;
	font-size: 23px;
	line-height: 29px;
	color: white;
	text-align: center;
}
#modal #button_glow {
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	opacity: 0;
	background: url(images/button_glow.png);
	pointer-events: none;
}
#modal #button_glow2 {
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	opacity: 0;
	background: url(images/button_glow.png);
	pointer-events: none;
}
#modal #button_container {
	position: absolute;
	opacity: 0;
	-ms-transition: opacity 2.5s ease-in;
	-o-transition: opacity 2.5s ease-in;
	-moz-transition: opacity 2.5s ease-in;
	-webkit-transition: opacity 2.5s ease-in;
	transition: opacity 2.5s ease-in;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	display: none;
}
#modal #button_container.shown {
	display: table;
}
#modal #button_container #button {
	display: table-cell;
	vertical-align: middle;
	text-align: center;
}
#modal #button_container #button img {
	border: 0;
}
#modal #logo {
	position: absolute;
	width: 100%;
	left: 0px;
	top: 450px;
	text-align: center;
	display: none;
	z-index: 9001;
	-ms-transition: opacity 2.5s ease-in;
	-o-transition: opacity 2.5s ease-in;
	-moz-transition: opacity 2.5s ease-in;
	-webkit-transition: opacity 2.5s ease-in;
	transition: opacity 2.5s ease-in;
	opacity: 0;
}

/* --- Animations --- */
@-webkit-keyframes blink {
	0% { opacity: 0; }
	25% { opacity: 1; }
	50% { opacity: 1; }
	75% { opacity: 0; }
	100% { opacity: 0; }
}
@keyframes blink {
	0% { opacity: 0; }
	25% { opacity: 1; }
	50% { opacity: 1; }
	75% { opacity: 0; }
	100% { opacity: 0; }
}
#record_light .blink {
	-webkit-animation-duration: 1.5s;
	animation-duration: 1.5s;
	-webkit-animation-iteration-count: infinite;
	animation-iteration-count: infinite;
	-webkit-animation-name: blink;
	animation-name: blink;
}

@-webkit-keyframes flash {
	0% { opacity: 0; }
	5% { opacity: 1; }
	100% { opacity: 0; display: none; }
}
@keyframes flash {
	0% { opacity: 0; }
	5% { opacity: 1; }
	100% { opacity: 0; display: none; }
}
#flash {
	-webkit-animation-duration: 2.5s;
	animation-duration: 2.5s;
	-webkit-animation-name: flash;
	animation-name: flash;
	-webkit-animation-timing-function: ease-out;
	animation-timing-function: ease-out;
}

@-webkit-keyframes houses_front {
	0% { background-position: 0px 110px; }
	35% { background-position: 0px 110px; }
	65% { background-position: 0px 0px; }
	
}
@keyframes houses_front {
	0% { background-position: 0px 110px; }
	35% { background-position: 0px 110px; }
	65% { background-position: 0px 0px; }
}
#modal #houses_front {
	-webkit-animation-duration: 10s;
	animation-duration: 10s;
	-webkit-animation-name: houses_front;
	animation-name: houses_front;
	-webkit-animation-timing-function: ease-out;
	animation-timing-function: ease-out;
}

@-webkit-keyframes houses_back {
	0% { background-position: 0px 55px; }
	35% { background-position: 0px 55px; }
	65% { background-position: 0px 0px; }
	
}
@keyframes houses_back {
	0% { background-position: 0px 55px; }
	35% { background-position: 0px 55px; }
	65% { background-position: 0px 0px; }
}
#modal #houses_back {
	-webkit-animation-duration: 10s;
	animation-duration: 10s;
	-webkit-animation-name: houses_back;
	animation-name: houses_back;
	-webkit-animation-timing-function: ease-out;
	animation-timing-function: ease-out;
}

@-webkit-keyframes modal {
	0% { margin-top: 100px; opacity: 0; background-position: 0px 0px; }
	35% { margin-top: 100px; opacity: 0; background-position: 0px 0px; }
	55% { margin-top: 0px; opacity: 1; }
	65% { background-position: 0px 0px; }
	
}
@keyframes modal {
	0% { margin-top: 100px; opacity: 0; background-position: 0px 0px; }
	35% { margin-top: 100px; opacity: 0; background-position: 0px 0px; }
	55% { margin-top: 0px; opacity: 1; }
	65% { background-position: 0px 0px; }
}
#modal {
	-webkit-animation-duration: 10s;
	animation-duration: 10s;
	-webkit-animation-name: modal;
	animation-name: modal;
	-webkit-animation-timing-function: ease-out;
	animation-timing-function: ease-out;
}

@-webkit-keyframes button_glow {
	0% { opacity: 0; }
	50% { opacity: 1; }
	100% { opacity: 0; }
	
}
@keyframes button_glow {
	0% { opacity: 0; }
	50% { opacity: 1; }
	100% { opacity: 0; }
}
#modal #button_glow.animate {
	-webkit-animation-duration: 5s;
	animation-duration: 5s;
	-webkit-animation-name: button_glow;
	animation-name: button_glow;
	-webkit-animation-iteration-count: infinite;
	animation-iteration-count: infinite;
}




/* Mobile styles */
@media (max-width:674px) {
	#camera .lens img, #record_light .blink img { width: 300px; height: auto; }

	#modal { position: relative; margin: 0px auto; width: 100%; height: 100%; border-radius: 0px; background-image: url(images/background.png); background-position: 0px 0px; background-size: auto 100%; background-attachment: fixed; box-shadow: none; }
	#modal #houses_back { border-radius: 0px; background-size: auto 100%; background-attachment: fixed; }
	#modal #houses_front { border-radius: 0px; background-size: auto 100%; background-attachment: fixed; border-bottom: 0px none transparent;	}
	#modal #button_glow { display: none; }
	#modal #button_glow2 { display: none; }
	#modal #close {
		padding: 7px 10px;
		-webkit-border-top-right-radius: 0px;
		-moz-border-radius-topright: 0px;
		border-top-right-radius: 0px;
	}
	#modal #main { position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden; }
	#modal #content {
		position: static;
		left: auto;
		top: auto;
		width: auto;
		height: auto;
		padding: 2em 1em 1em 1em;
		font-size: 1em;
		line-height: 1.3em;
		text-align: left;
	}

	#modal #button_container {
		position: static;
		display: none;
		opacity: 0;
		-ms-transition: opacity 2.5s ease-in;
		-o-transition: opacity 2.5s ease-in;
		-moz-transition: opacity 2.5s ease-in;
		-webkit-transition: opacity 2.5s ease-in;
		transition: opacity 2.5s ease-in;
		left: auto;
		top: auto;
		width: auto;
		height: auto;
	}
	#modal #button_container.shown {
		display: block;
	}
	#modal #button_container #button {
		display: block;
		text-align: center;
	}
	#modal #button_container #button img {
		max-width: 40%;
		height: auto;
	}
	#modal #logo {
		margin-top: 1.5em; 
		position: static;
		width: auto;
		left: auto;
		top: auto;
		text-align: center;
		display: none;
	}
	#modal #logo img {
		max-width: 92%;
		height: auto;
	}

	/* --- Animations --- */
	#modal #houses_front {
		-webkit-animation-name: none;
		animation-name: none;
	}
	#modal #houses_back {
		-webkit-animation-name: none;
		animation-name: none;
	}
	@-webkit-keyframes modal_mobile {
		0% { margin-top: 0px; opacity: 0; background-position: 0px 0px; }
		35% { margin-top: 0px; opacity: 0; background-position: 0px 0px; }
		55% { margin-top: 0px; opacity: 1; }
		65% { background-position: 0px 0px; }
		
	}
	@keyframes modal_mobile {
		0% { margin-top: 0px; opacity: 0; background-position: 0px 0px; }
		35% { margin-top: 0px; opacity: 0; background-position: 0px 0px; }
		55% { margin-top: 0px; opacity: 1; }
		65% { background-position: 0px 0px; }
	}
	#modal {
		-webkit-animation-name: modal_mobile;
		animation-name: modal_mobile;
	}
}