/* =========================================================
   Site Header
   ========================================================= */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: #fff;
	border-bottom: 1px solid #e8e8e6;
	padding-block: 0;
	height: var(--header-height);
	display: flex;
	align-items: center;
	transition: box-shadow var(--transition);
}

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

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

.site-header.is-sticky {
	box-shadow: 0 2px 16px rgba(0,0,0,.1);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	width: 100%;
}

/* =========================================================
   Logo / Brand
   ========================================================= */
.site-header__brand {
	flex-shrink: 0;
}

.site-header__brand .custom-logo {
	height: 36px;
	min-height: 40px;
	width: auto;
}

.site-header__name {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 1.375rem;
	color: var(--color-primary);
	text-decoration: none;
	letter-spacing: .02em;
	transition: color var(--transition);
}

.site-header__name:hover {
	color: var(--color-dark);
}

/* =========================================================
   Primary Navigation
   ========================================================= */
.primary-nav {
	flex: 1;
	display: flex;
	justify-content: flex-end;
}

.primary-nav__list {
	display: flex;
	align-items: center;
	gap: 0;
}

.primary-nav__list li {
	position: relative;
}

.primary-nav__list a {
	display: block;
	padding: .5rem .875rem;
	font-family: var(--font-display);
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--color-text);
	text-decoration: none;
	border-radius: 0;
	position: relative;
	transition: color var(--transition);
}

.primary-nav__list a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: .875rem;
	right: .875rem;
	height: 2px;
	background: var(--color-primary);
	transform: scaleX(0);
	transition: transform var(--transition);
}

.primary-nav__list a:hover,
.primary-nav__list .current-menu-item > a,
.primary-nav__list .current-menu-ancestor > a {
	color: var(--color-primary);
}

.primary-nav__list a:hover::after,
.primary-nav__list .current-menu-item > a::after,
.primary-nav__list .current-menu-ancestor > a::after {
	transform: scaleX(1);
}

/* Dropdown */
.primary-nav__list .sub-menu {
	position: absolute;
	top: calc(100% + .25rem);
	left: 0;
	min-width: 200px;
	background: #fff;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	border: 1px solid #eee;
	padding: .5rem 0;
	z-index: 200;
	/* Hidden by default — use opacity/visibility so we can delay the hide */
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.2s ease,
		visibility 0s linear 0.3s;
}

.primary-nav__list li:hover > .sub-menu,
.primary-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transition:
		opacity 0.2s ease,
		visibility 0s linear 0s;
}

.primary-nav__list .sub-menu a {
	border-radius: 0;
	padding: .5rem 1rem;
	color: var(--color-text);
	font-size: .75rem;
}

.primary-nav__list .sub-menu a::after {
	display: none;
}

.primary-nav__list .sub-menu a:hover {
	color: var(--color-primary);
	background: var(--color-light);
}

/* CTA in header */
.site-header__cta {
	flex-shrink: 0;
	margin-left: auto;
}

/* =========================================================
   Hamburger (mobile)
   ========================================================= */
.hamburger {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 28px;
	height: 20px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.hamburger__bar {
	display: block;
	height: 2px;
	background: var(--color-dark);
	border-radius: 2px;
	transition: transform var(--transition), opacity var(--transition);
	transform-origin: center;
}

.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1) {
	transform: translateY(9px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2) {
	opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3) {
	transform: translateY(-9px) rotate(-45deg);
}

/* =========================================================
   Body offset for fixed header
   ========================================================= */
body {
	padding-top: var(--header-height);
}

/* =========================================================
   Mobile Breakpoint
   ========================================================= */
@media (max-width: 767px) {
	.hamburger {
		display: flex;
		margin-left: auto;
	}

	.site-header__cta {
		display: none;
	}

	.primary-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-top: 1px solid #eee;
		overflow: hidden;
		max-height: 0;
		transition: max-height .3s ease;
	}

	.primary-nav.is-open {
		max-height: 80vh;
		overflow-y: auto;
	}

	.primary-nav__list {
		flex-direction: column;
		align-items: stretch;
		padding: .5rem 0 1rem;
		gap: 0;
	}

	.primary-nav__list a {
		padding: .75rem 1.5rem;
	}

	.primary-nav__list a::after {
		display: none;
	}

	.primary-nav__list a:hover,
	.primary-nav__list .current-menu-item > a {
		background: var(--color-light);
	}

	.primary-nav__list .sub-menu {
		position: static;
		display: block;
		background: #f9f9f8;
		box-shadow: none;
		border-radius: 0;
		border: none;
		border-top: 1px solid #eee;
		padding: 0;
	}

	.primary-nav__list .sub-menu a {
		padding-left: 2.5rem;
	}
}

/* =========================================================
   Sentinel — zero-height element just below the hero
   Used by JS IntersectionObserver for sticky trigger
   ========================================================= */
#hero-sentinel {
	position: absolute;
	top: calc(var(--header-height) + 100vh);
	left: 0;
	height: 1px;
	width: 100%;
	pointer-events: none;
}
