@font-face {
	font-family: "Archivo";
	src: url("/fonts/archivo.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-display: swap;
}

@font-face {
	font-family: "Newsreader";
	src: url("/fonts/newsreader.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

:root {
	/* The land at dawn. Headlines are cut from it, so they read as skyline. */
	--ground: #14161C;
	--bedrock: #0E0F13;
	--light: #ECE5D8;
	--haze: #A29E97;
	--sun: #F4AE4B;
	--line: rgb(236 229 216 / 0.14);
	--error: #F3A49A;

	--display: "Archivo", ui-sans-serif, system-ui, sans-serif;
	--text: "Newsreader", ui-serif, Georgia, serif;
	--gutter: clamp(1.25rem, 4vw, 3.5rem);
	--measure: 88rem;

	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	background: var(--bedrock);
}

body {
	margin: 0;
	color: var(--light);
	font-family: var(--text);
	font-size: clamp(1.125rem, 1rem + 0.35vw, 1.3rem);
	font-optical-sizing: auto;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
p,
dl,
dd {
	margin: 0;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

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

:focus-visible {
	outline: 2px solid var(--sun);
	outline-offset: 3px;
	border-radius: 2px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.bar,
.contact,
.foot,
.page {
	width: 100%;
	max-width: var(--measure);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Sky and horizon */

.hero {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	min-height: 92svh;
	overflow: hidden;
	isolation: isolate;
}

.sky {
	position: absolute;
	inset: 0;
	z-index: -1;
	display: block;
	width: 100%;
	height: 100%;
	/* Close to the rendered first frame, for browsers without WebGL. */
	background: linear-gradient(to top, #B7642F 0%, #8A5A55 9%, #5B5068 24%, #3A3B57 50%, #232741 100%);
}

.bar {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding-block: clamp(1.25rem, 3vw, 2rem);
	font-size: 1.15rem;
}

.bar a {
	text-decoration: none;
}

.bar a:hover {
	text-decoration: underline;
}

/* The wordmark is the headline face at its widest, the opposite pole of the
   condensed type below it. */
.wordmark {
	font-family: var(--display);
	font-size: clamp(1.4rem, 1rem + 1.2vw, 2.1rem);
	font-weight: 850;
	font-stretch: 125%;
	line-height: 1;
	letter-spacing: -0.035em;
}

/* The headline stands on the horizon: its last baseline is the hero's bottom
   edge, and descenders sink into the ground. */
h1 {
	align-self: end;
	width: 100%;
	max-width: var(--measure);
	margin-inline: auto;
	padding-inline: var(--gutter);
	color: var(--ground);
	font-family: var(--display);
	font-size: clamp(3.4rem, 0.4rem + 8.4vw, 10rem);
	font-weight: 900;
	font-stretch: 62%;
	line-height: 0.96;
	letter-spacing: -0.012em;
	text-wrap: balance;
	text-box: trim-end text alphabetic;
}

/* Without text-box: Archivo's baseline sits 0.146em above the bottom of a
   0.96 line box (ascent 0.878, descent 0.210). */
@supports not (text-box: trim-end text alphabetic) {
	h1 {
		translate: 0 0.146em;
	}
}

/* Below the horizon */

.lede {
	background: var(--ground);
	padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 9vw, 7rem);
	font-size: clamp(1.35rem, 1rem + 1.3vw, 2.15rem);
	line-height: 1.3;
	font-weight: 380;
	letter-spacing: -0.005em;
	text-wrap: pretty;
}

.lede > span {
	display: block;
	max-width: 46rem;
}

/* Full-bleed bands keep their text on the same grid as everything else. */
.lede,
.stratum {
	padding-inline: max(var(--gutter), (100% - var(--measure)) / 2 + var(--gutter));
}

/* Strata: the four areas, from the abstract down to the bedrock. Each band
   runs edge to edge and is a little darker than the one above it. */

.stratum {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 0.85rem clamp(2rem, 5vw, 5rem);
	padding-block: clamp(2.25rem, 5vw, 4rem);
	background: var(--band);
}

.stratum:nth-child(1) { --band: #1A1C23; }
.stratum:nth-child(2) { --band: #16181E; }
.stratum:nth-child(3) { --band: #121419; }
.stratum:nth-child(4) { --band: var(--bedrock); }

.stratum dt {
	font-family: var(--display);
	font-size: clamp(1.7rem, 1rem + 2.4vw, 3.1rem);
	font-weight: 760;
	font-stretch: 70%;
	line-height: 1;
	letter-spacing: -0.01em;
}

.stratum dd {
	max-width: 36rem;
	color: var(--haze);
	text-wrap: pretty;
}

@media (max-width: 44rem) {
	.stratum {
		grid-template-columns: 1fr;
	}
}

/* Contact */

.contact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
	gap: clamp(2.5rem, 6vw, 6rem);
	align-items: start;
	padding-top: clamp(5rem, 12vw, 9rem);
}

h2 {
	font-family: var(--display);
	font-size: clamp(2.2rem, 1.2rem + 3.4vw, 4.4rem);
	font-weight: 860;
	font-stretch: 64%;
	line-height: 0.92;
	letter-spacing: -0.012em;
}

.contact-intro p {
	max-width: 30rem;
	margin-top: 1.4rem;
	text-wrap: pretty;
}

.quiet,
.fine,
.optional {
	color: var(--haze);
}

form {
	display: grid;
	gap: 1.3rem;
}

.field {
	display: grid;
	gap: 0.45rem;
}

label {
	font-size: 1.05rem;
	font-weight: 500;
}

.optional {
	font-weight: 400;
}

input,
textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: rgb(236 229 216 / 0.04);
	color: var(--light);
	font: inherit;
	font-size: 1.1rem;
	line-height: 1.4;
}

input:hover,
textarea:hover {
	border-color: rgb(236 229 216 / 0.28);
}

textarea {
	resize: vertical;
	min-height: 9rem;
}

input:focus-visible,
textarea:focus-visible {
	outline-offset: 0;
	border-color: transparent;
}

[aria-invalid="true"] {
	border-color: var(--error);
}

.hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-top: 0.3rem;
}

button {
	padding: 0.85rem 1.5rem;
	border: 0;
	border-radius: 3px;
	background: var(--sun);
	color: var(--ground);
	font-family: var(--display);
	font-size: 1rem;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.01em;
	cursor: pointer;
}

button:hover {
	background: color-mix(in oklab, var(--sun) 82%, white);
}

button:focus-visible {
	outline-color: var(--light);
}

button:disabled {
	cursor: progress;
	opacity: 0.6;
}

.status {
	flex: 1 1 14rem;
	font-size: 1rem;
}

.status.is-error {
	color: var(--error);
}

.fine {
	max-width: 30rem;
	font-size: 0.95rem;
	line-height: 1.45;
}

.ts:empty {
	display: none;
}

/* Footer */

.foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 1rem 2rem;
	margin-top: clamp(6rem, 14vw, 10rem);
	padding-block: 1.75rem 2.25rem;
	color: var(--haze);
	font-size: 1rem;
}

.foot .wordmark {
	margin-right: auto;
	color: var(--light);
	text-decoration: none;
}

@media (max-width: 44rem) {
	.foot .wordmark {
		flex-basis: 100%;
	}
}

/* Plain pages: Impressum, 404 */

.plain {
	display: flex;
	flex-direction: column;
	min-height: 100svh;
	background: var(--ground);
}

.plain .page {
	flex: 1;
}

.short {
	min-height: clamp(20rem, 52svh, 34rem);
}

.page {
	padding-top: clamp(2.5rem, 7vw, 4.5rem);
}

.page > p {
	max-width: 34rem;
}

.facts {
	display: grid;
	border-bottom: 1px solid var(--line);
}

.facts div {
	display: grid;
	grid-template-columns: minmax(8rem, 14rem) 1fr;
	gap: 0.25rem 2rem;
	padding-block: 1.1rem;
	border-top: 1px solid var(--line);
}

.facts dt {
	color: var(--haze);
	align-self: baseline;
}

.facts dd {
	font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width: 30rem) {
	.facts div {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
