/* ==========================================================================
   provenio ai — HEADER  (v3 design, 12 Nov 2026)
   Neve's header is switched off (functions.php: neve_filter_toggle_content_parts).
   The header markup is printed by pv_render_header() in functions.php, exactly as
   in the v3 source (provenio-ai/index.html): header.site-header > .wrap.bar >
   a.brand + button.menu-btn + nav#site-nav (ul + a.nav-cta).
   Menu items come from Appearance → Menus → "Primary" (location primary).
   Dropdown icons: pv_menu_icons() in functions.php (by menu-item ID).
   Values are the v3 values; colours use the base.css tokens.
   ========================================================================== */

/* ---------- 1. Sticky header ----------
   Neve's .wrapper uses overflow:hidden, which blocks position:sticky. */
body .wrapper {
	overflow: visible !important;
	overflow-x: clip !important;
}
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: 76px;
	padding-top: 12px;
	box-sizing: border-box;
}
/* v3: the header floats over the page hero (hero padding includes the header height) */
body:has(.pv-hero) .site-header,
body:has(.pv-page-hero) .site-header { margin-bottom: -76px; }
body:has(.pv-hero) .pv-hero { padding-top: calc(76px + clamp(32px, 5vw, 64px)) !important; }   /* v3: header + .hero .wrap padding */
@media (min-width: 1024px) {
	body:has(.pv-hero) .pv-hero { padding-top: calc(76px + clamp(40px, 6vh, 80px)) !important; }
}
@media (min-width: 1024px) and (max-height: 940px) {
	body:has(.pv-hero) .pv-hero { padding-top: 100px !important; }
}
body:has(.pv-page-hero) .pv-page-hero { padding-top: calc(76px + clamp(48px, 7vw, 104px)) !important; }
/* WordPress admin bar (logged-in only) */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}

/* ---------- 2. Bar ---------- */
.site-header .wrap {
	width: min(1200px, calc(100% - 48px));   /* = content edges (sections: 1200px max, 24px side padding) */
	margin-inline: auto;
}
.site-header .wrap.bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: 64px;
	padding: 0 8px 0 22px;
	border-radius: 14px;
	box-sizing: border-box;
}
.site-header .bar::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: rgba(6, 12, 31, .86);
	border: 1px solid rgba(241, 245, 249, .2);
	box-shadow: 0 12px 24px -18px rgba(0, 0, 0, .5);
	-webkit-backdrop-filter: saturate(1.4) blur(18px);
	backdrop-filter: saturate(1.4) blur(18px);
	opacity: 0;
	transition: opacity .3s;
}
.site-header.scrolled .bar::before { opacity: 1; }
.site-header .brand,
.site-header .menu-btn { position: relative; z-index: 2; }
.site-header .brand { display: inline-flex; }
.site-header .brand img { display: block; height: 32px; width: auto; }
.site-header .sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.site-header :focus-visible {
	outline: 2px solid var(--pv-cyan);
	outline-offset: 3px;
	border-radius: 6px;
}

/* ---------- 3. Navigation ---------- */
#site-nav {
	display: flex;
	align-items: center;
	gap: 30px;
}
#site-nav ul {
	display: flex;
	gap: 26px;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}
#site-nav li { margin: 0; }
#site-nav li a {
	position: relative;
	padding: 8px 0;
	font: 500 .875rem var(--pv-head);
	color: var(--pv-light);
	text-decoration: none;
}
#site-nav li a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 1px;
	background: linear-gradient(90deg, #2B5CE6, #06B6D4);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s;
}
#site-nav li a:hover::after,
#site-nav li a[aria-current]::after,
#site-nav li a.active::after { transform: none; }
#site-nav li a:not([href]) { cursor: default; }
#site-nav li a:not([href]):hover { color: var(--pv-light); }
#site-nav li a:not([href]):hover::after { transform: scaleX(0); }

/* CTA button "Start a conversation" (menu item with class pv-nav-cta) */
.site-header .btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	letter-spacing: -.005em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color .25s, border-color .25s, color .25s, transform .25s cubic-bezier(.2, .7, .2, 1);
}
.site-header .btn:active { transform: translateY(0); }
.site-header .btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--pv-bg), 0 0 0 5px var(--pv-cyan); }
.site-header .btn-primary { background: var(--pv-blue); color: #fff; }
.site-header .nav-cta {
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid transparent;   /* v3 computed: 1px */
	border-radius: 10px;
	font: 600 .95rem var(--pv-head);
}
.site-header .nav-cta:hover {
	background: #1F4BCB;
	color: #fff;
	transform: translateY(-1px);
}

/* Knowledge Hub (menu item class pv-nav-kh, user request 12 Nov — not in v3):
   highlighted pill with a bulb icon; no link yet (class pv-no-link). */
#site-nav li.pv-nav-kh a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 13px 6px 10px;
	border: 1px solid rgba(6, 182, 212, .5);
	border-radius: 999px;
	background: rgba(6, 182, 212, .12);
/* 	box-shadow: 0 0 14px -4px rgba(6, 182, 212, .45); */
	color: #fff;
}
#site-nav li.pv-nav-kh a::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306B6D4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
#site-nav li.pv-nav-kh a::after { display: none; }

/* ---------- 4. Hamburger (shown ≤1040px) ---------- */
.site-header .menu-btn {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 48px;
	height: 48px;
	padding: 12px;
	background: none;
	border: 0;
	cursor: pointer;
}
.site-header .menu-btn i {
	display: block;
	height: 2px;
	background: #fff;
	transition: transform .25s, opacity .2s;
}
.site-header .menu-btn[aria-expanded="true"] i:nth-child(2) { transform: translateY(8px) rotate(45deg); }
.site-header .menu-btn[aria-expanded="true"] i:nth-child(3) { opacity: 0; }
.site-header .menu-btn[aria-expanded="true"] i:nth-child(4) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 5. Solutions dropdown ---------- */
#site-nav .has-sub {
	position: relative;
	display: flex;
	align-items: center;
	gap: 2px;
}
#site-nav .has-sub > a { padding: 8px 0; }
.site-header .sub-btn {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	margin-left: -2px;
	background: none;
	border: 0;
	border-radius: 6px;
	color: var(--pv-light);
	cursor: pointer;
}
.site-header .sub-btn svg { width: 14px; height: 14px; transition: transform .2s; }
.site-header .sub-btn:hover { background: rgba(241, 245, 249, .08); }
#site-nav .has-sub.open .sub-btn svg,
#site-nav .has-sub:hover .sub-btn svg { transform: rotate(180deg); }
#site-nav .has-sub.is-current > a::after { transform: none; }
#site-nav .submenu {
	position: absolute;
	left: -14px;
	top: 100%;
	z-index: 60;
	display: block;
	min-width: 250px;
	margin: 12px 0 0;
	padding: 8px;
	list-style: none;
	background: #0A1330;
	border: 1px solid rgba(241, 245, 249, .2);
	border-radius: 14px;
	box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .5);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}
#site-nav .submenu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -14px;
	height: 14px;
}
#site-nav .has-sub:hover > .submenu,
#site-nav .has-sub.open > .submenu {
	opacity: 1;
	visibility: visible;
	transform: none;
}
#site-nav .submenu li { display: block; }
#site-nav .submenu a {
	display: flex !important;
	align-items: center;
	gap: 12px;
	padding: 8px 10px !important;
	border-radius: 8px;
	font: 500 .9rem var(--pv-head) !important;
	color: var(--pv-light) !important;
}
#site-nav .submenu a::after { display: none !important; }
#site-nav .submenu a:hover,
#site-nav .submenu a[aria-current] {
	background: rgba(241, 245, 249, .07);
	color: #fff !important;
}
/* icon tile (v3 .ico) */
.site-header .ico {
	position: relative;
	display: inline-grid;
	place-items: center;
	flex: none;
	box-sizing: border-box;
	width: 34px;
	height: 34px;
	border: 1px solid transparent;
	border-radius: 10px;
	background:
		linear-gradient(160deg, rgba(6, 182, 212, .16), rgba(43, 92, 230, .1)) padding-box,
		linear-gradient(160deg, rgba(6, 182, 212, .5), rgba(43, 92, 230, .25) 60%, rgba(241, 245, 249, .06)) border-box;
	color: var(--pv-cyan);
	transition: background .25s, color .25s, box-shadow .25s;
}
.site-header .ico svg { width: 17px; height: 17px; }
#site-nav .submenu a:hover .ico { color: #fff; }

/* ---------- 6. Mobile (≤1040px, v3): full-screen menu ---------- */
@media (max-width: 1040px) {
	.site-header .menu-btn { display: flex; }
	.site-header .wrap.bar { padding-right: 4px; }
	#site-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
		padding: 100px 24px 32px;
		background: var(--pv-bg);
		overflow: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity .25s, transform .25s, visibility .25s;
	}
	#site-nav.open { opacity: 1; visibility: visible; transform: none; }
	body.nav-open .site-header .bar::before { opacity: 0; }
	body.nav-open { overflow: hidden; }
	#site-nav ul { flex-direction: column; gap: 0; align-items: stretch; }
	#site-nav li a {
		display: block;
		padding: 16px 0;
		font-size: 1.25rem;
		border-bottom: 1px solid rgba(241, 245, 249, .1);
	}
	#site-nav li a::after { display: none; }
	#site-nav .has-sub { display: block; }
	.site-header .sub-btn { display: none; }
	#site-nav .submenu {
		position: static;
		min-width: 0;
		margin: 0;
		padding: 0 0 8px 8px;
		background: none;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	#site-nav .submenu::before { display: none; }
	#site-nav .submenu a {
		padding: 12px 4px !important;
		font-size: 1.05rem !important;
		border-bottom: 0 !important;
		color: var(--pv-steel) !important;
	}
	/* Knowledge Hub pill: only as wide as its text */
	#site-nav li.pv-nav-kh a {
		display: inline-flex;
		margin-top: 18px;
		padding: 6px 13px 6px 10px;
		font-size: 1.05rem;
		border: 1px solid rgba(6, 182, 212, .5);
	}
}

/* QC fix 13 Nov 2026: on phones the closed full-screen menu is invisible, but the
   v3 rule ".submenu { visibility: visible }" kept the Solutions submenu links
   tappable across the middle of the screen (taps jumped to #services, incl. taps on
   the enquiry form). The submenu now inherits the menu's hidden state, and the
   closed menu ignores taps. */
@media (max-width: 1040px) {
	#site-nav .submenu { visibility: inherit; }
	#site-nav:not(.open) { pointer-events: none; }
}

@media print {
	.site-header { display: none; }
}

/* ==========================================================================
   18 Nov 2026 — MOBILE MENU ACCORDION (≤1040px)
   Every parent item (Solutions now, more later) shows an arrow button on the right; its submenu
   stays closed until tapped. Toggle + aria-expanded = the existing .sub-btn script in
   inc/scripts.php (header behaviour); Escape / tapping elsewhere closes it.
   ========================================================================== */
@media (max-width: 1040px) {
	#site-nav .has-sub {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 56px;
		align-items: stretch;
	}
	#site-nav .has-sub > a { grid-column: 1; grid-row: 1; padding: 16px 0; }
	.site-header #site-nav .sub-btn {
		display: grid;
		grid-column: 2;
		grid-row: 1;
		place-items: center;
		width: 56px;
		height: auto;
		margin: 0;
		border-radius: 0;
		border-bottom: 1px solid rgba(241, 245, 249, .1);
		color: #F1F5F9;
	}
	.site-header #site-nav .sub-btn svg { width: 20px; height: 20px; transition: transform .25s; }
	.site-header #site-nav .sub-btn:hover { background: none; }
	.site-header #site-nav .sub-btn:focus-visible { outline: 2px solid #06B6D4; outline-offset: -4px; border-radius: 8px; }
	#site-nav .has-sub:hover:not(.open) .sub-btn svg { transform: none; }
	#site-nav .has-sub.open .sub-btn svg { transform: rotate(180deg); }
	/* 20 Nov 2026 (user): the submenu slides + fades open AND closed, with the same feel as the case-studies "Jump to a case study" list
	   (.65s slide, .5s fade). Closed = height 0 + hidden (out of the tab order); "inherit" keeps it hidden while the whole menu is closed. */
	#site-nav .has-sub > .submenu {
		grid-column: 1 / -1;
		display: block;
		box-sizing: border-box;
		max-height: 0;
		overflow: hidden;
		padding: 0 0 0 8px;
		border-radius: 0;
		box-shadow: inset 0 -1px 0 rgba(241, 245, 249, .1);
		opacity: 0;
		visibility: hidden;
		transition: max-height .65s cubic-bezier(.4, 0, .2, 1), padding .65s cubic-bezier(.4, 0, .2, 1), opacity .5s ease, visibility 0s linear .65s;
	}
	#site-nav .has-sub.open > .submenu {
		max-height: 280px; /* 4 items = 248px; keep it just above the real height so the slide takes the full .65s (raise it if more items are added) */
		padding: 4px 0 12px 8px;
		opacity: 1;
		visibility: inherit;
		transition: max-height .65s cubic-bezier(.4, 0, .2, 1), padding .65s cubic-bezier(.4, 0, .2, 1), opacity .5s ease .05s, visibility 0s;
	}
}
@media (prefers-reduced-motion: reduce) { #site-nav .has-sub > .submenu, #site-nav .has-sub.open > .submenu { transition: none; } }

/* 18 Nov 2026 (evening) — LOGO SIZE: a little larger (was 32px high). */
.site-header .brand img { height: 38px !important; width: auto !important; }
@media (max-width: 760px) { .site-header .brand img { height: 34px !important; } }

/* ==========================================================================
   19 Nov 2026 — KH ACTIVE STATE = Claude Design option D "Inverted white"
   (canvas "provenio ai — Knowledge Hub active state options").
   Rest: unchanged tinted pill. Hover: brighter tint + ring, lighter icon.
   Active (on the Knowledge Hub page): white pill, navy text, darker cyan icon, soft cyan shadow.
   ========================================================================== */
#site-nav li.pv-nav-kh a {
	transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
#site-nav li.pv-nav-kh a:hover {
	background: rgba(6, 182, 212, .2);
	border-color: rgba(6, 182, 212, .8);
	color: #fff;
}
#site-nav li.pv-nav-kh a:hover::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322D3EE' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
body.page-id-148 #site-nav li.pv-nav-kh a,
body.page-id-148 #site-nav li.pv-nav-kh a:hover,
#site-nav li.pv-nav-kh.current-menu-item a,
#site-nav li.pv-nav-kh a[aria-current] {
	background: #fff;
	border-color: #fff;
	color: #0A1438;
/* 	box-shadow: 0 6px 20px rgba(6, 182, 212, .3); */
	cursor: default;
}
body.page-id-148 #site-nav li.pv-nav-kh a::before,
#site-nav li.pv-nav-kh.current-menu-item a::before,
#site-nav li.pv-nav-kh a[aria-current]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230891B2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
