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

:root {
	font-size: 16px;
	--color-text: #fff;
	--color-bg: #000;
	--color-link: #fff;
	--color-link-hover: #907030;
	--color-title: #fff;
	--perspective: 1500px;
	--grid-item-ratio: 0.664;
	--grid-width: 100%;
	--grid-height: auto;
	--grid-gap: 2vw;
	--grid-columns: 4;
	--grid-inner-scale: 1;
}

body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* 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;
	border-radius: 50%;
	opacity: 0.4;
	background: var(--color-link);
	animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
	to {
		opacity: 1;
		transform: scale3d(0.5,0.5,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:not(.card__image):focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	outline: none;
	background: lightgrey;
}

a:not(.card__image):focus:not(:focus-visible) {
	/* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
	background: transparent;
}

a:not(.card__image):focus-visible {
	/* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
	outline: 2px solid red;
	background: transparent;
}

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

.unbutton:focus {
	outline: none;
}

main {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.frame {
	position: relative;
	width: 100%;
	padding: 1rem;
	display: grid;
	grid-template-columns: 100%;
	grid-template-areas: 'back' 'prev' 'sponsor';
	grid-gap: 0.5rem;
	justify-items: start;
	align-self: start;
	justify-self: start;
	pointer-events: none;
	align-items: center;
	text-transform: uppercase;
	font-size: 0.85rem;
	background: var(--color-bg-alt);
}

body #cdawrap {
    justify-self: start;
}

.frame a {
	pointer-events: auto;
}

.frame a:not(.frame__title-back) {
	white-space: nowrap;
	overflow: hidden;
	position: relative;
}

.frame a:not(.frame__title-back)::before {
	content: '';
	height: 1px;
	width: 100%;
	background: currentColor;
	position: absolute;
	top: 90%;
	transition: transform 0.3s;
	transform-origin: 0% 50%;
}

.frame a:not(.frame__title-back):hover::before {
	transform: scaleX(0);
	transform-origin: 100% 50%;
}

.frame__title {
	grid-area: title;
	display: flex;
}

.frame__title-main {
	font-size: inherit;
	margin: 0;
	font-weight: inherit;
}

.frame__title-back {
	position: relative;
	display: flex;
	align-items: flex-end;
	margin-bottom: 0.15rem;
}

.frame__title-back span {
	display: none;
}

.frame__title-back svg {
	fill: currentColor;
}

.frame__prev {
	grid-area: prev;
}

.intro {
	height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    margin-bottom: 30vh;
    background: linear-gradient(0deg, transparent, var(--color-bg-alt));
    position: relative;
    overflow: hidden;
}

.intro__title {
    margin: 0;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
    line-height: 0.96;
    text-align: center;
    overflow: hidden;
}

.intro__title-pre {
	display: block;
	width: 100%;
	overflow: hidden;
	font-weight: 300;
    font-size: clamp(2rem,8vw,5rem);
    color: var(--color-title);
    text-transform: uppercase;
}

.intro__title-sub {
	display: block;
	width: 100%;
	overflow: hidden;
    font-size: clamp(1.5rem,20vw,8rem);
    max-width: 15ch;
    margin: 0 auto;
    font-weight: 700;
}

.intro__title-text {
	display: block;
}

.intro__info {
	max-width: 15ch;
    opacity: .6;
    margin-bottom: 4rem;
    padding-bottom: 1rem;
    line-height: 1.2;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}


.intro__info::after {
	content: "";
	width: 1px;
	height: 2rem;
	background: #fff;
	position: absolute;
	top: 100%;
	left: 50%;
}

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

.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.8);
}

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

.content {
	position: relative;
	margin-bottom: 20vh;
}

.content--spacing {
	margin-bottom: 100vh;
}

.content__title {
	position: absolute;
	height: 100vh;
	width: 100vw;
	top: 50%;
	left: 50%;
	margin: -50vh 0 0 -50vw;
	padding: 0 10vw;
	display: grid;
	place-items: center;
	text-align: center;
	font-weight: 300;
	font-size: clamp(1.5rem, 15vw, 6.5rem);
}

.content__title--top {
	align-items: start;
}

.content__title--bottom {
	align-items: end;
}

.content__title--left {
	justify-items: start;
	text-align: left;
}

.content__title--right {
	justify-items: end;
	text-align: right;
}

.content__panel {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(82vw, 900px);
	padding: 0;
	color: #fff;
	text-align: left;
	display: grid;
	gap: 0.75rem;
}

.content__panel h3 {
	margin: 0;
	font-size: clamp(2.4rem, 9vw, 5.5rem);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 300;
	line-height: 1.05;
}

.content__panel h4 {
	margin: 0.4rem 0 0.2rem;
	font-size: clamp(1rem, 2.6vw, 1.4rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.85;
	font-weight: 500;
}

.content__panel p {
	margin: 0;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(1.3rem, 3.2vw, 2rem);
	max-width: 820px;
	margin-left: 0;
	margin-right: auto;
}

.content__panel ul {
	margin: 0;
	padding: 0;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(1.15rem, 2.6vw, 1.5rem);
	max-width: 820px;
	margin-left: 0;
	margin-right: auto;
	text-align: left;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.content__panel ul li {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-height: 1.6em;
	border-top: 1px dashed rgba(255, 255, 255, 0.1);
	border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
	padding: 0.7rem 0;
}

.content__panel ul li::before {
	content: none;
}

.content__panel ul li:last-child {
	min-height: 2.4em;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.content__lede {
	letter-spacing: 0.04em;
}

.content__panel--judging {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 1.3rem;
}

.content__panel--judging > p {
	font-size: 1.3em;
	line-height: 1.7;
}

.content__panel--judging .judging-note {
	font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: clamp(1rem, 2vw, 1.25rem);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 500;
	line-height: 1.5;
}

.content__panel--left {
	left: 35%;
	transform: translate(-35%, -50%);
	text-align: left;
}

.content__panel--right {
	left: 65%;
	transform: translate(-65%, -50%);
	text-align: left;
}

.content__panel--top {
	top: 38%;
}

.content__panel--bottom {
	top: 62%;
}

.word {
	display: inline-block;
	white-space: nowrap;
}

.word__inner {
	display: inline-block;
}

.char {
	display: inline-block;
}

.char__inner {
	display: inline-block;
}

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

.grid {
	display: grid;
	place-items: center;
	padding: 2rem;
	width: 100%;
	perspective: var(--perspective);
}

.grid-wrap {
	height: var(--grid-height);
	width: var(--grid-width);
	display: grid;
	grid-template-columns: repeat(var(--grid-columns),1fr);
	gap: var(--grid-gap);
	transform-style: preserve-3d;
}

.grid__item {
	aspect-ratio: var(--grid-item-ratio);
	width: 100%;
	height: auto;
	overflow: hidden;
	position: relative;
	border-radius: 4px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: transparent;
}

.grid__item-inner {
	position: relative;
	width: calc(100% - 0.5rem);
	height: calc(100% - 0.5rem);
	border: 2px solid rgba(255, 255, 255, 0.9);
	background: transparent;
	box-shadow: 0 0 28px rgba(255, 255, 255, 0.12);
	transform: scale(var(--grid-inner-scale));
	transform-origin: center;
}

@media screen and (min-width: 53em) {
	.frame {
		grid-template-columns: auto auto auto 1fr;
		grid-template-areas: 'title prev ... sponsor';
		align-content: space-between;
		justify-items: start;
		grid-gap: 2rem;
	}
	.frame__demos {
		justify-self: end;
	}

	.content--outro {
		height: 100vh;
		justify-content: center;
	}

	.card-wrap {
		grid-template-columns: repeat(3,250px);
	}

	body #cdawrap {
	    justify-self: end;
	}
}
