/**
 * GO Header — docs/sections/HEADER-HERO.md §4.
 * Breakpoint: 1000 px (inline nav ≥ 1000, menu button below).
 */

.go-header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	right: 0;
	left: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	color: var(--go-ink);
	font-family: var(--go-font-sans);
}

.go-header-spacer {
	height: var(--go-header-h);
}

.go-header__bar {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 24px;
	height: 76px;
	padding-inline: var(--go-pad-x);
}

.go-header a:focus-visible,
.go-header button:focus-visible {
	outline: 2px solid var(--go-lavender);
	outline-offset: 3px;
}

/* ---------- Logo: compact header lockup, 154 px wide ---------- */

.go-logo {
	display: inline-flex;
	align-items: center;
	gap: 7.5px;
	color: var(--go-ink);
	text-decoration: none;
}

.go-logo:hover,
.go-logo:focus-visible {
	color: var(--go-ink);
}

.go-logo__tile {
	flex: none;
	width: 45px;
	height: 45px;
}

/*
 * Customizer logo: shown at the lockup's 45 px height, width from the image's aspect ratio.
 * Scoped to .go-header to beat Elementor's `.elementor img { height: auto; max-width: 100% }`.
 */
.go-header .go-logo__img {
	display: block;
	width: auto;
	max-width: none;
	height: 45px;
}

.go-logo__name {
	display: flex;
	flex-direction: column;
	font-size: 16px;
	font-weight: 400;
	line-height: 17px;
	letter-spacing: -.01em;
	white-space: nowrap;
}

.go-logo__name > span:first-child {
	font-weight: 500;
}

/* ---------- Desktop nav ---------- */

.go-nav,
.go-mnav {
	margin: 0;
	padding: 0;
	list-style: none;
}

.go-nav {
	display: flex;
	justify-content: center;
	gap: 2px;
}

.go-nav a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 12px;
	border-radius: 10px;
	color: var(--go-text-2);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: color .2s ease;
}

.go-nav a::before,
.go-mnav a::before {
	content: "";
	flex: none;
	width: var(--go-marker);
	height: var(--go-marker);
	background: var(--go-ink);
	opacity: 0;
	transition: opacity .25s ease;
}

.go-nav a:hover,
.go-nav a:focus-visible,
.go-nav a[aria-current] {
	color: var(--go-ink);
}

.go-nav a[aria-current]::before,
.go-mnav a[aria-current]::before {
	opacity: 1;
}

/* ---------- Menu button ---------- */

.go-header__toggle {
	display: none;
	justify-self: end;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--go-line);
	border-radius: 12px;
	background: var(--go-white);
	color: var(--go-ink);
	cursor: pointer;
}

.go-header__toggle:hover,
.go-header__toggle:focus {
	background: var(--go-white);
	color: var(--go-ink);
}

.go-header__bar-line {
	transform-box: fill-box;
	transform-origin: center;
	transition: transform .4s var(--go-ease);
}

.go-header.is-open .go-header__bar-line--1 {
	transform: translateY(3px) rotate(45deg);
}

.go-header.is-open .go-header__bar-line--2 {
	transform: translateY(-3px) rotate(-45deg);
}

/* ---------- Mobile menu panel ---------- */

.go-mobile-menu {
	display: flex;
	flex-direction: column;
	height: calc(100dvh - var(--go-header-h) - var(--wp-admin--admin-bar--height, 0px));
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--go-white);
	animation: go-m-in .35s var(--go-ease);
}

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

.go-mobile-menu__inner {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
}

.go-mnav li + li a {
	border-top: 1px solid var(--go-line);
}

.go-mnav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px var(--go-pad-x);
	color: var(--go-ink);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

.go-mnav a:hover,
.go-mnav a:focus-visible {
	color: var(--go-ink);
}

.go-mnav a:focus-visible {
	outline-offset: -3px;
}

.go-mobile-menu__cta {
	margin-top: auto;
	padding: 20px var(--go-pad-x);
	border-top: 1px solid var(--go-line);
}

@keyframes go-m-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
}

/* Page scroll is locked while the mobile menu is open (go-header.js). */
html.go-menu-open,
html.go-menu-open body {
	overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 999.98px) {
	.go-header__bar {
		grid-template-columns: auto 1fr;
	}

	.go-header__nav,
	.go-header__cta {
		display: none;
	}

	.go-header__toggle {
		display: inline-grid;
	}
}

@media (min-width: 1000px) {
	.go-mobile-menu,
	.go-mobile-menu[hidden] {
		display: none;
	}
}

/* 1000–1099 px: the design's nav spacing overflows the bar by up to ~50 px, so tighten it. */
@media (min-width: 1000px) and (max-width: 1099.98px) {
	.go-header__bar {
		gap: 16px;
	}

	.go-nav a {
		padding-inline: 7px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.go-mobile-menu {
		animation: none;
	}

	.go-header__bar-line,
	.go-nav a,
	.go-nav a::before,
	.go-mnav a::before {
		transition: none;
	}
}
