/* Fuente Tipográfica.
	 ========================================================================== */

span, p, a { font-family: "ZCOOL QingKe HuangYou"; }

span.ganador { font-size: 5rem; }

span.guía { font-size: 2.5rem; }

span.nombre { font-size: 2.75rem; }

p {
	font-size: 2rem;
	letter-spacing: .4px;
}

a {
	font-size: 1.75rem;
	letter-spacing: 1.4px;
}

/* Base.
	 ========================================================================== */

:root { --diámetro: 272px; }

@media (min-width: 550px) {
	:root { --diámetro: 320px; }
}

html {
	box-sizing: border-box;
	height: 100%;
	font-size: 62.5%;
}

*, *::before, *::after { box-sizing: inherit; }

* {
	margin: 0;
	padding: 0;
}

body {
	min-height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 7.5%;
	background: radial-gradient(circle, rgb(0, 30, 60) 0%, rgb(0, 4, 8) 100%);
	overflow-x: hidden;
}

@media (min-width: 750px) {
	body {
		max-width: 100%;
		justify-content: space-between;
	}
}

::selection {
	color: #212529;
	background-color: #f8f9fa;
}

.info span::selection,
.info p::selection,
.info a::selection {
	color: #f8f9fa;
	background-color: #212529;
}

/* Logo.
	 ========================================================================== */

.logo {
	position: absolute;
	top: 0;
	left: 0;
	width: 50px;
	height: 50px;
	display: none;
	margin: 20px;
	opacity: 0;
	transform: scale(1.4);
	transition-property: opacity, transform;
	transition-duration: .8s;
	transition-delay: 2.4s;
	transition-timing-function: ease-out;
}

@media (min-width: 750px) {
	.logo { display: block; }
}

.logo.inicio {
	opacity: 1;
	transform: scale(1);
}

.token {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	transform-style: preserve-3d;
	transition: transform .2s;
	cursor: pointer;
}

.token.giro { animation: giro 2.4s ease-in-out; }

.token .cara { transform: translateZ(3.75px); }

.token .sello { transform: translateZ(-3.75px) rotateY(180deg); }

.token .estructura {
	width: 7.5px;
	height: 50px;
}

.token .estructura::before, .token .estructura::after {
	width: 7.5px;
	height: calc(50px / 10);
}

/* Aplicación.
	 ========================================================================== */

.escena {
	z-index: 1;
	width: var(--diámetro);
	height: var(--diámetro);
	opacity: 0;
	transform: scale(.85);
	transition-property: opacity, transform;
	transition-duration: .4s;
	transition-timing-function: linear;
}

.escena.inicio {
	opacity: 1;
	transform: scale(1);
}

.moneda {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	transform-style: preserve-3d;
	transition: transform .2s;
	animation-duration: 1.2s;
	animation-timing-function: linear;
	cursor: pointer;
}

.moneda:hover { will-change: transform; }

.moneda.inicio { animation: lanzamientoInicial 1.2s .4s linear; }

.moneda.tails-heads,
.moneda.heads-heads { transform: rotateX(0deg); }

.moneda.heads-tails,
.moneda.tails-tails { transform: rotateX(180deg); }

@media (min-width: 750px) {
	.moneda:hover, .token:hover { transform: rotateX(30deg) }

	.heads-heads.moneda:hover,
	.tails-heads.moneda:hover { transform: rotateX(30deg); }

	.tails-tails.moneda:hover,
	.heads-tails.moneda:hover { transform: rotateX(210deg); }
}

.lado {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	transform-style: preserve-3d;
}

.lado svg {
	display: block;
	width: 100%;
	height:100%;
}

.cara {
	overflow: hidden;
	transform: translateZ(10px);
	backface-visibility: hidden;
}

.sello {
	overflow: hidden;
	transform: translateZ(-10px) rotateY(180deg);
	backface-visibility: hidden;
}

@media (min-width: 750px) {
	.cara::before {
		content: "";
		position: absolute;
		width: 100%;
		height: 25%;
		background: white;
		opacity: .4;
		transform: translateY(-100%);
		transition: transform 0s;
	}

	.moneda:hover .cara::before,
	.token:hover .cara::before {
		transform: translateY(400%);
		transition: transform .2s;
	}

	.sello::before {
		content: "";
		position: absolute;
		width: 100%;
		height: 25%;
		background: white;
		opacity: .4;
		transform: translateY(400%);
		transition: transform 0s;
	}

	.moneda:hover .sello::before,
	.token:hover .sello::before {
		transform: translateY(-100%);
		transition: transform .2s;
	}
}

.estructura {
	position: absolute;
	left: 50%;
	width: 20px;
	height: var(--diámetro);
	transform-style: preserve-3d;
}

.estructura:nth-child( 1) { transform: translateX(-50%) rotateY(90deg) rotateX( 11.25deg); }
.estructura:nth-child( 2) { transform: translateX(-50%) rotateY(90deg) rotateX( 22.50deg); }
.estructura:nth-child( 3) { transform: translateX(-50%) rotateY(90deg) rotateX( 33.75deg); }
.estructura:nth-child( 4) { transform: translateX(-50%) rotateY(90deg) rotateX(    45deg); }
.estructura:nth-child( 5) { transform: translateX(-50%) rotateY(90deg) rotateX( 56.25deg); }
.estructura:nth-child( 6) { transform: translateX(-50%) rotateY(90deg) rotateX( 67.50deg); }
.estructura:nth-child( 7) { transform: translateX(-50%) rotateY(90deg) rotateX( 78.75deg); }
.estructura:nth-child( 8) { transform: translateX(-50%) rotateY(90deg) rotateX(    90deg); }
.estructura:nth-child( 9) { transform: translateX(-50%) rotateY(90deg) rotateX(101.25deg); }
.estructura:nth-child(10) { transform: translateX(-50%) rotateY(90deg) rotateX(112.50deg); }
.estructura:nth-child(11) { transform: translateX(-50%) rotateY(90deg) rotateX(123.75deg); }
.estructura:nth-child(12) { transform: translateX(-50%) rotateY(90deg) rotateX(   135deg); }
.estructura:nth-child(13) { transform: translateX(-50%) rotateY(90deg) rotateX(146.25deg); }
.estructura:nth-child(14) { transform: translateX(-50%) rotateY(90deg) rotateX(157.50deg); }
.estructura:nth-child(15) { transform: translateX(-50%) rotateY(90deg) rotateX(168.75deg); }
.estructura:nth-child(16) { transform: translateX(-50%) rotateY(90deg) rotateX(   180deg); }

.estructura::before, .estructura::after {
	content: "";
	position: absolute;
	width: 20px;
	height: calc(var(--diámetro) / 10);
	transform: rotateX(84.375deg);
	background-color: hsl(31, 100%, 35%);
}

.estructura::before {
	top: 0;
	transform-origin: top center;
}

.estructura::after {
	bottom: 0;
	transform-origin: center bottom;
}

/* Texto.
	 ========================================================================== */

span.ganador,
span.guía {
	display: block;
	color: #f8f9fa;
	text-transform: uppercase;
	text-align: center;
}

span.ganador {
	margin-bottom: 25px;
	opacity: 0;
	transform: scale(.85);
	transition-property: opacity, transform;
	transition-duration: .2s;
	transition-timing-function: ease-out;
}

@media (min-width: 550px) {
	span.ganador { margin-bottom: 50px; }
}

@media (min-width: 750px) {
	span.ganador { margin-bottom: 0; }
}

span.ganador.resultado {
	opacity: 1;
	transform: scale(1);
}

span.guía {
	margin-top: 25px;
	color: #adb5bd;
	opacity: 0;
	transform: scale(1.05);
	transition-property: opacity, transform;
	transition-duration: .4s;
	transition-delay: 1.6s;
	transition-timing-function: ease-out;
}

@media (min-width: 550px) {
	span.guía { margin-top: 50px; }
}

@media (min-width: 750px) {
	span.guía { margin-top: 0; }
}

span.guía.inicio {
	opacity: 1;
	transform: scale(1);
}

/* Información.
	 ========================================================================== */

.info-plus {
	width: 30px;
	height: 30px;
	margin-top: 20px;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0;
	transform: scale(1.4);
	transition: opacity, transform;
	transition-duration: .8s;
	transition-delay: 2.8s;
	transition-timing-function: ease-out;
}

.info-plus.inicio {
	opacity: 1;
	transform: scale(1);
}

@media (min-width: 750px) {
	.info-plus {
		position: absolute;
		bottom: 0;
		right: 0;
		width: 37.5px;
		height: 37.5px;
		margin: 20px;
	}
}

.info-plus svg {
	display: block;
	transform: scale(1);
	transition: transform .2s;
}

@media (min-width: 750px) {
	.info-plus:hover svg { transform: scale(1.2); }
}

.info {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: 100%;
	padding: 7.5%;
	background-color: rgba(0, 4, 8, .6);
	visibility: hidden;
	opacity: 0;
	transition-property: visibility, opacity;
	transition-duration: .4s;
	transform: translate3d(0, 0, 0);
}

.info.mostrar-info {
	visibility: visible;
	opacity: 1;
}

.info .caja {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 100%;
	color: #212529;
	opacity: 0;
	transform: scale(1.1);
	transition-property: opacity, transform;
	transition-duration: .4s;
}

@media (min-width: 400px) {
	.info .caja { width: 320px; }
}

.info.mostrar-info .caja {
	opacity: 1;
	transform: scale(1);
}

.info-persona {
	display: flex;
	justify-content: space-around;
	align-items: center;
	margin-bottom: 15px;
}

.info-persona .foto {
	width: 25%;
	border-radius: 50%;
}

.info-persona .nombre { text-transform: uppercase; }

.caja-a {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 7.5%;
	border-top-left-radius: 12.5px;
	border-top-right-radius: 12.5px;
	background-color: #f8f9fa;
}

.caja-a p:first-of-type { margin-bottom: 15px; }

.caja-b {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 7.5%;
	border-bottom-left-radius: 12.5px;
	border-bottom-right-radius: 12.5px;
	background-color: rgb(0, 30, 60);
}

.caja-b a {
	display: inline-block;
	padding: 12.5px 15px;
	border-radius: 7.5px;
	background: linear-gradient(#f8f9fa, #adb5bd);
	color: #212529;
	text-decoration: none;
	text-transform: uppercase;
	box-shadow: 0 0 10px #212529;
}

/* Animaciones.
	 ========================================================================== */

@keyframes lanzamientoInicial {
	0% { transform: rotateY(0deg) rotateX(30deg) scale(1); }

	20% { transform: rotateY(45deg) rotateX(240deg) scale(1.6); }

	60% { transform: rotateY(-30deg) rotateX(480deg) scale(2); }

	100% { transform: rotateY(0deg) rotateX(720deg) scale(1); }
}

@keyframes giro {
	from { transform: rotateX(30deg); }

	to { transform: rotateX(5turn); }
}

@keyframes heads-heads {
	0% { transform: rotateY(0deg) rotateX(30deg) scale(1); }

	20% { transform: rotateY(45deg) rotateX(240deg) scale(1.6); }

	60% { transform: rotateY(-30deg) rotateX(480deg) scale(2); }

	100% { transform: rotateY(0deg) rotateX(720deg) scale(1); }
}

@keyframes heads-tails {
	0% { transform: rotateY(0deg) rotateX(30deg) scale(1); }

	20% { transform: rotateY(45deg) rotateX(300deg) scale(1.6); }

	60% { transform: rotateY(-30deg) rotateX(600deg) scale(2); }

	100% { transform: rotateY(0deg) rotateX(900deg) scale(1); }
}

@keyframes tails-tails {
	0% { transform: rotateY(0deg) rotateX(calc(30deg + 180deg)) scale(1); }

	20% { transform: rotateY(45deg) rotateX(calc(240deg + 180deg)) scale(1.6); }

	60% { transform: rotateY(-30deg) rotateX(calc(480deg + 180deg)) scale(2); }

	100% { transform: rotateY(0deg) rotateX(calc(720deg + 180deg)) scale(1); }
}

@keyframes tails-heads {
	0% { transform: rotateY(0deg) rotateX(calc(30deg + 180deg)) scale(1); }

	20% { transform: rotateY(45deg) rotateX(calc(300deg + 180deg)) scale(1.6); }

	60% { transform: rotateY(-30deg) rotateX(calc(600deg + 180deg)) scale(2); }

	100% { transform: rotateY(0deg) rotateX(calc(900deg + 180deg)) scale(1); }
}
