/* ==========================================================================
   Mind Maprs — reset and base elements
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--mm-header-h) + 16px);
}

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

body {
	margin: 0;
	background: var(--mm-white);
	color: var(--mm-ink);
	font-family: var(--mm-font-body);
	font-size: var(--mm-size-base);
	line-height: var(--mm-leading-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--mm-space-sm);
	font-family: var(--mm-font-display);
	font-weight: 600;
	line-height: var(--mm-leading-tight);
	letter-spacing: var(--mm-track-heading);
	color: var(--mm-ink);
	text-wrap: balance;
}

h1 { font-size: var(--mm-size-h1); line-height: 1.02; letter-spacing: var(--mm-track-display); }
h2 { font-size: var(--mm-size-h2); }
h3 { font-size: var(--mm-size-h3); letter-spacing: -0.024em; }
h4 { font-size: 19px; letter-spacing: var(--mm-track-tight); }
h5 { font-size: 16.5px; }
h6 { font-size: var(--mm-size-sm); }

p, ul, ol, dl, blockquote, figure, table, pre {
	margin: 0 0 var(--mm-space-md);
}

p { max-width: var(--mm-measure); text-wrap: pretty; }

a {
	color: var(--mm-blue);
	text-decoration: none;
	transition: color var(--mm-duration) var(--mm-ease);
}

a:hover,
a:focus-visible {
	color: var(--mm-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--mm-focus);
	outline-offset: var(--mm-focus-offset);
}

::selection {
	background: var(--mm-sky);
	color: var(--mm-deep);
}

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

figure { margin-inline: 0; }

figcaption {
	margin-top: var(--mm-space-xs);
	font-size: var(--mm-size-xs);
	color: var(--mm-muted-soft);
}

ul, ol { padding-left: 1.25em; }
li { margin-bottom: var(--mm-space-2xs); }

hr {
	height: 0;
	margin: var(--mm-space-xl) 0;
	border: 0;
	border-top: var(--mm-border);
}

blockquote {
	padding-left: var(--mm-space-md);
	border-left: 2px solid var(--mm-sky);
	font-family: var(--mm-font-display);
	font-size: var(--mm-size-xl);
	line-height: var(--mm-leading-snug);
	letter-spacing: var(--mm-track-tight);
	color: var(--mm-navy);
}

blockquote p { max-width: none; }

code, kbd, pre, samp {
	font-family: var(--mm-font-mono);
	font-size: 0.9em;
}

code {
	padding: 0.15em 0.4em;
	background: var(--mm-surface-alt);
	color: var(--mm-navy);
}

pre {
	padding: var(--mm-space-md);
	overflow-x: auto;
	background: var(--mm-surface-alt);
	border: var(--mm-border);
}

pre code { padding: 0; background: none; }

table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--mm-size-sm);
}

th, td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: var(--mm-border);
	vertical-align: top;
}

th {
	font-family: var(--mm-font-display);
	font-weight: 600;
	color: var(--mm-navy);
	border-bottom: var(--mm-border-strong);
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 12px 14px;
	background: var(--mm-white);
	border: var(--mm-border-strong);
	border-radius: var(--mm-radius);
	transition: border-color var(--mm-duration) var(--mm-ease);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--mm-blue);
}

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

/* --- Accessibility utilities ------------------------------------------ */

.screen-reader-text {
	position: absolute !important;
	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 {
	position: absolute;
	top: -100%;
	left: var(--mm-gutter);
	z-index: 999;
	padding: 12px 20px;
	background: var(--mm-navy);
	color: var(--mm-white);
	font-family: var(--mm-font-display);
	font-size: var(--mm-size-sm);
	font-weight: 600;
}

.skip-link:focus-visible {
	top: 12px;
	color: var(--mm-white);
	text-decoration: none;
}
