/* RESET */
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}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}

.clear {
	clear: both;
}

.cover {
	background-size: cover;
	background-position: center center;
}

.transition( @target: all, @duration: 400ms, @type: ease, @delay: 0s ) {
	-webkit-transition: @target @duration @type @delay;
	-moz-transition: @target @duration @type @delay;
	-ms-transition: @target @duration @type @delay;
	-o-transition: @target @duration @type @delay;
	transition: @target @duration @type @delay;
}

.border-radius( @value: 1000px ) {
	-webkit-border-radius: @value;
	border-radius: @value;
	-webkit-background-clip: padding-box; 
	-moz-background-clip: padding; 
	background-clip: padding-box;
}

.contain {
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
}

.rotate( @value: 0deg ) {
	-webkit-transform: rotate( @value );
	-moz-transform: rotate( @value );
	-ms-transform: rotate( @value );
	-o-transform: rotate( @value );
	transform: rotate( @value );
}

.box-sizing {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.scale( @value: 1 ) {
	-webkit-transform: scale( @value );
	-moz-transform: scale( @value );
	-ms-transform: scale( @value );
	-o-transform: scale( @value );
	transform: scale( @value );
}

.no-select {
	-webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html, body {
	background-color: #EBEBEB;
}

/*================================*/

.preloader {
	@w: 17px;
	@h: 10px;
	@N: 11;
	
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 20;
	background-color: #EBEBEB;
	display: none;
	
	.mix(@n, @i) when(@i > 0) {
		.mix(@n, @i - 1);
		
		&.state--@{i} {
			.item--@{i} {
				display: inline-block !important;
			}
		}
		
		.bar .item--@{i} {
			background-color: mix(#4B6020, #E9D562, 100% * @i / @n);
		}
	}
	
	.mix(@N, @N);
	
	&.shown {
		display: block;
	}

	.bar {
		position: absolute;
		width: @w * @N;
		height: @h;
		top: 50%;
		margin-top: -@w / 2;
		left: 50%;
		margin-left: -@w * @N / 2;
		font-size: 0;
	
		.item {
			display: none;
			float: left;
			width: @w;
			height: @h;
		}
	}
}

.page {
	.start, .action, .finish {
		display: none;
		padding: 50px 0;
		
		&.shown {
			display: block;
		}
	}

    .start {
    	.container {
    		position: relative;
    		width: 991px;
    		height: 1433px;
    		background-image: url(../images/start.jpg);
    		margin: 0 auto;
    	}
    	
    	.text {
    		font-family: 'trivia-serif';
    		position: absolute;
    		left: 580px;
    		top: 480px;
    		width: 360px;
    		font-size: 16px;
    		line-height: 20px;
    		
    		a {
    			color: #7C8E3A;
    			text-decoration: underline;
    		}
    	}
    	
    	.button {
    		font-family: 'trivia-grotesk';
    		position: absolute;
    		width: 390px;
    		height: 130px;
    		left: 50%;
    		margin-left: -198px;
    		bottom: 290px;
    		background-color: #fff;
    		border: 3px #000 solid;
    		text-align: center;
    		line-height: 140px;
    		font-size: 48px;
    		cursor: pointer;
    		
    		&:hover {
    			background-color: #7C8E3A;
    			color: #fff;
    		}
    	}
    }
    
    .action {
    	font-family: 'trivia-serif';
    
    	.container {
    		position: relative;
    		width: 830px;
    		height: 800px;
    		margin: 0 auto;
    	}
    	
    	.object, .panel, .result {
    		opacity: 0;
    		pointer-events: none;
    		.transition(@duration: 300ms, @target: opacity);
    		
    		&.shown {
    			pointer-events: auto;
    			opacity: 1;
    		}
    	}
    	
    	.question {
    		position: absolute;
    		z-index: 8;
    		font-size: 21px;
    		line-height: 26px;
    		left: 0;
    		top: 200px;
    		width: 240px;
    	}
    	
    	.object {
    		position: absolute;
    		width: 500px;
    		height: 800px;
    		left: 50%;
    		margin-left: -250px;
    		top: 0;
    		
    		&.shown {
    			display: block;
    		}
    		
    		&.before {
    			z-index: 3;
    		}
    		
    		&.after {
    			z-index: 5;
    		}
    	}
    	
    	.panel {
    		position: absolute;
    		width: 250px;
    		right: 0;
    		bottom: 100px;
    		z-index: 8;
    	
    		.button {
    			font-family: 'trivia-grotesk';
    			padding: 30px;
    			border: 2px solid #000;
    			background-color: #fff;
    			cursor: pointer;
    			font-size: 20px;
    			text-align: center;
    			
    			&:hover {
    				background-color: #7C8E3A;
    				color: #fff;
    			}
    		
    			&.one {
    				margin-bottom: 10px;
    			}
    			
    			&.two {
    				
    			}
    		}
    	}
    	
    	.result {
    		position: absolute;
    		left: 0;
    		bottom: 100px;
    		z-index: 8;
    	
    		.you {
    			font-size: 21px;
    			margin-bottom: 20px;
    		}
    		
    		.answer {
    			font-size: 21px;
    			margin-bottom: 50px;
    		}
    		
    		.button {
    			font-family: 'trivia-grotesk';
    			padding: 30px;
    			border: 2px solid #000;
    			background-color: #fff;
    			cursor: pointer;
    			font-size: 20px;
    			text-align: center;
    			
    			&:hover {
    				background-color: #7C8E3A;
    				color: #fff;
    			}
    		}
    	}
    }
    
    .finish {
    	color: #fff;
    	background-color: #000;
    	font-family: 'trivia-grotesk';
    	padding: 150px 0;
    	
    	.container {
    		position: relative;
    		width: 730px;
    		height: 354px;
    		margin: 0 auto;
    	}
    
    	.image {
    		position: absolute;
    		width: 216px;
    		height: 354px;
    		left: 0;
    		top: 0;
    		background-image: url(../images/result.png);
    	}
    	
    	.content {
    		position: absolute;
    		width: 490px;
    		right: 0;
    		top: 50px;
    	
    		.result {
    			font-size: 16px;
    			line-height: 20px;
    			margin-bottom: 20px;
    		}
    		
    		.you {
    			font-family: 'trivia-serif';
    			font-size: 24px;
    			line-height: 28px;
    			margin-bottom: 20px;
    		}
    		
    		.about {
    			font-size: 16px;
    			line-height: 20px;
    			margin-bottom: 40px;
    		}
    		
    		.shares {
    			font-size: 0;
    		
    			.share {
    				display: inline-block;
    				margin-left: 20px;
    				cursor: pointer;
    				background-image: url(../images/btnShare.png);
    				width: 150px;
    				height: 45px;
    			
    				&.vk {
    					margin-left: 0;
    					background-position: -330px 0px;
    					
    					&:hover {
    						background-position: -330px -46px;
    					}
    				}
    				
    				&.fb {
    					background-position: 0px 0px;
    					
    					&:hover {
    						background-position: 0px -46px;
    					}
    				}
    				
    				&.tw {
    					background-position: -165px 0px;
    					
    					&:hover {
    						background-position: -165px -46px;
    					}
    				}
    			}
    		}
    	}
    }
}