/*
 * CellQual — shell: utility bar, navigation, mobile menu, search overlay,
 * footer, scroll-to-top. Identical on every page.
 */

/* ============================================================= Utility bar */
/*
 * Sticky header, rebuilt for zero jank.
 *
 * The old version animated max-height on the utility bar and min-height on the
 * nav. Both are layout properties, so every frame of the transition triggered
 * reflow AND the content below the header shifted — that is the lag.
 *
 * This version never changes the header's height. The wrapper sticks with a
 * NEGATIVE top equal to the utility bar's own height, so the utility bar
 * scrolls out of view naturally and the nav lands flush at the top. No JS
 * drives the collapse, no height is animated, and nothing below moves.
 */
.cq-head-wrap {
	position: relative;
	z-index: 90;
	background: var(--void);
	--util-h: 40px;
}
/* The mega panel is positioned against this wrapper, so it must not clip. */
.cq-head-wrap { overflow: visible; }

.cq-head-wrap.is-sticky {
	position: sticky;
	/* The whole trick. */
	top: calc(-1 * var(--util-h));
	/* Promote once, up front — not on scroll, which is what causes a repaint
	   spike the moment the user starts moving. */
	will-change: transform;
	transform: translateZ(0);
	backface-visibility: hidden;
}

.cq-head-wrap.is-sticky[data-shrink="0"] { top: 0; }

/* The scrolled treatment changes paint only: colour, border, shadow. */
.cq-head-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(5,7,10,.88);
	border-bottom: 1px solid rgba(255,255,255,.08);
	box-shadow: 0 14px 40px rgba(0,0,0,.45);
	opacity: 0;
	transition: opacity 320ms var(--e-ui);
	pointer-events: none;
}
.cq-head-wrap.is-scrolled::after { opacity: 1; }

/* Blur is opt-in and applied to a layer that already exists, so turning it on
   does not add a new compositing layer mid-scroll. */
.cq-head-wrap[data-blur="1"]::after {
	backdrop-filter: blur(16px) saturate(1.3);
	-webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.cq-util {
	position: relative;
	border-bottom: 1px solid rgba(255,255,255,.07);
	height: var(--util-h);
}
.cq-util__in {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 22px;
	height: 100%;
}
.cq-util__menu {
	display: flex;
	align-items: center;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cq-util__menu a {
	position: relative;
	font-family: var(--font-head);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted-dark);
	transition: color var(--d-btn) var(--e-ui);
}
.cq-util__menu a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: -4px;
	height: 1px;
	background: var(--green-br);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 320ms var(--e-card);
}
.cq-util__menu a:hover { color: #fff; }
.cq-util__menu a:hover::after { transform: scaleX(1); transform-origin: left; }

.cq-util__pill {
	position: relative;
	padding: 6px 16px;
	border: 1px solid rgba(255,255,255,.2);
	border-radius: var(--r-btn);
	font-family: var(--font-head);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #fff;
	overflow: hidden;
	transition: border-color var(--d-btn) var(--e-ui), color var(--d-btn) var(--e-ui);
}
/* Fill sweeps in from the left instead of the background snapping. */
.cq-util__pill::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--green);
	transform: translateX(-101%);
	transition: transform 380ms var(--e-card);
}
.cq-util__pill:hover { border-color: var(--green); color: #fff; }
.cq-util__pill:hover::before { transform: translateX(0); }

/* ============================================================== Navigation */
/*
 * Fixed height, always. The scrolled state scales the logo and tightens the
 * padding with transform, which the compositor handles without reflow.
 */
.cq-nav { position: relative; }
.cq-nav__in {
	display: flex;
	align-items: center;
	gap: clamp(16px, 2.5vw, 40px);
	height: 76px;
}
.cq-head-wrap.is-scrolled .cq-brand {
	transform: scale(.9);
	transform-origin: left center;
}
.cq-brand { transition: transform 340ms var(--e-card); }

/* ------------------------------------------------------------------- Brand */
.cq-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
	color: #fff;
}
.cq-brand__img { height: var(--logo-h); width: auto; object-fit: contain; }
.cq-brand__mark { width: var(--logo-h); height: var(--logo-h); color: var(--green-br); flex: none; }
.cq-brand__mark svg { width: 100%; height: 100%; }
.cq-brand__txt { display: flex; flex-direction: column; line-height: 1; }
.cq-brand__word {
	font-family: var(--font-head);
	font-size: 19px;
	font-weight: 800;
	letter-spacing: .02em;
	color: #fff;
}
.cq-brand__word span { color: var(--green-br); }
.cq-brand__tag {
	font-size: 8px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted-dark);
	margin-top: 4px;
}

/* --------------------------------------------------------------- Nav items */
.cq-nav__items {
	display: flex;
	align-items: center;
	gap: clamp(10px, 1.6vw, 26px);
	margin-inline-start: auto;
}

.cq-ni { position: relative; }

.cq-ni__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 0;
	background: none;
	border: 0;
	font-family: var(--font-head);
	font-size: 13.5px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	white-space: nowrap;
}
.cq-ni__link::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: 4px;
	width: 100%;
	height: 2px;
	background: var(--green-br);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--d-nav) var(--e-ui);
}
.cq-ni:hover > .cq-ni__link::after,
.cq-ni.is-current > .cq-ni__link::after { transform: scaleX(1); }
.cq-ni.is-current > .cq-ni__link { color: #fff; }

.cq-caret { width: 9px; height: 6px; opacity: .6; transition: transform var(--d-dd) var(--e-ui); }
.cq-ni:hover .cq-caret { transform: rotate(180deg); }

.cq-ni__toggle { display: none; }

/* ---------------------------------------------------------------- Dropdown */
.cq-dd {
	position: absolute;
	top: 100%;
	inset-inline-start: 50%;
	z-index: 20;
	min-width: 290px;
	padding-top: 10px;
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, -6px);
	transition:
		opacity var(--d-dd) var(--e-ui),
		transform var(--d-dd) var(--e-ui),
		visibility var(--d-dd);
}
.cq-ni:hover > .cq-dd,
.cq-ni.is-open > .cq-dd {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.cq-dd__in {
	display: grid;
	grid-template-columns: repeat(var(--dd-cols, 1), minmax(250px, 1fr));
	gap: 2px;
	padding: 10px;
	background: var(--ink2);
	border: 1px solid rgba(255,255,255,.09);
	border-radius: var(--r-card);
	box-shadow: 0 26px 60px rgba(0,0,0,.5);
}

.cq-dd__a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 14px;
	border-radius: 2px;
	font-size: 13.5px;
	line-height: 1.35;
	color: var(--muted-dark);
	transition: background var(--d-btn) var(--e-ui), color var(--d-btn) var(--e-ui);
}
.cq-dd__a .cq-arw { opacity: 0; transform: translateX(-4px); transition: all var(--d-btn) var(--e-ui); flex: none; }
.cq-dd__a:hover { background: rgba(255,255,255,.05); color: #fff; }
.cq-dd__a:hover .cq-arw { opacity: 1; transform: translateX(0); }
.cq-dd__a.is-current { color: #fff; }
.cq-dd__a.is-current::before {
	content: "";
	width: 3px; height: 14px;
	background: var(--green-br);
	border-radius: 2px;
	margin-inline-end: -6px;
}

/* Keep a wide dropdown inside the viewport near the end of the bar. */
.cq-nav__items > .cq-ni:nth-last-child(-n+2) > .cq-dd {
	inset-inline-start: auto;
	inset-inline-end: 0;
	transform: translate(0, -6px);
}
.cq-nav__items > .cq-ni:nth-last-child(-n+2):hover > .cq-dd { transform: translate(0, 0); }

/* ----------------------------------------------------------------- Actions */
.cq-nav__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

.cq-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px; height: 40px;
	padding: 0 9px;
	background: transparent;
	border: 1px solid rgba(255,255,255,.16);
	border-radius: var(--r-btn);
	cursor: pointer;
}
.cq-burger span {
	display: block;
	height: 1.6px;
	background: #fff;
	transition: transform var(--d-btn) var(--e-ui), opacity var(--d-btn) var(--e-ui);
}
.cq-burger span:nth-child(2) { width: 70%; }

/* ============================================================ Mobile menu */
.cq-mm { position: fixed; inset: 0; z-index: 200; }
.cq-mm[hidden] { display: none; }
.cq-mm__scrim {
	position: absolute;
	inset: 0;
	background: rgba(5,7,10,.7);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity var(--d-card) var(--e-ui);
}
.cq-mm.is-open .cq-mm__scrim { opacity: 1; }

.cq-mm__panel {
	position: absolute;
	inset-block: 0;
	inset-inline-end: 0;
	width: min(420px, 92vw);
	display: flex;
	flex-direction: column;
	background: var(--void);
	border-inline-start: 1px solid rgba(255,255,255,.08);
	transform: translateX(100%);
	transition: transform var(--d-card) var(--e-card);
}
.cq-mm.is-open .cq-mm__panel { transform: translateX(0); }

.cq-mm__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 22px;
	border-bottom: 1px solid rgba(255,255,255,.08);
	flex: none;
}

.cq-mm__nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }

.cq-mm__row {
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid rgba(255,255,255,.05);
}
.cq-mm__a,
.cq-mm__label {
	flex: 1;
	padding: 15px 10px;
	font-family: var(--font-head);
	font-size: 15px;
	font-weight: 600;
	color: #fff;
}
.cq-mm__label { color: var(--muted-dark); }
.cq-mm__row--d1 .cq-mm__a,
.cq-mm__row--d1 .cq-mm__label {
	padding-inline-start: 24px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--muted-dark);
}
.cq-mm__row--d1 .cq-mm__a:hover { color: #fff; }

.cq-mm__toggle {
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	background: rgba(255,255,255,.05);
	border: 0;
	border-radius: 2px;
	color: var(--green-br);
	cursor: pointer;
	flex: none;
}
.cq-mm__toggle svg { width: 12px; height: 12px; }
.cq-mm__toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
.cq-mm__toggle svg { transition: transform var(--d-btn) var(--e-ui); }

.cq-mm__sub { width: 100%; }
.cq-mm__sub[hidden] { display: none; }

.cq-mm__foot {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px;
	border-top: 1px solid rgba(255,255,255,.08);
	flex: none;
}
.cq-mm__contact { font-size: 13.5px; color: var(--muted-dark); }
.cq-mm__contact:hover { color: var(--green-br); }

/* ========================================================= Search overlay */
.cq-so { position: fixed; inset: 0; z-index: 210; }
.cq-so[hidden] { display: none; }
.cq-so__scrim {
	position: absolute;
	inset: 0;
	background: rgba(5,7,10,.94);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity var(--d-card) var(--e-ui);
}
.cq-so.is-open .cq-so__scrim { opacity: 1; }

.cq-so__panel {
	position: relative;
	max-width: 820px;
	margin: min(16vh, 140px) auto 0;
	padding-inline: var(--gut);
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity var(--d-card) var(--e-ui), transform var(--d-card) var(--e-card);
}
.cq-so.is-open .cq-so__panel { opacity: 1; transform: translateY(0); }

.cq-so__close { position: fixed; top: 22px; inset-inline-end: 22px; }

.cq-so__field {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 16px;
	border-bottom: 2px solid rgba(255,255,255,.14);
}
.cq-so__field svg { width: 22px; height: 22px; color: var(--green-br); flex: none; }
.cq-so__field input {
	flex: 1;
	background: none;
	border: 0;
	font-family: var(--font-head);
	font-size: clamp(22px, 3.4vw, 38px);
	font-weight: 700;
	letter-spacing: -.02em;
	color: #fff;
}
.cq-so__field input::placeholder { color: rgba(147,163,173,.5); }
.cq-so__field input:focus { outline: none; }
.cq-so__field:focus-within { border-bottom-color: var(--green-br); }

.cq-so__hint {
	margin: 12px 0 0;
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted-dark);
}

.cq-so__results { margin-top: 26px; display: grid; gap: 2px; }
.cq-so__r {
	display: block;
	padding: 15px 18px;
	background: rgba(255,255,255,.03);
	border-inline-start: 3px solid var(--tint, var(--green));
	border-radius: 2px;
	transition: background var(--d-btn) var(--e-ui);
}
.cq-so__r:hover { background: rgba(255,255,255,.07); }
.cq-so__rk {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--green-br);
	margin-bottom: 4px;
}
.cq-so__rt { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: #fff; }
.cq-so__empty { padding: 16px 0; color: var(--muted-dark); font-size: 14px; }
.cq-so__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	font-family: var(--font-head);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--green-br);
}

/* ================================================================== Footer */
.cq-ft { background: var(--void); border-top: 1px solid rgba(255,255,255,.07); }

.cq-ft__trust {
	border-bottom: 1px solid rgba(255,255,255,.07);
	background: rgba(255,255,255,.015);
}
.cq-ft__trust p {
	margin: 0;
	padding-block: 16px;
	font-family: var(--font-head);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted-dark);
	text-align: center;
}

.cq-ft__in {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1.15fr 1.1fr;
	gap: clamp(24px, 3.4vw, 56px);
	padding-block: clamp(44px, 5vw, 72px);
}

.cq-ft__h {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 18px;
}

.cq-ft__about {
	margin: 18px 0 0;
	font-size: 13.5px;
	line-height: 1.65;
	color: var(--muted-dark);
	max-width: 34ch;
}

.cq-ft__social {
	display: flex;
	gap: 8px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}
.cq-ft__social a {
	display: grid;
	place-items: center;
	width: 34px; height: 34px;
	border: 1px solid rgba(255,255,255,.14);
	border-radius: 2px;
	color: var(--muted-dark);
	transition: border-color var(--d-btn) var(--e-ui), color var(--d-btn) var(--e-ui);
}
.cq-ft__social a:hover { border-color: var(--green-br); color: var(--green-br); }

.cq-ft__menu,
.cq-ft__contact {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 11px;
}
.cq-ft__menu a { font-size: 13.5px; color: var(--muted-dark); }
.cq-ft__menu a:hover { color: var(--green-br); }

.cq-ft__contact li {
	display: flex;
	gap: 11px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--muted-dark);
}
.cq-ft__contact a { color: var(--muted-dark); }
.cq-ft__contact a:hover { color: var(--green-br); }
.cq-ft__ico { width: 16px; height: 16px; color: var(--green-br); flex: none; margin-top: 3px; }

.cq-ft__pending {
	padding: 10px 12px;
	background: rgba(201,138,22,.1);
	border: 1px dashed rgba(201,138,22,.5);
	border-radius: 2px;
	color: var(--amber);
	font-size: 12px;
	line-height: 1.5;
}

.cq-ft__map {
	position: relative;
	aspect-ratio: 4 / 3;
	border: 1px solid rgba(255,255,255,.1);
	border-radius: var(--r-card);
	overflow: hidden;
}
.cq-ft__map iframe {
	width: 100%; height: 100%;
	border: 0;
	filter: grayscale(1) invert(.92) contrast(.9) brightness(.95);
}

.cq-ft__legal { border-top: 1px solid rgba(255,255,255,.07); }
.cq-ft__legalIn {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 28px;
	padding-block: 20px;
}
.cq-ft__copy p { margin: 0; font-size: 12px; color: var(--muted-dark); }
.cq-ft__copy a { color: var(--muted-dark); text-decoration: underline; text-decoration-color: rgba(147,163,173,.35); }
.cq-ft__copy a:hover { color: var(--green-br); }
.cq-ft__disclaimer,
.cq-ft__credit { margin-top: 6px !important; font-size: 11px !important; opacity: .8; }

.cq-ft__legalMenu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cq-ft__legalMenu a { font-size: 12px; color: var(--muted-dark); }
.cq-ft__legalMenu a:hover { color: var(--green-br); }

/* ========================================================= Scroll to top */
.cq-top {
	position: fixed;
	inset-inline-end: 22px;
	inset-block-end: 22px;
	z-index: 80;
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	background: var(--green);
	border: 0;
	border-radius: var(--r-btn);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all var(--d-card) var(--e-ui);
}
.cq-top svg { width: 16px; height: 16px; }
.cq-top.is-on { opacity: 1; visibility: visible; transform: translateY(0); }
.cq-top:hover { background: var(--green-br); }

/* ============================================================ Breakpoints */
@media (max-width: 1080px) {
	.cq-ft__in { grid-template-columns: 1fr 1fr; }
	.cq-ft__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
	.cq-nav__items { display: none; }
	.cq-burger { display: flex; }
}

@media (max-width: 860px) {
	.cq-util__menu { gap: 14px; }
	.cq-util__menu a { font-size: 10px; letter-spacing: .1em; }
}

@media (max-width: 560px) {
	.cq-nav__in { min-height: 64px; }
	.cq-ft__in { grid-template-columns: 1fr; }
	.cq-ft__legalIn { flex-direction: column; align-items: flex-start; }
	.cq-util__in { justify-content: space-between; }
	.cq-brand__tag { display: none; }
	.cq-top { inset-inline-end: 14px; inset-block-end: 14px; }
}

/* --------------------------------------------- Third-level dropdown nest */
/* The approved navigation is two levels deep. A third exists in the walker so
   a deeper menu still renders sensibly rather than disappearing. */
.cq-dd__nest {
	grid-column: 1 / -1;
	display: grid;
	gap: 1px;
	margin-block-start: 4px;
	padding-block-start: 6px;
	padding-inline-start: 14px;
	border-top: 1px solid rgba(255,255,255,.07);
}
.cq-dd__nest .cq-dd__a { padding-block: 8px; font-size: 12.8px; color: rgba(147,163,173,.82); }

/* A dropdown label with no destination: a real button, so it must not inherit
   the browser's button chrome while still looking like a nav item. */
.cq-ni__link--label {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: 0;
	font: inherit;
	color: #fff;
	cursor: pointer;
	position: relative;
}

.cq-mm__close { flex: none; }
.cq-so__form { position: relative; }
.cq-ft__col--links,
.cq-ft__col--contact,
.cq-ft__col--map { min-width: 0; }
