/* ============================================================
   Site header / multi-page navigation

   Desktop (>= 992px): a full-width olive bar with two full-height
   "bookend" CTA tabs — BOOK A TOUR (filled darker green, left) and
   APPLY NOW (gold, right). The centre column holds the split nav
   around the monogram + wordmark. The FAQS | RESIDENT LOG-IN | phone
   row sits beneath the bar in its own .theme-container so it clears
   the bookend tabs and aligns with the page content below.

   Mobile (< 992px): only the monogram (left), phone and hamburger
   (right) stay visible. Nav links, both CTAs, FAQs and the resident
   log-in live in the slide-in drawer, toggled by body.menu-active.
   ============================================================ */

/* Pinned to the top full-time on every viewport — the bar stays put while
   scrolling rather than sliding away on desktop. */
.menubar--section {
	background: var(--color-hero-grey);
	color: var(--color-text-white);
	position: sticky;
	top: 0;
	z-index: 100;
}

/* The bar stretches its children so the bookend tabs run full height */
.menubar--bar {
	display: flex;
	align-items: stretch;
}

/* ---- CTA tabs (shared by desktop bookends + drawer buttons) ---- */
.menubar--cta {
	display: inline-flex;
	flex-direction: column;
	gap: 9px;
	font-family: 'ABC Whyte Inktrap', sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-text-white);
	text-decoration: none;
	white-space: nowrap;
}

.menubar--cta-arrow {
	display: block;
	width: 21px;
	height: 21px;
}

.menubar--cta.book-tour-mod { background: var(--color-footer-green); }
.menubar--cta.apply-mod     { background: var(--color-gold); color: var(--color-gold-text); }

.menubar--cta:hover,
.menubar--cta:focus-visible { color: var(--color-gold-text); }

.menubar--cta.apply-mod:hover,
.menubar--cta.apply-mod:focus-visible { color: var(--color-body-cream); }

/* Desktop bookends: full-height tabs, left-aligned text + arrow below */
.menubar--bookend {
	align-items: flex-start;
	justify-content: center;
	padding: 0 clamp(20px, 2vw, 34px);
	max-height: 70px;
}

/* ---- Centre column ---- */
.menubar--container {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	padding: 16px var(--theme-content-padding) 8px;
}

/* Main row: left nav | logo | right nav */
.menubar--main {
	display: flex;
	align-items: center;
}

.menubar--logo-wrap {
	flex: 0 0 auto;
	display: block;
	padding: 0 clamp(24px, 3.4vw, 54px);
	line-height: 0;
}

.menubar--logo {
	display: block;
	width: clamp(160px, 14vw, 230px);
	height: auto;
}

/* ---- Nav lists ---- */
.menubar--menu {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.2vw, 40px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.menubar--menu.left-mod  { flex: 1; justify-content: flex-end; }
.menubar--menu.right-mod { flex: 1; justify-content: flex-start; }

.menubar--menu a {
	font-family: 'ABC Whyte Inktrap', sans-serif;
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--color-text-white);
	text-decoration: none;
	padding: 4px 0;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.menubar--menu a:hover,
.menubar--menu a:focus,
.menubar--menu .current-menu-item > a {
	color: var(--color-gold-text);
	border-bottom-color: var(--color-gold);
}

/* ---- FAQs | resident log-in | phone row ----
   .menubar--util-bar is a .theme-container sibling of .menubar--bar, so the row
   is measured against the viewport (max-width + padding) exactly like the content
   containers below it, instead of against the bar's bookend-inset centre column. */
.menubar--util-bar {
	padding-bottom: 16px;
}

.menubar--util {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
}

.menubar--util-link {
	font-family: 'ABC Whyte Inktrap', sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-text-white);
	text-decoration: none;
	white-space: nowrap;
}

.menubar--util-link:hover,
.menubar--util-link:focus { color: var(--color-gold-text); }

.menubar--util-divider {
	width: 1px;
	height: 14px;
	background: rgba(246, 240, 230, 0.4);
}

/* ---- Hamburger ---- */
.menubar--hamburger {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 8px;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.menubar--hamburger span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--color-text-white);
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-active .menubar--hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-active .menubar--hamburger span:nth-child(2) { opacity: 0; }
.menu-active .menubar--hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile-only chrome is hidden on desktop */
.menubar--mono,
.menubar--mobile-actions,
.menubar--drawer {
	display: none;
}

/* ============================================================
   Mobile / drawer (< 1300px) — the dense split nav needs ~1300px
   ============================================================ */
@media (max-width: 1299px) {

	/* Hide the desktop layout */
	.menubar--bookend,
	.menubar--main,
	.menubar--util-bar {
		display: none;
	}

	/* Top bar: monogram (left) ........ phone + hamburger (right) */
	.menubar--container {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 12px var(--theme-content-padding);
	}

	.menubar--mono {
		display: block;
		line-height: 0;
		position: relative;
		z-index: 95;
	}

	.menubar--mono img {
		display: block;
		width: auto;
		height: 34px;
	}

	.menubar--mobile-actions {
		display: flex;
		align-items: center;
		gap: 16px;
		position: relative;
		z-index: 95;
	}

	.menubar--mobile-phone {
		font-family: 'ABC Whyte Inktrap', sans-serif;
		font-size: 0.82rem;
		letter-spacing: 0.04em;
		color: var(--color-text-white);
		text-decoration: none;
		white-space: nowrap;
	}

	.menubar--mobile-phone:hover,
	.menubar--mobile-phone:focus { color: var(--color-gold-text); }

	/* ---- Drawer ---- */
	.menubar--drawer {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 30px;
		position: fixed;
		inset: 0;
		background: var(--color-hero-grey);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.3s ease, visibility 0s linear 0.3s;
		z-index: 90;
		padding: 80px 24px 40px;
	}

	.menu-active .menubar--drawer {
		transform: translateX(0);
		visibility: visible;
		transition: transform 0.3s ease, visibility 0s;
	}

	.menubar--drawer-nav {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 14px;
	}

	.menubar--drawer .menubar--menu {
		flex-direction: column;
		gap: 14px;
	}

	.menubar--drawer .menubar--menu a {
		font-size: 1.05rem;
	}

	.menubar--drawer-ctas {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 14px;
		width: min(82%, 320px);
		margin-top: 6px;
	}

	/* Drawer CTAs render as horizontal buttons (label + arrow inline) */
	.menubar--drawer .menubar--cta {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: 100%;
		padding: 15px 22px;
	}

	.menubar--drawer .menubar--cta-arrow {
		width: 18px;
		height: 18px;
	}

	.menubar--drawer-resident {
		font-family: 'ABC Whyte Inktrap', sans-serif;
		font-size: 0.82rem;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		color: var(--color-text-white);
		text-decoration: none;
		margin-top: 4px;
	}

	.menubar--drawer-resident:hover,
	.menubar--drawer-resident:focus { color: var(--color-gold-text); }
}
