/* Containers, section rhythm and grid primitives. */

.container {
	width: min(100% - 2 * var(--space-m), var(--container));
	margin-inline: auto;
}

.container--narrow {
	width: min(100% - 2 * var(--space-m), var(--container-narrow));
	margin-inline: auto;
}

.section {
	padding-block: var(--space-2xl);
	position: relative;
}

.section--tight {
	padding-block: var(--space-xl);
}

.section--roomy {
	padding-block: var(--space-3xl);
}

/* Tints within the dark family. The page never flips theme. */
.section--raised {
	background: var(--surface);
}

.section--sunken {
	background: linear-gradient(180deg, var(--bg), var(--surface) 55%, var(--bg));
}

.section__head {
	max-width: 58ch;
	margin-bottom: var(--space-xl);
}

.section__head--center {
	max-width: none;
	margin-inline: auto;
	text-align: center;
}

.section__head--center h2 {
	white-space: nowrap;
	text-wrap: nowrap;
	overflow-wrap: normal;
}

.section__head p {
	color: var(--text-muted);
	margin-top: var(--space-s);
	font-size: var(--step-1);
	max-width: 52ch;
}

.section__head--center p {
	margin-inline: auto;
}

.section__head--split {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-m);
	max-width: none;
}

.section__head--split > .link-arrow {
	flex-shrink: 0;
	margin-bottom: 0.2em;
}

/* Centered title with an independent action that must not pull the heading off-center. */
.section__head--has-aside {
	position: relative;
}

.section__head--has-aside > .link-arrow {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
}

@media (min-width: 701px) {
	.section__head--has-aside > div {
		padding-inline: 9.5rem;
	}
}

@media (max-width: 700px) {
	.section__head--has-aside > .link-arrow {
		position: static;
		transform: none;
		margin-top: var(--space-s);
	}
}

/* Quiet kicker. Small, muted, no masthead bar. */
.eyebrow {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-faint);
	margin-bottom: 0.7em;
}

.grid {
	display: grid;
	gap: var(--space-m);
}

.grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Asymmetric splits carry the higher design variance. */
.split {
	display: grid;
	gap: var(--space-xl);
	align-items: center;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.split--wide-left {
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.split--wide-right {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
}

.split--flip > *:first-child {
	order: 2;
}

.stack {
	display: grid;
	gap: var(--space-s);
	align-content: start;
}

.cluster {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s);
	align-items: center;
}

.divider {
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--line), transparent);
	border: 0;
}

@media (max-width: 900px) {
	.split,
	.split--wide-left,
	.split--wide-right,
	.grid--3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.split--flip > *:first-child {
		order: 0;
	}

	.section {
		padding-block: 4rem;
	}

	.section--roomy {
		padding-block: 5rem;
	}
}

@media (max-width: 640px) {
	.grid--2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.section {
		padding-block: 3.5rem;
	}

	.section--roomy {
		padding-block: 4.25rem;
	}

	.section--tight {
		padding-block: var(--space-l);
	}

	.split,
	.split--wide-left,
	.split--wide-right {
		gap: var(--space-l);
	}

	.section__head {
		margin-bottom: var(--space-l);
	}

	.section__head--center h2 {
		white-space: normal;
		text-wrap: balance;
		overflow-wrap: break-word;
	}
}
