/**
 * HyperKit Pill Nav.
 *
 * The hover highlight is a single absolutely-positioned element inside the
 * pill, moved and resized by JS to sit under the active link. One element
 * means it SLIDES between links; a background on each link can only fade.
 */

.hk-pn {
	--hk-pn-bg: rgba(255, 255, 255, 0.86);
	--hk-pn-border: rgba(17, 17, 17, 0.08);
	--hk-pn-pad: 6px;
	--hk-pn-gap: 10px;
	--hk-pn-radius: 999px;
	--hk-pn-top: 18px;

	--hk-pn-link: #111111;
	--hk-pn-link-hover: var(--hk-pn-link);
	--hk-pn-highlight: rgba(17, 17, 17, 0.06);
	--hk-pn-link-pad: 14px;
	--hk-pn-icon: 17px;
	--hk-pn-icon-gap: 8px;

	--hk-pn-brand-size: 54px;
	--hk-pn-brand-bg: rgba(255, 255, 255, 0.86);
	--hk-pn-brand-color: #111111;

	--hk-pn-action-size: 54px;
	--hk-pn-action-bg: #ffd400;
	--hk-pn-action-color: #111111;
	--hk-pn-action-hover: var(--hk-pn-action-bg);
	--hk-pn-action-hover-color: var(--hk-pn-action-color);

	position: relative;
	z-index: 300;
}

.hk-pn--empty {
	padding: 14px;
	border: 1px dashed rgba(17, 17, 17, 0.3);
	border-radius: 10px;
	font-style: italic;
	text-align: center;
}

/* --- placement ---------------------------------------------------------- */
.hk-pn__row {
	display: flex;
	justify-content: center;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}

.hk-pn--sticky .hk-pn__row {
	position: -webkit-sticky;
	position: sticky;
	top: var(--hk-pn-top);
	z-index: 2;
}

.hk-pn--fixed .hk-pn__row {
	position: fixed;
	top: var(--hk-pn-top);
	left: 0;
	right: 0;
	z-index: 2;
	padding: 0 16px;
}

/* Hidden by a downward scroll. Pulled up by its own height plus the offset so
 * nothing peeks out from under the top of the window. */
.hk-pn.is-hidden .hk-pn__row {
	transform: translateY(calc((100% + var(--hk-pn-top)) * -1));
	opacity: 0;
	pointer-events: none;
}

.hk-pn__bar {
	display: inline-flex;
	gap: var(--hk-pn-gap);
	align-items: center;
	max-width: 100%;
}

/* --- pill --------------------------------------------------------------- */
.hk-pn__pill,
.hk-pn__brand,
.hk-pn__action,
.hk-pn__toggle {
	background: var(--hk-pn-bg);
	border: 1px solid var(--hk-pn-border);
	border-radius: var(--hk-pn-radius);
}

.hk-pn--blur .hk-pn__pill,
.hk-pn--blur .hk-pn__brand,
.hk-pn--blur .hk-pn__toggle {
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
	backdrop-filter: blur(12px) saturate(1.4);
}

.hk-pn__pill {
	position: relative;
	padding: var(--hk-pn-pad);
	min-width: 0;
}

.hk-pn__list {
	display: flex;
	gap: 2px;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.hk-pn__item {
	margin: 0;
	list-style: none;
}

.hk-pn--divided .hk-pn__item + .hk-pn__item {
	border-left: 1px solid var(--hk-pn-border);
}

.hk-pn__link {
	position: relative;
	z-index: 1;
	display: inline-flex;
	gap: var(--hk-pn-icon-gap);
	align-items: center;
	padding: 9px var(--hk-pn-link-pad);
	border-radius: var(--hk-pn-radius);
	color: var(--hk-pn-link);
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease, background-color 0.2s ease;
}

/* Colours are stated against the root class and for every anchor state.
 * A bare `.hk-pn__link` (0,1,0) loses to any theme rule like
 * `.site-header a:link` — which is exactly how a colour control ends up
 * looking broken on somebody's site. */
.hk-pn .hk-pn__link,
.hk-pn .hk-pn__link:link,
.hk-pn .hk-pn__link:visited {
	color: var(--hk-pn-link);
}

.hk-pn .hk-pn__link:hover,
.hk-pn .hk-pn__link:focus-visible {
	color: var(--hk-pn-link-hover);
}

/* Without the sliding highlight each link carries its own background, which
 * is the honest fallback when JS has not run. */
.hk-pn:not(.hk-pn--slide) .hk-pn__link:hover,
.hk-pn:not(.hk-pn--slide) .hk-pn__link.is-current {
	background: var(--hk-pn-highlight);
}

.hk-pn__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--hk-pn-icon);
	height: var(--hk-pn-icon);
}

.hk-pn__icon svg,
.hk-pn__brand-icon svg,
.hk-pn__action-icon svg {
	width: 100%;
	height: 100%;
}

/* Only colour in icons that have not declared a fill of their own. Font
 * Awesome's inline SVGs carry no fill and expect currentColor; a hand-drawn
 * line icon carries fill="none" and expects to be left alone. A blanket
 * `fill: currentColor` overrides that attribute — CSS beats a presentation
 * attribute — and turns every outline icon into a solid black blob. */
/* Icon paint, in three cases, so the colour control actually works whatever
 * the icon set does:
 *
 *   1. No fill attribute at all — Font Awesome's inline SVGs. Paint the fill.
 *   2. fill="none" — an outline icon. Painting its FILL would turn it into a
 *      solid blob, so paint the stroke instead.
 *   3. Children of an outline icon that hardcode a stroke of their own, which
 *      is the case a rule on the <svg> alone silently loses. */
.hk-pn__icon svg:not([fill]),
.hk-pn__brand-icon svg:not([fill]),
.hk-pn__action-icon svg:not([fill]) {
	fill: currentColor;
}

.hk-pn__icon svg[fill="none"],
.hk-pn__brand-icon svg[fill="none"],
.hk-pn__action-icon svg[fill="none"],
.hk-pn__icon svg[fill="none"] [stroke]:not([stroke="none"]),
.hk-pn__brand-icon svg[fill="none"] [stroke]:not([stroke="none"]),
.hk-pn__action-icon svg[fill="none"] [stroke]:not([stroke="none"]) {
	stroke: currentColor;
}

.hk-pn__icon i,
.hk-pn__brand-icon i,
.hk-pn__action-icon i {
	font-size: inherit;
	line-height: 1;
}

.hk-pn__icon i {
	font-size: var(--hk-pn-icon);
}

.hk-pn__highlight {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 0;
	height: var(--hk-pn-hh, 0px);
	border-radius: var(--hk-pn-radius);
	background: var(--hk-pn-highlight);
	opacity: 0;
	transform: translate3d(var(--hk-pn-hx, 0px), var(--hk-pn-hy, 0px), 0);
	width: var(--hk-pn-hw, 0px);
	transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
	pointer-events: none;
}

.hk-pn--slide .hk-pn__highlight.is-on {
	opacity: 1;
}

/* --- brand + action ----------------------------------------------------- */
.hk-pn__brand {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--hk-pn-brand-size);
	height: var(--hk-pn-brand-size);
	overflow: hidden;
	/* The badge has its OWN background and border. Without these two lines it
	 * silently inherits the bar's from the shared rule above, and the Style
	 * tab's badge colours — including a transparent one — do nothing at all. */
	background: var(--hk-pn-brand-bg);
	border-color: var(--hk-pn-brand-border, var(--hk-pn-border));
	text-decoration: none;
}

.hk-pn .hk-pn__brand,
.hk-pn .hk-pn__brand:link,
.hk-pn .hk-pn__brand:visited {
	color: var(--hk-pn-brand-color);
}

/* "No plate" has to take the shadow with it, or an invisible badge still
 * casts one. Three classes deep so it beats the Style tab's own
 * `{{WRAPPER}} .hk-pn__brand` shadow output, which loads later. */
.hk-pn.hk-pn--action-bare .hk-pn__action,
.hk-pn.hk-pn--brand-bare .hk-pn__brand {
	background: none;
	border-color: transparent;
	/* !important is deliberate and narrow: it only has to beat a stale
	 * per-widget stylesheet generated before the selector above learned to
	 * exclude bare plates. Elementor regenerates that CSS on the next save,
	 * but nobody should have to re-save a page to make "off" mean off. */
	box-shadow: none !important;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.hk-pn__brand-text {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Scoped with the root class on purpose. Elementor's frontend stylesheet
 * carries `.elementor img { height: auto; border-radius: 0; }` at specificity
 * (0,1,1), which beats a bare `.hk-xx__img` (0,1,0) — so the image ignores its
 * height and its radius, sizes to its own aspect ratio, and leaves the card's
 * background showing as a polaroid border nobody asked for. Two classes wins. */
.hk-pn .hk-pn__brand-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hk-pn__brand-icon {
	display: inline-flex;
	width: 45%;
	height: 45%;
	align-items: center;
	justify-content: center;
}

.hk-pn__action {
	display: inline-flex;
	flex: none;
	gap: 8px;
	align-items: center;
	justify-content: center;
	width: var(--hk-pn-action-size);
	height: var(--hk-pn-action-size);
	border-color: transparent;
	background: var(--hk-pn-action-bg);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

/* One control paints the icon AND the label: they are the same anchor, and
 * two colours that can drift apart is a worse setting, not a better one. */
.hk-pn .hk-pn__action,
.hk-pn .hk-pn__action:link,
.hk-pn .hk-pn__action:visited {
	color: var(--hk-pn-action-color);
}

.hk-pn .hk-pn__action:hover,
.hk-pn .hk-pn__action:focus-visible {
	background: var(--hk-pn-action-hover);
	color: var(--hk-pn-action-hover-color);
	transform: translateY(-1px);
}

.hk-pn__action--wide {
	width: auto;
	padding: 0 22px;
}

.hk-pn__action-icon {
	display: inline-flex;
	width: calc(var(--hk-pn-icon) + 2px);
	height: calc(var(--hk-pn-icon) + 2px);
	align-items: center;
	justify-content: center;
}

.hk-pn__action-icon i {
	font-size: calc(var(--hk-pn-icon) + 2px);
}

.hk-pn__action-text {
	font-size: 15px;
	white-space: nowrap;
}

/* --- scrolled state ----------------------------------------------------- */
.hk-pn__pill,
.hk-pn__brand,
.hk-pn__action,
.hk-pn__toggle {
	transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
}

.hk-pn.is-flat .hk-pn__pill,
.hk-pn.is-flat .hk-pn__brand,
.hk-pn.is-flat .hk-pn__action,
.hk-pn.is-flat .hk-pn__toggle {
	box-shadow: none;
}

/* --- mobile ------------------------------------------------------------- */
.hk-pn__toggle,
.hk-pn__sheet {
	display: none;
}

.hk-pn__toggle {
	position: relative;
	width: var(--hk-pn-brand-size);
	height: var(--hk-pn-brand-size);
	padding: 0;
	color: var(--hk-pn-link);
	cursor: pointer;
}

.hk-pn__bars,
.hk-pn__bars::before,
.hk-pn__bars::after {
	position: absolute;
	left: 50%;
	width: 18px;
	height: 1.5px;
	margin-left: -9px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.hk-pn__bars {
	top: 50%;
	margin-top: -0.75px;
}

.hk-pn__bars::before,
.hk-pn__bars::after {
	content: "";
	left: 0;
	margin-left: 0;
}

.hk-pn__bars::before { transform: translateY(-6px); }
.hk-pn__bars::after { transform: translateY(6px); }

.hk-pn.is-open .hk-pn__bars { background: transparent; }
.hk-pn.is-open .hk-pn__bars::before { transform: rotate(45deg); }
.hk-pn.is-open .hk-pn__bars::after { transform: rotate(-45deg); }

@media (max-width: 767px) {
	.hk-pn--mob-sheet .hk-pn__pill {
		display: none;
	}

	.hk-pn--mob-sheet .hk-pn__toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.hk-pn--mob-sheet .hk-pn__sheet {
		display: block;
		position: fixed;
		top: calc(var(--hk-pn-top) + var(--hk-pn-brand-size) + 10px);
		left: 12px;
		right: 12px;
		z-index: 3;
		padding: 8px;
		border: 1px solid var(--hk-pn-border);
		border-radius: 22px;
		background: var(--hk-pn-bg);
		-webkit-backdrop-filter: blur(14px) saturate(1.4);
		backdrop-filter: blur(14px) saturate(1.4);
		box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
		opacity: 0;
		translate: 0 -8px;
		transition: opacity 0.25s ease, translate 0.25s ease;
	}

	.hk-pn--mob-sheet .hk-pn__sheet[hidden] {
		display: none;
	}

	.hk-pn.is-open .hk-pn__sheet {
		opacity: 1;
		translate: 0 0;
	}

	.hk-pn__sheet-list {
		display: flex;
		flex-direction: column;
		gap: 2px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.hk-pn__link--sheet {
		width: 100%;
		padding: 13px 16px;
		border-radius: 16px;
		font-size: 16px;
	}

	.hk-pn__link--sheet:hover,
	.hk-pn__link--sheet.is-current {
		background: var(--hk-pn-highlight);
	}

	/* Sideways scroll keeps the real pill on small screens; the scrollbar is
	 * hidden because the pill's own overflow is the affordance. */
	.hk-pn--mob-scroll .hk-pn__pill {
		overflow-x: auto;
		scrollbar-width: none;
	}

	.hk-pn--mob-scroll .hk-pn__pill::-webkit-scrollbar {
		display: none;
	}

	.hk-pn--mob-labels .hk-pn__text {
		display: none;
	}

	.hk-pn--mob-labels .hk-pn__link {
		padding: 9px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hk-pn__row,
	.hk-pn__highlight,
	.hk-pn__sheet {
		transition-duration: 0.001ms;
	}
}
