/* BJP custom site header — replaces Astra's default header markup.
   Values taken from the Figma frame (1440x84). */

.bjp-header {
	--bjp-color-teal: #156082;
	--bjp-color-teal-hover: #0f4a63;
	--bjp-color-text: #231F20;
	--bjp-color-border: #EAECF0;
	--bjp-font: 'Manrope', -apple-system, Roboto, Helvetica, sans-serif;

	position: relative;
	z-index: 10;
	width: 100%;
	font-family: var(--bjp-font);
}

/* Homepage: overlays the hero so the artwork can bleed up behind it. */
.bjp-header--transparent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: transparent;
}

/* Every other page: solid white, in normal flow. */
.bjp-header--solid {
	position: relative;
	background: #ffffff;
}

.bjp-header__inner {
	box-sizing: border-box;
	max-width: 1440px;
	min-height: 84px;
	margin: 0 auto;
	padding: 16px clamp(20px, 5.5556vw, 80px);
	display: flex;
	align-items: center;
	gap: 32px;
}

/* Logo — 195x52 box in the design; scale by height to avoid distortion. */
.bjp-header__logo {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.bjp-header .bjp-header__logo img {
	display: block;
	height: 52px;
	width: auto;
	max-width: 195px;
	object-fit: contain;
}

.bjp-header__logo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 195px;
	height: 52px;
	border: 1px dashed var(--bjp-color-text);
	border-radius: 8px;
	font-family: var(--bjp-font);
	font-weight: 600;
	text-decoration: none;
	color: var(--bjp-color-text);
}

/* Nav + CTA share one flex row pushed to the right, 32px gaps throughout. */
.bjp-header__nav-wrap {
	display: flex;
	flex: 1 0 0;
	justify-content: flex-end;
	align-items: center;
	gap: 32px;
}

.bjp-header__nav {
	display: flex;
	align-items: center;
}

.bjp-header__menu {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bjp-header__menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bjp-header .bjp-header__menu a {
	display: inline-flex;
	align-items: center;
	font-family: var(--bjp-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	color: var(--bjp-color-text);
	text-decoration: none;
	white-space: nowrap;
}

.bjp-header .bjp-header__menu a:hover,
.bjp-header .bjp-header__menu a:focus {
	color: var(--bjp-color-teal);
}

.bjp-header .bjp-header__button {
	display: flex;
	padding: 8px 12px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	border-radius: 8px;
	background: var(--bjp-color-teal);
	font-family: var(--bjp-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	color: #ffffff;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

.bjp-header .bjp-header__button:hover,
.bjp-header .bjp-header__button:focus {
	background: var(--bjp-color-teal-hover);
	color: #ffffff;
}

/* Mobile menu toggle — hidden at design width.
   Figma node 69:414 is a [button]--primary variant holding a 20x20
   lucide:menu icon: white fill, 1px #EAECF0 border, 8px radius,
   12px/8px padding. */
.bjp-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-left: auto;
	padding: 8px 12px;
	background: #ffffff;
	border: 1px solid var(--bjp-color-border);
	border-radius: 8px;
	color: var(--bjp-color-text);
	cursor: pointer;
}

.bjp-header__toggle-icon {
	display: block;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

@media (max-width: 1024px) {
	.bjp-header__toggle {
		display: flex;
	}

	.bjp-header__nav-wrap {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 20;
		flex: 0 0 auto;
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		display: none;
		padding: 24px clamp(20px, 5.5556vw, 80px);
		background: #ffffff;
		box-shadow: 0 12px 24px rgba(35, 31, 32, 0.08);
	}

	.bjp-header__nav-wrap.is-open {
		display: flex;
	}

	.bjp-header__nav {
		width: 100%;
	}

	.bjp-header__menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		width: 100%;
	}

	.bjp-header__cta {
		width: 100%;
	}

	.bjp-header .bjp-header__button {
		width: 100%;
	}
}

/* ----------------------------------------------------------------------
   Homepage nav over the hero photograph (BJP-13)

   The transparent header floats over the hero, which since BJP-13 is a
   photograph under a 40% #231F20 overlay. Sampling the strip the nav sits on
   gives rgb(74,74,74), against which the #231F20 links measure 1.86:1 — well
   under the 4.5:1 WCAG AA asks. White measures 8.86:1.

   Only the transparent variant is touched, so every other page keeps its dark
   links on white. And only above 1024, because at or below that the nav
   collapses into a dropdown that draws its own white background, where the
   dark links are already correct.

   Hover shifts to an underline rather than a colour: the teal the solid
   header hovers to is 1.28:1 here, and even the lighter brand accent only
   reaches 4.46:1, so neither can carry the state on this background.
   ---------------------------------------------------------------------- */

@media (min-width: 1025px) {
	.bjp-header.bjp-header--transparent .bjp-header__menu a {
		color: #ffffff;
	}

	.bjp-header.bjp-header--transparent .bjp-header__menu a:hover,
	.bjp-header.bjp-header--transparent .bjp-header__menu a:focus {
		color: #ffffff;
		text-decoration: underline;
		text-underline-offset: 4px;
	}
}

@media (max-width: 560px) {
	.bjp-header .bjp-header__logo img {
		height: 40px;
	}

	.bjp-header__inner {
		min-height: 72px;
	}
}
