/**
 * Header — styles Astra's Header Builder output to match design/hero.png.
 * Structure (logo, menu, button) is set in Customizer > Header Builder.
 * Mobile-first: mobile/tablet header first, desktop at 922px (Astra's breakpoint).
 */

/* ---------- Bar ---------- */
#masthead,
#masthead .main-header-bar,
#masthead .ast-primary-header-bar,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
	background-color: var(--cxo-paper);
	border-bottom: 0;
	box-shadow: none;
}

#masthead .ast-primary-header-bar .site-primary-header-wrap {
	min-height: 72px;
}

#masthead .site-primary-header-wrap.ast-container,
#masthead .ast-builder-grid-row-container {
	max-width: none;
	padding-inline: clamp(1rem, 0.2rem + 1.6vw, 2rem);
}

/* ---------- Logo ---------- */
#masthead .custom-logo-link img,
#masthead .site-logo-img img {
	width: 112px;
	max-width: none;
	height: auto;
}

/* ---------- Mobile toggle ---------- */
#masthead .menu-toggle,
#masthead .menu-toggle:hover,
#masthead .menu-toggle:focus {
	background: transparent;
	border: 0;
	color: var(--cxo-ink);
	padding: 0.5rem;
}

#masthead .menu-toggle .ast-mobile-svg {
	fill: var(--cxo-ink);
	width: 24px;
	height: 24px;
}

/* ---------- Header CTA: bold text link, no pill ---------- */
#masthead .ast-header-button-1 .ast-custom-button,
#masthead .ast-header-button-1 .ast-custom-button:hover,
#masthead .ast-header-button-1 .ast-custom-button:focus {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	color: var(--cxo-ink);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.2;
}

#masthead .ast-header-button-1 .ast-custom-button {
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 2px;
	transition: background-size 0.3s var(--cxo-ease), color 0.2s;
}

#masthead .ast-header-button-1 .ast-custom-button:hover,
#masthead .ast-header-button-1 .ast-custom-button:focus-visible {
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 100% 2px;
	color: var(--cxo-red);
}

/* ---------- Off-canvas mobile menu ---------- */
.ast-mobile-popup-drawer .ast-mobile-popup-inner {
	background-color: var(--cxo-ink);
	background-image:
		radial-gradient(90% 60% at 0% 100%, rgba(196, 18, 26, 0.6) 0%, rgba(196, 18, 26, 0) 70%),
		linear-gradient(to right, var(--cxo-grid-line) 1px, transparent 1px),
		linear-gradient(to bottom, var(--cxo-grid-line) 1px, transparent 1px);
	background-size: auto, 56px 56px, 56px 56px;
	color: var(--cxo-white);
}

.ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close {
	color: var(--cxo-white);
}

.ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close .ast-mobile-svg {
	fill: var(--cxo-white);
}

.ast-mobile-popup-drawer .main-header-menu,
.ast-mobile-popup-drawer .main-header-menu .menu-item {
	background: transparent;
	border: 0;
}

.ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link {
	color: var(--cxo-white);
	font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
	font-weight: 500;
	letter-spacing: -0.03em;
	padding: 0.4rem 0;
	border: 0;
}

.ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link:hover,
.ast-mobile-popup-drawer .main-header-menu .current-menu-item > .menu-link {
	color: var(--cxo-white);
	opacity: 0.65;
}

.ast-mobile-popup-drawer .ast-header-button-1 .ast-custom-button {
	display: inline-flex;
	align-items: center;
	min-height: 3.25rem;
	margin-top: 1.5rem;
	padding: 0 2em;
	border: 2px solid var(--cxo-white);
	border-radius: 999px;
	background: transparent;
	color: var(--cxo-white);
	font-weight: 500;
}

/* ---------- Desktop ---------- */
@media (min-width: 922px) {
	#masthead .ast-primary-header-bar .site-primary-header-wrap {
		min-height: clamp(110px, 4rem + 4vw, 148px);
	}

	#masthead .custom-logo-link img,
	#masthead .site-logo-img img {
		width: clamp(112px, 5rem + 2.5vw, 134px);
	}

	/* Menu sits ~10vw right of the logo, like the design. */
	#masthead .ast-builder-menu-1 {
		margin-inline-start: clamp(2rem, 9vw, 10.5rem);
	}

	#masthead .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
		padding: 0 clamp(0.9rem, 1.5vw, 1.8rem);
		color: var(--cxo-muted);
		font-size: clamp(1.0625rem, 0.8rem + 0.5vw, 1.375rem);
		font-weight: 400;
		letter-spacing: -0.015em;
		transition: color 0.2s;
	}

	#masthead .ast-builder-menu-1 .main-header-menu > .menu-item:first-child > .menu-link {
		padding-inline-start: 0;
	}

	#masthead .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:hover,
	#masthead .ast-builder-menu-1 .main-header-menu > .menu-item.current-menu-item > .menu-link,
	#masthead .ast-builder-menu-1 .main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
		color: var(--cxo-ink);
	}

	#masthead .ast-header-button-1 .ast-custom-button {
		font-size: clamp(1.0625rem, 0.8rem + 0.5vw, 1.375rem);
	}
}
