/* region fonts */
@font-face {
	font-family: "Linux Libertine";
	src: url("../fonts/LinLibertine_R.woff2") format("woff2");
}

@font-face {
	font-family: "Linux Libertine";
	font-style: italic;
	src: url("../fonts/LinLibertine_RI.woff2") format("woff2");
}

@font-face {
	font-family: "Linux Libertine";
	font-weight: bold;
	src: url("../fonts/LinLibertine_RB.woff2") format("woff2");
}

@font-face {
	font-family: "Linux Libertine";
	font-style: italic;
	font-weight: bold;
	src: url("../fonts/LinLibertine_RBI.woff2") format("woff2");
}

@font-face {
	font-family: "Linux Libertine Display";
	src: url("../fonts/LinLibertine_DR.woff2") format("woff2");
}

@font-face {
	font-family: "Ubuntu Mono";
	src: url("../fonts/UbuntuMono-R.woff2") format("woff2");
}
/* endregion */

:root {
	--accent-1: #242c47;
	--accent-2: #050920;
	--accent-strong: #e1caaa;
	--accent-stronger: #dea143;
	--fill-color: #f8f6f7;
	--fill-color-2: #f0edee;
	--header-height: 5rem;
	/* --connection-height: 0; */
	--text-color: #030303;
	--text-color-faded: #03030380;
	--magic-number: tan(22.5deg);

	font-size: 16px;
	font-family: "Poppins", sans-serif;
	font-weight: 300;
	background: var(--accent-1);
	/*background-image: linear-gradient(to bottom, var(--accent-1), var(--accent-2));*/
	background-attachment: fixed;
	color: var(--text-color);
}

@media (max-width: 500px) {
	:root {
		font-size: 12px;
	}
}

*, *::before, *::after {
	box-sizing: border-box;
	scroll-margin-top: var(--header-height);
}

body {
	height: 100vh;
	display: grid;
	grid-template-rows: 1fr auto;

	&.logged-in {
		--connection-height: 2rem;
	}
}


h1, h2, h3 {
	line-height: 1;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 500;
}

p {
	line-height: 1.75;
}

header {
	position: fixed;
	top: 0;
	height: var(--header-height);
	width: 100%;
	z-index: 1;
	background-color: var(--fill-color);
	box-shadow: var(--accent-1) 0 -20px 12px 15px;
	display: grid;
	grid-template: 1fr / auto auto;
	justify-content: space-between;
	padding: .5rem 2rem;
	align-items: center;


}

header > a {
	contain: size;
}

header > a,
header > a > svg {
	height: 100%;
}

header nav > ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	gap: 2em;
	text-transform: uppercase;
	font-weight: 300;


}

header nav > ul a {
	padding-block: 1em;
	text-decoration: none;
	color: inherit;
}

header .auth {
	font-size: smaller;
	height: var(--connection-height);
	position: absolute;
	top: 100%;
	padding: .25rem 2rem;
	background-color: var(--accent-strong);
	inline-size: 100%;
	display: flex;
	align-items: center;
	gap: 1rem;


}

header .auth .user {
	flex: 1 0 auto;
}

header .auth .dashboard {
	margin: 0;
	padding: .25em .5rem;
	background-color: oklch(from var(--accent-stronger) l c h / .5);
	border: none;
	border-radius: 1em;
	cursor: pointer;
	text-decoration: none;
	color: var(--text-color);
}

header .auth button {
	margin: 0;
	padding: .25em .5rem;
	background-color: oklch(from var(--accent-stronger) l c h / .5);
	border: none;
	border-radius: 1em;
	cursor: pointer;
}

@media (max-width: 800px) {
	header {
		/*grid-template: auto auto / 1fr;*/


	}
	header li.pc-only {
		display: none;
	}

	header nav {
		font-size: smaller;
	}
}

main {
	margin-top: calc(var(--header-height) + var(--connection-height, 0rem));
	width: calc(100% - 2em);
	max-width: 1900px;
	margin-inline: auto;
	background-color: var(--fill-color);
}

main h2.highlight {
	font-family: "Linux Libertine Display", serif;
	font-size: 3rem;
	margin: 1em auto 1em;
	font-weight: normal;
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr auto 1fr;
	text-align: center;
	align-items: baseline;
}

@media (max-width: 500px) {
	main h2.highlight {
		font-size: 2.5rem;
		margin-top: 4rem;
	}
}

main h2.highlight::before {
	--height: 1em;
	--stroke: calc(var(--height) / 2);
	--offset: calc(var(--stroke) * var(--magic-number) / 2);
	--shift-point: 40%;
	content: "";
	height: var(--height);
	clip-path: polygon(
			100% calc(100% - var(--stroke)),
			calc(100% - var(--offset)) 100%,
			calc(var(--shift-point) - var(--offset)) 100%,
			calc(var(--shift-point) - var(--stroke) - var(--offset)) 50%,
			0 calc(100% - var(--stroke)),
			0 0,
			calc(var(--shift-point) - var(--stroke) + var(--offset)) 0,
			calc(var(--shift-point) + var(--offset)) calc(100% - var(--stroke))
	);
	background: var(--accent-1);
}

main h3.highlight {
	font-family: 'Linux Libertine Display', serif;
	font-weight: normal;
	font-size: 2em;
	position: relative;
	z-index: 0;
	margin: 0 0 0 2em;
	padding-bottom: .25em;
}

main h3.highlight::before {
	--height: 100%;
	--stroke: .125em;
	--offset: calc(var(--stroke) * var(--magic-number) / 2);
	position: absolute;
	z-index: -1;
	inset: 0 0 0 -2em;
	clip-path: polygon(
			100% calc(100% - var(--stroke)),
			calc(100% - var(--offset)) 100%,
			calc(1.75em - var(--offset)) 100%,
			calc(.75em - var(--stroke) - var(--offset)) .125em,
			0 .125em,
			var(--offset) 0,
			calc(.75em - var(--stroke) + var(--offset)) 0,
			calc(1.75em  + var(--offset)) calc(100% - .125em)
	);
	content: "";
	height: var(--height);
	background: var(--accent-strong);
}

.error {
	width: fit-content;
	margin: 1rem 2rem;
	padding: .5rem;
	border: 1px solid red;
	background-color: pink;
}

footer {
	color: var(--fill-color);
	text-align: center;
	font-size: smaller;
	padding: .5rem;
}
