/* ==========================================================================
   SITE HEADER
   Fixed and transparent over the hero, white glassmorphism once scrolled.
   ========================================================================== */

:root {
	--sm-header-offset: 96px;
}

.sm-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: var(--sm-z-header, 9000);
	padding: 18px 0;
	background: transparent;
	transition: background .45s ease, padding .45s ease, box-shadow .45s ease, backdrop-filter .45s ease;
}

.sm-header * {
	box-sizing: border-box;
}

.sm-header__inner {
	max-width: var(--sm-container-wide, 1480px);
	margin: 0 auto;
	padding: 0 var(--sm-gutter, 40px);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

/* Scrolled state. */
.sm-header.is-scrolled {
	padding: 8px 0;
	background: rgba(255, 255, 255, .82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 8px 30px rgba(27, 27, 27, .08);
	border-bottom: 1px solid var(--sm-gold-16, rgba(201, 161, 91, .18));
}

/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */

.sm-logo {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: var(--sm-gold, #C9A15B);
}

.sm-logo__mark {
	display: flex;
	flex: 0 0 auto;
}

.sm-logo__img {
	max-height: 56px;
	width: auto;
}

.sm-logo__text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.sm-logo__title {
	font-family: var(--sm-font-head, serif);
	font-weight: 700;
	font-size: 24px;
	color: var(--sm-charcoal, #1B1B1B);
	letter-spacing: .3px;
	transition: color .4s ease;
}

.sm-logo__sub {
	font-family: var(--sm-font-body, sans-serif);
	font-weight: 400;
	font-size: 10.5px;
	letter-spacing: .6px;
	color: #6b6b6b;
	transition: color .4s ease;
}

/* A custom logo image replaces the wordmark rather than duplicating it. */
.sm-logo:has(.sm-logo__img) .sm-logo__text {
	display: none;
}

/* --------------------------------------------------------------------------
   Desktop navigation
   -------------------------------------------------------------------------- */

.sm-nav__list {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 30px;
	margin: 0;
	padding: 0;
}

.sm-nav__list > li {
	position: relative;
}

.sm-nav__link {
	position: relative;
	display: inline-block;
	text-decoration: none;
	font-family: var(--sm-font-body, sans-serif);
	font-weight: 500;
	font-size: 15px;
	color: var(--sm-charcoal, #1B1B1B);
	padding: 6px 0;
	transition: color .3s ease;
	/* A menu label must never wrap onto a second line — that is what
	   pushed the header to three rows on a live install. */
	white-space: nowrap;
}

.sm-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 2px;
	width: 0;
	background: var(--sm-gold, #C9A15B);
	transition: width .35s ease;
}

.sm-nav__link:hover,
.sm-nav__link.is-active {
	color: var(--sm-gold, #C9A15B);
}

.sm-nav__link:hover::after,
.sm-nav__link.is-active::after {
	width: 100%;
}

/* Second level — the prototype has no dropdowns, but 48 services need
   somewhere to live, so one is provided in the same visual language. */
.sm-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: -18px;
	min-width: 240px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	background: rgba(255, 255, 255, .97);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--sm-gold-16, rgba(201, 161, 91, .16));
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(27, 27, 27, .14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.sm-nav__list > li:hover > .sub-menu,
.sm-nav__list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sm-nav__list .sub-menu a {
	display: block;
	padding: 9px 18px;
	font-size: 14px;
	color: var(--sm-text-soft, #5d5d5d);
	text-decoration: none;
	transition: color .25s ease, padding .25s ease;
}

.sm-nav__list .sub-menu a:hover {
	color: var(--sm-gold, #C9A15B);
	padding-left: 23px;
}

/* --------------------------------------------------------------------------
   Mega menu

   One menu item replaces six: the panel is built from the Service categories
   and their treatments, so it never needs maintaining by hand.
   -------------------------------------------------------------------------- */

/* Must out-specify `.sm-nav__list > li { position: relative }` above, or the
   panel is trapped inside the width of its own menu item. */
.sm-nav__list > li.sm-nav__item--mega {
	position: static;
}

.sm-mega {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	width: 100%;
	background: rgba(255, 255, 255, .98);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-top: 1px solid var(--sm-gold-16, rgba(201, 161, 91, .16));
	box-shadow: 0 24px 50px rgba(27, 27, 27, .16);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
	z-index: 5;
}

.sm-nav__list > li.sm-nav__item--mega:hover > .sm-mega,
.sm-nav__list > li.sm-nav__item--mega:focus-within > .sm-mega {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sm-mega__inner {
	max-width: var(--sm-container-wide, 1480px);
	margin: 0 auto;
	padding: 34px var(--sm-gutter, 40px) 38px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 30px 34px;
}

.sm-mega__title {
	display: block;
	font-family: var(--sm-font-head, serif);
	font-weight: 700;
	font-size: 19px;
	color: var(--sm-burgundy, #5A2F33);
	text-decoration: none;
	padding-bottom: 10px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--sm-gold-20, rgba(201, 161, 91, .2));
	transition: color .25s ease;
}

.sm-mega__title:hover {
	color: var(--sm-gold, #C9A15B);
}

.sm-mega__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sm-mega__col li {
	margin-bottom: 7px;
}

.sm-mega__col li a {
	display: block;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--sm-text-soft, #5d5d5d);
	text-decoration: none;
	transition: color .25s ease, padding-left .25s ease;
}

.sm-mega__col li a:hover {
	color: var(--sm-gold, #C9A15B);
	padding-left: 5px;
}

.sm-mega__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	font-family: var(--sm-font-btn, sans-serif);
	font-weight: 600;
	font-size: 12px;
	color: var(--sm-burgundy, #5A2F33);
	text-decoration: none;
	transition: gap .25s ease, color .25s ease;
}

.sm-mega__more:hover {
	gap: 11px;
	color: var(--sm-gold, #C9A15B);
}

/* The panel is a desktop affordance; the mobile menu links straight through. */
@media (max-width: 1100px) {
	.sm-mega { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.sm-mega { transition: none; }
}

/* --------------------------------------------------------------------------
   Right-hand side
   -------------------------------------------------------------------------- */

.sm-header__right {
	display: flex;
	align-items: center;
	gap: 18px;
}

.sm-header__cta {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	text-decoration: none;
	font-family: var(--sm-font-btn, sans-serif);
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: .4px;
	color: #fff;
	background: var(--sm-burgundy, #5A2F33);
	padding: 12px 24px;
	border-radius: 40px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(90, 47, 51, .28);
	transition: transform .3s ease, box-shadow .3s ease;
}

.sm-header__cta::before {
	content: "";
	position: absolute;
	top: 0;
	left: -120%;
	width: 60%;
	height: 100%;
	background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent);
	transform: skewX(-20deg);
	transition: left .6s ease;
}

.sm-header__cta:hover,
.sm-header__cta:focus-visible {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(90, 47, 51, .4);
}

.sm-header__cta:hover::before,
.sm-header__cta:focus-visible::before {
	left: 140%;
}

/* --------------------------------------------------------------------------
   Burger
   -------------------------------------------------------------------------- */

.sm-burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 6px;
}

.sm-burger span {
	display: block;
	width: 26px;
	height: 2.5px;
	background: var(--sm-charcoal, #1B1B1B);
	border-radius: 2px;
	transition: transform .35s ease, opacity .35s ease, background .35s ease;
}

.sm-burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.sm-burger.is-open span:nth-child(2) { opacity: 0; }
.sm-burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Legibility over a dark hero.

   The prototype was authored as a one-pager over its light ivory hero, so
   charcoal nav text works there. Inner pages open on a burgundy hero, where
   the same charcoal is unreadable — so the header inverts until scrolled.
   -------------------------------------------------------------------------- */

.sm-has-pagehero .sm-header:not(.is-scrolled) .sm-logo__title,
.sm-has-pagehero .sm-header:not(.is-scrolled) .sm-nav__link {
	color: #fff;
}

.sm-has-pagehero .sm-header:not(.is-scrolled) .sm-logo__sub {
	color: rgba(255, 255, 255, .72);
}

.sm-has-pagehero .sm-header:not(.is-scrolled) .sm-nav__link:hover,
.sm-has-pagehero .sm-header:not(.is-scrolled) .sm-nav__link.is-active {
	color: var(--sm-gold, #C9A15B);
}

.sm-has-pagehero .sm-header:not(.is-scrolled) .sm-burger span {
	background: #fff;
}

/* --------------------------------------------------------------------------
   Full-screen mobile menu
   -------------------------------------------------------------------------- */

.sm-mobile {
	position: fixed;
	inset: 0;
	z-index: var(--sm-z-mobile-menu, 9100);
	background: linear-gradient(160deg, var(--sm-burgundy, #5A2F33), var(--sm-burgundy-deep, #3c1e21));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transform: translateX(100%);
	transition: transform .5s var(--sm-ease-menu, ease);
	overflow-y: auto;
	padding: 80px 24px 40px;
}

.sm-mobile.is-open {
	transform: translateX(0);
}

.sm-mobile__close {
	position: absolute;
	top: 24px;
	right: 26px;
	background: none;
	border: 0;
	color: var(--sm-gold, #C9A15B);
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	padding: 6px;
}

.sm-mobile__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.sm-mobile__list a {
	display: block;
	font-family: var(--sm-font-head, serif);
	font-size: 30px;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	padding: 9px 0;
	transition: color .3s ease;
}

.sm-mobile__list a:hover,
.sm-mobile__list .current-menu-item > a {
	color: var(--sm-gold, #C9A15B);
}

/* Sub-items stay in the flow, one size down. */
.sm-mobile__list .sub-menu {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.sm-mobile__list .sub-menu a {
	font-size: 19px;
	font-family: var(--sm-font-body, sans-serif);
	font-weight: 400;
	color: rgba(255, 255, 255, .78);
	padding: 5px 0;
}

/* Staggered entrance — driven by an index the JS sets, so it works for any
   number of menu items rather than the prototype's hard-coded seven. */
.sm-mobile__list > li {
	opacity: 0;
	transform: translateY(18px);
}

.sm-mobile.is-open .sm-mobile__list > li {
	animation: smMobileIn .5s forwards;
	animation-delay: calc(.12s + (var(--sm-i, 0) * .06s));
}

@keyframes smMobileIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sm-mobile__list > li {
		opacity: 1;
		transform: none;
	}

	.sm-mobile.is-open .sm-mobile__list > li {
		animation: none;
	}
}

.sm-mobile__cta {
	margin-top: 26px;
}

.sm-mobile__social {
	display: flex;
	gap: 20px;
	margin-top: 30px;
}

.sm-mobile__social a {
	color: #fff;
	font-size: 18px;
	width: 42px;
	height: 42px;
	border: 1px solid var(--sm-gold-40, rgba(201, 161, 91, .5));
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background .3s ease, border-color .3s ease, color .3s ease;
}

.sm-mobile__social a:hover {
	background: var(--sm-gold, #C9A15B);
	border-color: var(--sm-gold, #C9A15B);
	color: #1b1b1b;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* The desktop/burger breakpoint itself is injected from Theme Settings —
   how wide the menu is depends entirely on the labels in it. */
@media (max-width: 1280px) {
	.sm-nav__list { gap: 22px; }
	.sm-header__inner { padding: 0 24px; }
	.sm-nav__link { font-size: 14.5px; }
}

@media (max-width: 480px) {
	:root { --sm-header-offset: 80px; }
	.sm-logo__sub { display: none; }
	.sm-logo__title { font-size: 21px; }
	.sm-mobile__list a { font-size: 25px; }
}
