/*
 * Header: fixed bar with wordmark, menu (dropdowns from 1100px), match-call
 * button; below 1100px a burger opens the full-screen menu.
 * States (site.js): .is-scrolled (solid bar), .is-hidden (scrolling down).
 */

.ls-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: var(--header-h);
	transition: background-color 0.4s ease, box-shadow 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.admin-bar .ls-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .ls-header { top: 46px; }
}

.ls-header.is-scrolled {
	background-color: rgba(247, 241, 235, 0.94);
	box-shadow: 0 1px 0 var(--line);
	backdrop-filter: saturate(1.2) blur(10px);
}

.ls-header.is-hidden {
	transform: translateY(-105%);
}

/* On a page that opens with a full-width photo, the bar is light on the photo
   until it turns solid (.is-scrolled). */
body:has(.ls-main > .ls-photo-hero:first-child) .ls-header:not(.is-scrolled) {
	--header-on-photo: var(--white);
}

body:has(.ls-main > .ls-photo-hero:first-child) .ls-header:not(.is-scrolled) :is(.ls-header__brand, .ls-nav__list > li > a, .ls-nav__list > li > .ls-subtoggle, .ls-burger) {
	color: var(--header-on-photo);
	transition: color 0.4s ease;
}

.ls-header__inner {
	display: flex;
	align-items: center;
	gap: var(--s6);
	height: 100%;
	max-width: calc(1360px + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.ls-header__brand {
	flex: 0 0 auto;
	font-family: var(--serif);
	font-size: var(--fs-h4);
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.01em;
	text-decoration: none;
	color: var(--wine);
	white-space: nowrap;
}

/* Logo SVG: 1.34em tall keeps the name the same size as the old text wordmark. */
.ls-logo {
	display: block;
	width: auto;
	height: 1.34em;
	overflow: visible;
}

/* Content starts below the fixed header; photo openings slide under it. */
.ls-has-header .ls-main {
	padding-top: var(--header-h);
}

.ls-has-header .ls-main > .ls-under-header:first-child {
	margin-top: calc(-1 * var(--header-h));
}

/* Desktop menu ------------------------------------------------------------- */
.ls-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.ls-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2vw, 2.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ls-nav__list > li {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.3rem;
	margin: 0;
}

.ls-nav__list a {
	position: relative;
	display: inline-block;
	padding-block: var(--s3);
	font-size: var(--fs-small);
	font-weight: 400;
	text-decoration: none;
	color: var(--ink);
	white-space: nowrap;
}

.ls-nav__list > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.35rem;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s ease;
}

.ls-nav__list > li > a:hover::after,
.ls-nav__list > li > a:focus-visible::after,
.ls-nav__list > .current-menu-item > a::after,
.ls-nav__list > .current-menu-ancestor > a::after,
.ls-nav__list > .current-menu-parent > a::after {
	transform: scaleX(1);
}

.ls-nav__list > .current-menu-item > a,
.ls-nav__list > .current-menu-ancestor > a,
.ls-nav__list > .current-menu-parent > a {
	color: var(--wine);
}

.ls-subtoggle {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	color: var(--ink);
	transition: transform 0.3s ease;
}

.ls-subtoggle[aria-expanded="true"] {
	transform: rotate(180deg);
}

.ls-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: -1.25rem;
	z-index: 10;
	min-width: 260px;
	margin: 0;
	padding: var(--s3) 0;
	list-style: none;
	background: var(--linen);
	box-shadow: 0 18px 40px -18px rgba(43, 29, 31, 0.35), 0 0 0 1px var(--line);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	/* Visibility flips at once on open, and only after the fade on close. */
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.ls-nav li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

@media (hover: hover) {
	.ls-nav li.menu-item-has-children:hover > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}
}

.ls-nav .sub-menu li {
	margin: 0;
}

.ls-nav .sub-menu a {
	display: block;
	padding: var(--s3) 1.25rem;
	font-size: var(--fs-small);
	white-space: normal;
}

.ls-nav .sub-menu a:hover,
.ls-nav .sub-menu a:focus-visible,
.ls-nav .sub-menu .current-menu-item > a {
	background: var(--linen-deep);
	color: var(--wine);
}

.ls-header__cta {
	flex: 0 0 auto;
	min-height: 46px;
	padding-inline: 1.5em;
}

/* Burger ---------------------------------------------------------------------- */
.ls-burger {
	display: none;
	align-items: center;
	gap: var(--s3);
	min-height: 44px;
	padding: 0 0 0 var(--s3);
	color: var(--wine);
}

.ls-burger__lines {
	display: grid;
	gap: 6px;
	width: 26px;
}

.ls-burger__lines span {
	display: block;
	height: 1.5px;
	background: currentColor;
}

.ls-burger__lines span:last-child {
	width: 70%;
	justify-self: end;
}

.ls-burger__label {
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

@media (max-width: 1099px) {
	.ls-nav,
	.ls-header__cta {
		display: none;
	}

	.ls-header__inner {
		justify-content: space-between;
	}

	.ls-burger {
		display: inline-flex;
	}
}

@media (max-width: 767px) {
	.ls-burger__label { display: none; }
}

/* Full-screen mobile menu --------------------------------------------------------- */
.ls-menu {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	padding: 0 var(--gutter) var(--s6);
	overflow-y: auto;
	background: var(--linen);
	opacity: 0;
	transform: translateY(-12px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.ls-menu[hidden] {
	display: none;
}

.ls-menu.is-open {
	opacity: 1;
	transform: none;
}

.ls-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--header-h);
}

.ls-menu__close {
	position: relative;
	width: 44px;
	height: 44px;
	color: var(--wine);
}

.ls-menu__close span::before,
.ls-menu__close span::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 9px;
	right: 9px;
	height: 1.5px;
	background: currentColor;
	transform: rotate(45deg);
}

.ls-menu__close span::after {
	transform: rotate(-45deg);
}

.ls-menu__nav {
	margin-top: var(--s6);
}

.ls-menu__list,
.ls-menu__list .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ls-menu__list > li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	border-bottom: 1px solid var(--line);
}

.ls-menu__list > li > a {
	flex: 1;
	padding: var(--s4) 0;
	font-family: var(--serif);
	font-size: var(--fs-h3);
	line-height: 1.15;
	text-decoration: none;
	color: var(--wine);
}

.ls-menu .ls-subtoggle {
	width: 44px;
	height: 44px;
	color: var(--wine);
}

.ls-menu__list .sub-menu {
	flex-basis: 100%;
	display: none;
	padding-bottom: var(--s4);
}

.ls-menu__list li.is-open > .sub-menu {
	display: block;
}

.ls-menu__list .sub-menu li {
	margin: 0;
}

.ls-menu__list .sub-menu a {
	display: block;
	padding: var(--s3) 0 var(--s3) var(--s4);
	font-size: var(--fs-body);
	text-decoration: none;
	color: var(--ink);
}

.ls-menu__list .current-menu-item > a {
	color: var(--wine);
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.ls-menu__cta {
	margin-top: var(--s7);
}

.ls-menu__cta .ls-btn {
	width: 100%;
}

body.ls-menu-open {
	overflow: hidden;
}
