@font-face {
	font-family: "Satoshi";
	font-style: normal;
	font-weight: 300 900;
	src: url("../fonts/Satoshi-Variable.woff2");
}

:root {
	--m-hair-line: .0625rem;
	--m-thin-line: .125rem;
	--m-medium-line: .175rem;
	--m-thick-line: .2625rem;
	--m-measure: 1.5rem;
	--m-measure-half: calc(var(--m-measure) / 2);
	--m-measure-double: calc(var(--m-measure) * 2);
	--m-measure-quad: calc(var(--m-measure) * 4);
	--font-alt: "Satoshi", monospace;
	--font-default: "Satoshi", sans-serif;
	--font-display: var(--font-default);
	--font-small: var(--font-default);
	--font-text: var(--font-default);
	
	--ls-uppercase: .7em;
	
	--inline-text-box-padding: .125em 0 .225em;
	
	--text-base-size-int: 16;
	--text-base-size: calc( var(--text-base-size-int) * 1px );

	--font-size-scale: 1.175;
	--font-size-small-scale: 1.15;
	--fs-l-1: calc(1rem * var(--font-size-scale));
	--fs-l-2: calc(var(--fs-l-1) * var(--font-size-scale));
	--fs-l-3: calc(var(--fs-l-2) * var(--font-size-scale));
	--fs-l-4: calc(var(--fs-l-3) * var(--font-size-scale));
	--fs-s-1: calc(1em / var(--font-size-small-scale));
	--fs-s-2: calc(var(--fs-s-1) / var(--font-size-small-scale));
	--fs-font-alt: .975em;
	
	--scroll-progress: 0;
}

@supports (letter-spacing: 1%) {
	:root {
		--ls-uppercase: 7%;
	}
}

@media (min-width:30em) {
	:root {
		--font-size-scale: 1.225;
	}
}

@media (min-width:40em) {
	:root {
		--text-base-size-int: 18;
		--m-measure: 4vw;
	}
}

@media (min-width:50em) {
	:root {
		--font-size-scale: 1.25;
	}
}

@media (min-width:60em) {
	:root {
		--text-base-size-int: 20;
	}
}

@media (min-width:70em) {
	:root {
		--font-size-scale: 1.333;
	}
}

@media (min-width:80em) {
	:root {
		--text-base-size-int: 22;
	}
}

@media (min-width:100em) {
	:root {
		--font-size-scale: 1.375;
	}
}

/*@media (min-width:100em) {
	:root {
		--text-base-size-int: 24;
	}
}*/

:root {
	--c-text: #000;/*#404040*/
	
	--m-page-margin: min(50px, max(.5rem, 2.5vw));
	
	--video-height: min(50vh, calc( 100vh - 10em ), 100vw);
	
	--ease-in-back: cubic-bezier(0.36, 0, 0.66, -0.56);
	--ease-in-cubic: cubic-bezier(0.32, 0, 0.67, 0);
	--ease-in-sine: cubic-bezier(0.12, 0, 0.39, 0);
	--ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);
}

html {
	font-size: var(--text-base-size);
	margin: 0;
	overflow-y: scroll;
	overflow-x: clip;
	padding: 0;
}

@supports (scrollbar-gutter: stable) {
	html {
		overflow-y: auto;
		scrollbar-gutter: stable;
	}
}

html {
	background-color: #eaeaea;
	z-index: 1;
}

body {
	--grid-line: 1px;
	--grid-size: calc( var(--m-page-margin) * 2 + var(--grid-line) / 2 );
	--grid-color: #aaa3;
	--offset-y: 0;
	
	background-image:
		linear-gradient(to right, var(--grid-color) var(--grid-line), transparent var(--grid-line)),
		linear-gradient(to bottom, var(--grid-color) var(--grid-line), transparent var(--grid-line));
	background-position: calc(-1 * var(--grid-line)) var(--offset-y);
	background-size: var(--grid-size) var(--grid-size);
	color: var(--c-text);
	font-family: var(--font-text);
	font-size: clamp(.875em, 2.5vw, 2em);
	font-size: var(--text-base-size);
	font-weight: 450;
	line-height: 1.4;
	letter-spacing: .02em;
	letter-spacing: 2%;
	letter-spacing: normal;
	margin: 0;
	overflow-x: clip;
	padding: 0 var(--m-page-margin);
	text-wrap: pretty;
	z-index: 3;
}

.logo {
	font-size: max(1.25em, min(3.5vw, 2em));
	font-weight: bold;
	height: 1.5em;
	margin: 0;
	overflow: hidden;
	text-align: center;
}

.logo::before {
	background: url("../img/logo-crop.svg") no-repeat left top;
	background-size: contain;
	content: "";
	display: block;
	height: 1em;
	margin: 0 0 2em;
}

h1.logo {
	left: 0;
	margin: var(--m-page-margin);
	pointer-events: none;
	position: fixed;
	top: 0;
	right: 0;
	z-index: 3;
}

h1,
h2,
h3 {
	font-size: var(--fs-l-2);
	font-family: var(--font-display);
	font-weight: normal;
	line-height: 1.05;
	letter-spacing: normal;
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-l-3);
	font-weight: 600;	
}

h3 {
	font-size: 1em;
	margin: 1em 0 .125em;
}

@media (min-height:30em) {
	html:has(.snap-near) {
		scroll-snap-type: y proximity;
	}
	
	html:has(.snap-force) {
		scroll-snap-type: y mandatory;
	}
	
	.snappy .section,
	.snappy main > h2 {
		scroll-snap-align: center;
	}
	
	.snap-force .section,
	.snap-force main > h2 {
		display: flex;
		flex-direction: column;
		justify-content: center;
		min-height: 100vh;
	}
	
	.snap-force main > h2,
	.snap-force .page > h2:last-child {
		justify-content: flex-end;
		padding-bottom: 1em;
	}
	
	.snap-force .section:first-of-type p:first-of-type {
		margin-bottom: 3em;
	}
	
	.snap-force footer {
		scroll-snap-align: end;
	}
}

.home .section,
.home p:not(.section p) {
	margin-bottom: 0;
	margin-right: 10%;
	margin-top: 45vh;
	min-height: 5em;
}

.home .section:last-of-type + * {
	margin-top: 45vh;
}

.home .page > :last-child {
	margin-bottom: 0;
	padding-bottom: calc( 1em + var(--video-height) );
}

.home .section:first-of-type,
.home .section:nth-of-type(2) {
	font-size: var(--fs-l-1);
}

.home .section:first-of-type {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	margin-top: calc( -1 * var(--video-height) );
}

.home .section:first-of-type p:first-of-type {
	margin-top: calc( 1em + 10vw );
	margin-bottom: 1em;
}

@media (min-width:40em) {
	.home h2 {
		font-size: var(--fs-l-3);
	}
}

@media (min-width:50em) {
	
	.section:first-of-type,
	.section:nth-of-type(2) {
		font-size: var(--fs-l-2);
	}
}

@media (min-width:70em) {
	.home h2 {
		font-size: var(--fs-l-4);
	}
}

@media (min-width:40em) {
	.home .section:first-of-type {
		box-sizing: border-box;
		margin-top: -80vh;
		min-height: 80vh;
		padding-bottom: calc( var(--m-page-margin) + 2rem );
	}
	
	.home .page > :last-child {
		padding-bottom: 0;
	}
}

p {
	max-width: 24em;
	text-wrap: balance;
}

.section:first-of-type {
	text-wrap: pretty;
}

li {
	line-height: 1.3;
	margin-bottom: .25em;
	text-wrap: balance;
}

ul {
	list-style-type: "→ ";
	list-style-position: outside;
	margin-left: .75em;
	padding-left: 0;
}

ul li {
	padding-left: .75em;
}

.screen-reader-text {
	color: transparent;
	clip-path: inset(0 0);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

.vcard a {
	color: inherit;
	text-decoration: none;
}

h2 {
	max-width: 10em;
}

@media (min-width:40em) {
	.home .page > h2:last-child {
		margin-bottom: 0;
		padding-bottom: .75em;
	}
}

footer {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	position: relative;
}

footer .logo {
	bottom: 0;
	font-size: 1.5em;
	left: 0;
	margin: 2em 0;
	position: absolute;
	z-index: 2;
	
	::before {
		margin: 0;
		transform: translateX(-10%);
	}
}

footer .contacts {
	background-color: #fcfcfc;
	margin: 0;
	padding: var(--m-page-margin) 0 calc( var(--m-page-margin) + 3em );
	position: relative;
	z-index: 1;
	
	&::before {
		background-color: inherit;
		content: "";
		inset: 0;
		margin: 0 calc( -1 * var(--m-page-margin) );
		position: absolute;
		width: 100vw;
		z-index: -1;
	}
}

@media (min-width:25em) {
	footer .contacts {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		line-height: 1.35;
		padding-bottom: 3em;
		padding-top: calc( var(--m-page-margin) - 1rem );
		
		div {
			grid-column: 2;
		}
		
		.instructions {
			grid-column: 1;
			padding-right: max(1em, 5vw);
			text-wrap: balance;
		}
		
		& > :first-child + div,
		h3 {
			margin-top: 0;
			padding-top: 1rem;
			text-box: trim-start cap alphabetic;
		}
	
		h3:first-of-type {
			break-before: column;
		}
	}
}

@media (min-width:60em) {
	footer .contacts {
		columns: none;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		
		div {
			grid-column: auto;
		}
	}
}

.video {
	--video-height: 100vh;
	aspect-ratio: 1/1;
	aspect-ratio: auto;
	display: block;
	height: var(--video-height);
	margin: 0;
	min-height: var(--video-height);
	mix-blend-mode: multiply;
	opacity: .75;
	overflow-x: clip;
	position: sticky;
	right: 0;
	top: calc( 100vh - var(--video-height) );
	-webkit-user-select: none;
	user-select: none;
	width: 100vw;
	will-change: opacity;
	z-index: 2;
}

/* Fade in for mobile to hide desktop sized poster image */
/*@media (max-width:39.999em) {
	.video:not(.autoplay .video) {
		opacity: min(.35, calc(var(--scroll-progress) * 50));
		will-change: opacity;
	}
}*/

.fullscreen-mobile .video {
	aspect-ratio: auto;
	min-height: var(--video-height);
	object-fit: cover;
	object-position: right center;
}

.fullscreen-mobile .video :is(img, video, svg) {
	aspect-ratio: auto;
	display: block;
	height: 100%;
	left: auto;
	margin-left: auto;
	object-position: right center;
	right: 0;
	width: auto;
}

.video :is(img, video, svg) {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.video :is(img, video, svg) {
	height: 100vw;
	max-width: none;
	max-height: none;
	position: absolute;
	bottom: 0;
	top: auto;
	left: 0;
	margin: 0;
	width: 100vh;
}

/* Full-screen translucent video in mobile */
@media (max-width:39.999em) {
	.fullscreen-mobile .video {
		height: 110vh;
		margin-left: calc(-5em - 10vh );
		opacity: .35;
		top: 0;
		width: calc( 100vw + 5em + 10vh );
		z-index: -1;
	}
	
	.autoplay .video {
		margin-left: calc( -7em - 40vh );
		width: calc( 100vw + 7em + 40vh );
	}
	
	.fullscreen-mobile .video :is(img, video, svg) {
		left: 0;
		object-position: left center;
		width: 100%;
		z-index: -1;
	}
}

@media (min-width:40em) {
	.video {
		aspect-ratio: auto;
		bottom: 0;
		height: auto;
		left: 0;
		margin-left: calc(var(--m-page-margin) * -1);
		min-height: 100svh;
		position: sticky;
		right: 0;
		top: 0;
		width: 100vw;
		z-index: -1;
	}
	
	.video :is(img, video, svg) {
		height: 100vh;
		width: 100%;
	}
	
	.home .section,
	.home p:not(.section p) {
		margin-right: 50vw;
	}
}

.opaque .video {
	mix-blend-mode: normal;
	opacity: 1;
}

[data-media-type="video"] #image,
[data-media-type="image"] #video {
	display: none;
}

svg image {
	object-fit: cover;
	min-height: 100%;
	width: 100%;
}

/* ! Interaction --------------------------------------------- */

:root {
	--scroll-position: 0;
}

.home::before {
	bottom: 0;
	content: "0" attr(data-current-section) "/" "0" attr(data-number-of-sections);
	display: block;
	font-family: var(--font-alt);
	font-size: var(--fs-s-1);
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	left: 0;
	letter-spacing: 5%;
	margin: 1.25em var(--m-page-margin);
	position: fixed;
	z-index: 8;
}

:root {
	--ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes fade-in-out {
	0% {
		opacity: 0;
	}
	15% {
		opacity: 1;
	}
	85% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes fade-in {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

@keyframes fade-out-up {
	0% {
		opacity: 1;
		transform: translateY(0);
	}
	100% {
		opacity: 0;
		transform: translateY(-3em);
	}
}

@keyframes logo-fade {
	0% {
		opacity: 1;
	}
	90% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes fade-up {
	0% {
		opacity: 0;
		transform: translateY(3em);
	}
	30% {
		opacity: 1;
		transform: translateY(0em);
	}
	75% {
		opacity: 1;
		transform: translateY(0em);
	}
	100% {
		opacity: 1;
		transform: translateY(0em);
	}
}

@keyframes fade-up-out {
	0% {
		opacity: 0;
		transform: translateY(3em);
	}
	30% {
		opacity: 1;
		transform: translateY(0em);
	}
	60% {
		opacity: 1;
		transform: translateY(0em);
	}
	95% {
		opacity: 0;
		transform: translateY(-3em);
	}
}

@keyframes grow {
	0% {
		transform: scaleX(0);
	}
	100% {
		transform: scaleX(1);
	}
}

.section:not(:first-of-type) {
	animation: fade-up 2s ease-in-out forwards;
	opacity: 0;
}

.section ul {
	--initial-delay: 2s;
}

.section ul::before {
	animation: grow .75s forwards 1 ease-out;
	animation-delay: var(--initial-delay);
	border-top: var(--m-hair-line) solid;
	content: "";
	display: block;
	margin-bottom: 1em;
	margin-left: -.75em;
	max-width: 20em;
	transform-origin: left;
	transform: scaleX(0);
}

.section ul li {
	--index: 1;
	--incremental-delay: .2s;
	animation: fade-up 2s ease-in-out forwards;
	animation-delay: calc( var(--initial-delay) + var(--index) * var(--incremental-delay) );
	animation-duration: .75s;
	opacity: 0;
}

.section ul li:nth-child(2) {
	--index: 2;
}

.section ul li:nth-child(3) {
	--index: 3;
}

.section ul li:nth-child(4) {
	--index: 4;
}

.section ul li:nth-child(5) {
	--index: 5;
}

.section ul li:nth-child(6) {
	--index: 6;
}

.section ul li:nth-child(7) {
	--index: 7;
}

.section ul li:nth-child(8) {
	--index: 8;
}

.section ul li:nth-child(9) {
	--index: 9;
}

.section ul li:nth-child(10) {
	--index: 10;
}

.section ul li:nth-child(11) {
	--index: 11;
}

.section ul li:nth-child(12) {
	--index: 12;
}

.section > h2 {
	animation-delay: .5s;
}

.section > h2 + * {
	animation-delay: 1.5s;
}

@property --scale {
	syntax: '<number>';
	inherits: false;
	initial-value: 1;
}

@property --offset-x {
	syntax: '<length-percentage>';
	inherits: false;
	initial-value: 0;
}

@property --offset-y {
	syntax: '<length-percentage>';
	inherits: false;
	initial-value: 0;
}

@keyframes slide-up {
	0% {
		--offset-y: 0;
	}
	100% {
		--offset-y: 100vh;
	}
}

@supports (animation-timeline: scroll()) {
	
	.home {
		animation: slide-up 100s linear;
		animation-duration: auto;
		animation-timeline: scroll();
	}
	
	/* ! Progress indicator */
	.home::after {
		animation: grow-progress 1 linear both;
		animation-timeline: scroll(root block);
		border-top: .125em solid var(--c-text);
		bottom: 0;
		display: block;
		content: "";
		font-size: var(--fs-s-1);
		left: 0;
		margin: 1em var(--m-page-margin);
		position: fixed;
		transform: scaleX(0);
		transform-origin: left;
		width: calc( 100% - var(--m-page-margin) * 2 );
		z-index: 9;
	}
	@keyframes grow-progress {
		0%   { transform: scaleX(0); }
		100% { transform: scaleX(1); }
	}
	
	.section:not(:first-of-type) {
		animation-name: fade-up-out;
		animation-timeline: view();
		animation-range: entry 30% exit 80%;
		animation-duration: auto;
	}
	
	.section:not(:first-of-type) > * {
		animation-fill-mode: forwards;
		animation-name: fade-in-out;
		animation-timeline: view();
		animation-range: entry 0% exit 20%;
		animation-duration: auto;
	}
	
	.section:first-of-type {
		animation: fade-in reverse 1s linear;
		animation-timeline: view();
		animation-range: contain 100% exit 90%;
		animation-duration: auto;
	}
}

/* ! Content Page */

main article {
	padding: var(--m-measure-quad) 0;
}

main article h1 {
	margin: 1em 0 var(--m-measure);
}

main article h2 {
	margin: 1.5em 0 .5em;
}

main article .lead {
	font-size: var(--fs-l-1);
	font-weight: 600;
	line-height: 1.375;
	margin: 1.5em 0;
	max-width: 35ch;
	text-wrap: balance;
}

main article p,
main article li {
	line-height: 1.45;
	max-width: 35rem;
	text-wrap: pretty;
}

main article ul {
	padding-left: .5em;
}

main article li {
	line-height: 1.375;
}

main article a {
	color: inherit;
	text-decoration-color: #aeb6b9;
	text-decoration-skip-ink: none;
	text-decoration-thickness: var(--m-medium-line);
	transition: text-decoration-color .25s, opacity .2s;
}

main article a:hover {
	opacity: .66;
	text-decoration-color: #8b9a9a;
}

/* ! Navigation */

nav {
	font-size: var(--fs-s-1);
}

nav a {
	font-weight: 500;
	text-decoration: none;
}

article nav:first-child a:only-child::before {
	content: "← ";
	vertical-align: top;
}