/*
 * Reset, typography and the layout helpers every page shares.
 * Component styles live in their own files — see functions.php for what loads
 * where, and the README for why a shared component must not sit in a
 * page-scoped stylesheet.
 */

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

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

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg,
video {
	max-width: 100%;
}

img,
video {
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

button {
	font: inherit;
	color: inherit;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-body);
	font-weight: 500;
	line-height: 1.25;
}

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

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.icon {
	display: block;
	width: 20px;
	height: 20px;
}

/* Accessibility helpers (the class names WordPress and WooCommerce use). */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	padding: 10px 16px;
	clip: auto;
	clip-path: none;
	background: var(--color-navy);
	color: var(--color-white);
	font-size: 14px;
}

/* Page titles: centred, with air above and below, as the design sets them. */
.page-title {
	margin: 0;
	padding-block: var(--page-title-gap);
	font-family: var(--font-display);
	font-size: var(--fs-page-title);
	font-weight: 400;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.site-main {
	min-height: 40vh;
}

/*
 * Buttons. Site-wide, because the footer's sign-up, the cart panel's checkout
 * and the shop's filters are the same object — a page-scoped copy would render
 * unstyled everywhere else.
 *
 * The design's button is a wide, flat, letterspaced rectangle: no radius, no
 * shadow, uppercase at a small size.
 */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 30px;
	border: 0;
	background: var(--color-charcoal);
	color: var(--color-white);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.12em;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
	background: var(--color-ink);
	color: var(--color-white);
}

/* The quiet variant: a grey slab with dark text, as the footer draws it. */
.btn--muted {
	background: var(--color-border);
	color: var(--color-ink);
}

.btn--muted:hover {
	background: #cfcfcf;
	color: var(--color-ink);
}

@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;
	}
}
