/*
 * Base: reset, typography, layout primitives, accessibility.
 * No component or WooCommerce styling here.
 */

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

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

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text-body);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	font-weight: var(--fw-regular);
	line-height: var(--lh-body);
	letter-spacing: var(--ls-tight);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

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

/* ---- Headings --------------------------------------------------------
 * Element defaults map to the type scale. Other roles are utility classes
 * (.t-display-xl, .t-display-lg, .t-display-md, .t-display-sm).
 */
h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--color-text-heading);
	font-weight: var(--fw-medium);
	line-height: var(--lh-heading);
	overflow-wrap: break-word; /* overflow guard until approved mobile type sizes exist */
}

h1 {
	font-size: var(--fs-display-md);
}

h2 {
	font-size: var(--fs-h2);
}

h3 {
	font-size: var(--fs-h3);
}

h4 {
	font-size: var(--fs-body);
}

p {
	margin: 0 0 1em;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--transition), opacity var(--transition);
}

ul,
ol {
	margin: 0;
	padding: 0;
}

button,
input,
select,
textarea {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}

/* ---- Type utilities ------------------------------------------------ */
.t-display-xl {
	font-size: var(--fs-display-xl);
	line-height: var(--lh-display-xl);
	font-weight: var(--fw-medium);
}

.t-display-lg {
	font-size: var(--fs-display-lg);
	line-height: var(--lh-display-lg);
	font-weight: var(--fw-regular);
}

.t-display-md {
	font-size: var(--fs-display-md);
	line-height: var(--lh-heading);
	font-weight: var(--fw-medium);
}

.t-display-sm {
	font-size: var(--fs-display-sm);
	line-height: var(--lh-heading);
	font-weight: var(--fw-medium);
}

.t-caption {
	font-size: var(--fs-caption);
	line-height: var(--lh-heading);
}

/* ---- Layout primitives ---------------------------------------------- */

/* 1340px content at a 1440px viewport (50px margins). */
.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

.container--narrow {
	width: min(100% - 2 * var(--gutter), var(--container-narrow));
}

.section {
	margin-block: var(--section-gap);
}

.section:first-child {
	margin-top: 0;
}

/* Contained large panel (hero, customer notes, lab). */
.panel {
	border-radius: var(--radius-xl);
	overflow: hidden;
}

/* Heading row: title left, controls right; 40px to the content below. */
.section-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3) var(--space-5);
	margin-bottom: var(--space-7);
}

/* ---- Accessibility --------------------------------------------------- */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: var(--space-1);
	left: var(--space-1);
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--space-2) var(--space-5);
	clip: auto;
	clip-path: none;
	background: var(--color-action);
	color: var(--color-on-action);
	border-radius: var(--radius-pill);
	text-decoration: none;
}

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

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