@font-face {
	font-family: 'Lexend';
	src: url('Lexend-Light.woff2') format('woff2'),
		url('Lexend-Light.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Lexend';
	src: url('Lexend-Bold.woff2') format('woff2'),
		url('Lexend-Bold.woff') format('woff');
	font-weight: bold;
	font-style: normal;
	font-display: swap;
}

@property --background-color {
	syntax: "<color>";
	inherits: true;
	initial-value: #fff;
}

@property --foreground-color {
	syntax: "<color>";
	inherits: true;
	initial-value: #fff;
}

@property --brand-color {
	syntax: "<color>";
	inherits: true;
	initial-value: #fff;
}

@property --primary-accent-color {
	syntax: "<color>";
	inherits: true;
	initial-value: #fff;
}

@property --secondary-accent-color {
	syntax: "<color>";
	inherits: true;
	initial-value: #fff;
}

@property --muted-color {
	syntax: "<color>";
	inherits: true;
	initial-value: #fff;
}

@property --border-color {
	syntax: "<color>";
	inherits: true;
	initial-value: #fff;
}

/* Dark mode (default) */
:root {
	--brand-color: #da9036;
	--foreground-color: #f8f3eb;
	--background-color: #23212a;
	--secondary-background-color: #403d4b;
	--primary-accent-color: #b9a0fd;
	--secondary-accent-color: #cd9af9;
	--muted-color: #b1adb3;
	--border-color: #c6ab71;

	background: var(--background-color);
	color: var(--foreground-color);
	font-family: Lexend, sans-serif;
	line-height: 1.5;

	transition-duration: 0.3s;
	transition-property:
		--brand-color,
		--foreground-color,
		--background-color,
		--secondary-background-color,
		--primary-accent-color,
		--secondary-accent-color,
		--muted-color,
		--border-color;
}

/* Light mode */
@media (prefers-color-scheme: light) {
	:root {
		--brand-color: #a35c00;
		--foreground-color: #23212a;
		--background-color: #f8f3eb;
		--secondary-background-color: #ece5d8;
		--primary-accent-color: #652cab;
		--secondary-accent-color: #8901ad;
		--muted-color: #655c68;
		--border-color: #544733;
	}
}

html,
body,
ul,
ol,
h1,
h2,
h3,
p {
	margin: 0;
	padding: 0;
}

button,
input,
select,
h1,
h2 {
	font: inherit;
}

button,
input[type=radio],
input[type=checkbox],
label,
select,
summary {
	cursor: pointer;
}

form,
label {
	display: flex;
	flex-direction: column;
}

form {
	gap: 1em;
}

label {
	gap: 0.5em;
}

input,
button {
	--control-border-color: var(--brand-color);
	--control-text-color: inherit;
	--control-background: transparent;

	border: 0.1em solid var(--control-border-color);
	border-radius: 0.1em;
	outline: none;
	padding: 0.8em;
	background: var(--control-background);
	color: var(--control-text-color);

	transition: all 0.3s;
}

:is(input, button):is(:hover, :focus-visible) {
	--control-border-color: var(--primary-accent-color);
}

input {
	--control-background: var(--secondary-background-color);
}

button {
	--control-background: var(--brand-color);
	--control-text-color: var(--background-color);
	font-weight: bold;
}

button:hover {
	--control-background: var(--primary-accent-color);
}

body {
	background-image: url('fugge-bg-dark.webp');
	background-size: 100%;
	background-position: top center;
	background-repeat: no-repeat;
}

@media (prefers-color-scheme: light) {
	body {
		background-image: url('fugge-bg-light.webp');
	}
}


main {
	display: contents;
}

li {
	list-style: none;
}

#hero {
	display: flex;
	flex-direction: column;
	gap: 2em;
	margin-bottom: 2em;
	font-size: 140%;
}

#hero header {
	flex: none;
	display: flex;
	justify-content: center;
	padding: 2em 1em;
}

#hero .logo {
	font-size: 180%;
	font-weight: bold;
	text-transform: lowercase;
	letter-spacing: -0.04em;
	white-space: nowrap;
	color: var(--brand-color);
}

#hero .logo span {
	display: inline-block;
	color: var(--primary-accent-color);
	transform: rotate(-18deg);
}

#hero .messaging {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding-bottom: min(10dvh, 7em);
}

#hero :is(.tagline, p) {
	max-width: min(80%, 80ch);
	text-align: center;
}

#hero .tagline {
	font-size: clamp(120%, 4vw, 300%);
	font-weight: bold;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--brand-color);
}

#hero .tagline span {
	display: block;
}

#hero .intro {
	text-wrap: balance;
}

#versus,
#how {
	padding: 2em;
}

#versus {
	display: flex;
	gap: 2em;
	flex-wrap: wrap;
	max-width: 120em;
	margin: 0 auto;
}

#versus section {
	flex: 1;
}

#versus section,
#how {
	display: flex;
	flex-direction: column;
	gap: 1em;
	min-width: min(100%, 16em);
}

#versus h2,
#how h2 {
	font-size: clamp(100%, 2.4vw, 200%);
	font-weight: bold;
	line-height: 1.4;
}

#versus h2 {
	text-wrap: balance;
}

#versus ul {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

#versus li {
	position: relative;
	padding-left: 2em;
}

#versus li::before {
	position: absolute;
	left: 0;
}

#versus section:first-child li::before {
	content: '🥲';
}

#versus section:last-child li::before {
	content: '😀';
}

#how {
	max-width: 40em;
	margin: 0 auto;
	padding: 2em 1em;
}

#how ol {
	display: flex;
	flex-direction: column;
	gap: 1em;
	padding: 1em 0;
}

#how li {
	margin-left: 1em;
	padding-left: 1em;
	list-style: decimal;
	font-size: 150%;
}

x-signup section {
	display: flex;
	flex-direction: column;
	gap: 2em;
	width: min(20em, calc(100% - 2em));
	margin: 2em auto;
}

x-signup h2 {
	text-align: center;
	font-weight: bold;
}

x-signup p {
	text-align: center;
}

x-survey h2 {
	font-size: 120%;
	font-weight: bold;
}

x-survey dialog[open] {
	display: flex;
	flex-direction: column;

	max-width: min(48em, calc(100% - 4em));
	max-height: min(40em, calc(100dvh - 4em));

	border: 0;
	border-radius: 0.1em;
	background: var(--secondary-background-color);
	color: inherit;
	animation: fade-in 0.3s ease-in 0.3s backwards;
}

x-survey dialog::backdrop {
	background: var(--background-color);
	animation: fade-in 0.3s ease-in;
}

x-survey form {
	display: flex;
	flex-direction: column;
	gap: 1em;
	height: 100%;
	min-height: 0;
}

x-survey :is(h2, p, button) {
	flex: none;
}

x-survey .fields {
	flex: 1 1 auto;
	display: flex;
	gap: 0.5em;
	min-height: 0;
	overflow-y: auto;
	flex-wrap: wrap;
	padding: 0.5em 0;
}

x-survey .fields fieldset {
	flex: 1 1 18em;
	display: flex;
	flex-direction: column;
	border-radius: 0.1em;
	border-color: var(--muted-color);
}

x-survey .fields legend {
	font-weight: bold;
}

x-survey label {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0.5em;
}

x-survey input:checked+span {
	font-weight: bold;
	color: var(--primary-accent-color);
}

x-survey .notice {
	background: var(--primary-accent-color);
	color: var(--background-color);
	border-radius: 0.2em;
	margin: 1em 0;
	padding: 1em;
	font-size: 87.5%;
	font-weight: bold;
}

@keyframes fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}