/* ----------------------------------------------------------------------
   header.css — broadsheet-masthead (2-row + paired-rule divider + scroll collapse)
   Mobile: hamburger to full-screen overlay
---------------------------------------------------------------------- */

.header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: var(--c-bg);
	transition: background var(--dur) var(--ease);
}

/* TOP ROW — est date / location / edition */
.header__top {
	height: 26px;
	border-bottom: 1px solid var(--c-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 var(--s-32);
	font-family: var(--f-mono);
	font-size: 0.6875rem;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--c-text-dim);
	overflow: hidden;
	transition: height var(--dur) var(--ease), opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.header__top-left,
.header__top-center,
.header__top-right { flex: 1; }
.header__top-center { text-align: center; }
.header__top-right  { text-align: right; }

/* MAIN ROW — nav split L/R of centered wordmark */
.header__main {
	height: 66px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding: 0 var(--s-32);
	gap: var(--s-24);
	transition: height var(--dur) var(--ease);
}

.header__wordmark {
	font-family: var(--f-heading);
	font-weight: 600;
	font-style: normal;
	font-size: 1.625rem;
	letter-spacing: 0.5px;
	color: var(--c-white);
	text-decoration: none;
	white-space: nowrap;
}
.header__wordmark:hover { color: var(--c-white); text-decoration: none; }

.header__nav {
	display: flex;
	gap: var(--s-24);
	align-items: center;
}
.header__nav--left  { justify-content: flex-end; }
.header__nav--right { justify-content: flex-start; }

.header__nav a {
	font-family: var(--f-body);
	font-weight: 500;
	font-size: 0.75rem;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--c-text);
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--dur) var(--ease);
}
.header__nav a:hover { color: var(--c-accent); text-decoration: none; }
.header__nav a[aria-current="page"],
.header__nav a.is-active { color: var(--c-accent); }

/* CTA badge in right nav */
.header__cta { margin-left: var(--s-16); }

/* PAIRED-RULE signature — below masthead */
.header__rule-paired {
	height: 8px;
	background:
		linear-gradient(to bottom,
			var(--c-accent) 0 3px,
			transparent 3px 7px,
			var(--c-white) 7px 8px);
}

/* Scroll-collapsed state (JS toggles .header--scrolled) */
.header--scrolled .header__top {
	height: 0;
	opacity: 0;
	border-bottom-color: transparent;
}
.header--scrolled .header__main {
	height: var(--header-h-scrolled);
}

/* ---------- Mobile hamburger ---------- */
.header__hamburger {
	display: none;
	width: 36px;
	height: 36px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: transparent;
	border: 1px solid var(--c-border);
	border-radius: var(--r-sm);
	cursor: pointer;
	position: relative;
	z-index: 110;
}
.header__hamburger span {
	display: block;
	width: 18px;
	height: 1.5px;
	background: var(--c-text);
	transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
	transform-origin: center;
}
.header__hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.header__hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile overlay */
.header__mobile-menu {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--c-bg);
	z-index: 105;
	padding: var(--s-80) var(--s-24) var(--s-48);
	overflow-y: auto;
	transform: translateY(-100%);
	transition: transform var(--dur) var(--ease);
	display: flex;
	flex-direction: column;
}
.header__mobile-menu.is-open { transform: translateY(0); }

/* Close button in mobile menu (×) — SVG-like two crossed bars */
.header__mobile-close {
	position: absolute;
	top: var(--s-16);
	right: var(--s-16);
	width: 40px;
	height: 40px;
	background: transparent;
	border: 1px solid var(--c-border);
	border-radius: var(--r-sm);
	cursor: pointer;
	z-index: 110;
	display: flex;
	align-items: center;
	justify-content: center;
}
.header__mobile-close span {
	position: absolute;
	width: 18px;
	height: 1.5px;
	background: var(--c-text);
	transition: background var(--dur) var(--ease);
}
.header__mobile-close span:nth-child(1) { transform: rotate(45deg); }
.header__mobile-close span:nth-child(2) { transform: rotate(-45deg); }
.header__mobile-close:hover span { background: var(--c-accent); }
.header__mobile-close:hover { border-color: var(--c-accent); }
.header__mobile-menu a {
	font-family: var(--f-heading);
	font-weight: 500;
	font-size: 1.375rem;
	color: var(--c-white);
	text-decoration: none;
	padding: var(--s-12) 0;
	border-bottom: 1px solid var(--c-border);
	letter-spacing: 0;
	text-transform: none;
	display: block;
}
.header__mobile-menu a:hover { color: var(--c-accent); }

.header__mobile-meta {
	margin-top: var(--s-32);
	padding-top: var(--s-24);
	border-top: 1px solid var(--c-border);
	font-family: var(--f-mono);
	font-size: 0.75rem;
	color: var(--c-text-dim);
	letter-spacing: 0.5px;
	line-height: 1.8;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
	.header__nav--left,
	.header__nav--right { display: none; }
	.header__main {
		grid-template-columns: 1fr auto 1fr;
		padding: 0 var(--s-16);
	}
	/* Explicit grid placement: wordmark centred in column 2, hamburger flushed right in column 3.
	   Column 1 stays empty to balance the centred wordmark. */
	.header__wordmark {
		grid-column: 2 / 3;
		justify-self: center;
	}
	.header__hamburger {
		display: inline-flex;
		grid-column: 3 / 4;
		justify-self: end;
	}
	.header__top {
		height: 0;
		opacity: 0;
		border-bottom: none;
	}
}

@media (min-width: 1024px) {
	.header__mobile-menu { display: none; }
}

/* Mobile menu lock */
body.kw-menu-open { overflow: hidden; }
