/* Base — element defaults, written with :where() so blocks may restate them. */

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

html {
	-webkit-text-size-adjust: 100%;
	scrollbar-color: var(--brand-2) var(--strip);
}

body {
	margin: 0;
	font-variant-numeric: tabular-nums;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	caret-color: var(--brand);
}

::selection {
	background: var(--sand);
	color: var(--util);
}

:where(h1, h2, h3, h4) {
	margin: 0 0 var(--s4);
	color: var(--brand);
	font-family: var(--font-head);
	font-weight: 600;
	line-height: var(--lh-head);
	text-wrap: balance;
}

:where(h1) { font-size: var(--fs-h1); }
:where(h2) { font-size: var(--fs-h2); }
:where(h3) { font-size: var(--fs-h3); }
:where(h4) { font-size: var(--fs-h4); }

:where(p, ul, ol) {
	margin: 0 0 var(--s4);
}

:where(p) {
	max-width: var(--measure);
}

:where(a) {
	color: var(--link);
	text-underline-offset: 0.2em;
}

:where(a:hover) {
	color: var(--brand);
}

:where(img, svg, video) {
	display: block;
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

:where(button, input, select, textarea) {
	font: inherit;
	color: inherit;
}

:where(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input[type="password"], textarea, select) {
	width: 100%;
	min-height: 2.75rem;
	padding: var(--s2) var(--s3);
	border: 1px solid var(--field);
	border-radius: var(--r-field);
	background: var(--paper);
	font-size: 0.9375rem;
}

:where(input, textarea, select):focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 0;
	border-color: var(--focus);
}

:where(label) {
	font-size: var(--fs-small);
	font-weight: 500;
}

.screen-reader-text,
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: var(--s2);
	left: var(--s2);
	z-index: 200;
	width: auto;
	height: auto;
	clip: auto;
	padding: var(--s3) var(--s4);
	background: var(--brand);
	color: #fff;
}

.wrap {
	width: 100%;
	max-width: var(--page-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--s8);
}

.section-title {
	margin-bottom: var(--s5);
}

/* Buttons */

.btn,
.button,
button.button,
.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--s2);
	min-height: 2.75rem;
	padding: 0 var(--s5);
	border: 0;
	border-radius: var(--r-btn);
	background: var(--brand);
	color: #fff;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.btn:hover,
.button:hover,
.wpcf7-submit:hover {
	background: var(--brand-dark);
	color: #fff;
}

.btn--arrow::after {
	content: "\2192";
	font-weight: 500;
}

.btn--sand {
	background: var(--sand);
	color: var(--util);
}

.btn--sand:hover {
	background: #b59d79;
	color: var(--util);
}

.btn--ghost {
	background: transparent;
	box-shadow: inset 0 0 0 2px #fff;
	color: #fff;
}

.btn--ghost:hover {
	background: #fff;
	color: var(--brand);
}

.btn--light {
	background: #fff;
	color: var(--brand);
}

.btn--light:hover {
	background: var(--strip);
	color: var(--brand);
}

.button:disabled,
.button.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Cards: white, small radius, hairline border. */
.card {
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: var(--r-card);
}

/* An image slot with no photo yet. */
.img-missing {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 12rem;
	background: var(--panel);
}

/* Placeholder stock photo tag (preview builds only). */
.ph-photo {
	position: relative;
}

.ph-photo::after {
	content: "Stock photo";
	position: absolute;
	right: var(--s2);
	bottom: var(--s2);
	padding: 2px 8px;
	border-radius: 2px;
	background: rgba(32, 32, 32, 0.78);
	color: #fff;
	font-family: var(--font-body);
	font-size: 0.6875rem;
	font-weight: 500;
	pointer-events: none;
}

/* Part letters, used in the parts list beside drawings. */
.part-letter {
	display: inline-grid;
	place-items: center;
	width: 1.75em;
	height: 1.75em;
	border: 1.5px solid currentColor;
	border-radius: 50%;
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1;
	flex: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}
}
