:root {
	/* Dimensions */
	--body-content-width: 1440px;
	--body-content-content-width: calc(var(--body-content-width) - 160px);
	--form-field-height: 2.5rem;
	--global-blur-radius: 12px;
	--global-border-radius: 8px;
	--global-border-width: 2px;
	--regform-width: 45vw;

	/* Other */
	--card-shadow: 0px 2px 4px var(--shadow-color), 0px 8px 16px var(--shadow-color);
	--global-focus-outline: 3px solid var(--brand-color);
	--global-transition: all 0.2s ease-in-out;
	--top-level-padding: 40px 240px 80px;
}

::selection {
	background-color: var(--gray5);
	color: var(--accent-color);
	-webkit-text-fill-color: var(--accent-color);
}

html,
body {
	background-color: var(--gray2);
	font-family: 'Schibsted Grotesk', system-ui, 'Segoe UI', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
	font-kerning: none;
	font-optical-sizing: auto;
	font-size: 21.5px;
	font-weight: 400;
	font-synthesis: none;
	hanging-punctuation: first last;
	line-height: 1.5;
	margin: 0;
	padding: 0;
}

footer {
	width: 100%;
	max-width: var(--body-content-content-width);
}

p,
a,
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--gray5);
	font-family: 'Schibsted Grotesk', system-ui, 'Segoe UI', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
	font-size: 1rem;
	line-height: 1.5;
}

p {
	margin-block-start: 0;
	margin-block-end: 1em;
}

a {
	border-radius: calc(var(--global-border-radius) / 2);
	text-decoration-color: var(--brand-color);
	text-decoration-line: underline;
	text-decoration-thickness: 0.09em;
	text-underline-offset: 0.09em;
	transition: var(--global-transition);
}

a:hover {
	color: var(--brand-color);
	text-decoration-color: var(--accent-color);
}

a.external::after {
	content: '↗';
	margin-inline-start: 0.5em;
}

strong {
	background: linear-gradient(270deg, rgb(100% 100% 100% / 6%), rgb(0 0 0 / 15%)),
		linear-gradient(0deg, var(--brand-color), var(--brand-color));
	font-weight: 700;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

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

mark {
	background: linear-gradient(270deg, rgb(100% 100% 100% / 12%), rgb(0 0 0 / 12%)),
		linear-gradient(0deg, var(--accent-color), var(--accent-color));
	background-blend-mode: overlay, normal;
	border-radius: calc(var(--global-border-radius) / 2);
	color: var(--gray5);
	padding-inline: 0.05em;
}

[type='button'],
[type='reset'],
[type='submit'],
button {
	appearance: none;
	border: none;
	border-radius: var(--global-border-radius);
	box-sizing: border-box;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	outline-offset: 1px;
	padding: 0.5rem 1.1rem;
	transition: var(--global-transition);
}

[type='button']:focus,
[type='button']:focus-visible,
[type='reset']:focus,
[type='reset']:focus-visible,
[type='submit']:focus,
[type='submit']:focus-visible,
button:focus,
button:focus-visible {
	outline: var(--global-focus-outline);
}

.btn-primary {
	background-color: var(--brand-color);
	color: var(--gray1);
}

.btn-secondary,
.btn-tertiary {
	background-blend-mode: multiply;
	color: var(--brand-color);
}

.btn-secondary {
	-webkit-backdrop-filter: blur(var(--global-blur-radius));
	backdrop-filter: blur(var(--global-blur-radius));
	background-blend-mode: multiply;
	background-color: lch(100% 0 0 / 6%);
	background-color: rgb(100% 100% 100% / 6%);
	color: var(--brand-color);
	outline: var(--brand-color) solid 1px;
}

.btn-secondary:focus,
.btn-secondary:focus-visible {
	outline: var(--global-focus-outline);
}

.btn-tertiary {
	-webkit-backdrop-filter: blur(0);
	backdrop-filter: blur(0);
	background-blend-mode: multiply;
	color: var(--brand-color);
	background-color: transparent;
}

.btn-primary:hover {
	background: var(--brand-color-darker);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:focus-visible,
.btn-tertiary:hover,
.btn-tertiary:focus,
.btn-tertiary:focus-visible {
	-webkit-backdrop-filter: blur(var(--global-blur-radius));
	backdrop-filter: blur(var(--global-blur-radius));
	background-color: var(--shadow-color);
}

.btnbar {
	align-items: center;
	display: flex;
	flex-direction: row;
	gap: 1.1rem;
	justify-content: flex-start;
	width: 100%;
}

.btnbar.center {
	justify-content: center;
}

.btnbar.expand {
	justify-content: space-between;
	width: 100%;
}

.btnbar.reverse {
	flex-direction: row-reverse;
}

dialog {
	border: none;
	margin: 0;
	width: auto;
	height: auto;
}

dialog:modal {
	max-width: 100%;
	max-height: 100%;
}

form {
	border: none;
}

kbd {
	--bg-opacity: 12%;
	background: rgb(100% 100% 100% / var(--bg-opacity)); /* Fallback */
	background: lch(100%, 0, 0 / var(--bg-opacity));
	border: 1px solid var(--gray3);
	border-radius: calc(var(--global-border-radius) / 2);
	display: none;
	font-family: 'Schibsted Grotesk', system-ui, 'Segoe UI', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.5rem;
	margin-inline: 0.5rem;
	padding: 0.2em 0.4em;
}

#heroSect {
	align-items: center;
	background-color: var(--bg-translucent);
	display: flex;
	flex-direction: column;
	gap: 4rem;
	padding: var(--top-level-padding);
	width: 100%;
}

.backdrop:has(#heroSect) {
	background: no-repeat center url('sarah-dorweiler-9Z1KRIfpBTM-unsplash_duotone.webp');
	/*
		Photo by Sarah Dorweiler (https://unsplash.com/@sarahdorweiler)
		Used with permission under the Unsplash Licence (https://unsplash.com/license)
		Obtained from https://unsplash.com/photos/9Z1KRIfpBTM
	*/
	background-size: cover;
}

#navbar {
	align-items: center;
	background-color: var(--gray1);
	border-radius: calc(var(--global-border-radius) * 2);
	box-shadow: var(--card-shadow);
	display: flex;
	flex: none;
	flex-grow: 0;
	justify-content: space-between;
	padding: 12px 80px;
	width: var(--body-content-width);
}

#navbar > .wrapper {
	align-items: center;
	display: flex;
	flex-direction: row;
	padding: 0;
	gap: 32px;
}

#navHeading {
	color: var(--gray4);
	font-weight: 500;
}

#navbar a {
	font-weight: 500;
	padding-inline: 0.5em;
	text-decoration: none;
}

#navbar a:hover {
	background-color: var(--accent-color);
}

#heroContent {
	width: var(--body-content-content-width);
}

/* Logo */

.logo,
.logotype {
	user-select: text;
}

.logo {
	filter: drop-shadow(0px 2px 4px var(--shadow-color)) drop-shadow(0px 8px 16px var(--shadow-color));
	height: 80px;
}

#navbar .logotype {
	height: 40px;
}

#navbar a:has(.logo),
#navbar a:has(.logotype),
#navbar a:has(.logo):hover,
#navbar a:has(.logotype):hover {
	background-color: transparent; /* Logo should not highlight upon hover*/
	padding-inline: 0;
}

/* Footer */

.subfold footer {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 2rem;
}

.subfold footer p,
.subfold footer a {
	color: var(--gray4);
	font-size: 1rem;
}

footer .logotype {
	filter: grayscale(100%);
	height: 60px;
	margin-block-end: 0.8rem;
}

.links {
	display: grid;
	font-size: 1rem;
	column-gap: 4rem;
	row-gap: 0.4rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: min-content;
	list-style: none;
	padding: 0;
}

ol.links,
ul.links {
	margin-block: 0;
}

.links p,
.links a {
	color: var(--gray4);
	font-weight: 500;
	text-decoration: none;
}

.links a:hover {
	color: var(--gray5);
}

/* Hero statement */

.tagline {
	color: var(--gray5);
	font-family: 'Roslindale Variable';
	font-style: normal;
	font-variation-settings: 'wdth' 75;
	font-variant-ligatures: discretionary-ligatures;
	font-weight: 700;
	font-size: 150px;
	line-height: 0.9;
	margin-block: 0;
	text-align: left;
	text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.06), 0px 8px 16px rgba(0, 0, 0, 0.06);
}

.tagline em {
	/* background-color: var(--selection-color); */
	font-style: italic;
	font-weight: 200;
	font-variation-settings: 'ital' 1;
	/* padding-inline: 8px; */
}

.heroSupport {
	color: var(--gray4);
	font-size: 1.15rem;
	margin-block-start: 1rem;
	margin-block-end: 2rem;
}

.heroSupport strong {
	background: none;
	-webkit-background-clip: unset;
	background-clip: unset;
	-webkit-text-fill-color: var(--gray4);
}

/* Synopsis */

.subfold {
	align-items: center;
	background-color: var(--gray1);
	box-shadow: var(--card-shadow);
	border-top: 3px solid var(--gray3);
	display: flex;
	flex-direction: column;
	padding: var(--top-level-padding);
}

.subfold p,
.subfold a {
	font-size: 1.3rem;
	width: 50ch;
	margin-left: auto;
	margin-right: auto;
	max-width: var(--body-content-content-width);
}

/* Newsletter prompt */

.interstitial {
	background-color: var(--gray2);
	border-radius: calc(var(--global-border-radius) * 2);
	box-shadow: var(--card-shadow);
	display: flex;
	flex-direction: row;
	gap: 6rem;
	margin-block: 2rem;
	min-height: 16rem;
	padding: 60px 80px;
	width: var(--body-content-width);
}

.subfold .prompt {
	color: var(--gray5);
	font-family: 'Roslindale Variable', serif;
	font-size: 5.5rem;
	font-weight: 200;
	font-variation-settings: 'wdth' 100;
	line-height: 1.1;
	margin: 0;
	width: fit-content;
	min-width: fit-content;
}

.interstitial h2 {
	font-size: 1.3rem;
}

.interstitial p {
	color: var(--gray4);
	font-size: 1.3rem;
}

.interstitial strong {
	font-style: italic;
	font-variation-settings: 'ital' 1;
}

.interstitial input {
	border-bottom: none;
	border-radius: var(--global-border-radius);
	border: 2px solid var(--gray4);
	font-size: 1rem;
	padding-inline: 1em;
	padding-block: 0.6em;
	min-width: 4rem;
}

.interstitial input:focus,
.interstitial input:focus-visible {
	border-color: var(--gray3);
	outline: var(--global-focus-outline);
	outline-offset: 1px;
}

.interstitial ::placeholder {
	color: var(--gray4);
}

.interstitial input[type='email'] {
	width: 40ch;
}

.interstitial input[type='submit'] {
	width: fit-content;
}

/* Registration form */

#regPreambleWrapper {
	background: linear-gradient(0deg, var(--bg-translucent), var(--bg-translucent)),
		no-repeat center url('sander-weeteling-iGDg_f_mlWo-unsplash.jpg');
	/*
		Photo by Sander Weeteling (https://unsplash.com/@sanderweeteling)
		Used with permission under the Unsplash Licence (https://unsplash.com/license)
		Obtained from https://unsplash.com/photos/iGDg_f_mlWo
	*/
	background-size: cover;
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: space-between;
	max-height: 100vh;
	padding: 80px 120px;
	width: calc(100vw - var(--regform-width));
}

.preamble p {
	font-size: 1.4rem;
	max-width: 45ch;
}

form > p {
	text-align: center;
}

fieldset,
.fieldset /* This class is used for validator compatibility */ {
	border: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	max-width: 100%;
	width: 100%;
	padding: 0;
}

label {
	color: var(--gray5);
	font-size: 0.7rem;
	letter-spacing: 0.01em;
	line-height: 1.25em;
	pointer-events: none;
	text-align: left;
	transition: var(--global-transition);
	width: 100%;
}

input {
	appearance: none;
	background-color: transparent;
	border: none;
	border-bottom: var(--gray3) 1px solid;
	caret-color: var(--brand-color);
	font-size: 0.85rem;
	outline: none;
	padding: 0;
	transition: var(--global-transition);
	width: 100%;
}

input:focus,
input:focus-visible {
	border-bottom-color: var(--brand-color);
}

.input-group {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	justify-content: flex-start;
	max-width: 40ch;
	width: 100%;
}

.form-field:focus-within {
	outline: var(--global-focus-outline);
}

.form-field {
	align-items: center;
	background-color: var(--gray1);
	border: var(--global-border-width) solid var(--gray3);
	border-color: var(--gray3);
	border-radius: var(--global-border-radius);
	display: flex;
	flex-direction: column;
	margin: 0;
	width: 100%;
	outline-offset: calc(-1 * var(--global-border-width));
	padding: 0.5rem 1rem;
	transition: var(--global-transition);
}

.name-fields {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 4px;
	width: 100%;
}

#regModal {
	background-color: var(--gray2);
	border: none;
	flex-direction: row;
	gap: 0;
	justify-content: stretch;
	margin: 0;
	padding: 0;
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	min-width: 100vw;
	min-height: 100vh;
	max-width: 100vw;
	max-height: 100vh;
	overflow: auto;
}

#regWrapper {
	display: flex;
	flex-direction: row;
	justify-content: stretch;
	gap: 0;
	height: 100%;
}

#regForm {
	align-items: center;
	border-left: var(--gray3) solid 3px;
	box-shadow: var(--card-shadow);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 80px 120px;
	width: var(--regform-width);
	height: 100vh;
	min-height: fit-content;
	max-height: 100vh;
}

#regForm nav a {
	font-weight: 500;
}

#regForm header {
	align-items: center;
	width: 100%;
}

#regForm > header p,
#regForm > header h1,
#regForm > header h2,
#regForm > header h3,
#regForm > header h4,
#regForm > header h5,
#regForm > header h6 {
	margin-block: 0;
	text-align: center;
}

#regForm > footer {
	width: 100%;
}

#regForm > footer p,
#regForm > footer a {
	color: var(--gray4);
	font-size: 0.85rem;
	text-align: center;
}

#regForm > footer a:hover {
	color: var(--brand-color);
}

.fine-print > ul {
	display: flex;
	flex-direction: row;
	gap: 1.5em;
	list-style: none;
	margin: 0;
	padding: 0;
}
