body.mh-mobile-nav-open { overflow: hidden; }

body:not(.home) { padding-top: var(--header-height); }

.mh-site-header,
.mh-site-header * { box-sizing: border-box; }

.mh-site-header {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10000;
	width: 100%;
	font-family: var(--font-body);
}

.mh-header-container {
	width: min(var(--content-max), calc(100% - (var(--page-gutter) * 2)));
	margin-inline: auto;
}

.mh-main-layer {
	position: relative;
	border-bottom: var(--border-width) solid var(--border);
	background: var(--bg);
	transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.mh-header-home .mh-main-layer {
	border-bottom-color: transparent;
	background: var(--header-home);
	-webkit-backdrop-filter: blur(var(--space-1));
	backdrop-filter: blur(var(--space-1));
}

.mh-header-home.mh-is-scrolled .mh-main-layer,
.mh-header-home.mh-menu-active .mh-main-layer {
	border-bottom-color: var(--border-dark);
	background: var(--header-dark);
	box-shadow: var(--shadow-soft);
}

.mh-main-row {
	display: grid;
	grid-template-columns: minmax(calc(var(--space-9) * 2), 1fr) auto minmax(calc(var(--space-10) * 2), 1fr);
	align-items: center;
	min-height: var(--header-height);
}

.mh-wordmark {
	justify-self: start;
	color: var(--heading) !important;
	font-family: var(--font-heading);
	font-size: var(--title-sm);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
	text-decoration: none;
}

.mh-header-home .mh-wordmark { color: var(--text-on-dark) !important; }

.mh-primary-nav {
	display: flex;
	align-items: stretch;
	align-self: stretch;
	gap: var(--space-1);
}

.mh-nav-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	min-height: var(--header-height);
	padding: 0 var(--space-1);
	border: 0;
	background: transparent !important;
	color: var(--heading) !important;
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: 600;
	letter-spacing: var(--tracking-nav);
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: color var(--motion-fast);
}

.mh-header-home .mh-nav-link { color: var(--text-on-dark) !important; }

.mh-header-inner .mh-nav-link:hover,
.mh-header-inner .mh-nav-link:focus-visible,
.mh-header-inner .mh-nav-link.mh-is-current,
.mh-header-inner .mh-products-trigger[aria-expanded="true"] { color: var(--accent) !important; }

.mh-header-home .mh-nav-link:hover,
.mh-header-home .mh-nav-link:focus-visible,
.mh-header-home .mh-nav-link.mh-is-current,
.mh-header-home .mh-products-trigger[aria-expanded="true"] { color: var(--accent-on-dark) !important; }

.mh-nav-link::after {
	position: absolute;
	right: var(--space-1);
	bottom: 0;
	left: var(--space-1);
	height: calc(var(--border-width) * 2);
	background: currentColor;
	content: "";
	opacity: 0;
	transform: scaleX(0.5);
	transition: opacity var(--motion-fast), transform var(--motion-fast);
}

.mh-nav-link:hover::after,
.mh-nav-link:focus-visible::after,
.mh-nav-link.mh-is-current::after,
.mh-products-trigger[aria-expanded="true"]::after {
	opacity: 1;
	transform: scaleX(1);
}

.mh-chevron {
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	border-right: calc(var(--border-width) * 2) solid currentColor;
	border-bottom: calc(var(--border-width) * 2) solid currentColor;
	font-size: 0;
	line-height: 0;
	transform: translateY(-18%) rotate(45deg);
	transform-origin: center;
	transition: transform var(--motion-fast);
}

[aria-expanded="true"] > .mh-chevron { transform: translateY(18%) rotate(225deg); }

.mh-quote-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: end;
	min-height: var(--control-size);
	padding: 0 var(--space-2);
	border: var(--border-width) solid var(--accent);
	border-radius: var(--radius-button);
	background: var(--accent);
	color: var(--card) !important;
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: 600;
	text-decoration: none;
	transition: box-shadow var(--motion-fast), transform var(--motion-fast);
}

.mh-header-home .mh-quote-button {
	border-color: var(--accent-on-dark);
	background: var(--accent-on-dark);
	color: var(--bg-dark) !important;
}

.mh-quote-button:hover,
.mh-quote-button:focus-visible {
	box-shadow: var(--shadow-soft);
	transform: translateY(calc(var(--border-width) * -1));
}

.mh-products-panel {
	position: absolute;
	top: calc(100% + var(--space-1));
	left: 50%;
	width: min(var(--content-max), calc(100% - (var(--page-gutter) * 2)));
	padding: var(--space-3);
	border: var(--border-width) solid var(--border);
	border-radius: var(--radius-card);
	background: var(--card);
	box-shadow: var(--shadow-soft);
	color: var(--heading);
	transform: translateX(-50%);
}

.mh-products-panel[hidden] { display: none; }

.mh-products-layout {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(var(--preview-min), 1.1fr);
	gap: var(--space-4);
	align-items: stretch;
}

.mh-products-copy { padding: var(--space-1) 0; }

.mh-panel-label {
	margin: 0 0 var(--space-2);
	color: var(--accent);
	font-family: var(--font-heading);
	font-size: var(--text-xs);
	font-weight: 700;
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
}

.mh-product-links-grid {
	display: grid;
	gap: var(--space-1);
	grid-auto-rows: 1fr;
}

.mh-product-entry {
	display: grid;
	grid-template-columns: var(--space-5) minmax(0, 1fr);
	gap: var(--space-2);
	align-items: center;
	min-height: var(--space-12);
	padding: var(--space-2);
	border: var(--border-width) solid transparent;
	border-radius: var(--radius-card);
	background: transparent;
	color: var(--heading) !important;
	text-decoration: none;
	transition: border-color var(--motion-fast), background var(--motion-fast), transform var(--motion-fast);
}

.mh-product-entry:hover,
.mh-product-entry:focus-visible,
.mh-product-entry.is-previewed {
	border-color: var(--border);
	background: var(--accent-soft);
	transform: translateX(calc(var(--border-width) * 2));
}

.mh-product-icon {
	display: grid;
	width: var(--space-5);
	height: var(--space-5);
	place-items: center;
	color: var(--accent);
}

.mh-product-icon svg {
	width: var(--icon-size);
	height: var(--icon-size);
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.5;
}

.mh-product-text {
	display: grid;
	gap: var(--space-1);
	align-content: center;
}

.mh-product-text strong {
	color: var(--heading);
	font-family: var(--font-heading);
	font-size: var(--text-base);
	font-weight: 700;
}

.mh-product-text small {
	color: var(--body);
	font-size: var(--text-sm);
	line-height: var(--line-body);
}

.mh-product-preview-stage {
	display: grid;
	min-height: 0;
}

.mh-product-preview {
	display: grid;
	grid-area: 1 / 1;
	grid-template-columns: minmax(calc(var(--space-12) * 2), 1.05fr) minmax(calc(var(--space-12) * 2), 0.95fr);
	min-height: calc(var(--space-12) * 2.5);
	min-width: 0;
	overflow: hidden;
	border-radius: var(--radius-card);
	background: var(--bg-dark);
	opacity: 0;
	visibility: hidden;
	transform: translateY(var(--space-1));
	transition: opacity var(--motion-fast), transform var(--motion-fast), visibility var(--motion-fast);
}

.mh-product-preview.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.mh-preview-image {
	position: relative;
	min-height: calc(var(--space-12) * 2.5);
	overflow: hidden;
	border-right: var(--border-width) solid var(--border-dark);
	background: linear-gradient(145deg, var(--bg-dark), var(--card-dark));
}

.mh-preview-image--wall { background: linear-gradient(35deg, var(--bg-dark), var(--card-dark)); }

.mh-preview-image::before,
.mh-preview-image::after,
.mh-preview-orbit {
	position: absolute;
	border: var(--border-width) solid var(--accent-on-dark);
	border-radius: 50%;
	content: "";
	opacity: 0.45;
}

.mh-preview-image::before { inset: 22% 10%; }
.mh-preview-image::after { inset: 34% 20%; }

.mh-preview-orbit {
	inset: 44% 30%;
	box-shadow: var(--shadow-soft);
}

.mh-preview-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--space-8);
	height: var(--space-8);
	color: var(--accent-on-dark);
	transform: translate(-50%, -50%);
}

.mh-preview-icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.25;
}

.mh-preview-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--space-4);
}

.mh-preview-copy h2 {
	margin: 0 0 var(--space-2);
	color: var(--text-on-dark) !important;
	font-family: var(--font-heading);
	font-size: var(--title-sm);
	font-weight: 700;
	line-height: var(--line-heading);
}

.mh-preview-copy p {
	margin: 0 0 var(--space-3);
	color: var(--muted-on-dark) !important;
	font-size: var(--text-sm);
	line-height: var(--line-body);
}

.mh-preview-copy a {
	align-self: flex-start;
	color: var(--accent-on-dark) !important;
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: 700;
	text-decoration: none;
}

.mh-mobile-header { display: none; }

.mh-site-header :focus-visible {
	outline: calc(var(--border-width) * 2) solid currentColor;
	outline-offset: calc(var(--border-width) * 3);
}

@media (max-width: 1100px) and (min-width: 1024px) {
	.mh-nav-link {
		padding-inline: calc(var(--space-1) / 2);
	}

	.mh-nav-link::after {
		right: calc(var(--space-1) / 2);
		left: calc(var(--space-1) / 2);
	}
}

@media (max-width: 1023px) {
	body:not(.home) { padding-top: var(--header-height-mobile); }

	.mh-desktop-header { display: none; }

	.mh-mobile-header {
		display: block;
		background: var(--bg);
	}

	.mh-header-home .mh-mobile-header { background: var(--header-home); }

	.mh-mobile-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: var(--header-height-mobile);
		padding: 0 var(--page-gutter);
		border-bottom: var(--border-width) solid var(--border);
		background: inherit;
		-webkit-backdrop-filter: blur(var(--space-1));
		backdrop-filter: blur(var(--space-1));
	}

	.mh-header-home .mh-mobile-bar { border-bottom-color: transparent; }

	.mh-header-home.mh-is-scrolled .mh-mobile-header,
	.mh-header-home.mh-menu-active .mh-mobile-header { background: var(--header-dark); }

	.mh-header-home.mh-is-scrolled .mh-mobile-bar,
	.mh-header-home.mh-menu-active .mh-mobile-bar { border-bottom-color: var(--border-dark); }

	.mh-menu-toggle {
		display: grid;
		width: var(--control-size);
		height: var(--control-size);
		place-content: center;
		gap: calc(var(--space-1) / 2);
		padding: 0;
		border: var(--border-width) solid var(--border);
		border-radius: var(--radius-button);
		background: transparent !important;
		color: var(--heading);
		cursor: pointer;
	}

	.mh-header-home .mh-menu-toggle {
		border-color: var(--border-dark);
		color: var(--text-on-dark);
	}

	.mh-menu-toggle span {
		display: block;
		width: var(--space-3);
		height: calc(var(--border-width) * 2);
		background: currentColor;
		transition: transform var(--motion-fast), opacity var(--motion-fast);
	}

	.mh-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(calc(var(--space-1) - var(--border-width))) rotate(45deg); }
	.mh-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.mh-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(calc((var(--space-1) - var(--border-width)) * -1)) rotate(-45deg); }

	.mh-mobile-menu {
		position: fixed;
		top: var(--header-height-mobile);
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1;
		display: flex;
		flex-direction: column;
		height: calc(100dvh - var(--header-height-mobile));
		padding: var(--space-3) var(--page-gutter);
		overflow-y: auto;
		background: var(--bg-dark);
	}

	.mh-mobile-menu[hidden] { display: none; }
	.mh-mobile-nav { display: grid; }

	.mh-mobile-link {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: var(--space-8);
		padding: 0 var(--space-1);
		border: 0;
		border-bottom: var(--border-width) solid var(--border-dark);
		background: transparent !important;
		color: var(--text-on-dark) !important;
		font-family: var(--font-heading);
		font-size: var(--text-lg);
		font-weight: 600;
		text-align: left;
		text-decoration: none;
		cursor: pointer;
	}

	.mh-mobile-link:hover,
	.mh-mobile-link:focus-visible,
	.mh-mobile-link.mh-is-current { color: var(--accent-on-dark) !important; }

	.mh-mobile-link.mh-is-current::before {
		position: absolute;
		bottom: calc(var(--border-width) * -1);
		left: var(--space-1);
		width: var(--space-8);
		height: calc(var(--border-width) * 2);
		background: var(--accent-on-dark);
		content: "";
	}

	.mh-mobile-products-list {
		display: grid;
		gap: var(--space-1);
		padding: var(--space-2) var(--space-1) var(--space-3);
	}

	.mh-mobile-products-list[hidden] { display: none; }

	.mh-mobile-products-list a {
		display: grid;
		gap: var(--space-1);
		padding: var(--space-2);
		border: var(--border-width) solid var(--border-dark);
		border-radius: var(--radius-card);
		background: var(--card-dark);
		color: var(--text-on-dark) !important;
		text-decoration: none;
	}

	.mh-mobile-products-list a:hover,
	.mh-mobile-products-list a:focus-visible { border-color: var(--accent-on-dark); }

	.mh-mobile-products-list strong {
		font-family: var(--font-heading);
		font-size: var(--text-base);
	}

	.mh-mobile-products-list small {
		color: var(--muted-on-dark);
		font-size: var(--text-sm);
	}

	.mh-mobile-quote {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: var(--control-size);
		margin-top: auto;
		padding: 0 var(--space-3);
		border-radius: var(--radius-button);
		background: var(--accent-on-dark);
		color: var(--bg-dark) !important;
		font-family: var(--font-heading);
		font-size: var(--text-sm);
		font-weight: 600;
		text-decoration: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mh-site-header *,
	.mh-site-header *::before,
	.mh-site-header *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
