/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
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{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}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:none}table{border-collapse:collapse;border-spacing:0}


/* General Styles */

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

body {
	text-align: center;
	font-family: helvetica, arial, verdana, sans-serif;
	font-weight: 700;
	line-height: 4em;
	color: #ff6;
	margin: 40px auto;
	background: url(paul-volkmer-qVotvbsuM_c-unsplash.jpg);
	background-size: cover;
	color: #ff6;
}

span {
	display: block;
	text-transform: uppercase;
	transition: color 1s ease;
	color: #ff6;
	font-size: 2em;
	line-height: 2em;
}

span.chosen {
	color: #fff;
}

.intro {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #ff6;
	-webkit-text-fill-color: #111; /* Will override color (regardless of order) */
	-webkit-text-stroke-width: 2px;
	-webkit-text-stroke-color: #ff6;
	font-family: "Ubuntu", sans-serif;
	font-weight: 700;
	font-size: 100px;
	line-height: 1.0em;
	letter-spacing: 2px;
}

.intro.fade {
	-webkit-animation: fade 3s linear forwards;
	-moz-animation: fade 3s linear forwards;
	-ms-animation: fade 3s linear forwards;
	-o-animation: fade 3s linear forwards;
	animation: fade 3s linear forwards;
}



/* animation */
@-webkit-keyframes fade {
	0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
}

@-moz-keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-ms-keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-o-keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@keyframes fade {
	0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
}




/* the interesting 3D scrolling stuff */
/* from http://codepen.io/squarecat/pen/KuHsl */

#titles
{
	position: absolute;
	width: 18em;
	height: 300vh;
	bottom: 0;
	left: 50%;
	margin-left: -9em;
	font-size: 350%;
	text-align: justify;
	overflow: hidden;
	-webkit-transform-origin: 50% 100%;
	-moz-transform-origin: 50% 100%;
	-ms-transform-origin: 50% 100%;
	-o-transform-origin: 50% 100%;
	transform-origin: 50% 100%;
	-webkit-transform: perspective(300px) rotateX(20deg);
	-moz-transform: perspective(300px) rotateX(20deg);
	-ms-transform: perspective(300px) rotateX(20deg);
	-o-transform: perspective(300px) rotateX(20deg);
	transform: perspective(300px) rotateX(20deg);
}

#titles:after
{
	position: absolute;
	content: ' ';
	left: 0;
	right: 0;
	top: 0;
	bottom: 60%;
	background-image: -webkit-linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%);
	background-image: -moz-linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%);
	background-image: -ms-linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%);
	background-image: -o-linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%);
	background-image: linear-gradient(top, rgba(0,0,0,1) 0%, transparent 100%);
	pointer-events: none;
}

#titles h4
{
	text-align: center;
	margin: 1em 0;
	font-family: 'Oswald', sans-serif;
	text-transform: uppercase;
	font-weight: 300;
	font-size: 1.6em;
}

#titles p
{
	text-align: justify;
	margin: 0.8em 0;
}

#titles p.center
{
	text-align: center;
}

#titles a
{
	color: #ff6;
	text-decoration: underline;
}

#titlecontent
{
	position: absolute;
	top: 100%;
}

#titlecontent.go
{
	-webkit-animation: scroll 55s linear .4s;
	-moz-animation: scroll 55s linear .4s;
	-ms-animation: scroll 55s linear .4s;
	-o-animation: scroll 55s linear .4s;
	animation: scroll 55s linear .4s;
}

#titlecontent.again {
	-webkit-animation: scroll2 35s linear;
	-moz-animation: scroll2 35s linear;
	-ms-animation: scroll2 35s linear;
	-o-animation: scroll2 35s linear;
	animation: scroll2 35s linear;
}

/* animation */
@-webkit-keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-moz-keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-ms-keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-o-keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@keyframes scroll {
	0% { top: 100%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}




@-webkit-keyframes scroll2 {
	0% { top: -140%; }
	1% { top: 60%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-moz-keyframes scroll2 {
	0% { top: -140%; }
	1% { top: 60%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-ms-keyframes scroll2 {
	0% { top: -140%; }
	1% { top: 60%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@-o-keyframes scroll2 {
	0% { top: -140%; }
	1% { top: 60%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}

@keyframes scroll2 {
	0% { top: -140%; }
	1% { top: 60%; }
	30% { opacity: 1; }
	80% { opacity: 0; }
	100% { top: -140%; opacity: 0; }
}


