/*
 * base.css — Modern CSS reset + html/body defaults + global accessibility rules.
 * No hardcoded values — all tokens come from tokens.css (loaded before this).
 */

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

/* ── Root ────────────────────────────────────────────────────────────────── */
html {
	font-size: var(--mvc-font-size-base, 16px);
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	tab-size: 4;
}

body {
	margin: 0;
	overflow-y: auto !important;
	background-color: var(--mvc-page-bg, var(--color-bg));
	color: var(--color-text);
	font-family: var(--mvc-font-body);
	font-size: var(--mvc-font-size-base);
	font-weight: var(--mvc-font-weight-body);
	line-height: var(--leading-relaxed);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ── Reset margins ───────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
	margin: 0;
}

/* ── Lists ───────────────────────────────────────────────────────────────── */
ol, ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ── Media ───────────────────────────────────────────────────────────────── */
img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
	border-style: none;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
input, button, textarea, select {
	font: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}

textarea {
	resize: vertical;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* ── Misc ────────────────────────────────────────────────────────────────── */
hr {
	border: none;
	border-top: 1px solid var(--color-divider);
	margin: var(--space-8) 0;
}

abbr[title] {
	text-decoration: underline dotted;
	cursor: help;
}

address {
	font-style: normal;
}

/* ── Skip link ───────────────────────────────────────────────────────────── */
.mvc-skip-link {
	position: absolute;
	top: -100%;
	left: var(--space-4);
	z-index: var(--z-toast);
	padding: var(--space-3) var(--space-6);
	background: var(--color-primary);
	color: var(--color-white);
	font-weight: var(--font-weight-bold);
	font-size: var(--text-sm);
	border-radius: var(--radius);
	text-decoration: none;
	transition: top var(--duration-fast) var(--ease-out);
}

.mvc-skip-link:focus {
	top: var(--space-4);
}

/* ── Focus visible ───────────────────────────────────────────────────────── */
:focus-visible {
	outline: var(--focus-ring-width) solid var(--focus-ring-color);
	outline-offset: var(--focus-ring-offset);
}

:focus:not(:focus-visible) {
	outline: none;
}

/* ── Site structure ──────────────────────────────────────────────────────── */
.mvc-site-wrap {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

#main {
	flex: 1;
}

/* ── Lazy-loaded image placeholder ──────────────────────────────────────── */
img[data-src]:not(.is-loaded) {
	background: var(--color-gray-100);
}

/* ── WP alignments ───────────────────────────────────────────────────────── */
.alignleft {
	float: left;
	margin-right: var(--space-6);
	margin-bottom: var(--space-4);
}

.alignright {
	float: right;
	margin-left: var(--space-6);
	margin-bottom: var(--space-4);
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: var(--space-4);
}

.alignwide {
	width: 100%;
}

.alignfull {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* ── Screen reader only ──────────────────────────────────────────────────── */
.screen-reader-text,
.u-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ── Selection ───────────────────────────────────────────────────────────── */
::selection {
	background-color: var(--color-primary);
	color: var(--color-white);
}
