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

/* https://vegaprotocol.github.io/alpha-lyrae/ */

@font-face {
	font-family: 'AlphaLyrae';
	src: url('../fonts/AlphaLyrae-Medium.woff2') format('woff2'),
	url('../fonts/AlphaLyrae-Medium.woff') format('woff');
	font-style: normal;
}

@font-feature-values 'AlphaLyrae' { 
  @styleset { ss01: 1; ss02: 2; ss03: 3; ss04: 4; ss05: 5 } 
}

html, body {
	overflow-x: hidden;
	width: 100vw;
}

:root {
	font-size: 14px;
	--color-text: #fff;
	--color-bg: #0b0826;
	--color-bg-alt: hsl(222.55deg 100% 49.22%);
	--color-link: #fff;
	--color-link-hover: #fff;
	--color-title: #fff;
}

body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: 'Tenon', 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:focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	outline: none;
	background: lightgrey;
}

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

a: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;
}

.frame {
	position: relative;
	width: 100%;
	padding: 1rem;
	display: grid;
	grid-template-columns: 100%;
	grid-template-areas: 'title' 'back' 'prev' 'sponsor';
	grid-gap: 0.5rem;
	justify-items: start;
	align-self: start;
	justify-self: start;
	pointer-events: none;
	align-items: center;
}

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;
	font-size: inherit;
	margin: 0;
	font-weight: inherit;
}

.frame__prev {
	grid-area: prev;
}

.frame__credits {
	grid-area: credits;
}

.intro {
	height: calc(100vh - 3rem);
	padding-top: 10vh;
    text-align: center;
    place-items: center;
    display: grid;
    grid-template-areas: 'intro';
    margin-bottom: 80vh;
    background: linear-gradient(0deg, transparent, var(--color-bg-alt));
}

.intro__title {
	grid-area: intro;
    place-items: center;
    margin: 0;
    display: grid;
    position: relative;
    z-index: 100;
}

.intro__title-pre {
    font-size: clamp(2rem,20vw,10rem);
    color: var(--color-title);
    font-weight: 400;
    text-transform: uppercase;
    font-family: 'AlphaLyrae', sans-serif
}

.intro__title-pre::first-letter {
	font-feature-settings: 'ss01' 1;
}

.intro__title-sub {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.intro__info {
	max-width: 20ch;
    opacity: .6;
    margin-bottom: 4rem;
    padding-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    align-self: end;
}

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

.content__title {
	font-size: 2rem;
	font-weight: normal;
}

.credits {
	font-size: 2rem;
	text-align: center;
	margin: 50vh auto;
}

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

.card__title {
	font-weight: normal;
	font-size: 1.5rem;
}

.content-wrap {
	display: grid;
	gap: 40vh;
	margin-bottom: 40vh;
}

.content {
	flex: none;
	display: grid;	
	place-items: center;
	line-height: 1.2;
	grid-template-areas: 'title' 'layout' '...';
	grid-template-rows: 3.5vw auto 3.5vw;
	gap: 1rem;
}

.content--intro {
	grid-area: intro;
}

.content__img-wrap {
	grid-area: layout;
}

.content__img {
	--img-width: 60vw;
	--img-height: 40vh;
	--img-ar: auto;
	--img-inner-margin-x: 0px;
	--img-inner-margin-y: 0px;
	position: relative;
	overflow: hidden;
	display: grid;
	place-items: center;
	width: var(--img-width);
	height: var(--img-height);
	aspect-ratio: var(--img-ar);
}

.content__img--1 {
	--img-width: 70vw;
	--img-height: auto;
	--img-ar: 16/8;
}

.content__img--2 {
	--img-width: 100vw;
	--img-height: 100vh;
}

.content__img--3 {
	--img-width: 100vw;
	--img-height: 200vh;
}

.content__img--4 {
	--img-width: 40vw;
	--img-height: auto;
	--img-ar: 0.8;
}

.content__img--5 {
	--img-width: 60vw;
	--img-height: auto;
	--img-ar: 1;
}

.content__img--6 {
	--img-width: 70vw;
	--img-height: auto;
	--img-ar: 16/8;
}

.content__img-inner {
	grid-area: 1 / -1;
	width: calc(100% + var(--img-inner-margin-x) * 2);
	height: calc(100% + var(--img-inner-margin-y) * 2);
	background-size: cover;
	background-position: 50% 50%;
}

.content__img-inner--hidden {
	opacity: 0;
}

.content__text {
	font-family: 'AlphaLyrae', sans-serif;
	position: relative;
	z-index: 100;
	grid-area: title;
	text-transform: uppercase;
	font-size: clamp(2rem, 6vw, 4rem);
	margin: 0;
	display: flex;
	flex-direction: column;
	font-weight: 400;
	line-height: 0.8;
	font-family: 'AlphaLyrae', sans-serif;
}

.content__text span span {
	display: inline-block;
}

.content__text span span.whitespace {
	white-space: pre;
}

.content__text span:nth-child(3n) {
	font-feature-settings: 'ss01' 1;
}

.content__text--large {
	font-size: clamp(2rem, 7vw, 6rem);
}

.content__text--center {
	text-align: center;
	align-self: stretch;
	justify-content: space-between;
	grid-row: 1 / span 3;
}

.content__text--left {
	justify-self: start;
	padding: 3rem;
	grid-area: layout;
	align-self: center;
}

.content__text-tiny {
	text-transform: none;
	font-family: 'Tenon', sans-serif;
	font-size: 1.5rem;
	font-weight: 300;
	max-width: 400px;
	line-height: 1.2;
	margin-top: 10vh;
}

@media screen and (min-width: 53em) {
	.frame {
		grid-template-columns: 1fr auto auto auto;
		grid-template-areas: 'title back prev sponsor';
		justify-items: start;
		grid-gap: 2rem;
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
	}

	.frame__prev {
		justify-self: end;
	}

	.title {
		font-size: clamp(2rem,15vw,9rem);
	}

	.content__img--4 {
		--img-width: 30vw;
	}

	.content__img--5 {
		--img-width: 40vw;
	}

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

	body #cdawrap {
	    justify-self: end;
	}

}
