/* Global header — fixed over the page top; transparent until scrolled, then glass. */
:not(#_) .aob-header,
:not(#_) .aob-header *,
:not(#_) .aob-header *::before,
:not(#_) .aob-header *::after { box-sizing: border-box; }

:not(#_) .aob-header {
	--aob-header-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--aob-header-time: 0.45s;
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 1000;
	font-family: var(--aob-font-body);
}
:not(#_) .admin-bar .aob-header { top: 32px; }
@media (max-width: 782px) { :not(#_) .admin-bar .aob-header { top: 46px; } }

:not(#_) .aob-header img { display: block; max-width: none; }

:not(#_) .aob-header__bar {
	position: relative;
	padding-block: 12px;
	transition: padding var(--aob-header-time) var(--aob-header-ease);
}
/* Background layer fades in (animating opacity is smoother than animating backdrop-filter itself). */
:not(#_) .aob-header__bar::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(17, 16, 14, 0.72), rgba(17, 16, 14, 0.5));
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	border-bottom: 1px solid rgba(200, 138, 74, 0.2);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transition: opacity var(--aob-header-time) var(--aob-header-ease);
	pointer-events: none;
}
:not(#_) .aob-header.is-scrolled .aob-header__bar::before,
:not(#_) .aob-header.is-open .aob-header__bar::before { opacity: 1; }

:not(#_) .aob-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* logo (two cropped source images, see Figma "image 449"/"image 450") */
:not(#_) .aob-header__logo {
	position: relative;
	display: block;
	flex: none;
	width: 150px;
	aspect-ratio: 292.3 / 64;
	transition: width var(--aob-header-time) var(--aob-header-ease);
}
:not(#_) .aob-header__logo-flame,
:not(#_) .aob-header__logo-text { position: absolute; display: block; overflow: hidden; }
:not(#_) .aob-header__logo-flame { left: 0; top: 0; width: 19.65%; height: 99.4%; }
:not(#_) .aob-header__logo-text { left: 21.3%; top: 16.2%; width: 78.7%; height: 83.8%; }
:not(#_) .aob-header__logo-flame img { position: absolute; left: -52.56%; top: 4.17%; width: 205.13%; height: 138.89%; }
:not(#_) .aob-header__logo-text img { position: absolute; left: -0.09%; top: -242.86%; width: 100.17%; height: 342.86%; }

/* nav: mobile = dropdown panel */
:not(#_) .aob-header__nav {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 8px 0 0;
	padding: 12px;
	border: 1px solid var(--aob-glass-border);
	border-radius: 20px;
	background: rgba(17, 16, 14, 0.82);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	box-shadow: var(--aob-shadow-glass);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.3s var(--aob-header-ease), transform 0.3s var(--aob-header-ease), visibility 0s 0.3s;
}
:not(#_) .aob-header.is-open .aob-header__nav {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}
:not(#_) .aob-header__link {
	padding: 10px 12px;
	border: 1px solid transparent;
	border-radius: 53px;
	color: var(--aob-light-2);
	font-size: 16px;
	line-height: 22.4px;
	text-decoration: none;
	white-space: nowrap;
	position: relative;
	transition: color 0.2s, background-color 0.25s, border-color 0.25s;
}
/* Hover: brand underline growing from the centre (desktop); pill highlight in the burger menu (below 1024px). */
:not(#_) .aob-header__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--aob-gradient-button);
	transform: scaleX(0);
	transition: transform 0.3s var(--aob-btn-ease);
}
:not(#_) .aob-header__link:hover { color: var(--aob-white); background: rgba(255, 255, 255, 0.07); border-color: var(--aob-gold-soft); }
:not(#_) .aob-header__link.is-active:hover { background: rgba(200, 138, 74, 0.14); }
:not(#_) .aob-header__link.is-active {
	color: var(--aob-white);
	background: var(--aob-gold-faint);
	border-color: var(--aob-gold-soft);
}

:not(#_) .aob-header .aob-btn { height: 48px; gap: 8px; padding: 4px 4px 4px 14px; font-size: 14px; }
:not(#_) .aob-header .aob-btn__icon { width: 38px; height: 38px; }
/* Phones: the phone/CTA lives in the bottom dock. Tablets keep the phone button in the header. */
@media (max-width: 767px) {
	:not(#_) .aob-header__cta { display: none; }
}
@media (max-width: 1023px) {
	:not(#_) .aob-header__cta { margin-left: auto; }
	:not(#_) .aob-header__toggle { margin-left: 0; }
}
@media (max-width: 767px) { :not(#_) .aob-header__toggle { margin-left: auto; } }

/* burger */
:not(#_) .aob-header__toggle {
	position: relative;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--aob-glass-border);
	border-radius: 50%;
	background: var(--aob-glass-bg);
	cursor: pointer;
}
:not(#_) .aob-header__toggle-bars,
:not(#_) .aob-header__toggle-bars::before,
:not(#_) .aob-header__toggle-bars::after {
	position: absolute;
	left: 50%;
	width: 18px;
	height: 2px;
	margin-left: -9px;
	border-radius: 2px;
	background: var(--aob-white);
	transition: transform 0.3s var(--aob-header-ease), opacity 0.2s;
}
:not(#_) .aob-header__toggle-bars { top: 50%; margin-top: -1px; }
:not(#_) .aob-header__toggle-bars::before,
:not(#_) .aob-header__toggle-bars::after { content: ""; left: 0; margin-left: 0; }
:not(#_) .aob-header__toggle-bars::before { top: -6px; }
:not(#_) .aob-header__toggle-bars::after { top: 6px; }
:not(#_) .aob-header.is-open .aob-header__toggle-bars { background: transparent; }
:not(#_) .aob-header.is-open .aob-header__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
:not(#_) .aob-header.is-open .aob-header__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* desktop */
@media (min-width: 1024px) {
	:not(#_) .aob-header__bar { padding-block: 25px; }
	:not(#_) .aob-header.is-scrolled .aob-header__bar { padding-block: 12px; }
	:not(#_) .aob-header__logo { width: clamp(170px, 19.5vw, 292px); }
	:not(#_) .aob-header.is-scrolled .aob-header__logo { width: clamp(140px, 15.5vw, 230px); }
	:not(#_) .aob-header__inner { gap: clamp(8px, 1.4vw, 16px); }
	:not(#_) .aob-header__toggle { display: none; }

	:not(#_) .aob-header__nav {
		position: static;
		flex-direction: row;
		align-items: center;
		gap: clamp(12px, 1.7vw, 24px);
		min-width: 0;
		margin: 0;
		padding: 8px clamp(12px, 1.2vw, 16px) 8px 8px;
		border: 0;
		border-radius: 300px;
		background: var(--aob-glass-bg);
		-webkit-backdrop-filter: blur(5.85px);
		backdrop-filter: blur(5.85px);
		box-shadow: var(--aob-shadow-glass);
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: background-color var(--aob-header-time) var(--aob-header-ease), box-shadow var(--aob-header-time) var(--aob-header-ease);
	}
	/* the bar is glass already; flatten the pill so the two layers don't stack */
	:not(#_) .aob-header.is-scrolled .aob-header__nav { background: rgba(255, 255, 255, 0.04); box-shadow: none; }
	:not(#_) .aob-header__link { padding: 6px 0; font-size: clamp(14px, 1.15vw, 16px); }
	:not(#_) .aob-header__link:hover { background: transparent; border-color: transparent; }
	:not(#_) .aob-header__link:not(.is-active):hover::after { transform: scaleX(1); }
	:not(#_) .aob-header__link::after { bottom: -2px; }
	:not(#_) .aob-header__link.is-active { padding-inline: 12px; }
	:not(#_) .aob-header .aob-btn { height: clamp(48px, 4.1vw, 58px); gap: clamp(10px, 1.1vw, 16px); padding: 4px 5px 4px clamp(16px, 1.7vw, 24px); font-size: clamp(14px, 1.25vw, 18px); flex: none; transition: transform var(--aob-header-time) var(--aob-header-ease), box-shadow 0.28s var(--aob-btn-ease), color 0.28s; }
	:not(#_) .aob-header .aob-btn__icon { width: clamp(38px, 3.35vw, 48px); height: clamp(38px, 3.35vw, 48px); }
	:not(#_) .aob-header.is-scrolled .aob-btn { transform: scale(0.88); transform-origin: right center; }
}

@media (prefers-reduced-motion: reduce) {
	:not(#_) .aob-header,
	:not(#_) .aob-header * { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
