/* ==========================================================================
   Site Header — sticky nav + Services mega-menu + mobile drawer.
   Mirrors progryss-homepage-final_6.html exactly. Tokens from tokens.css.
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-header .nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 74px;
}
/* Full-bleed nav: like the homepage reference the bar spans the full width with a
   5% side gutter (logo near the left edge, CTA near the right) — NOT the 1200px
   content container. */
.navwide {
	width: 100%;
	padding: 0 5%;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
}
.brand img {
	height: 30px;
	width: auto;
}
.brand .fallback {
	font-weight: 800;
	font-size: 22px;
	letter-spacing: -.03em;
	color: var(--ink);
}
.brand .fallback b {
	color: var(--brand);
}

.navlinks {
	display: flex;
	gap: 30px;
	font-size: 15px;
	font-weight: 500;
	color: var(--body);
}
.navlinks a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: .15s;
}
.navlinks a:hover {
	color: var(--brand);
}
.navlinks .chev {
	width: 14px;
	height: 14px;
	opacity: .6;
	transition: transform .2s ease;
}
.nav-cta {
	display: flex;
	align-items: center;
	gap: 16px;
}

/* ---- Services mega-dropdown --------------------------------------------- */
.ndrop {
	position: relative;
	display: inline-flex;
}
.ndrop > .ntrigger {
	cursor: pointer;
}
.ndrop:hover .chev,
.ndrop:focus-within .chev {
	transform: rotate(180deg);
}
.nmenu {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(8px);
	margin-top: 16px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: 0 24px 48px rgba(16, 24, 40, .16);
	padding: 8px;
	width: 330px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .18s ease, transform .18s ease;
	z-index: 60;
}
.nmenu::before { /* invisible bridge so hover survives the gap */
	content: "";
	position: absolute;
	top: -18px;
	left: 0;
	right: 0;
	height: 18px;
}
.ndrop:hover .nmenu,
.ndrop:focus-within .nmenu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}
.nmenu a {
	display: flex;
	gap: 13px;
	align-items: center;
	padding: 11px 12px;
	border-radius: 11px;
	transition: .14s;
	color: var(--ink);
}
.nmenu a:hover {
	background: var(--brand-tint);
}
.nmenu a .di {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 11px;
	background: var(--brand-tint);
	color: var(--brand);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: .14s;
}
.nmenu a:hover .di {
	background: var(--brand);
	color: #fff;
}
/* The icon box fills with brand blue on hover, so the icon has to go white with
   it. A menu item can supply its own hover icon (ACF "Icon on hover"); when it
   does that one is swapped in, otherwise the normal icon is recoloured white —
   either way it never disappears against the blue. */
/* Pasted SVG markup renders inside .p-svg and follows the text colour, so it
   turns white on hover on its own — no filter needed. */
.p-svg { display: inline-flex; }
.p-svg svg { width: 18px; height: 18px; }

.nmenu .di .p-icon--hover,
.mnav .di .p-icon--hover { display: none; }

/* Swap only when the item actually HAS a hover icon — otherwise the normal one
   must stay put (and just go white). */
.nmenu a:hover .di:has(.p-icon--hover) .p-icon--idle,
.nmenu a:focus-visible .di:has(.p-icon--hover) .p-icon--idle,
.mnav a:hover .di:has(.p-icon--hover) .p-icon--idle { display: none; }

.nmenu a:hover .di .p-icon--hover,
.nmenu a:focus-visible .di .p-icon--hover,
.mnav a:hover .di .p-icon--hover { display: inline-block; }

.nmenu a:hover .di .p-icon:not(.p-icon--hover),
.nmenu a:focus-visible .di .p-icon:not(.p-icon--hover),
.mnav a:hover .di .p-icon:not(.p-icon--hover) {
	filter: brightness(0) invert(1);
}
.nmenu a .dt {
	display: block;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.2;
}
.nmenu a .ds {
	display: block;
	font-size: 12px;
	color: var(--muted);
	margin-top: 2px;
}

/* ---- Hamburger ---------------------------------------------------------- */
.burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 6px;
}
.burger span {
	width: 24px;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: .25s;
}

/* ---- Mobile drawer ------------------------------------------------------ */
.mscrim {
	position: fixed;
	inset: 0;
	background: rgba(11, 16, 32, .5);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
	z-index: 79;
}
.mscrim.open {
	opacity: 1;
	visibility: visible;
}
.mnav {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(87%, 362px);
	background: #fff;
	z-index: 80;
	transform: translateX(100%);
	transition: transform .32s cubic-bezier(.4, 0, .2, 1);
	box-shadow: -24px 0 60px rgba(16, 24, 40, .20);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}
.mnav.open {
	transform: translateX(0);
}
.mnav-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 19px 20px;
	border-bottom: 1px solid var(--line);
}
.mnav-top .brand img {
	height: 28px;
	width: auto;
}
.mclose {
	background: none;
	border: 0;
	padding: 6px;
	margin: -6px;
	cursor: pointer;
	color: var(--ink);
	display: flex;
}
.mlinks {
	list-style: none;
	margin: 0;
	padding: 12px 12px 4px;
	display: flex;
	flex-direction: column;
	gap: 1px;
}
.mlinks > li > a,
.msvc-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	font-size: 16px;
	font-weight: 600;
	color: var(--ink);
	padding: 14px 12px;
	border-radius: 12px;
	background: none;
	border: 0;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: .14s;
}
.mlinks > li > a:hover,
.msvc-btn:hover {
	background: var(--soft);
}
.msvc-btn .chev {
	width: 18px;
	height: 18px;
	opacity: 1;
	color: var(--muted);
	transition: transform .28s ease;
}
.msvc.open .msvc-btn .chev {
	transform: rotate(180deg);
}
.msub {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .3s cubic-bezier(.33, 0, .2, 1);
}
.msvc.open .msub {
	grid-template-rows: 1fr;
}
.msub-in {
	overflow: hidden;
	min-height: 0;
}
.msub a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px 10px 16px;
	margin: 1px 6px;
	border-radius: 10px;
	transition: .14s;
}
.msub a:hover {
	background: var(--brand-tint);
}
.msub .dt {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--ink);
}
.msub .ds {
	font-size: 12px;
	color: var(--muted);
}
.mnav-foot {
	margin-top: auto;
	padding: 18px 20px 26px;
	border-top: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.mnav-foot .btn {
	justify-content: center;
	width: 100%;
}
.mnav-foot .mcontact {
	font-size: 13px;
	color: var(--muted);
	text-align: center;
}
body.menu-open {
	overflow: hidden;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
	.navwide {
		padding: 0 20px;
	}
	.navlinks {
		display: none;
	}
	.burger {
		display: flex;
	}
	.nav-cta {
		display: none;
	}
}
