/* The one header every public page renders (MarketingHeader.tsx): the menu
   bar with its dropdowns. The docs (apps/docs) and the blog (apps/blog,
   Nav.astro) carry byte-for-byte copies of this file.

   Every class is prefixed mh- and every value is written out here rather than
   read from a page's own stylesheet, so the header looks the same on every
   page. The current page is shown by colour alone, so no word changes width.

   Selectors carry the element (nav.mh-nav ...) on purpose: page stylesheets
   have rules like `.pp a { color: inherit }`, which outrank a bare class.

   Dropdowns open on hover and on keyboard focus in CSS alone, so the docs and
   the blog, which are plain HTML, need no script for them.

   Two looks: solid (frosted white, sticky) everywhere, and `mh-over` on the
   landing page, where the bar floats transparent over the dark hero until
   MarketingNavOver.tsx adds `mh-solid` past it. On every page the bar turns
   `mh-dark` (dark frosted) over the dark band and footer at the end: the site
   sets it in MarketingNavOver.tsx, the docs in docs.js, the blog in Nav.astro.
   The dropdowns follow: white frosted glass under a white bar, dark frosted
   glass over the dark hero and over the dark footer.

   The bar's blur sits on a layer behind it (::after), never on the bar itself:
   a blur on the bar would stop the dropdowns inside it from blurring the page. */

nav.mh-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: transparent;
	box-shadow: 0 1px 0 rgba(16, 16, 16, 0.08);
	color: #101010;
	font-family: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.5;
	transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}
nav.mh-nav::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(252, 252, 251, 0.86);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	transition: opacity 0.3s ease, background 0.3s ease;
}
nav.mh-nav .mh-wrap {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 36px;
	max-width: 1440px;
	height: 68px;
	margin: 0 auto;
	padding: 0 56px;
}
nav.mh-nav .mh-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: inherit;
	text-decoration: none;
}
nav.mh-nav .mh-mark {
	display: grid;
	overflow: hidden;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 7px;
	background: linear-gradient(180deg, #2e5446, #20402f);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
nav.mh-nav .mh-name {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* The top words. */
nav.mh-nav .mh-links {
	display: flex;
	align-items: center;
	gap: 4px;
}
nav.mh-nav .mh-top {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 13px;
	border: 0;
	border-radius: 9px;
	background: none;
	color: inherit;
	opacity: 0.88;
	font: inherit;
	font-size: 15px;
	font-weight: 450;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s;
}
nav.mh-nav .mh-top:hover,
nav.mh-nav .mh-menu:hover .mh-top,
nav.mh-nav .mh-menu:focus-within .mh-top {
	opacity: 1;
	background: rgba(16, 16, 16, 0.06);
}
nav.mh-nav .mh-top[aria-current="page"],
nav.mh-nav .mh-top[data-current] {
	opacity: 1;
	color: #26463b;
}
nav.mh-nav .mh-chev {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	transition: transform 0.2s;
}
nav.mh-nav .mh-menu:hover .mh-chev,
nav.mh-nav .mh-menu:focus-within .mh-chev {
	transform: rotate(180deg);
}

/* The dropdowns: frosted dark glass on every page. */
nav.mh-nav .mh-menu {
	position: relative;
}
nav.mh-nav .mh-panel {
	position: absolute;
	top: calc(100% + 12px);
	left: -14px;
	display: flex;
	gap: 10px;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, 0.75);
	border-radius: 18px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 250, 247, 0.58));
	-webkit-backdrop-filter: blur(30px) saturate(1.9) brightness(1.04);
	backdrop-filter: blur(30px) saturate(1.9) brightness(1.04);
	box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.06), 0 1px 2px rgba(16, 16, 16, 0.05), 0 30px 70px rgba(16, 16, 16, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
/* A bridge over the gap, so the pointer can reach the panel without closing it. */
nav.mh-nav .mh-panel::before {
	content: "";
	position: absolute;
	top: -14px;
	right: 0;
	left: 0;
	height: 14px;
}
nav.mh-nav .mh-menu:hover .mh-panel,
nav.mh-nav .mh-menu:focus-within .mh-panel {
	opacity: 1;
	visibility: visible;
	transform: none;
}
nav.mh-nav .mh-grid {
	display: grid;
	gap: 2px;
}
nav.mh-nav .mh-cols-1 {
	grid-template-columns: 260px;
}
nav.mh-nav .mh-cols-2 {
	grid-template-columns: repeat(2, 250px);
}
nav.mh-nav .mh-cols-3 {
	grid-template-columns: repeat(3, 250px);
}
nav.mh-nav .mh-item {
	display: flex;
	gap: 13px;
	padding: 13px 14px;
	border-radius: 12px;
	color: #101010;
	text-decoration: none;
	transition: background 0.15s;
}
nav.mh-nav .mh-item:hover,
nav.mh-nav .mh-item[aria-current="page"] {
	background: rgba(255, 255, 255, 0.6);
}
nav.mh-nav .mh-ic {
	display: grid;
	place-items: center;
	flex: none;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(38, 70, 59, 0.16);
	border-radius: 9px;
	background: rgba(38, 70, 59, 0.07);
}
nav.mh-nav .mh-ic svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: #26463b;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}
nav.mh-nav .mh-item b {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: -0.005em;
}
nav.mh-nav .mh-item small {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	line-height: 1.4;
	color: #6b6b67;
}
nav.mh-nav .mh-feature {
	position: relative;
	display: flex;
	flex: none;
	flex-direction: column;
	width: 240px;
	min-height: 220px;
	padding: 18px;
	overflow: hidden;
	border: 1px solid rgba(159, 209, 182, 0.22);
	border-radius: 13px;
	background:
		radial-gradient(120% 90% at 85% 0%, rgba(159, 209, 182, 0.28), transparent 60%),
		linear-gradient(160deg, #2e5446 0%, #1b3328 55%, #12130f 100%);
	color: #fff;
	text-decoration: none;
}
nav.mh-nav .mh-kick {
	font-family: var(--font-geist-mono), ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9fd1b6;
}
nav.mh-nav .mh-feature b {
	margin-top: auto;
	font-size: 17px;
	line-height: 1.25;
	letter-spacing: -0.01em;
}
nav.mh-nav .mh-feature small {
	margin-top: 6px;
	font-size: 12.5px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.72);
}
nav.mh-nav .mh-more {
	margin-top: 12px;
	font-size: 13px;
	font-weight: 600;
	color: #9fd1b6;
}

/* The buttons on the right. */
nav.mh-nav .mh-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}
nav.mh-nav .mh-sign {
	padding: 0 6px;
	color: inherit;
	opacity: 0.88;
	font-size: 15px;
	text-decoration: none;
}
nav.mh-nav .mh-sign:hover {
	opacity: 1;
}
nav.mh-nav .mh-ghost,
nav.mh-nav .mh-cta {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 15px;
	border-radius: 9px;
	font-size: 14.5px;
	white-space: nowrap;
	text-decoration: none;
}
nav.mh-nav .mh-ghost {
	border: 1px solid rgba(16, 16, 16, 0.18);
	color: inherit;
	font-weight: 550;
}
nav.mh-nav .mh-cta {
	border: 0;
	background: linear-gradient(180deg, #2f5748, #26463b);
	color: #fff;
	font-weight: 650;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
nav.mh-nav a:focus-visible,
nav.mh-nav button:focus-visible {
	outline: 3px solid rgba(38, 70, 59, 0.3);
	outline-offset: 3px;
}

/* Floating over the landing hero: transparent and white until scrolled past. */
nav.mh-nav.mh-over {
	position: fixed;
	right: 0;
	left: 0;
}
nav.mh-nav.mh-over:not(.mh-solid),
nav.mh-nav.mh-dark {
	box-shadow: none;
	color: #fff;
}
nav.mh-nav.mh-over:not(.mh-solid)::after {
	opacity: 0;
}
nav.mh-nav.mh-over.mh-dark::after,
nav.mh-nav.mh-dark:not(.mh-over)::after {
	opacity: 1;
	background: rgba(15, 16, 12, 0.72);
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-panel,
nav.mh-nav.mh-dark .mh-panel {
	border-color: rgba(255, 255, 255, 0.12);
	background: rgba(20, 22, 18, 0.84);
	-webkit-backdrop-filter: blur(28px) saturate(1.4);
	backdrop-filter: blur(28px) saturate(1.4);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-item,
nav.mh-nav.mh-dark .mh-item {
	color: #fff;
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-item:hover,
nav.mh-nav.mh-dark .mh-item:hover,
nav.mh-nav.mh-over:not(.mh-solid) .mh-item[aria-current="page"],
nav.mh-nav.mh-dark .mh-item[aria-current="page"] {
	background: rgba(255, 255, 255, 0.07);
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-item small,
nav.mh-nav.mh-dark .mh-item small {
	color: rgba(255, 255, 255, 0.58);
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-ic,
nav.mh-nav.mh-dark .mh-ic {
	border-color: rgba(159, 209, 182, 0.2);
	background: rgba(159, 209, 182, 0.1);
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-ic svg,
nav.mh-nav.mh-dark .mh-ic svg {
	stroke: #9fd1b6;
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-top:hover,
nav.mh-nav.mh-dark .mh-top:hover,
nav.mh-nav.mh-over:not(.mh-solid) .mh-menu:hover .mh-top,
nav.mh-nav.mh-dark .mh-menu:hover .mh-top,
nav.mh-nav.mh-over:not(.mh-solid) .mh-menu:focus-within .mh-top,
nav.mh-nav.mh-dark .mh-menu:focus-within .mh-top {
	background: rgba(255, 255, 255, 0.1);
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-ghost,
nav.mh-nav.mh-dark .mh-ghost {
	border-color: rgba(255, 255, 255, 0.3);
}
nav.mh-nav.mh-over:not(.mh-solid) .mh-cta,
nav.mh-nav.mh-dark .mh-cta {
	background: #fff;
	color: #101010;
}
nav.mh-nav.mh-over:not(.mh-solid) div.marketing-mobile-nav button.marketing-menu-toggle,
nav.mh-nav.mh-dark div.marketing-mobile-nav button.marketing-menu-toggle {
	border-color: rgba(255, 255, 255, 0.25);
	background: transparent;
	color: #fff;
}
nav.mh-nav.mh-dark .mh-top[aria-current="page"],
nav.mh-nav.mh-dark .mh-top[data-current] {
	color: #9fd1b6;
}

@media (max-width: 1100px) {
	nav.mh-nav::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(252, 252, 251, 0.86);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	transition: opacity 0.3s ease, background 0.3s ease;
}
nav.mh-nav .mh-wrap {
		gap: 20px;
		padding: 0 32px;
	}
	nav.mh-nav .mh-ghost {
		display: none;
	}
}
@media (max-width: 900px) {
	nav.mh-nav::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(252, 252, 251, 0.86);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	transition: opacity 0.3s ease, background 0.3s ease;
}
nav.mh-nav .mh-wrap {
		position: relative;
		gap: 12px;
		height: 64px;
		padding: 0 20px;
	}
	nav.mh-nav .mh-links,
	nav.mh-nav .mh-actions {
		display: none;
	}
	nav.mh-nav .mh-brand {
		min-height: 44px;
	}
}
@media (prefers-reduced-motion: reduce) {
	nav.mh-nav,
	nav.mh-nav .mh-panel,
	nav.mh-nav .mh-chev {
		transition: none;
	}
}
