/* Systical — Header (floating pill, hides on scroll down) */

.sys-hd {
	--hd-accent: #9afd0d;
	/* Matches the supplied logo's own opaque background (#111), so the image
	   sits on the pill without a visible rectangle around it. */
	--hd-bg: #111111;
	--hd-w: 750px;
	--hd-top: 40px;
	--hd-radius: 50px;
	--hd-border: rgba(255, 255, 255, 0.14);
	--hd-logo-h: 42px;
	--hd-link: #b4b4b4;
	--hd-link-hover: #9afd0d;
	--hd-link-active: #9afd0d;
	--hd-link-gap: 30px;
	/* Measured from the bottom of the bar, so the panel clears the pill. */
	--hd-drop-gap: 26px;
	--hd-ease: cubic-bezier(0.22, 1, 0.36, 1);
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: var(--hd-top);
	/* The strip spans the full width so the bar can be centred by layout rather
	   than by a transform — which leaves translateY free for the hide/show.
	   It must not swallow clicks meant for the page underneath. */
	pointer-events: none;
	transition: transform 420ms var(--hd-ease);
	will-change: transform;
}

/* Far enough to clear the bar and its shadow at any offset. */
.sys-hd.is-hidden {
	transform: translateY(calc(-100% - var(--hd-top) - 20px));
}

.sys-hd__bar,
.sys-hd__panel {
	pointer-events: auto;
}

.sys-hd__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	box-sizing: border-box;
	width: min(var(--hd-w), calc(100% - 32px));
	padding: 10px 10px 10px 22px;
	border: 1px solid var(--hd-border);
	border-radius: var(--hd-radius);
	background-color: var(--hd-bg);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* ---------- brand ---------- */

.sys-hd__brand {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	text-decoration: none;
}

/* Two classes deep on purpose: Elementor ships `.elementor img { height: auto }`,
   which is (0,1,1) and would otherwise outrank a single-class rule here and let
   the logo render at its natural size. */
.sys-hd .sys-hd__logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: var(--hd-logo-h);
	object-fit: contain;
}

.sys-hd__wordmark {
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}

/* ---------- nav ---------- */

.sys-hd__nav {
	display: flex;
	align-items: center;
	gap: var(--hd-link-gap);
	margin: 0 auto;
	/* Stretched so a dropdown's `top: 100%` measures from the bottom of the bar
	   rather than from the middle of a 15px-tall link — that way the panel keeps
	   clearing the pill when the padding controls change its height. */
	align-self: stretch;
}

.sys-hd__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--hd-link);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: color 200ms ease;
}

/* Background restated because Hello Elementor's reset paints `button:hover`
   pink, and the dropdown toggle is a button — the base rule above leaves
   background unset on hover, so the reset would win. */
.sys-hd__link:hover,
.sys-hd__link:focus-visible {
	background: none;
	color: var(--hd-link-hover);
}

.sys-hd__link.is-current:hover,
.sys-hd__link.is-current:focus-visible {
	color: var(--hd-link-active);
}

.sys-hd__link.is-current {
	color: var(--hd-link-active);
	font-weight: 600;
}

.sys-hd__caret {
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	/* Nudged up by a quarter of its own height so the rotated square reads as
	   centred against the text rather than sitting low. */
	transform: translateY(-2px) rotate(45deg);
	transition: transform 240ms var(--hd-ease);
}

.sys-hd__has-drop {
	position: relative;
	display: flex;
	align-items: center;
	align-self: stretch;
}

.sys-hd__has-drop.is-open .sys-hd__caret {
	transform: translateY(1px) rotate(-135deg);
}

/* ---------- dropdown ---------- */

.sys-hd__drop {
	position: absolute;
	top: calc(100% + var(--hd-drop-gap, 20px));
	left: 50%;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 210px;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	background-color: var(--hd-bg);
	/* The page behind is near-black too, so the shadow alone does not separate
	   the panel from it — the hairline is what gives it an edge. */
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	opacity: 0;
	transform: translate(-50%, -6px);
	visibility: hidden;
	transition:
		opacity 220ms ease,
		transform 220ms var(--hd-ease),
		visibility 0s linear 220ms;
}

.sys-hd__has-drop.is-open .sys-hd__drop {
	opacity: 1;
	transform: translate(-50%, 0);
	visibility: visible;
	transition-delay: 0s;
}

/* Bridges the gap between the button and the panel, so moving the pointer
   down to the list does not pass through dead space and close it. */
.sys-hd__drop::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 100%;
	left: 0;
	height: var(--hd-drop-gap, 20px);
}

.sys-hd__drop-link {
	padding: 11px 14px;
	border-radius: 10px;
	color: var(--hd-link);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 14.5px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color 180ms ease,
		color 180ms ease;
}

.sys-hd__drop-link:hover,
.sys-hd__drop-link:focus-visible {
	background-color: rgba(255, 255, 255, 0.07);
	color: var(--hd-link-hover);
}

/* ---------- button + burger ---------- */

.sys-hd__end {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
}

.sys-hd__cta {
	display: inline-flex;
	align-items: center;
	padding: 15px 26px;
	border-radius: 999px;
	background-color: #fff;
	color: #070707;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color 220ms ease,
		color 220ms ease;
}

/* The roll wrapper is a masked box exactly one line tall, so the button's own
   line-height has to match it or the label sits off-centre in the pill. */
.sys-hd__cta .sys-roll {
	--sys-roll-line: 1.15em;
}

.sys-hd__cta:hover,
.sys-hd__cta:focus-visible {
	background-color: var(--hd-accent);
}

.sys-hd__burger {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.08);
	cursor: pointer;
}

/* Same reason as the links above — without this the burger turns pink the
   moment a pointer touches it. */
.sys-hd__burger:hover,
.sys-hd__burger:focus-visible {
	background-color: rgba(255, 255, 255, 0.16);
}

.sys-hd__burger span {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background-color: #fff;
	transition:
		transform 260ms var(--hd-ease),
		opacity 160ms ease;
}

.sys-hd__burger[aria-expanded="true"] span:first-child {
	transform: translateY(3.5px) rotate(45deg);
}

.sys-hd__burger[aria-expanded="true"] span:last-child {
	transform: translateY(-3.5px) rotate(-45deg);
}

/* ---------- collapsed panel ---------- */

.sys-hd__panel {
	display: flex;
	flex-direction: column;
	gap: 6px;
	box-sizing: border-box;
	width: min(var(--hd-w), calc(100% - 32px));
	margin-top: 10px;
	padding: 14px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 22px;
	background-color: var(--hd-bg);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.sys-hd__panel[hidden] {
	display: none;
}

.sys-hd__panel-nav {
	display: flex;
	flex-direction: column;
}

.sys-hd__panel-nav .sys-hd__link {
	justify-content: space-between;
	width: 100%;
	padding: 13px 12px;
	border-radius: 12px;
	font-size: 16px;
}

.sys-hd__panel-nav .sys-hd__has-drop {
	flex-direction: column;
	align-items: stretch;
}

/* In the panel the dropdown is part of the flow — an absolutely positioned
   overlay would sit on top of the links below it. It is also plain: the panel
   already provides the border, background and shadow, so a second set of them
   reads as a box inside a box. */
.sys-hd__panel-nav .sys-hd__drop {
	position: static;
	display: none;
	min-width: 0;
	padding: 2px 0 6px 12px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	opacity: 1;
	transform: none;
	visibility: visible;
}

.sys-hd__panel-nav .sys-hd__has-drop.is-open .sys-hd__drop {
	display: flex;
	/* Restated. The desktop rule `.sys-hd__has-drop.is-open .sys-hd__drop` is
	   (0,3,0) and outranks the (0,2,0) block above, so the panel dropdown kept
	   the desktop's `translate(-50%, 0)` and slid half its own width off the
	   left edge of the panel. */
	transform: none;
}

/* The desktop menu is one line per item and has room; inside a 358px panel a
   label like "WordPress Development" has to be allowed to wrap. */
.sys-hd__panel-nav .sys-hd__drop-link {
	white-space: normal;
}

.sys-hd__panel-nav .sys-hd__drop::before {
	display: none;
}

.sys-hd__cta--panel {
	justify-content: center;
	margin-top: 6px;
	padding: 15px 24px;
	text-align: center;
}

/* ---------- responsive ---------- */

/* Below this the four links plus the button stop fitting inside the pill. */
@media (max-width: 900px) {
	.sys-hd__nav,
	.sys-hd__bar .sys-hd__cta {
		display: none;
	}

	.sys-hd__burger {
		display: flex;
	}
}

@media (min-width: 901px) {
	.sys-hd__panel {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sys-hd,
	.sys-hd__drop,
	.sys-hd__caret,
	.sys-hd__burger span {
		transition: none;
	}
}
