:root {
	--background: #0B130B;
	--content-background: #253425;

	--text-color: #FFFFFF;
	--title-color: #EFA944;

	--max-width: 1680px;
	--max-width-unitless: 1680;
	--max-footer-width: 80rem;
	--max-nav-padding-unitless: 120;
	--max-nav-padding: 120px;
	--max-nav-padding-switch: 600;

	--ratio: 1.5;
	--s-5: calc(var(--s-4) / var(--ratio));
	--s-4: calc(var(--s-3) / var(--ratio));
	--s-3: calc(var(--s-2) / var(--ratio));
	--s-2: calc(var(--s-1) / var(--ratio));
	--s-1: calc(var(--s0) / var(--ratio));
	--s0: 1rem;
	--s1: calc(var(--s0) * var(--ratio));
	--s2: calc(var(--s1) * var(--ratio));
	--s3: calc(var(--s2) * var(--ratio));
	--s4: calc(var(--s3) * var(--ratio));
	--s5: calc(var(--s4) * var(--ratio));
}

* {
	box-sizing: border-box;
}

body {
	font-family: Prompt, sans-serif;

	background: var(--background);
	color: var(--text-color);

	margin: 0; padding: 0;
}

h1, h2, h3, h4, h5 {
	font-family: Josefin Slab, serif;
	color: var(--title-color);
}

h1 {
	font-weight: 700;
	font-size: 3rem;
	font-size: calc(1.5vw + 1.7rem);
	line-height: 1.5em;

	margin-top: var(--s3);
	margin-bottom: var(--s0);
}

a {
	color: var(--text-color);
}

.nav-background {
	position: sticky;
	top: 0;
	background: var(--content-background);

	z-index: 1;
}

nav {
	overflow: auto;

	max-width: var(--max-width);
	margin: 0 auto;
	height: 80px;

	display: flex;
	justify-content: space-between;
	align-items: center;

	padding: var(--s0) var(--max-nav-padding);
	padding: var(--s0)
		calc(
			clamp(
				var(--s0),
				var(--max-nav-padding-unitless) * (100vw - 1px * var(--max-nav-padding-switch)) / (var(--max-width-unitless) - var(--max-nav-padding-switch)),
				var(--max-nav-padding)
			)
		);
}

nav a {
	display: inline-block;
	font-size: 1.125rem;

	text-decoration: none;

	transition: color 0.25s ease-in-out;
}

nav a:hover {
	color: #F7D29C;
}

nav a.active {
	color: #EFA944;
}

nav a.primary {
	flex: 0.7;
	text-align: center;
}

nav a img {
	max-height: 2em;
}

nav a .underline {
	height: 2px;
	background: transparent;
}

nav a.active .underline {
	height: 2px;
	background: #EFA944;
}

.content {
	background: var(--content-background);
}
.content.dark {
	background: var(--background);
}
.content.dark .nav-background {
	background: var(--background);
}
.content-width {
	max-width: var(--max-width);
	margin: 0 auto;

	padding-left: var(--s-1);
	padding-right: var(--s-1);
	padding-bottom: var(--s4);
}

.content-width p {
	max-width: 70ch;
}

.hero-title {
	text-align: center;

	display: flex;
	flex-direction: column;
	justify-content: center;

	min-height: 10rem;
	min-height: 50vh;
	min-height: calc(50vh - var(--s2));
}

.hero-title h3 {
	text-transform: uppercase;
}

.hero-title img {
	max-width: 80vw;
}

.hero-teaser a {
	position: relative;

	box-sizing: border-box;
	display: flex;

	width: 100%;
	height: 85vh;

	background-size: cover;
	background-position: 50% 30%;

	align-items: flex-end;

	text-decoration: none;
}

.hero-teaser a .title {
	flex: 1;
	padding: var(--s0);
	padding-top: var(--s2);
	display: block;
	background: rgba(0,0,0,0.2);
	background: linear-gradient(360deg, rgba(0, 0, 0, 0.4) 0%, rgba(217, 217, 217, 0) 100%, rgba(0, 0, 0, 0) 100%);
}

.hero-teaser a .corner {
	position: absolute;

	bottom: 0;
	right: 0;

	background: #ebefeb;
	padding: var(--s0);

	line-height: 0;
	border-radius: var(--s0) 0 0 0;

	transform: scale(0.0);
	transform-origin: bottom right;
	transition:
		transform 0.25s ease-in-out;

	box-shadow: -1px -1px 10px rgba(0,0,0,0.1);
}

.hero-teaser a:hover .corner {
	transform: scale(1);
}

.tags {
	margin-bottom: var(--s0);
}
.tags a {
	display: inline-block;
	text-decoration: none;

	border: 1px solid #fff;
	border-radius: var(--s2);
	padding: var(--s-1) var(--s1);

	margin-bottom: var(--s-1);
	margin-right: var(--s-1);

	transition: background 0.25s ease-in-out;
}

.tags a:hover {
	background: #EBEFEB;
	color: #000;
}
.tags a.active {
	background: #fff;
	color: #000;
}

.single-page-tags {
	margin-top: var(--s0);
	font-size: 0.9em;
}
.single-page-tags a {
	padding: var(--s-3) var(--s0);
	border: 0;
}

article.single {
	text-align: center;
	padding-top: var(--s2);
}

article.single p {
	text-align: left;

	margin-left: auto;
	margin-right: auto;
}

article.single p:has(img) {
	margin: 0 auto;
	text-align: center;
}

article.single img {
	max-height: 85vh;
}

article.single {
	position: relative;
}

article.single .single-footer {
	margin-top: var(--s3);
}
.dark .content-width {
	padding-bottom: 0;
}

article.single .back {
	/* TODO fix positioning for this */
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--s-2);

	text-decoration: none;
}
article.single .back svg {
	fill: #EBEFEB;
}
article.single .back:hover {
	color: #F7D29C;
}
article.single .back:hover svg {
	fill: #F7D29C;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-gap: var(--s0);

	margin-top: var(--s2);
}
.gallery a:first-child {
	grid-column: 1/3;
}
@media (max-width: 60rem) {
	.gallery {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 40rem) {
	.gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

.gallery a {
	position: relative;
	background-size: cover;
	background-position: 50% 30%;
	height: 25ch;
	height: 35vh;

	border-radius: var(--s0);
}

.gallery a .title {
	position: absolute;
	left: 0; bottom: 0; right: 0;
	background: #394739e8;
	padding: var(--s0) var(--s1);

	display: flex;
	justify-content: space-between;

	color: #fff;
	transition:
		color 0.25s ease-in-out,
		background 0.25s ease-in-out;

	border-radius: 0 0 var(--s0) var(--s0);
}

.gallery a:hover .title {
	position: absolute;
	left: 0; bottom: 0; right: 0;
	color: #000;
	background: #B9C0B9;
	padding: var(--s0) var(--s1);
}
.gallery a .title svg {
	fill: transparent;
	transition: fill 0.25s ease-in-out;
}
.gallery a:hover .title svg {
	fill: #253425;
}

/* common stuff */

article {
	position: relative;
}

.side-by-side {
	display: flex;
	gap: var(--s0);
}
.side-by-side {
	padding: var(--s0)
		calc(
			clamp(
				var(--s0),
				var(--max-nav-padding-unitless) * (100vw - 1px * var(--max-nav-padding-switch)) / (var(--max-width-unitless) - var(--max-nav-padding-switch)),
				var(--max-nav-padding)
			)
		);
}

.side-by-side > * {
	flex: 1;
}
.sticky {
	position: sticky;
	top: var(--s4);
}
.flex-center {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.about-page {
	/* HACK: negate content-width padding */
	margin-left:  calc(-1 * var(--s-1));
	margin-right: calc(-1 * var(--s-1));
}
.about-page-portrait {
	width: 100%;
	max-height: 35vh;
	min-height: 35ch;
	object-fit: cover;
	object-position: 35% 35%;
	border-radius: var(--s0);

	margin-top: calc(var(--s3) + 0.5em);
	margin-bottom: var(--s1);
}

.contact-page .side-by-side {
	min-height: 50vh;
	align-items: center;
}

.contact-page-email a {

	text-decoration: underline solid 2px;
}

.inline-socials {
	display: inline-block;
	vertical-align: middle;
}

.inline-socials > a {
	position: relative;
	display: inline-block;
	box-sizing: border-box;

	background: transparent;
	border-radius: var(--s-2);
	padding: var(--s-2);
	transition: background 0.25s ease-in-out;

	width:  var(--s2);
	height: var(--s2);
	margin-left: var(--s0);
}

.inline-socials > a svg {
	position: absolute;
	display: block;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);

	fill: #EBEFEB;
	transition: fill 0.25s ease-in-out;
}
.inline-socials > a:hover {
	background: #EBEFEB;
}
.inline-socials > a:hover svg {
	fill: #253425;
}

@media (max-width: 50rem) {
	.side-by-side {
		display: block;
	}
	.about-page-portrait {
		margin-top: var(--s2);
	}
}

/* pagination */

.paginator {
	margin-top: var(--s2);

	display: flex;
	gap: var(--s-2);

	justify-content: center;
}
.paginator a {
	display: block;

	background: #394739;
	border-radius: var(--s-2);
	padding: var(--s-2) var(--s-1);
	transition: background 0.25s ease-in-out;

	text-decoration: none;

	min-width: var(--s0);
	text-align: center;
}
.paginator a:hover, .paginator a.active {
	background: #EBEFEBA0;
	color: #253425;
}
.paginator a.disabled {
	background: transparent;
	color: inherit;
}

/* footer stuff */

footer {
	max-width: var(--max-footer-width);
	margin: 0 auto;

	padding: var(--s-1);
	padding-top: 0;

	margin-top: var(--s4);
	margin-bottom: var(--s4);

	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--s-1);

	grid-template:
		"portrait about   works  back-top" /* var(--s4) */
		"portrait about   works  message"  /* var(--s4) */
		"portrait about   store  message"  /* var(--s4) */
		"socials  socials store  message"  /* var(--s4) */
}

@media (max-width: 60rem) {
	footer {
		grid-template:
				"portrait about   "
				"portrait about   "
				"portrait about   "
				"socials  socials "
				"works  back-top  "
				"works  message   "
				"store  message   "
				"store  message   "
	}
}
@media (max-width: 40rem) {
	footer {
		grid-template:
				"portrait"
				"about"
				"message"
				"socials"
				"works"
				"store"
				"back-top"
	}
}

footer > * {
	background: #EBEFEB1A;
	border-radius: var(--s-2);
	padding: var(--s0);
	min-height: var(--s4);
	contain: paint;
}

footer .portrait {
	position: relative;
	grid-area: portrait;

	display: flex;
	flex-direction: column;
	justify-content: flex-end;

	text-transform: uppercase;
	font-size: 1.5rem;

	line-height: 1.25em;

	padding: var(--s2) var(--s0);
}

footer .portrait img {
	position: absolute;
	left: 0; top: 0; bottom: 0; right: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: 30% 27%;
	opacity: 0.5;
	pointer-events: none;
	z-index: -1;
}

footer .about {
	grid-area: about;

	font-size: 1rem;
	font-weight: 300;

	padding: var(--s2) var(--s0);
}

footer .socials {
	background: none;

	grid-area: socials;

	display: grid;
	grid-auto-flow: column;
	gap: var(--s-1);
	padding: 0;
}

footer .socials > a {
	background: #EBEFEB1A;
	border-radius: var(--s-2);

	flex: 1;

	display: flex;
	justify-content: center;
	align-items: center;

	padding: var(--s1);

	transition: background 0.25s ease-in-out;
}

footer .socials > a svg {
	fill: #EBEFEB;
	transition: fill 0.25s ease-in-out;
}
footer .socials > a:hover {
	background: #EBEFEB;
}
footer .socials > a:hover svg {
	fill: #253425;
}

footer .works {
	grid-area: works;

	display: flex;
	position: relative;

	max-width: 100%;

	padding: 0;
}

footer .works .title {
	position: absolute;
	top: 0; left: 0; bottom: 0; right: 0;

	display: flex;
	justify-content: center;
	align-items: center;

	font-size: 1.5rem;
	font-weight: bold;
	text-transform: uppercase;
}

footer .works .column {
	flex: 1;
	background-size: cover;
	background-position: 50% 50%;
}

footer .works img {
	flex: 1;
	object-fit: cover;

	max-height: 100%;
	max-width: 100%;
}

footer .store {
	grid-area: store;

	font-size: 1.5rem;
	font-weight: bold;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;

	transition:
		background 0.25s ease-in-out,
		color 0.25s ease-in-out;
}

footer .store svg {
	fill: #EBEFEB;
	transition: fill 0.25s ease-in-out;
}
/*
footer .store:hover {
	background: #EBEFEB;
	color: #253425;
}
footer .store:hover svg {
	fill: #253425;
}*/

footer .back-to-top {
	grid-area: back-top;

	font-size: 1.5rem;
	font-weight: bold;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;

	display: flex;
	justify-content: space-around;
	align-items: center;
}

footer .message {
	grid-area: message;

	font-size: 1.5rem;
	font-weight: bold;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;

	display: flex;
	flex-direction: column;
	justify-content: space-around;
	align-items: center;
}

footer .message .email {
	font-weight: normal;
	text-transform: none;
	font-size: 1rem;
}

/* misc elements */
img, iframe, video { max-width: 100%; }