/* Base: reset, type, layout helpers. Shared by every page. */

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--mm-header-h) + 16px);
}
html.mm-locked { overflow: hidden; }

body {
	margin: 0;
	background: var(--mm-paper);
	color: var(--mm-ink);
	font-family: var(--mm-body);
	font-size: var(--mm-text);
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--mm-display);
	font-weight: 400;
	line-height: .95;
	letter-spacing: .01em;
	text-transform: uppercase;
	margin: 0 0 .4em;
	text-wrap: balance;
}
h1 { font-size: var(--mm-h1); }
h2 { font-size: var(--mm-h2); }
h3 { font-size: var(--mm-h3); }
h4 { font-size: 24px; }

p { margin: 0 0 1em; }

a {
	color: inherit;
	text-decoration-color: var(--mm-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
a:hover { color: var(--mm-accent-text); }

:focus-visible {
	outline: 2px solid var(--mm-accent);
	outline-offset: 3px;
}

button, input, select, textarea { font: inherit; color: inherit; }

/* Layout */
.mm-wrap {
	width: min(100% - 2 * var(--mm-gutter), var(--mm-max));
	margin-inline: auto;
}
.mm-section { padding-block: var(--mm-section); }
.mm-on-ink { background: var(--mm-ink); color: var(--mm-paper); }
.mm-on-ink :where(p) { color: var(--mm-on-ink); } /* low specificity: class rules (prices, labels) win */
.mm-label {
	font-family: var(--mm-body);
	font-size: var(--mm-label);
	line-height: 1.5;
}

/* Plain pages (legal, cart, checkout, account) */
.mm-page { padding-block: clamp(48px, 6vw, 88px) var(--mm-section); }
.mm-page__title { font-size: var(--mm-h2); margin-bottom: 32px; }
.mm-prose { max-width: 760px; }
.mm-prose h2 { font-size: 40px; margin-top: 1.4em; }
.mm-prose h3 { font-size: 30px; margin-top: 1.2em; }
.mm-prose a { font-weight: 700; }
.woocommerce-cart .mm-prose,
.woocommerce-checkout .mm-prose,
.woocommerce-account .mm-prose { max-width: none; }

/* Accessibility helpers */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.mm-skip {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 200;
	background: var(--mm-accent);
	color: var(--mm-ink);
	padding: 10px 16px;
	font-family: var(--mm-body);
	font-size: 14px;
	text-decoration: none;
}
.mm-skip:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
