
/* 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%;
}

body {
	height: 100%;
	overflow: hidden;
	background-color: #4d0437;
	color: #000000;
	line-height: 1.5;
	font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 100%;
	text-align: center;
}

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

a:visited {
	color: #78b3a5;
}

a:hover {
	text-decoration: none;
}

img {
	border: 0 none transparent;
}

input, select, table, textarea, a.button {
	color: #464749;
	font-size: 100%;
	font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}




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

#squares {
	display: grid;
	grid-template-rows: 1fr 1fr 1fr;
	grid-template-columns: 1fr 1fr 1fr;
	position: absolute;
	left: 50%;
	top: 50%;
	width: 80vmin;
	height: 80vmin;
	list-style-type: none;
	transform: translate(-50%,-50%);
}

#squares li {
	position: relative;
	overflow: hidden;
	background-color: #FF8260;
	cursor: pointer;
	transition: all 0.1s ease-out;
}

#squares li:nth-child(4n+1) {
	background-color: #240041;
}

#squares li:nth-child(4n+2) {
	background-color: #900048;
}

#squares li:nth-child(4n+3) {
	background-color: #FF4057;
}

#squares > li > * {
	transition: opacity 0.2s linear;
}

#squares:not(.isolated):hover li > * {
	opacity: 0.25;
}

#squares:not(.isolated):hover li:hover > * {
	opacity: 1;
}

#squares.isolated li:not(.on) * {
	display: none;
}

#squares.isolated li:not(.on):hover * {
	display: block;
}

p {
	position: absolute;
	left: 50%;
	top: 50%;
	padding: 1em;
	max-width: 50%;
	border-radius: 0.4em;
	background-color: rgba(0,0,0,0.5);
	color: #ffffff;
	text-align: center;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.moving p {
	opacity: 0;
	transition: opacity 1s linear;
}