/* =========================================================================
   Base: modern reset + element defaults + typography
   ========================================================================= */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	font-size: calc(100% * var(--a11y-scale, 1));
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

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

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

picture img { width: 100%; }

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5 {
	font-family: var(--font-display);
	font-weight: var(--fw-medium);
	line-height: var(--lh-heading);
	color: var(--color-text);
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { text-wrap: pretty; }
p + p { margin-top: var(--sp-4); }

ul, ol { padding-left: 1.25rem; }

strong, b { font-weight: var(--fw-semibold); }

blockquote {
	font-family: var(--font-display);
	font-weight: var(--fw-light);
	font-size: var(--fs-h4);
	color: var(--color-primary-dark);
}

hr {
	border: 0;
	height: 1px;
	background: var(--color-border);
	margin: var(--sp-6) 0;
}

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

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

:where(input, textarea, select) {
	width: 100%;
	padding: 0.85rem 1rem;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--r-sm);
	transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
:where(input, textarea, select):focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--c-teal-100);
}

textarea { min-height: 140px; resize: vertical; }

::selection { background: var(--c-teal-100); color: var(--c-teal-900); }

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

/* WP core alignment / caption helpers used by the editor content */
.alignleft  { float: left;  margin: 0 var(--sp-5) var(--sp-4) 0; }
.alignright { float: right; margin: 0 0 var(--sp-4) var(--sp-5); }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: var(--fs-small); color: var(--color-text-muted); margin-top: var(--sp-2); }

.entry-content > * + * { margin-top: var(--sp-5); }
.entry-content h2 { margin-top: var(--sp-7); }
.entry-content img { border-radius: var(--r-md); }
