/* ETF Site: sticky header bar and its controls (logo, desktop menu, language link). One light translucent bar
   on every section, also over the black hero; content scrolls under it. The material sits on header::before,
   never on the header itself: backdrop-filter, filter, opacity or contain on the header would trap the
   fixed mobile menu (menu.css). A hairline fades in once the page has scrolled (CSS scroll timeline; no line
   where that is unsupported or under reduced motion). */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	margin-block: 0;
}

.wp-site-blocks > header.wp-block-template-part::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--etf-site-chrome);
	-webkit-backdrop-filter: var(--etf-site-chrome-blur);
	backdrop-filter: var(--etf-site-chrome-blur);
	pointer-events: none;
}

@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		.wp-site-blocks > header.wp-block-template-part::after {
			content: "";
			position: absolute;
			inset: auto 0 0;
			height: 1px;
			background: var(--etf-site-chrome-line);
			pointer-events: none;
			animation: etf-site-hairline linear both;
			animation-timeline: scroll(root block);
			animation-range: 0 3rem;
		}
	}
}

@keyframes etf-site-hairline {
	from { opacity: 0; }
	to { opacity: 1; }
}

.etf-site-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0 0.5rem;
	min-height: var(--etf-site-bar);
}

.etf-site-header__title {
	flex: none;
	margin: 0;
}

.etf-site-header__title a {
	display: flex;
	align-items: center;
	min-width: var(--etf-site-hit);
	min-height: var(--etf-site-hit);
	color: var(--etf-site-text);
	text-decoration: none;
}

/* Logo (header and footer): the brand SVG as a mask filled with the text colour, so it follows the text's
   contrast; one cached file instead of inline SVG. The site title stays in the link as hidden text. */
.etf-site-logo {
	display: block;
	height: 1.5rem;
	aspect-ratio: 3404 / 1292;
	background-color: currentColor;
	-webkit-mask: url(../brand/stazora-logo.svg) center / contain no-repeat;
	mask: url(../brand/stazora-logo.svg) center / contain no-repeat;
}

/* ---- Desktop menu (the same element becomes the full-height panel below 56em) ---- */
.etf-site-menu {
	display: flex;
	flex: 1 1 auto;
	justify-content: center;
	min-width: 0;
}

.etf-site-nav ul {
	display: flex;
	gap: 0 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.etf-site-nav a,
.etf-site-lang {
	display: inline-flex;
	align-items: center;
	gap: 0.375em;
	min-height: var(--etf-site-hit);
	padding: 0 0.625rem;
	color: var(--etf-site-nav);
	font-size: 0.8125rem;
	font-weight: 400;
	letter-spacing: -0.003em;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--etf-site-dur) var(--etf-site-ease), opacity var(--etf-site-dur) var(--etf-site-ease);
}

/* Where am I: the current page in full-strength text and semibold (no capsule) */
.etf-site-nav a[aria-current="page"] {
	color: var(--etf-site-text);
	font-weight: 600;
}

.etf-site-header__end {
	display: flex;
	flex: none;
	align-items: center;
	margin-left: auto;
}

.etf-site-lang {
	padding-inline: 0.5rem;
}

.etf-site-lang svg {
	flex: none;
	width: 1.25em;
	height: 1.25em;
}

@media (hover: hover) and (pointer: fine) {
	.etf-site-nav a:hover,
	.etf-site-lang:hover {
		color: var(--etf-site-text);
	}
}

/* Feedback on pointer-down: the link dims at once, then recovers on the damped curve */
.etf-site-nav a:active,
.etf-site-lang:active {
	opacity: 0.55;
	transition-duration: var(--etf-site-dur-press);
	transition-timing-function: var(--etf-site-ease-press);
}

/* ---- Visitor preferences ---- */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
	.wp-site-blocks > header.wp-block-template-part::before {
		background: var(--etf-site-chrome-solid);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		box-shadow: 0 1px 0 var(--etf-site-chrome-line);
	}
}

@media (prefers-reduced-motion: reduce) {
	.etf-site-nav a,
	.etf-site-lang {
		transition: none;
	}
}

@media (forced-colors: active) {
	.wp-site-blocks > header.wp-block-template-part::before {
		border-bottom: 1px solid CanvasText;
	}

	.etf-site-logo {
		forced-color-adjust: none;
		background-color: CanvasText;
	}

	.etf-site-nav a[aria-current="page"] {
		text-decoration: underline;
		text-underline-offset: 0.25em;
	}
}
