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

:root {
	font-size: 15px;
}

body {
	margin: 0;
	--color-text: #000;
	--color-text-alt: #3e4843;
	--color-heading-main: #000;
	--color-heading-main-alt: #fff;
	--color-heading-sub: #374b41;
	--color-menu: #7ec59d;
	--color-menu-hover: #128b47;
	--color-bg: #4f6c5e;
	--color-bg-menu: #000;
	--color-link: #000;
	--color-link-alt: #3e4843;
	--color-link-hover: #000;
	--color-link-alt-hover: #fff;
	color: var(--color-text);
	background-color: var(--color-bg-menu);
	font-family: meno-banner, serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow: 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;
	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;
}

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 #fff;
	background: transparent;
}

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

.unbutton:focus {
	outline: none;
}

.hover-line {
	white-space: nowrap;
	overflow: hidden;
	position: relative;
	display: inline-block;
}

.hover-line::before {
	content: '';
	height: 1px;
	width: 100%;
	background: currentColor;
	position: absolute;
	top: 92%;
	transition: transform 0.3s;
	transform-origin: 0% 50%;
}

.hover-line:hover::before {
	transform: scaleX(0);
	transform-origin: 100% 50%;
}

main {
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: 100vh;
}

.frame {
	grid-area: 1 / 1 / 2 / 2;
	z-index: 100;
	display: grid;
	align-content: space-between;
	align-items: center;
	height: 100vh;
	padding: 1rem 1rem 0.5rem 1rem;
	pointer-events: none;
	font-size: 1rem;
	grid-template-columns: repeat(4,25%);
	grid-template-rows: auto auto 1fr auto;
	grid-template-areas: 'author heading heading button'
						'... ... ... ...'
						'links links links links'
						'title title title title';	
}

.frame--menu-open {
	color: var(--color-text-alt);
	--color-link: var(--color-link-alt);
	--color-link-hover: (--color-link-hover-alt);
	--color-heading-main: var(--color-heading-main-alt);
}

.frame__title {
	grid-area: title;
	font-size: inherit;
	font-weight: normal;
	margin: 0.5rem 0 0;
	justify-self: center;
}

.frame__links {
	grid-area: links;
	display: flex;
	flex-wrap: wrap;
	justify-self: center;
	align-self: end;
}

.frame__links a {
	margin: 0 0.5rem;
}

.frame__author {
	margin: 0;
	grid-area: author;
}

.frame__button {
	justify-self: end;
	grid-area: button;
}

.frame--menu-open .frame__author {
	opacity: 0;
	pointer-events: none;
}

.frame__heading {
	grid-area: heading;
	text-align: center;
	margin: 0;
	display: flex;
	flex-direction: column;
	white-space: nowrap;
	justify-self: center;
}

.frame__heading-main {
	line-height: 0.8;
	display: block;
	font-size: 1.5rem;
	color: var(--color-heading-main);
}

.frame__heading-sub {
	font-size: 0.75rem;
	line-height: 1;
	color: var(--color-heading-sub);
}

.frame--menu-open .frame__heading-sub {
	pointer-events: none;
	opacity: 0;
}

.frame a,
.frame button {
	pointer-events: auto;
}

.content {
	grid-area: 1 / 1 / 2 / 2;
	display: flex;
	flex-direction: column;
	width: 100vw;
	position: relative;
	align-items: center;
	height: 100vh;
	justify-content: center;
}

.content__title {
	font-weight: 400;
	text-align: center;
	font-size: 7.5vw;
	line-height: 0.75;
	cursor: default;
	margin: 10vh 0 0 0;
}

.menu-wrap {
	grid-area: 1 / 1 / 2 / 2;
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: 100vh;
	position: relative;
	background: var(--color-bg-menu);
	pointer-events: none;
	opacity: 0;
}

.menu-wrap.menu-wrap--open {
	pointer-events: auto;
	opacity: 1;
}

.overlay {
	grid-area: 1 / 1 / 2 / 2;
	position: relative;
	z-index: 1000;
	pointer-events: none;
	width: 100%;
	height: 100%;
}


.tiles {
	position: absolute;
	left: 50%;
	top: 50%;
	/* width: 100vw; */
	height: 150vh;
	display: flex;
	opacity: 0.5;
	flex-direction: column;
	justify-content: center;
	transform: translate3d(-50%,-50%, 0) rotate(22.5deg);
}

.tiles__line {
	display: flex;
	width: max-content;
	will-change: transform;
	backface-visibility: hidden;
	transform: translate3d(25%, 0, 0);
	animation: runner 10s linear infinite;
}

.tiles__line:nth-child(2) {
	animation: runner 16s linear infinite;
}

.tiles__line:nth-child(3) {
	animation: runner 22s linear infinite;
}

@keyframes runner {
	to {
		transform: translate3d(-25%, 0, 0);
	}
}

@media screen and (max-width: 768px) {
	.tiles__line {
		animation: none;
		transform: translate3d(0, 0, 0);
	}

	.tiles__line--mobile-loop {
		transform: translate3d(0, 0, 0);
		animation-name: runner-mobile;
	}

	.tiles__line--mobile-raf {
		animation: none !important;
		transform: translate3d(0, 0, 0);
	}

	.tiles__line-img {
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
		-webkit-mask-image: -webkit-radial-gradient(white, black);
	}

	@keyframes runner-mobile {
		to {
			transform: translate3d(calc(-1 * var(--mobile-loop-distance, 0px)), 0, 0);
		}
	}
}

.tiles__line-img {
	--tile-margin: 3vw;
	flex: none;
	width: 30vh;
	height: 30vh;
	margin: var(--tile-margin);
	background-size: cover;
	background-position: 50% 50%;
	border-radius: 50%;
}

.tiles__line-img--large {
	width: 100vh;
	border-radius: 20vh;
}

@media screen and (min-width: 53em) {
	.frame {
		grid-template-columns: 390px 1fr 390px;
		grid-template-areas: 'author heading button'
							'... ... ...'
							'title links links';	
		font-size: 1.5rem;
	}
	.frame__title {
		justify-self: start;
		align-self: end;
		margin: 0 3rem 0 0;
	}
	.frame__links {
		display: flex;
		justify-self: start;
		padding: 0;
	}
	.frame__links a:not(:last-child) {
		margin-right: 0.5rem;
	}
	.frame__heading-main {
		font-size: 2.15rem;
	}
	.frame__heading-sub {
		font-size: 1rem;
	}
}
