/*
  Fonts
*/
@font-face {
	font-family: "Libre Baskerville";
	src: url("./fonts/LibreBaskerville-Bold.ttf");
	font-weight: bold;
}
@font-face {
	font-family: "Libre Baskerville";
	src: url("./fonts/LibreBaskerville-Italic.ttf");
	font-weight: italic;
}
@font-face {
	font-family: "Libre Baskerville";
	src: url("./fonts/LibreBaskerville-Regular.ttf");
	font-weight: regular;
}

/*
  Global
*/
body {
	color-scheme: light;
	min-height: 170vh;
	background-image: url("./assets/background.jpg");
	background-repeat: no-repeat;
	background-size: auto 300%;
	background-position: 50% 30%;
	background-attachment: fixed;
	font-family: "Libre Baskerville";

	animation: parallax-movement linear;
	animation-timeline: scroll();
}
@keyframes parallax-movement {
	to {
		background-position: 50% 35%;
		background-size: auto 270%;
	}
}

a,
p,
h1,
h2,
h3,
button {
	color: white;
}
.fixed-width {
	width: min(110rem, 80%);
}

/*
  Outside of the coal
*/
nav,
.clouds,
img.play,
img.title,
img.arrow,
.popup-video,
.cta {
	position: fixed;
}

nav,
.clouds,
img.title,
img.play,
img.arrow,
.cta {
	left: 50%;
	transform: translateX(-50%);
}

nav {
	width: 80%;
	top: 0;
	z-index: 40;
}
nav ul {
	display: flex;
	justify-content: space-evenly;
	margin-inline: 20%;
	list-style-type: none;
	padding: 0;
	padding-block: 3.6rem;
	margin: 0;
}
nav li {
	flex-grow: 1;
	text-align: center;
	max-width: fit-content;
}
nav li a,
nav li button {
	text-decoration: none;
	font-weight: bold;
	font-size: 2rem;
	text-transform: uppercase;
}
nav li a:hover,
nav li button:hover {
	color: hsl(0 0% 90%);
}
@media screen and (max-width: 650px) {
	nav li a,
	nav li button {
		font-size: clamp(0.9rem, 2.2vw + 0.5rem, 2rem);
	}
}

img.play,
img.arrow,
.cta,
.clouds {
	z-index: 10;
}

img.title {
	/* top position and width are defined in js */
	max-width: 110rem;
	z-index: 40;
	transition: all 250ms ease-out;
}

.cta {
	text-align: center;
	margin-top: 60svh;

	display: flex;
	flex-direction: column;
	align-items: center;
}
.cta h1 {
	padding-top: 5rem;
	font-size: 3rem;
}
@media screen and (max-width: 650px) {
	.cta {
		margin-top: 52svh;
	}
	.cta h1 {
		font-size: clamp(2.1rem, 3.9vw + 0.5rem, 3rem);
	}
}

.unete {
	background-color: transparent;
	border: 2px solid white;
	color: white;
	border-radius: 25px;
	padding: 0.8rem 3.4rem;
	margin-top: 1.1rem;

	font-size: 1.6rem;
	font-weight: bold;
	text-decoration: none;
	text-transform: uppercase;
}
.unete:hover {
	color: hsl(0 0% 90%);
	border-color: hsl(0 0% 90%);
}

.clouds {
	pointer-events: none;
}
.clouds > img {
	position: absolute;
	max-width: none;
}

.clouds > img:nth-child(1) {
	opacity: 70%;
	width: 130%;
	top: -10%;
	left: -100%;
	animation: cloud-one linear;
	animation-timeline: scroll();
}
@keyframes cloud-one {
	to {
		transform: translate(180%, 8%);
	}
}

.clouds > img:nth-child(2) {
	opacity: 85%;
	width: 130%;
	top: 30%;
	left: -90%;

	animation: cloud-two linear;
	animation-timeline: scroll();
}
@keyframes cloud-two {
	to {
		transform: translate(200%, -60%);
	}
}

.clouds > img:nth-child(3) {
	opacity: 75%;
	width: 170%;
	top: 20%;
	right: -150%;

	animation: cloud-three;
	animation-timeline: scroll();
}
@keyframes cloud-three {
	to {
		transform: translate(-90%, -10%);
	}
}

.clouds > img:nth-child(4) {
	opacity: 70%;
	width: 180%;
	top: 50%;
	right: -150%;

	animation: cloud-four;
	animation-timeline: scroll();
}
@keyframes cloud-four {
	to {
		transform: translate(-90%, -10%);
	}
}

img.arrow {
	width: 4rem;
	bottom: 0.8rem;
}
img.play {
	top: 52svh;
	width: 8.5rem;
	cursor: pointer;
}
img.play,
img.arrow {
	animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
	0% {
		opacity: 100%;
	}
	50% {
		opacity: 40%;
	}
	100% {
		opacity: 100%;
	}
}
@media screen and (max-width: 650px) {
	img.play {
		top: 40svh;
		width: 11rem;
	}
}

.popup-video,
.popup-video span {
	z-index: 100;
}
.popup-video {
	display: none;
	top: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.8);
	height: 100%;
	width: 100%;
}
.popup-video iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(95svw, 100rem);
	aspect-ratio: 16 / 9;
	border-radius: 5px;
	border: 3px solid white;
	object-fit: cover;
}
.popup-video span {
	position: absolute;
	top: 5px;
	right: 20px;
	font-size: 4rem;
	color: white;
	font-weight: bolder;
	font-family: "Arial";
	cursor: pointer;
}

/*
  Entering coal
*/
.mine,
.mine img.coal {
	pointer-events: none;
}
.mine {
	z-index: 20;
	position: absolute;
	width: 100%;
	margin-top: 140vh;
	pointer-events: all;
}

.gradient {
	position: absolute;
	width: 100%;
	background-image: linear-gradient(transparent, black);

	top: -10svh;
	height: 10svh;
}

.sticky-gradient,
.placeholder {
	position: sticky;
}
.sticky-gradient {
	display: block;

	z-index: 30;
	top: 0;
	width: 100%;
	height: min(30svw + 2rem, 37rem);
	background-image: linear-gradient(to bottom, black 75%, transparent);
}
.placeholder {
	height: 10svh; /* height at which you wanna go when clicking "La serie" */
}
@media screen and (max-width: 650px) {
	.sticky-gradient {
		height: 32rem;
	}
}

main {
	position: absolute;
	width: 100%;
	background-color: black;
	display: flex;
	flex-direction: column;
	align-items: center;
}

main .main-text {
	font-size: 3.2rem;
	text-align: center;
}

.info {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.pdf {
	display: flex;
	width: 100%;
	border: 2px solid white;
	margin-block: 6rem;
}
.pdf > * {
	flex: 1;
}
.pdf > .download {
	position: relative;
}
.pdf > .download a {
	position: absolute;
	top: 50%;
	left: 50%;

	font-size: 2rem;
	transform: translate(-50%, -50%);
}
.pdf > .download img {
	display: block;
	width: 5rem;
	margin-inline: auto;
	margin-block-end: 1rem;
}
@media screen and (max-width: 650px) {
	.pdf {
		flex-direction: column;
	}
	.pdf > .download {
		padding-block: 10rem;
	}
}

h2 {
	text-align: center;
	font-size: 4rem;
	padding-top: 15rem;
}

footer {
	display: flex;
	align-items: center;
	flex-direction: row;
	gap: 8%;

	margin-block: 5rem;
}
footer .contact {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
footer p {
	font-size: 2rem;
}
footer h3 {
	font-size: 3rem;
}
footer a {
	font-size: 2rem;
	text-decoration: none;
}
@media screen and (max-width: 650px) {
	footer {
		flex-direction: column;
		gap: 2rem;
		margin-block-start: 2rem;
		margin-block-end: 12rem;
	}
	footer p,
	footer h3 {
		text-align: center;
	}
	footer .contact {
		gap: 0;
	}
}
