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

:root {
	font-size: 12px;
	--color-text: #111;
	--color-bg: #e7e5dd;
	--color-link: #82725c;
	--color-link-hover: #000;
	--padding-page: 1.5rem;
	touch-action: pan-x pan-y;
	text-transform: uppercase;
}

body {
	margin: 0;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, 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: fixed;
	color: var(--color-title);
	padding: var(--padding-page);
	display: grid;
	grid-template-columns: auto auto auto;
	grid-template-rows: auto;
	grid-template-areas: 'title prev sponsor';
	justify-content: start;
	margin-bottom: 3rem;
	grid-gap: 2rem;
	z-index: 1000;
}

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

.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;
	align-items: start;
}

.frame__title-main {
	font-size: 1rem;
	margin: 0;
	font-weight: normal;
	max-width: 32ch;
}

.frame__title-back {
	position: relative;
	display: flex;
	align-items: flex-end;
}

.frame__title-back span {
	display: none;
}

.frame__title-back svg {
	fill: currentColor;
}

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

.page {
	width: 100%;
	height: 300vh;
}

.container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
}

.container canvas {
	touch-action: auto !important; /* overwriting threejs */
}

.ui-controls {
	position: absolute;
	bottom: 0;
	right: 0;
	user-select: none;
	text-align: end;
	min-width: 200px;
	padding: var(--padding-page);
}

.ui-controls__button {
	cursor: pointer;
	display: inline-block;
	text-align: center;
	font-size: 1.15rem;
	border: 1px solid #000;
	padding: 0.65rem 1rem;
	line-height: 1;
	cursor: pointer;
	margin: 0 0 1rem 0.5rem;
}

.ui-controls__button.disabled {
	pointer-events: none;
	cursor: auto;
	opacity: .3;
}

.lil-gui {
	--background-color: #f6f6f6;
	--text-color: #3d3d3d;
	--title-background-color: #efefef;
	--title-text-color: #3d3d3d;
	--widget-color: #eaeaea;
	--hover-color: #f0f0f0;
	--focus-color: #fafafa;
	--number-color: #07aacf;
	--string-color: #8da300;
}

@media screen and (min-width: 53em) {
	
}