/* Native fine rail header. The original and capsule header styles stay
 * scoped to their own roots; the global Customizer can render this on every
 * route. */
.zeo-rail-header-template {
	position: fixed;
	top: calc(clamp(12px, 2vw, 28px) + var(--zeo-admin-bar-height, 0px));
	right: 0;
	left: 0;
	z-index: 1010;
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 0 18px;
	margin: 0 !important;
	pointer-events: none;
	color: #2F2A28;
}

/* The saved template-part wrapper remains in the document for editor
 * compatibility, but the rail itself owns its fixed placement. */
body .wp-site-blocks > header.wp-block-template-part:has(.zeo-rail-header-template) {
	/* Keep the fixed rail above the first visual section.  The shared sticky
	 * header adds `will-change: transform`, which creates a lower stacking
	 * context even after the wrapper is collapsed to zero height. */
	position: relative;
	z-index: 1020;
	top: auto;
	inset: auto;
	height: 0;
	min-height: 0;
	transform: none;
	will-change: auto;
}

body.zeo-sticky-header.is-zeo-header-hidden .zeo-rail-header-template,
body.zeo-sticky-header.is-zeo-header-hidden .zeo-capsule-header-template {
	top: calc(-100% - var(--zeo-admin-bar-height, 0px));
	visibility: hidden;
	transition: transform 420ms cubic-bezier(.22,.61,.36,1), top 420ms cubic-bezier(.22,.61,.36,1), visibility 0s linear 420ms;
	transform: translate3d(0, -8px, 0);
}

body.zeo-sticky-header:has(.zeo-rail-header.is-open) .zeo-rail-header-template {
	top: calc(clamp(12px, 2vw, 28px) + var(--zeo-admin-bar-height, 0px));
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

/* Inner pages use the same rail markup and navigation, but keep the header in
 * normal flow so the sticky surface reserves its real height.  The homepage
 * continues to use the fixed, padded presentation above. */
.zeo-rail-header-template--inner {
	position: sticky;
	top: var(--zeo-admin-bar-height, 0px);
	right: auto;
	left: auto;
	z-index: 1010;
	display: block;
	width: 100%;
	padding: 0;
	background: #E6E8D5;
	pointer-events: auto;
	transform: none;
	visibility: visible;
	transition: transform 420ms cubic-bezier(.22,.61,.36,1);
}

/* Pin the actual flow box. A sticky child cannot outlive a short parent. */
body .wp-site-blocks > header.wp-block-template-part:has(.zeo-rail-header-template--inner) {
	position: sticky;
	top: var(--zeo-admin-bar-height, 0px);
	height: auto;
	min-height: 0;
}

body.zeo-sticky-header.is-zeo-header-hidden .zeo-rail-header-template--inner {
	top: var(--zeo-admin-bar-height, 0px);
	visibility: visible;
	transform: translate3d(0, calc(-100% - 2px), 0);
}

body.zeo-sticky-header:has(.zeo-rail-header.is-open) .zeo-rail-header-template--inner {
	top: var(--zeo-admin-bar-height, 0px);
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.zeo-rail-header-template,
.zeo-capsule-header-template {
	transition: transform 420ms cubic-bezier(.22,.61,.36,1), top 420ms cubic-bezier(.22,.61,.36,1), visibility 0s linear 0s;
}

.zeo-rail-header,
.zeo-rail-header * {
	box-sizing: border-box;
}

.zeo-rail-header {
	width: min(var(--zeo-rail-width, 1080px), 100%);
	font-family: var(--zeo-body-font, 'Cormorant Garamond', 'Songti SC', STSong, Georgia, serif);
	font-size: 14px;
	line-height: 1.35;
	pointer-events: auto;
}

.zeo-rail-header__bar {
	position: relative;
	z-index: 1;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: clamp(18px, 3.2vw, 52px);
	min-height: 48px;
	padding: 8px 22px;
	border: 0;
	border-bottom: 1px solid var(--zeo-rail-line, rgba(139, 121, 99, 1));
	border-radius: 3px;
	background: transparent;
	box-shadow: 0 2px 10px rgba(40, 36, 34, .08);
	-webkit-backdrop-filter: blur(var(--zeo-rail-blur, 0px));
	backdrop-filter: blur(var(--zeo-rail-blur, 0px));
}

/* Keep the backdrop, selected background layer, and content independent.
 * The alpha belongs only to the selected layer; text and the bottom rule
 * remain fully opaque at every background setting. */
.zeo-rail-header__bar::before,
.zeo-rail-header__bar::after,
.zeo-rail-header__mobile-panel::before,
.zeo-rail-header__mobile-panel::after {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	border-radius: inherit;
	pointer-events: none;
	content: '';
}

.zeo-rail-header__bar::before,
.zeo-rail-header__mobile-panel::before {
	background: var(--zeo-rail-bg, #E6E8D5);
	opacity: var(--zeo-rail-solid-opacity, .96);
}

.zeo-rail-header__bar::after,
.zeo-rail-header__mobile-panel::after {
	background: var(--zeo-rail-image, none) center / cover no-repeat;
	opacity: var(--zeo-rail-image-opacity, 0);
}

.zeo-rail-header__bar > *,
.zeo-rail-header__mobile-panel > * {
	position: relative;
	z-index: 1;
}

/* The inner treatment is deliberately opaque and full width.  It does not
 * consume the homepage's configurable image, alpha, blur or max-width
 * settings; those remain scoped to the floating rail. */
.zeo-rail-header-template--inner .zeo-rail-header {
	width: 100%;
	max-width: none;
}

.zeo-rail-header-template--inner .zeo-rail-header__bar {
	min-height: 68px;
	padding-inline: clamp(20px, 5vw, 72px);
	border-radius: 0;
	background: #E6E8D5;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.zeo-rail-header-template--inner .zeo-rail-header__bar::before,
.zeo-rail-header-template--inner .zeo-rail-header__mobile-panel::before {
	background: #E6E8D5;
	opacity: 1;
}

.zeo-rail-header-template--inner .zeo-rail-header__bar::after,
.zeo-rail-header-template--inner .zeo-rail-header__mobile-panel::after {
	opacity: 0;
}

.zeo-rail-header-template--inner .zeo-rail-header__mobile-panel {
	margin-top: 0;
	border-radius: 0;
	background: #E6E8D5;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.zeo-rail-header a {
	color: inherit;
	text-decoration: none;
}

.zeo-rail-header :where(a, button):focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
}

.zeo-rail-header__brand {
	display: inline-flex;
	align-items: baseline;
	justify-self: start;
	min-height: 32px;
	color: #2F2A28;
	font-family: var(--zeo-display-font, 'Cormorant Garamond', Georgia, serif);
	font-size: clamp(21px, 2.1vw, 27px);
	font-weight: 500;
	letter-spacing: -.025em;
	line-height: 1;
	white-space: nowrap;
}

.zeo-rail-header__brand-dot {
	color: #6A382B;
	font: inherit;
}

.zeo-rail-header__links {
	justify-self: center;
}

.zeo-rail-header__links ul {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(18px, 2.1vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.zeo-rail-header__links li {
	margin: 0;
	padding: 0;
}

.zeo-rail-header__links a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	color: #2F2A28;
	font-size: clamp(12px, 1.15vw, 15px);
	font-weight: 400;
	white-space: nowrap;
	transition: color .22s ease;
}

.zeo-rail-header__links a::after {
	position: absolute;
	right: 0;
	bottom: 2px;
	left: 0;
	height: 1px;
	content: '';
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .22s ease;
}

.zeo-rail-header__links a:hover,
.zeo-rail-header__links a:focus-visible,
.zeo-rail-header__links li.is-current a {
	color: #6A382B;
}

.zeo-rail-header__links a:hover::after,
.zeo-rail-header__links a:focus-visible::after,
.zeo-rail-header__links li.is-current a::after {
	transform: scaleX(1);
}

.zeo-rail-header__actions {
	display: flex;
	align-items: center;
	justify-self: end;
	gap: 18px;
}

.zeo-rail-header__inquire {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 2px 0 3px;
	border-bottom: 1px solid #34463D;
	color: #34463D !important;
	font-size: clamp(12px, 1.15vw, 15px);
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	transition: color .22s ease, border-color .22s ease;
}

.zeo-rail-header__inquire:hover,
.zeo-rail-header__inquire:focus-visible {
	border-color: #6A382B;
	color: #6A382B !important;
}

.zeo-rail-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 8px;
	border: 0;
	background: transparent;
	color: #2F2A28;
	cursor: pointer;
}

.zeo-rail-header__toggle i {
	display: block;
	width: 22px;
	height: 1px;
	margin: 3px 0;
	background: currentColor;
	transition: transform .2s ease, opacity .2s ease;
}

.zeo-rail-header__mobile-panel {
	position: relative;
	isolation: isolate;
	display: none;
	margin-top: 8px;
	padding: 14px 20px 18px;
	border-bottom: 1px solid var(--zeo-rail-line, rgba(139, 121, 99, 1));
	border-radius: 3px;
	background: transparent;
	box-shadow: 0 2px 10px rgba(40, 36, 34, .08);
	-webkit-backdrop-filter: blur(var(--zeo-rail-blur, 0px));
	backdrop-filter: blur(var(--zeo-rail-blur, 0px));
}

.zeo-rail-header__mobile-panel[hidden] {
	display: none;
}

.zeo-rail-header__mobile-panel:not([hidden]) {
	display: block;
}

.zeo-rail-header__links--mobile ul {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	margin: 0;
}

.zeo-rail-header__links--mobile a {
	min-height: 44px;
	font-size: 16px;
}

.zeo-rail-header__links--mobile a::after {
	bottom: 7px;
}

.zeo-rail-header__inquire--mobile {
	margin-top: 10px;
	font-size: 16px;
}

@media (max-width: 760px) {
	.zeo-rail-header-template {
		padding: 0 16px;
	}

	.zeo-rail-header {
		width: min(var(--zeo-rail-width, 1080px), 100%);
	}

	.zeo-rail-header__bar {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		min-height: 48px;
		padding: 5px 12px 5px 20px;
	}

	.zeo-rail-header__brand {
		font-size: clamp(21px, 6vw, 26px);
	}

	.zeo-rail-header__links:not(.zeo-rail-header__links--mobile),
	.zeo-rail-header__actions > .zeo-rail-header__inquire {
		display: none;
	}

	.zeo-rail-header__actions {
		gap: 0;
	}

	.zeo-rail-header__toggle {
		display: inline-flex;
	}

	.zeo-rail-header.is-open .zeo-rail-header__toggle i:nth-of-type(1) {
		transform: translateY(4px) rotate(45deg);
	}

	.zeo-rail-header.is-open .zeo-rail-header__toggle i:nth-of-type(2) {
		opacity: 0;
	}

	.zeo-rail-header.is-open .zeo-rail-header__toggle i:nth-of-type(3) {
		transform: translateY(-4px) rotate(-45deg);
	}
}

/* Site Editor previews should not pin a header over the editor canvas. */
.editor-styles-wrapper .zeo-rail-header-template {
	position: relative;
	inset: auto;
	width: 100%;
	padding: 0;
	margin: 0 0 24px !important;
}

.editor-styles-wrapper .zeo-rail-header {
	width: min(var(--zeo-rail-width, 1080px), 100%);
}

@media (prefers-reduced-motion: reduce) {
	.zeo-rail-header-template,
	.zeo-rail-header-template * {
		transition: none !important;
	}
}
