:root { --header-height: 72px; }

.global-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	background: linear-gradient(112deg, #000923 0%, #021b65 48%, #042373 100%);
	border-bottom: 1px solid rgba(255, 255, 255, .11);
	box-shadow: none;
}

.global-nav {
	display: flex;
	width: min(calc(100% - 40px), 1180px);
	margin-inline: auto;
	height: var(--header-height);
	align-items: center;
	gap: 28px;
}

.global-brand { display: flex; flex: 0 0 auto; align-items: center; }
.global-brand picture { display: block; }
.global-brand img { display: block; width: 155px; height: auto; max-height: 41px; object-fit: contain; object-position: left center; }
.main-links, .nav-actions { display: flex; align-items: center; }
.main-links { gap: 25px; margin-left: auto; }
.nav-actions { gap: 8px; margin-left: 4px; }
.mobile-header-signup { display: none; }

.main-link,
.solutions-trigger {
	position: relative;
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	color: rgba(255, 255, 255, .84);
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
}

.main-link::after,
.solutions-trigger::after {
	position: absolute;
	right: 0;
	bottom: 2px;
	left: 0;
	height: 2px;
	border-radius: 2px;
	background: #0dffff;
	content: "";
	transform: scaleX(0);
	transition: transform .18s ease;
}

.main-link:hover,
.solutions-trigger:hover,
.solutions-trigger[aria-expanded="true"] { color: #fff; }
.main-link:hover::after,
.solutions-trigger:hover::after,
.solutions-trigger[aria-expanded="true"]::after { transform: scaleX(1); }
.chevron { opacity: .75; font-size: 10px; transition: transform .18s ease; }
.solutions-wrap { position: relative; }
.solutions-wrap.open .chevron { transform: rotate(180deg); }

.mega-menu {
	position: absolute;
	top: 52px;
	left: 50%;
	display: grid;
	width: 610px;
	grid-template-columns: 1.08fr .92fr;
	border: 1px solid #d7e2ed;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 65px rgba(0, 27, 72, .24);
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transform: translateX(-45%) translateY(7px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
	overflow: hidden;
}

.solutions-wrap:hover .mega-menu,
.solutions-wrap:focus-within .mega-menu,
.solutions-wrap.open .mega-menu {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
	transform: translateX(-45%);
}

.menu-column { padding: 20px; }
.menu-column + .menu-column { border-left: 1px solid #e6ecf2; background: #f8fafd; }
.menu-column-title {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 10px;
	color: #738398;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
}
.menu-column-title::before { width: 6px; height: 6px; border-radius: 50%; background: #007dff; content: ""; }
.menu-column.content .menu-column-title::before { background: #48c7bd; }

.mega-link {
	display: grid;
	grid-template-columns: 35px 1fr;
	align-items: center;
	gap: 10px;
	padding: 9px;
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
}
.mega-link:hover, .mega-link:focus-visible { background: #edf5ff; }
.menu-column.content .mega-link:hover, .menu-column.content .mega-link:focus-visible { background: #edf9f7; }
.mega-icon {
	display: grid;
	width: 35px;
	height: 35px;
	place-items: center;
	border-radius: 10px;
	color: #0065c9;
	background: #eaf3ff;
	font-size: 14px;
	font-weight: 700;
}
.mega-icon .menu-icon,
.mobile-solution-icon .menu-icon {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}
.mega-icon .menu-icon-filled,
.mobile-solution-icon .menu-icon-filled,
.nav-btn .menu-icon-filled,
.mobile-login .menu-icon-filled,
.mobile-signup .menu-icon-filled {
	fill: currentColor;
	stroke: none;
}
.mega-icon .menu-icon-filled path,
.mega-icon .menu-icon-filled circle,
.mega-icon .menu-icon-filled rect,
.mobile-solution-icon .menu-icon-filled path,
.mobile-solution-icon .menu-icon-filled circle,
.mobile-solution-icon .menu-icon-filled rect,
.nav-btn .menu-icon-filled path,
.nav-btn .menu-icon-filled circle,
.nav-btn .menu-icon-filled rect,
.mobile-login .menu-icon-filled path,
.mobile-login .menu-icon-filled circle,
.mobile-login .menu-icon-filled rect,
.mobile-signup .menu-icon-filled path,
.mobile-signup .menu-icon-filled circle,
.mobile-signup .menu-icon-filled rect {
	fill: currentColor;
	stroke: none;
}
.menu-icon-wordmark {
	fill: currentColor;
	stroke: none;
}
.mega-icon .menu-icon-image,
.mobile-solution-icon .menu-icon-image {
	width: 20px;
	height: auto;
	object-fit: contain;
}
.mega-icon .gear-dollar-image,
.mobile-solution-icon .gear-dollar-image {
	height: auto;
}
.mega-icon.rian { color: #5b4dba; background: linear-gradient(135deg, #e9faf5, #f0ecff); }
.mega-icon.plus { color: #ffde47; background: #021b65; }
.mega-icon.erp { color: #025faf; background: #eaf3ff; }
.menu-column.content .mega-icon { color: #168b80; background: #e9f8f5; }
.mega-copy strong, .mega-copy span { display: block; }
.mega-copy strong { margin-bottom: 1px; color: #183650; font-size: 12px; font-weight: 600; }
.mega-copy span { color: #748499; font-size: 9px; line-height: 1.35; }

.nav-btn {
	display: inline-flex;
	min-height: 39px;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 0 14px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
}
.nav-btn .menu-icon,
.mobile-login .menu-icon,
.mobile-signup .menu-icon,
.mobile-header-signup .menu-icon {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}
.nav-btn .menu-icon-filled,
.mobile-login .menu-icon-filled,
.mobile-signup .menu-icon-filled,
.mobile-header-signup .menu-icon-filled {
	fill: currentColor;
	stroke: none;
}
.nav-login { border: 1px solid rgba(255, 255, 255, .34); color: #fff; background: rgba(255, 255, 255, .04); }
.nav-signup { border: 1px solid #0dffff; color: #001b36; background: #0dffff; }
.nav-login:hover, .nav-login:focus-visible { background: rgba(255, 255, 255, .09); }
.nav-signup:hover, .nav-signup:focus-visible { filter: brightness(.97); }

.menu-toggle, .mobile-panel { display: none; }

@media (max-width: 980px) {
	.global-nav { gap: 16px; }
	.main-links { gap: 16px; }
	.global-brand img { width: 135px; }
	.main-link, .solutions-trigger { font-size: 12px; }
}

@media (max-width: 820px) {
	:root { --header-height: 64px; }
	.global-header { position: sticky; box-shadow: none; }
	.global-nav { position: relative; width: min(calc(100% - 24px), 1180px); }
	.main-links, .nav-actions { display: none; }
	.global-brand img { width: 40px; height: 40px; max-height: none; border-radius: 50%; }
	.mobile-header-signup {
		position: absolute;
		top: 50%;
		left: 50%;
		display: inline-flex;
		min-height: 44px;
		align-items: center;
		justify-content: center;
		gap: 7px;
		padding: 0 16px;
		border: 1px solid #0dffff;
		border-radius: 10px;
		color: #001b36;
		background: #0dffff;
		font-size: 13px;
		font-weight: 600;
		line-height: 1;
		white-space: nowrap;
		text-decoration: none;
		transform: translate(-50%, -50%);
	}
	.mobile-header-signup .menu-icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
	.mobile-header-signup:hover, .mobile-header-signup:focus-visible { filter: brightness(.97); }

	.menu-toggle {
		position: relative;
		display: grid;
		width: 42px;
		height: 36px;
		place-items: center;
		margin-left: auto;
		padding: 0;
		border: 0;
		border-radius: 0;
		color: #fff;
		background: transparent;
		font-size: 0;
		cursor: pointer;
	}
	.menu-toggle::before, .menu-toggle::after {
		position: absolute;
		width: 32px;
		height: 4px;
		border-radius: 2px;
		background: #fff;
		content: "";
		transition: transform .18s ease;
	}
	.menu-toggle::before { transform: translateY(-9px); box-shadow: 0 9px 0 #fff, 0 18px 0 #fff; }
	.menu-toggle::after { display: none; }
	.menu-toggle.is-open::before { transform: rotate(45deg); }
	.menu-toggle.is-open::before { box-shadow: none; }
	.menu-toggle.is-open::after { display: block; transform: rotate(-45deg); }

	.mobile-panel {
		position: absolute;
		top: var(--header-height);
		right: 0;
		left: 0;
		display: none;
		max-height: calc(100dvh - var(--header-height));
		border-top: 1px solid #e3e9ef;
		background: #fff;
		box-shadow: 0 22px 46px rgba(0, 9, 35, .24);
		overflow: hidden;
	}
	.mobile-panel.open { display: flex; flex-direction: column; }
	.mobile-menu-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px 18px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
	.mobile-primary-nav { overflow: hidden; border: 1px solid #dee6ee; border-radius: 14px; background: #fff; }
	.mobile-primary-link {
		display: flex;
		width: 100%;
		min-height: 54px;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 0 15px;
		border: 0;
		border-bottom: 1px solid #e8edf2;
		color: #173650;
		background: #fff;
		font-size: 14px;
		font-weight: 600;
		line-height: 1.3;
		text-align: left;
		text-decoration: none;
	}
	.mobile-primary-link i { flex: 0 0 auto; color: #8090a1; font-size: 15px; font-style: normal; font-weight: 400; }
	.mobile-primary-nav > .mobile-primary-link:last-child { border-bottom: 0; }
.mobile-solutions { border-bottom: 1px solid #e8edf2; }
.mobile-solutions > .mobile-primary-link { border-bottom: 0; }
.mobile-solutions-chevron { transition: transform .16s ease; }
.mobile-solutions.open .mobile-solutions-chevron { transform: rotate(180deg); }
.mobile-solutions-content { display: none; border-top: 1px solid #e5ebf1; background: #f6f9fc; }
.mobile-solutions.open .mobile-solutions-content { display: block; }
	.mobile-solutions-section { padding: 10px 9px 11px; }
	.mobile-solutions-section + .mobile-solutions-section { border-top: 1px solid #dee6ee; }
	.mobile-solutions-label { padding: 2px 7px 7px; color: #7d8b9a; font-size: 10px; font-weight: 700; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; }
.mobile-solution { display: grid; grid-template-columns: 38px minmax(0, 1fr); min-height: 56px; align-items: center; gap: 10px; padding: 7px; border-radius: 10px; text-decoration: none; }
.mobile-solution:active { background: #eaf3ff; }
.mobile-solution-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #0065c9; background: #eaf3ff; font-size: 14px; font-weight: 700; }
.mobile-solution-icon.rian { color: #5b4dba; background: linear-gradient(135deg, #eaf9f6, #f0ecff); }
.mobile-solution-icon.plus { color: #ffde47; background: #021b65; }
.mobile-solution-icon.content { color: #168b80; background: #eaf8f5; }
.mobile-solution-text { min-width: 0; }
.mobile-solution-text strong, .mobile-solution-text small { display: block; }
.mobile-solution-text strong { color: #193650; font-size: 13px; font-weight: 600; line-height: 1.3; }
.mobile-solution-text small { margin-top: 2px; color: #758598; font-size: 11px; line-height: 1.35; }

	.mobile-footer-actions { display: grid; flex: 0 0 auto; grid-template-columns: .82fr 1.18fr; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #e0e7ee; background: #fff; box-shadow: 0 -8px 22px rgba(0, 35, 115, .05); }
	.mobile-login, .mobile-signup { display: flex; min-height: 46px; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; }
	.mobile-login { border: 1px solid #b9c9d9; color: #173b59; background: #fff; }
	.mobile-signup { border: 1px solid #0dffff; color: #001b36; background: #0dffff; }
	body.mobile-menu-open { overflow: hidden; }
}

@media (max-width: 500px) {
	.mobile-menu-scroll { padding: 10px 10px 14px; }
	.mobile-primary-link { min-height: 52px; padding-inline: 13px; }
	.mobile-solution { grid-template-columns: 36px minmax(0, 1fr); min-height: 54px; }
	.mobile-solution-icon { width: 36px; height: 36px; }
	.mobile-footer-actions { grid-template-columns: 1fr; padding-right: 10px; padding-left: 10px; }
	.mobile-header-signup { padding-right: 12px; padding-left: 12px; font-size: 12px; }
}
