.mfb-site-header {
	position: relative;
	z-index: 20;
	background: var(--mfb-color-cream);
}

.mfb-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mfb-space-md);
	min-height: clamp(4.5rem, 3.5rem + 3vw, 7.25rem);
	padding-block: 0.625rem;
}

.mfb-site-header__logo {
	flex-shrink: 0;
	width: clamp(9.5rem, 7rem + 10vw, 17rem);
	color: var(--mfb-color-ink);
	font-family: var(--mfb-font-display);
	font-weight: 600;
	text-decoration: none;
}

.mfb-site-header__logo-image {
	width: 100%;
}

/* Larger on phones, as on the original homepage, while leaving room for the menu button at 320px. */
@media (max-width: 47.999em) {
	.mfb-site-header__logo {
		width: clamp(9.5rem, 50vw, 11.75rem);
	}
}

/* Desktop navigation */

/* White pill holding the links, with the last item ("Contact us") styled like the primary button inside it. */
.mfb-site-nav {
	padding: 0.375rem 0.375rem 0.375rem 0.75rem;
	border-radius: var(--mfb-radius-pill);
	background: var(--mfb-color-white);
	/* A tight contact shadow plus a soft lift, so the pill reads as raised off the cream header. */
	box-shadow:
		0 1px 2px rgb(45 45 45 / 6%),
		0 0.375rem 1.25rem -0.375rem rgb(45 45 45 / 5%);
}

.mfb-site-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(0.25rem, -0.5rem + 1.2vw, 1rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mfb-site-nav__list .mfb-menu-only {
	display: none;
}

.mfb-site-nav__list a {
	display: inline-flex;
	align-items: center;
	min-height: 2.5rem;
	padding-inline: 0.75rem;
	border-radius: var(--mfb-radius-pill);
	color: var(--mfb-color-ink);
	font-size: var(--mfb-text-small);
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
	transition:
		color 0.3s ease,
		background-color 0.3s ease;
}

.mfb-site-nav__list .mfb-button {
	min-height: 0;
	padding-inline: 0;
	transition: padding 0.5s var(--mfb-ease-out-quart);
}

@media (hover: hover) {
	.mfb-site-nav__list a:not(.mfb-button):hover {
		color: var(--mfb-color-stone);
	}

	.mfb-site-nav__list .mfb-button:hover {
		padding-inline-end: calc(var(--mfb-button-size) + var(--mfb-button-gap));
	}
}

/* Compact menu: shown below 60em once the script has enhanced it. */

.mfb-menu {
	position: relative;
	display: none;
}

@media (max-width: 59.999em) {
	.mfb-site-header:has(.mfb-menu.is-enhanced) .mfb-site-nav {
		display: none;
	}

	.mfb-menu.is-enhanced {
		display: block;
	}
}

.mfb-menu__toggle {
	position: relative;
	z-index: 2;
	display: grid;
	width: 6.25rem;
	height: 2.5rem;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--mfb-radius-pill);
	background: var(--mfb-color-sun-soft);
	color: var(--mfb-color-ink);
	font-family: var(--mfb-font-body);
	font-size: var(--mfb-text-caption);
	font-weight: 500;
	line-height: 1;
	letter-spacing: var(--mfb-tracking-label);
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.45s var(--mfb-ease-in-out);
}

.mfb-menu__label {
	grid-area: 1 / 1;
	place-self: center;
	transition:
		transform 0.45s var(--mfb-ease-in-out),
		opacity 0.3s ease;
}

.mfb-menu__label--close {
	color: var(--mfb-color-sun-soft);
	opacity: 0;
	transform: translateY(100%);
}

.mfb-menu.is-open .mfb-menu__toggle {
	background: var(--mfb-color-ink);
}

.mfb-menu.is-open .mfb-menu__label--open {
	opacity: 0;
	transform: translateY(-100%);
}

.mfb-menu.is-open .mfb-menu__label--close {
	opacity: 1;
	transform: none;
}

.mfb-menu__panel {
	position: absolute;
	top: -0.625rem;
	right: -0.625rem;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--mfb-space-lg);
	width: min(100vw - 2.5rem, 30rem);
	max-height: min(100svh - 3.75rem, 40.625rem);
	padding: 5.625rem 1.875rem 2.5rem;
	overflow-y: auto;
	border-radius: 1.5625rem;
	background: var(--mfb-color-sun-soft);
	clip-path: inset(0.625rem 0.625rem calc(100% - 3.125rem) calc(100% - 6.875rem) round 1.5625rem);
	transition: clip-path 0.75s var(--mfb-ease-in-out);
}

.mfb-menu__panel[hidden] {
	display: none;
}

.mfb-menu.is-open .mfb-menu__panel {
	clip-path: inset(0 round 1.5625rem);
}

.mfb-menu__list,
.mfb-menu__social-list {
	display: flex;
	flex-direction: column;
	padding: 0;
	list-style: none;
}

.mfb-menu__list {
	gap: 0.5rem;
}

.mfb-menu__social-list {
	gap: 0.3125rem;
}

.mfb-menu__list li {
	overflow: hidden;
}

.mfb-menu__list a,
.mfb-menu__social-list a {
	display: inline-block;
	color: #000;
	text-decoration: none;
	opacity: 0;
	transition:
		transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1),
		opacity 0.4s ease;
	transition-delay: 0s;
}

.mfb-menu__list a {
	font-size: var(--mfb-text-menu);
	line-height: var(--mfb-leading-heading);
	letter-spacing: var(--mfb-tracking-heading);
	transform: translateY(100%);
}

.mfb-menu__social-list a {
	font-size: var(--mfb-text-small);
	transform: translateY(1.25rem);
}

.mfb-menu.is-open .mfb-menu__list a,
.mfb-menu.is-open .mfb-menu__social-list a {
	opacity: 1;
	transform: none;
	transition-delay: calc(0.4s + var(--mfb-index, 0) * 0.1s);
}
