/**
 * GPE site header — FOZA 2026 structure + GPE tokens
 */

header.dp-site-header {
	align-items: center;
	backdrop-filter: blur(18px);
	background-color: rgb(4 24 47 / 90%); /* var(--dp-color-navy-dark); */
	background-image: none;
	border-bottom: 1px solid rgb(220 201 163 / 35%);
	color: var(--dp-color-white);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	inset-inline: 0;
	margin-top: 0;
	min-height: auto;
	padding: 0.5em;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1000;
}

header.dp-site-header.is-scrolled {
	background-image: none;
}

/* Brand mark — hidden until hero logo scrolls away (JS toggles .is-visible) */
.dp-site-header__brand {
	align-self: center;
	border: 0;
	color: inherit;
	grid-column: 1;
	grid-row: 1;
	justify-self: start;
	line-height: 0.9;
	min-height: 0;
	min-width: 0;
	opacity: 0;
	overflow: hidden;
	padding: 0;
	pointer-events: none;
	text-decoration: none;
	transform: translateX(-0.75rem);
	transition:
		opacity 320ms ease,
		transform 320ms ease,
		min-width 320ms ease;
	width: auto;
	z-index: 2;
}

.dp-site-header__brand.is-visible {
	min-height: var(--dp-brand-mark-height);
	min-width: var(--dp-brand-mark-slot-width);
	opacity: 1;
	overflow: visible;
	pointer-events: auto;
	transform: translateX(0);
	width: auto;
}

.dp-site-header__brand img,
.dp-site-header__logo-image,
.dp-site-header__brand .dp-logo {
	aspect-ratio: 1102.78 / 374.95;
	display: block;
	height: var(--dp-brand-mark-height);
	margin-left: var(--dp-brand-mark-inset);
	object-fit: contain;
	width: var(--dp-brand-mark-width);
}

.dp-site-header__site-name {
	font-family: var(--dp-font-ui);
	font-size: var(--dp-text-body-sm);
	font-weight: 700;
	letter-spacing: 0.08em;
	margin-left: var(--dp-brand-mark-inset);
	text-transform: uppercase;
}

.dp-site-header__toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--dp-color-white);
	cursor: pointer;
	display: none;
	grid-column: 3;
	grid-row: 1;
	justify-content: center;
	justify-self: end;
	line-height: 0;
	padding: 0.5rem;
	z-index: 2;
}

.dp-site-header__toggle svg {
	aspect-ratio: 1;
	display: block;
	height: auto;
	width: 3rem;
}

.dp-site-header__backdrop {
	display: none;
}

.dp-site-header__nav {
	align-items: center;
	display: flex;
	grid-column: 1 / -1;
	grid-row: 1;
	justify-content: center;
	justify-self: center;
	pointer-events: none;
	z-index: 1;
}

.dp-site-header__nav-close {
	display: none;
}

.dp-site-header__nav-list {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	pointer-events: auto;
}

.dp-site-header__nav-item {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dp-site-header__nav-link {
	border-radius: 999px;
	color: rgb(255 255 255 / 90%);
	font-family: var(--dp-font-ui);
	font-size: var(--dp-text-button-md);
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.72rem 0.88rem;
	text-decoration: none;
	text-transform: uppercase;
	transition:
		background-color 200ms ease-in-out,
		color 200ms ease-in-out;
}

.dp-site-header__nav-link:hover,
.dp-site-header__nav-link:focus-visible {
	background: rgb(255 255 255 / 12%);
	color: var(--dp-color-white);
	text-decoration: none;
}

.dp-site-header__nav-link.is-active,
.dp-site-header__nav-link[aria-current='page'] {
	background: rgb(235 196 94 / 18%);
	color: var(--dp-color-gold-bright);
}

.dp-site-header__nav-link.is-active:hover,
.dp-site-header__nav-link.is-active:focus-visible,
.dp-site-header__nav-link[aria-current='page']:hover,
.dp-site-header__nav-link[aria-current='page']:focus-visible {
	background: rgb(235 196 94 / 28%);
	color: var(--dp-color-gold-bright);
}

.dp-site-header__cta {
	align-self: center;
	background: var(--dp-button-primary-bg);
	border: 0;
	border-radius: var(--dp-radius-sm);
	color: var(--dp-button-primary-text);
	cursor: pointer;
	display: inline-flex;
	font-family: var(--dp-font-ui);
	font-size: var(--dp-text-button-md);
	font-weight: bold;
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	line-height: 1.2;
	margin-inline-end: clamp(1rem, 4vw, 3.75rem);
	padding: 0.85rem 1.35rem;
	text-decoration: none;
	text-transform: uppercase;
	transition:
		background-color 180ms ease,
		color 180ms ease,
		transform 180ms ease;
	z-index: 2;
}

.dp-site-header__cta:hover,
.dp-site-header__cta:focus-visible {
	background: var(--dp-color-gold-bright);
	color: var(--dp-color-navy-deep);
	text-decoration: none;
}

@media (max-width: 1200px) {
	.dp-site-header__cta {
		margin-inline-end: clamp(1rem, 3vw, 2.5rem);
	}

	.dp-site-header__nav-link {
		font-size: clamp(0.82rem, 1.4vw, 1rem);
		padding: 0.72rem clamp(0.45rem, 1vw, 0.75rem);
	}
}

@media (max-width: 900px) {
	header.dp-site-header {
		display: flex;
		gap: 0.75rem;
		justify-content: space-between;
		padding-inline: 0.5rem 0.25rem;
	}

	.dp-site-header__brand {
		flex: 0 0 auto;
		grid-column: auto;
		grid-row: auto;
	}

	.dp-site-header__brand:not(.is-visible) {
		width: 0;
	}

	header.dp-site-header .dp-site-header__cta {
		display: none;
	}

	.dp-site-header__toggle {
		display: inline-flex;
		flex: 0 0 auto;
		grid-column: auto;
		grid-row: auto;
		margin-inline: 0;
	}

	.dp-site-header__backdrop {
		background: rgb(0 8 17 / 52%);
		border: 0;
		cursor: pointer;
		display: block;
		inset: 0;
		opacity: 0;
		pointer-events: none;
		position: fixed;
		transition: opacity 180ms ease;
		z-index: 999;
	}

	.dp-site-header__backdrop.is-open {
		opacity: 1;
		pointer-events: auto;
	}

	.dp-site-header__nav {
		align-content: start;
		background: var(--dp-color-navy-deep);
		border-left: 1px solid rgb(235 196 94 / 28%);
		box-shadow: -22px 0 60px rgb(0 0 0 / 28%);
		display: grid;
		gap: 0.35rem;
		grid-column: auto;
		grid-row: auto;
		height: 100svh;
		inset-block-start: 0;
		inset-inline-end: 0;
		justify-content: stretch;
		justify-self: auto;
		max-width: min(22rem, calc(100vw - 2rem));
		padding: 1rem;
		pointer-events: none;
		position: fixed;
		transform: translateX(105%);
		transition: transform 220ms ease;
		width: 100%;
		z-index: 1001;
	}

	.dp-site-header__nav.is-open {
		pointer-events: auto;
		transform: translateX(0);
	}

	.dp-site-header__nav-list {
		align-items: stretch;
		flex-direction: column;
		width: 100%;
	}

	.dp-site-header__nav-link {
		border-bottom: 1px solid rgb(255 255 255 / 10%);
		border-radius: 0;
		display: block;
		font-size: 1.05rem;
		padding: 1rem;
		width: 100%;
	}

	.dp-site-header__nav-close {
		align-self: start;
		background: var(--dp-color-gold-primary);
		border: 0;
		border-radius: 999px;
		color: var(--dp-color-navy-deep);
		cursor: pointer;
		display: inline-flex;
		font-family: var(--dp-font-ui);
		font-weight: 700;
		justify-self: end;
		margin-bottom: 2rem;
		padding: 0.72rem 0.9rem;
		pointer-events: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dp-site-header__brand {
		transform: none;
		transition: opacity 120ms ease;
	}

	.dp-site-header__brand.is-visible {
		transform: none;
	}

	.dp-site-header__nav {
		transition: none;
	}
}
