:root {
	--text: #e9fcfb;
	--background: #020d0d;
	--primary: #79ecea;
	--secondary: #71148a;
	--accent: #e2328d;

	--surface: #192525;

	--noise: url(../images/noise.svg);
	--controller: url(../images/controller.svg);
	--blend: overlay;
	--size-big: clamp(2rem, 3vw, 3rem);
	--size-medium: clamp(1.5rem, 2vw, 2rem);

	--text-shadow: 0 0 1rem;
	--special-shadow: var(--text-shadow) var(--accent), var(--text-shadow) var(--accent);
}

:root[data-theme="light"] {
	--text: #031615;
	--background: #f2fdfd;
	--primary: #138684;
	--secondary: #d275eb;
	--accent: #cd1d78;

	--surface: #dae6e6;

	--blend: darken;

	--special-shadow: var(--text-shadow) var(--accent);
}

@keyframes stick-drift {
	0% {
		background-position: 0 0;
	}

	100% {
		background-position: 100% 0;
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: grid;
	grid-template-rows: auto 1fr auto;
	place-items: center;
	gap: 1rem;

	background-color: var(--background);
	background-image: var(--controller);
	background-repeat: repeat;
	background-size: 5rem;
	background-blend-mode: var(--blend);

	animation: 300s linear 0s infinite forwards stick-drift;

	color: var(--text);

	font-family: "Inter", sans-serif;
	/* https://caniuse.com/mdn-css_properties_font-optical-sizing_auto */
	font-optical-sizing: auto;
}

/* Grid stuff */

header {
	grid-row: 1;
}

main {
	grid-row: 2;
}

main.four-oh-four {
	display: flex;
	flex-direction: column;
	align-items: center;
}

footer {
	grid-row: 3;
}

/* End grid stuff */

header {
	position: sticky;
	width: 100%;
	top: 0;
	border-bottom: 0.1rem solid var(--background);

	backdrop-filter: blur(1rem);
}

header nav ul {
	margin: 0;
	padding: 0.5rem;
	list-style: none;

	display: flex;
	flex-direction: row;
	justify-content: start;
	align-items: center;
	gap: 1rem;
	font-size: 1.25rem;
}

hgroup {
	display: flex;
	flex-direction: column;
	align-items: center;
}

hgroup h1 {
	margin: 0;
}

hgroup p {
	margin-top: 0;
	font-weight: 300;
}

h1 {
	font-size: var(--size-big);
	font-weight: 400;
	color: var(--primary);
}

h2 {
	font-size: var(--size-medium);
}

.special {
	font-weight: 300;
	color: var(--accent);
	text-shadow: var(--special-shadow);
}

img {
	width: 100%;
	height: auto;
}

a {
	color: var(--primary);
	text-decoration: underline transparent;
	text-underline-offset: 0.1rem;
	transition:
		text-decoration 200ms ease-in-out,
		text-underline-offset 200ms ease-in-out;
}

a:hover {
	text-decoration: underline var(--primary);
	text-underline-offset: 0.5rem;
}

button {
	padding: 0.5rem 1rem;
	border: 0.05rem solid var(--text);
	border-radius: 0.5rem;
	background-color: var(--primary);
	color: var(--surface);

	font-size: 1.25rem;
	cursor: pointer;
}

button:disabled {
	opacity: 0.5;
	cursor: default;
}

main {
	width: clamp(85%, 80rem, 95%);
}

#join {
	display: flex;
	flex-direction: column;
	align-items: center;

	margin-bottom: 2rem;
}

form {
	display: flex;
	flex-direction: column;
	align-items: start;
	gap: 1.5rem;

	width: clamp(10rem, 30%, 20rem);
}

form label {
	width: 100%;
	display: flex;
	flex-direction: column;

	gap: 0.5rem;
}

form label:has(input[type="checkbox"]) {
	flex-direction: row;
}

form label input[type="checkbox"] {
	width: auto;
}

form input,
form select {
	width: 100%;

	padding: 0.5rem;
	border: 0.05rem solid var(--text);
	border-radius: 0.5rem;
	background-color: var(--surface);
	color: var(--text);
}

footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;

	margin-bottom: 1.5rem;
}

figure {
	margin: 0;
	max-width: 50rem;
}

main[data-page="rdr2"] #how section {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

main[data-page="rdr2"] #gallery section {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

main[data-page="join"] {
	display: flex;
	flex-direction: column;
	align-items: center;
}

@media (max-width: 768px) {
	header nav ul {
		font-size: initial;
	}

	form {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 1.5rem;

		width: clamp(10rem, 70%, 20rem);
	}
}
