/*
 * Diffuse Field
 *
 * One face (Hanken Grotesk, self-hosted), two weights doing most of the work:
 * 300 for anything large, 400 for reading. The greys are cool and slightly blue,
 * taken from the water in the first cover rather than from paper. The only
 * drawing on the page is the field in the hero; everything below it is type
 * and space.
 */

@font-face {
	font-family: "Hanken Grotesk";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("fonts/hanken-grotesk-latin-300-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Hanken Grotesk";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Hanken Grotesk";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/hanken-grotesk-latin-400-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Hanken Grotesk";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2");
}

:root {
	--bg: #dfe1e1;      /* fog */
	--ink: #1c2328;     /* deep water */
	--soft: #535d66;    /* slate, 5:1 on --bg */
	--line: #b7bdc0;    /* underlines at rest */
	--field: #2b343b;   /* the hero strokes; alpha is applied per stroke */
	--plate: #cfd3d4;   /* behind the cover while it loads */

	--gutter: clamp(1.25rem, 4vw, 3.5rem);
	--measure: 76rem;
	--label-col: minmax(9rem, 14rem);

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #161b1f;
		--ink: #dde1e3;
		--soft: #8e98a0;
		--line: #3e474e;
		--field: #c9d0d4;
		--plate: #20262b;
		color-scheme: dark;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
	font-size: 1.0625rem;
	font-weight: 400;
	line-height: 1.6;
	font-kerning: normal;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-color: var(--line);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	transition: text-decoration-color 160ms ease;
}
a:hover {
	text-decoration-color: currentColor;
}
a:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
	border-radius: 1px;
}

/* ---- Hero: the field, and the name in its quiet zone ---------------------- */

.hero {
	position: relative;
	height: clamp(30rem, 86svh, 54rem);
	overflow: hidden;
}

.field {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	/* The field thins out into the page instead of stopping at a line. */
	-webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
	mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.hero-text {
	position: absolute;
	/* Level with the left edge of main, however wide the window. */
	left: max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter)));
	right: var(--gutter);
	bottom: clamp(2.5rem, 9svh, 6rem);
	max-width: fit-content;
}

h1 {
	font-weight: 300;
	font-size: clamp(3.4rem, 11.2vw, 9.75rem);
	line-height: 0.92;
	letter-spacing: -0.025em;
	/* The ff ligature in "Diffuse" is part of the wordmark. */
	font-variant-ligatures: common-ligatures;
}

.tagline {
	margin-top: clamp(1rem, 2.4vw, 1.75rem);
	font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
	color: var(--soft);
	padding-left: 0.08em;
}

/* ---- Body ----------------------------------------------------------------- */

main {
	max-width: var(--measure);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* The name, defined. Set large and alone, to the right of the label column. */
.definition {
	display: grid;
	grid-template-columns: var(--label-col) minmax(0, 1fr);
	column-gap: clamp(1.5rem, 4vw, 4rem);
	padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(4rem, 10vw, 8rem);
}
.definition dl {
	grid-column: 2;
	max-width: 44rem;
}
.definition dt {
	font-size: 1.0625rem;
	color: var(--soft);
	margin-bottom: 0.75rem;
}
.definition dfn {
	font-style: italic;
}
.definition dd {
	font-weight: 300;
	font-size: clamp(1.45rem, 2.6vw, 2.05rem);
	line-height: 1.32;
	letter-spacing: -0.01em;
}

/* Each block: its name in the left column, its content in the right. */
.block {
	display: grid;
	grid-template-columns: var(--label-col) minmax(0, 1fr);
	column-gap: clamp(1.5rem, 4vw, 4rem);
	padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

h2 {
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.6;
	/* Hangs level with the first line of the content beside it. */
	padding-top: 0.15rem;
}

/* ---- The release ------------------------------------------------------------ */

.release-body {
	display: grid;
	grid-template-columns: minmax(0, 32rem) minmax(15rem, 1fr);
	column-gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: end;
}

.cover {
	display: block;
	background: var(--plate);
	aspect-ratio: 1;
	text-decoration: none;
}
.cover img {
	display: block;
	width: 100%;
	height: auto;
}

h3 {
	font-weight: 300;
	font-size: clamp(2.1rem, 3.6vw, 3rem);
	line-height: 1.05;
	letter-spacing: -0.015em;
}
.byline {
	margin-top: 0.4rem;
	font-size: 1.1875rem;
}
.note {
	margin-top: 1.5rem;
	max-width: 32ch;
	color: var(--soft);
}

.facts {
	margin-top: 1.75rem;
	display: grid;
	gap: 0.3rem;
}
.facts div {
	display: grid;
	grid-template-columns: 6rem 1fr;
}
.facts dt {
	color: var(--soft);
}
.facts dd {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.out {
	margin-top: 1.75rem;
}

/* ---- Roster and contact ----------------------------------------------------- */

.roster {
	list-style: none;
	padding: 0;
	font-weight: 300;
	font-size: clamp(1.6rem, 2.8vw, 2.25rem);
	line-height: 1.3;
}

.contact {
	font-weight: 300;
	font-size: clamp(1.25rem, 2.2vw, 1.6rem);
	overflow-wrap: anywhere;
}

/* ---- Footer ------------------------------------------------------------------ */

footer {
	max-width: var(--measure);
	margin: 0 auto;
	padding: clamp(4rem, 10vw, 7rem) var(--gutter) 2.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--soft);
	font-size: 0.9375rem;
}

.mark {
	width: 1.75rem;
	height: 1.75rem;
	fill: currentColor;
	stroke: currentColor;
	flex: none;
}

/* ---- Narrow screens --------------------------------------------------------- */

@media (max-width: 52rem) {
	.definition,
	.block {
		grid-template-columns: minmax(0, 1fr);
	}
	.definition dl {
		grid-column: 1;
	}
	h2 {
		margin-bottom: 1.25rem;
		padding-top: 0;
	}
	.release-body {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 1.75rem;
	}
}

/* A 404 uses the same page, without the field. */
.lost {
	max-width: var(--measure);
	margin: 0 auto;
	padding: clamp(5rem, 18vh, 10rem) var(--gutter) 0;
}
.lost h1 {
	font-size: clamp(2.6rem, 7vw, 5rem);
}
.lost p {
	margin-top: 1.5rem;
	font-size: 1.1875rem;
}
