
/* GENERAL ========================================= */

/* Zero default margin & padding around common elements */
article, blockquote, body, dd, dl, dt, fieldset, figure, form, h1, h2, h3, h4, h5, h6, header, li, menu, nav, ol, p, section, ul {
	margin: 0;
	border: 0 none #FFFFFF;
	padding: 0;
}

html {
	height: 100%;
	overflow: hidden;
	font-size: 30vmin;
}

html.typing {
	transform: translateY(-0.8em);
}

@media screen and (max-width: 600px) {
	html {
		font-size: 40vmin;
	}
}

body {
	height: 100%;
	overflow: hidden;
	background-color: #4c3666;
	color: #ffffff;
	font-family: 'Work Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	text-align: center;
	font-weight: 800;
	perspective: 400px;
}

a {
	color: #0099cc;
	text-decoration: underline;
}

a:visited {
	color: #9966cc;
}

a:hover {
	text-decoration: none;
}

img {
	border: 0 none transparent;
}

input, select, table, textarea {
	color: #3f4652;
	font-size: 100%;
	font-family: 'Work Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}




/* CONTENT ========================================= */

h1 {
	position: absolute;
	left: 0.5em;
	top: 0.5em;
	z-index: 10;
	color: rgba(0,0,0,0.5);
	font-size: 25%;
	line-height: 1;
	text-align: left;
}

@media screen and (max-width: 800px) {
	h1 {
		width: 5em;
	}
}

#switch {
	position: absolute;
	right: 1.2em;
	top: 1.55em;
	z-index: 10;
	list-style: none;
	font-size: 12%;
	cursor: pointer;
}

@media screen and (max-width: 600px) {
	#switch {
		top: 2.25em;
		font-size: 9%;
	}
}


#switch:before {
	content: '';
	position: absolute;
	left: 4.5em;
	top: 50%;
	width: 2em;
	height: 1em;
	border-radius: 0.5em;
	background-color: rgba(0,0,0,0.5);
	transform: translateY(-50%);
}

#switch:after {
	content: '';
	position: absolute;
	left: 4.5em;
	top: 50%;
	width: 1em;
	height: 1em;
	border-radius: 0.5em;
	background-color: rgba(255,255,255,0.5);
	transform: translateY(-50%);
	transition: left 0.15s ease;
}

#switch.bubbles:after {
	left: 5.5em;
}

#switch li {
	display: inline-block;
}

#switch li + li {
	margin-left: 3em;
}

#switch a {
	color: rgba(0,0,0,0.5);
	text-decoration: none;
	transition: color 0.15s linear;
}

#switch:not(.bubbles) li:first-child a,
#switch.bubbles li + li a {
	color: rgba(255,255,255,0.5);	
}

#letters {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 2;
	width: 50%;
	height: 100%;
	background-color: #4c3666;
	overflow: hidden;
	list-style: none;
}

#letters li {
	position: absolute;
	left: 0;
	top: 0;
	margin-top: -0.03em;
	line-height: 1;
	text-align: left;
	transform-origin: 50% 50%;
}

#bubbles {
	position: absolute;
	left: 50%;
	top: 0;
	z-index: 1;
	width: 50%;
	height: 100%;
	overflow: hidden;
	list-style: none;
}

#membrane {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 4;
	transform: translate(-50%,-50%);
	width: 2vmin;
	height: 50vmin;
	background-color: #ffffff;
}

@media screen and (max-width: 600px) {
	#membrane {
		height: 33vh;
	}
}

#template {
	position: absolute;
	left: -50%;
	top: 0;
	width: 1em;
	height: 1em;
	line-height: 1;
	text-align: center;
}

#measure {
	position: absolute;
	left: -50%;
	top: 0;
	width: 1.1em;
	height: 1em;
	line-height: 1;
	text-align: center;
}

.sphereImage,
#bubble {
	position: absolute;
	right: 150%;
	top: 0;
}

#instructions {
	position: absolute;
	left: 50%;
	width: 20em;
	bottom: 12.5%;
	z-index: 10;
	-webkit-appearance: none;
	background-color: transparent;
	border: 0 none transparent;
	outline: 0 none transparent;
	color: #ffffff;
	font-size: 10%;
	font-family: 'Work Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	transform: translate(-50%, 50%);
	transition: opacity 1s linear;
	animation: pulse 3s infinite;
}

#typing:focus + #instructions {
	border-bottom: 1px solid #ffffff;
	color: rgba(255,255,255,0);
	animation: none;
}

@keyframes pulse {
	0% {
		color: rgba(255,255,255,0.333);
	}
	40% {
		color: rgba(255,255,255,1);
	}
	60% {
		color: rgba(255,255,255,1);
	}
	100% {
		color: rgba(255,255,255,0.333);
	}
}

html:not(.touch) #instructions.off {
	opacity: 0;
}

#attribution {
	position: fixed;
	right: 0;
	bottom: 0;
	z-index: 100;
	border-top-left-radius: 0.4em;
	padding: 1em;
	background-color: rgba(0,0,0,0.333);
	color: #ffffff;
	font-size: 11.3px;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-weight: normal;
	text-transform: uppercase;
}

@media screen and (max-width: 600px) {
	#attribution {
		right: 50%;
		border-top-right-radius: 0.4em;
		transform: translateX(50%);
	}
}

#typing {
	position: absolute;
	right: 150%;
	top: 0;
	font-size: 20%;
	z-index: 100;
}