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

:root {
	font-size: 12px;
	--color-text: #f0f0f0;
	--color-bg: #0f0e0e;
	--color-link: #aaa;
	--color-link-hover: #fff;
	--color-title: #7f7f8f;
	--color-year: #b9b3af;
	--img-ratio: 1.5;
	--s: 1;
}

body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: "Outfit", sans-serif;
	font-weight: 600;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	width: 100%;
	overflow-x: hidden;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
	content: '';
	position: fixed;
	z-index: 1000;
}

.js .loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-bg);
}

.js .loading::after {
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	opacity: 0.4;
	background: var(--color-link);
	animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
	to {
		opacity: 1;
		transform: scale3d(0.7,0.7,1);
	}
}

a {
	text-decoration: none;
	color: var(--color-link);
	outline: none;
	cursor: pointer;
}

a:hover {
	color: var(--color-link-hover);
	outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	outline: none;
}

a:focus-visible {
	/* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
	outline: 2px solid red;
}

.unbutton {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	cursor: pointer;
}

.unbutton:focus {
	outline: none;
}

.frame {
	position: relative;
	padding: 3rem 3rem;
	display: grid;
	width: 100%;
	grid-template-columns: auto;
	grid-template-areas: 'contact';
	grid-row-gap: 1.75rem;
	grid-column-gap: 3rem;
	pointer-events: none;
	justify-items: start;
	align-content: start;
}

.frame a {
	pointer-events: auto;
}


.frame__back {
	grid-area: back;
	justify-self: start;
}

.frame__prev {
	grid-area: prev;
	justify-self: start;
}

.frame__contact {
	grid-area: contact;
	display: flex;
	flex-direction: row;
	gap: 2.3rem;
	flex-wrap: wrap;
	align-self: start;
}

.frame__contact-item {
	font-size: 1.2rem;
	font-weight: 500;
}

.frame__contact-item--static {
	color: var(--color-text);
	font-weight: 400;
}

.frame__logo {
	display: flex;
	align-items: center;
}

.frame__logo img {
	width: 80px;
	height: auto;
	display: block;
}

.grid {
	width: 100%;
	grid-template-columns: 100%;
	grid-auto-rows: auto;
	display: grid;
	grid-gap: 4rem;
	position: relative;
	margin: 10vh auto 50vh;
}

.grid__item {
    position: relative;
    margin: 0;
}

.grid__item-img {
	position: relative;
	overflow: hidden;
	display: grid;
	place-items: center;
	width: 100%;
	height: auto;
	aspect-ratio: var(--img-ratio);
}

.grid__item-img-inner {
	width: 100%;
	height: 100%;
	background-position: 50%;
	background-size: cover;
	position: relative;
}

.grid__item-caption {
	position: absolute;
	padding: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.grid__item-caption h3 {
	font-weight: bold;
	font-size: inherit;
	margin: 0;
	color: var(--color-title);
}

.grid__item-caption span {
	font-weight: bold;
	color: var(--color-year);
}

.outro {
	display: grid;
	place-items: center;
	margin: 40vh 0;
}

.outro__title {
	font-weight: 300;
	font-size: clamp(1.5rem,10vw,2rem);
}

.card-wrap {
	margin-top: 5vh;
	display: grid;
	grid-gap: 2rem;
	grid-auto-flow: row;
	grid-template-columns: 250px;
	text-align: center;
}

.card__image {
	display: block;
	border-radius: 7px;
	background-size: cover;
	background-position: 50% 50%;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	filter: contrast(0.95);
}

.card__title {
	font-weight: 300;
}

.credits {
	font-size: 1.5rem;
	text-align: center;
	margin: 50vh auto 0;
	padding-bottom: 50vh;
}

@media screen and (max-width: 53em) {
	.frame {
		padding: 10rem 2rem 3rem 2rem;
		justify-items: center;
		text-align: center;
	}

	.frame__contact {
		flex-direction: column;
		align-items: center;
		gap: 0.8rem;
	}

	.frame__logo {
		margin-bottom: 1.5rem;
	}

	.frame__contact-item--static {
		line-height: 1.2;
	}

	.frame__contact-item--static:first-of-type {
		font-weight: 500;
		font-size: 1.8rem;
	}

	.frame__contact-item--static + .frame__contact-item:not(.frame__contact-item--static) {
		margin-top: 1.5rem;
	}

	.frame__contact-item {
		font-size: 1.1rem;
	}

	.frame__logo img {
		width: 60px;
	}
}

@media screen and (min-width: 53em) {
	.card-wrap {
		grid-template-columns: repeat(2,300px);
	}

	.grid {
		grid-template-columns: repeat(8,1fr);
	}

	.grid__item {
	    grid-column: var(--c) / span var(--s);
	    grid-row: var(--r);
	}
}
