/* 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: oklch(0.3 0.05 270);
	/*--accent-2: oklch(from var(--accent-1) .15 c h);*/
	--accent-strong: oklch(0.85 0.05 75 / 1);
	--accent-stronger: oklch(from var(--accent-strong) 0.75 0.13 h);
	--fill-color: oklch(from var(--accent-1) .975 calc(c / 20) calc(h + 180));
	--fill-color-2: oklch(from var(--accent-1) .95 calc(c / 15) calc(h + 180));
	--header-height: 5rem;
	/*--connection-height: 0;*/
	--text-color: oklch(.1 0 0);
	--text-color-faded: oklch(from var(--text-color) l c h / .5);
	--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 (width < 500px) {
		& {
			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;

	& > a {
		contain: size;
	}

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

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

		& a {
			padding-block: 1em;
			text-decoration: none;
			color: inherit;
		}
	}

	& .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;

		& .user {
			flex: 1 0 auto;
		}

		& .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);
		}

		& 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 (width < 800px) {
		& {
			/*grid-template: auto auto / 1fr;*/

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

			& 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);




	& 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;
		/*padding: 1rem 0 1rem 5rem;*/
		/*background-image: linear-gradient(to right, var(--accent-op-2), oklch(from var(--accent-op-2) l c h / 0));*/
		/*line-height: 1;*/

		&::before {
			--height: 1em;
			--stroke: calc(var(--height) / 2);
			--offset: calc(var(--stroke) * var(--magic-number) / 2);
			--shift-point: 40%;
			content: "";
			height: var(--height);
			/*margin-bottom: .18em;*/
			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: linear-gradient(to bottom, var(--accent-1), var(--accent-2));*/
			background: var(--accent-1);
			/*mask-image: url('../img/bars.svg');*/
			/*mask-size: 100%;*/
			/*height: 100%;*/
			/*aspect-ratio: 1 / 1;*/
		}

		/*&::after {
			scale: -1 1;
			translate: .25px 0;
		}*/

		@media (width < 500px) {
			font-size: 2.5rem;
			margin-top: 4rem;
		}
	}

	& h3.highlight {
		/*display: grid;*/
		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;

		&::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);
		}

		/*& > *, &::before {
			grid-area: 1 / -1 / 1 / -1;
		}*/
	}

}

.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;
}
