/**
 * Blue Frame Films: header.css
 *
 * Purpose:  Sticky site header: logo, navigation, call-to-action button, mobile menu.
 *           Since 2.4.0 the header is a strip of 35mm film: sprocket bands top and bottom
 *           (::before / ::after, the --film-holes SVG tile from base.css) on a dark film base
 *           with a soft electric-blue edge glow; the bar between them is the see-through "frame".
 * Used by:  template-parts/header/site-header.php (every page).
 * To edit:  Current-page style: .nav ul a.on. Sizes: --nav-h and --film-band in base.css
 *           (scroll-padding-top follows them). Optional film-roll motion: body.bf-film-roll
 *           (Appearance > Blue Frame Settings; off by default, never with reduced motion).
 *           Mobile menu open state (.nav.open) is toggled by assets/js/nav.js.
 */

/* ==========================================================================
   Sticky header bar
   ========================================================================== */
header.wp-block-template-part,
header.bf-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height,0px);
	z-index: 30;
	padding: var(--film-band) 0;
	background: rgba(5,7,13,.82);
	backdrop-filter: blur(12px);
	box-shadow: 0 0 22px rgba(30,123,255,.14);
}

/* ==========================================================================
   Film strip: sprocket bands (shared with the footer, see footer.css)
   ========================================================================== */
header.wp-block-template-part::before,
header.wp-block-template-part::after,
header.bf-header::before,
header.bf-header::after,
footer.wp-block-template-part::before,
footer.wp-block-template-part::after,
footer.bf-footer::before,
footer.bf-footer::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: var(--film-band);
	background: var(--film-holes) 0 50% / auto 100% repeat-x, var(--film-base);
	pointer-events: none;
}

header.wp-block-template-part::before,
header.bf-header::before,
footer.wp-block-template-part::before,
footer.bf-footer::before {
	top: 0;
	border-bottom: 1px solid rgba(0,194,255,.38);
	box-shadow: 0 1px 10px rgba(0,194,255,.2);
}

header.wp-block-template-part::after,
header.bf-header::after,
footer.wp-block-template-part::after,
footer.bf-footer::after {
	bottom: 0;
	border-top: 1px solid rgba(0,194,255,.38);
	box-shadow: 0 -1px 10px rgba(0,194,255,.2);
}

/* Optional film-roll motion: off unless enabled in settings, and never with reduced motion. */
@media (prefers-reduced-motion:no-preference) {
	body.bf-film-roll header.wp-block-template-part::before,
	body.bf-film-roll header.wp-block-template-part::after,
	body.bf-film-roll header.bf-header::before,
	body.bf-film-roll header.bf-header::after {
		animation: bf-film-roll 3s linear infinite;
	}
}

@keyframes bf-film-roll {
	to {
		background-position: calc(var(--film-band) * 24 / 14) 50%, 0 0;
	}
}

.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--nav-h);
	gap: 16px;
}

/* ==========================================================================
   Logo
   ========================================================================== */
.logo {
	display: flex;
	align-items: center;
	min-height: 44px;      /* tap target */
	gap: .6rem;
	font-weight: 800;
	letter-spacing: .05em;
}

.logo b {
	font-size: 1rem;
	line-height: 1;
}

.logo b span {
	display: block;
	font-weight: 600;
	font-size: .6rem;
	letter-spacing: .45em;
	color: var(--elec2);
	margin-top: 4px;
}

.logo-img {
	width: 54px;
	height: 48px;
	object-fit: contain;
	flex: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav ul {
	display: flex;
	gap: 1.6rem;
	list-style: none;
	font-size: .9rem;
	color: var(--muted);
}

.nav ul a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 44px;       /* tap target */
}

.nav ul a:hover {
	color: #fff;
}

/* Current page (class "on" + aria-current, set in site-header.php) */
.nav ul a.on {
	color: #fff;
	font-weight: 600;
}

.nav ul a.on::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 8px;
	height: 2px;
	border-radius: 2px;
	background: var(--elec2);
	box-shadow: 0 0 10px rgba(0,194,255,.6);
}

.nav .btn {
	min-height: 44px;
	padding: .55rem 1rem;
	font-size: .85rem;
}

/* ==========================================================================
   Mobile menu button (hidden on desktop)
   ========================================================================== */
.menu {
	display: none;
}

.nav button.menu {
	font: inherit;
	color: var(--text);
	background: transparent;
	cursor: pointer;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width:760px) {
	.nav ul,
	.nav .btn {
		display: none;
	}

	.menu {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 44px;
		border: 1px solid var(--line);
		border-radius: 8px;
		padding: 0 14px;
		font-size: .85rem;
		font-weight: 600;
	}

	.menu i {
		width: 16px;
		height: 2px;
		background: #fff;
		box-shadow: 0 5px 0 #fff,0 -5px 0 #fff;
	}

	.logo-img {
		width: 44px;
		height: 39px;
	}

	.nav.open ul {
		display: flex;
		flex-direction: column;
		gap: 0;
		position: absolute;
		top: 100%;           /* just below the bottom sprocket band */
		left: 0;
		right: 0;
		background: rgba(5,7,13,.97);
		border-bottom: 1px solid var(--line);
		padding: 8px 24px 16px;
	}

	.nav.open ul a {
		display: flex;
		padding: 0;
		font-size: 1rem;
		color: #fff;
	}

	.nav.open ul a.on {
		color: var(--elec2);
	}

	.nav.open ul a.on::after {
		left: -12px;
		right: auto;
		top: 14px;
		bottom: 14px;
		width: 3px;
		height: auto;
	}
}
