/* Shared navigation — homepage full-bleed → floating pill on scroll */
header.sticky,
header.site-header {
  position: fixed !important;
  inset: 0 0 auto 0;
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 50;
  transition: padding 0.28s ease;
}

header.sticky > .container-page,
header.site-header > .container-page {
  width: 100%;
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
  padding-right: clamp(20px, 2.5vw, 32px) !important;
  padding-left: clamp(20px, 2.5vw, 32px) !important;
  transition: width 0.28s ease, max-width 0.28s ease, padding 0.28s ease;
}

header.sticky nav,
header.site-header nav {
  min-height: 74px;
  font-family: 'Manrope', 'Inter', ui-sans-serif, system-ui, sans-serif;
  height: auto;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition:
    min-height 0.28s ease,
    padding 0.28s ease,
    border-color 0.28s ease,
    border-radius 0.28s ease,
    background-color 0.28s ease,
    box-shadow 0.28s ease;
}

header.sticky nav > a:first-child,
header.site-header nav > a:first-child {
  gap: 8px;
  padding-right: 12px;
  white-space: nowrap;
  color: #fff !important;
  font-size: 14px;
}

header.sticky nav > a:first-child img,
header.site-header nav > a:first-child img {
  width: 30px;
  height: 30px;
}

header.sticky nav > a:first-child span,
header.site-header nav > a:first-child span {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

header.sticky nav > div[class*="hidden lg:flex"],
header.site-header nav > div[class*="hidden lg:flex"] {
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: clamp(2px, 0.6vw, 10px);
}

header.sticky .nav-item > button,
header.sticky nav > div[class*="hidden lg:flex"] > a,
header.site-header .nav-item > button,
header.site-header nav > div[class*="hidden lg:flex"] > a {
  border-radius: 4px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 13px !important;
  font-weight: 550;
  letter-spacing: -0.01em;
  padding: 8px clamp(9px, 0.9vw, 13px) !important;
  color: #fff !important;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

header.sticky .nav-item > button:hover,
header.sticky .nav-item:focus-within > button,
header.sticky nav > div[class*="hidden lg:flex"] > a:hover,
header.site-header .nav-item > button:hover,
header.site-header .nav-item:focus-within > button,
header.site-header nav > div[class*="hidden lg:flex"] > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

header.sticky nav > div:last-child > a,
header.site-header nav > div:last-child > a {
  min-height: 36px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  padding-inline: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  background-color: rgba(64, 122, 184, 0.72) !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 28px -16px rgba(27, 52, 83, 0.7);
}

header.sticky #mobileToggle,
header.site-header #mobileToggle {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  font-size: 18px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

header.sticky #mobileToggle:hover,
header.sticky #mobileToggle[aria-expanded="true"],
header.site-header #mobileToggle:hover,
header.site-header #mobileToggle[aria-expanded="true"] {
  background: rgba(64, 122, 184, 0.22);
  border-color: rgba(115, 185, 242, 0.42);
}

header.sticky #mobileMenu,
header.site-header #mobileMenu {
  width: min(calc(100% - 24px), 1192px);
  margin: 8px auto 0;
  padding: 10px;
  border: 1px solid rgba(210, 232, 250, 0.16);
  border-radius: 24px;
  background: rgba(5, 12, 21, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 55px rgba(0, 0, 0, 0.46);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  color: #fff !important;
  font-size: 14px;
}

header.sticky #mobileMenu.open,
header.site-header #mobileMenu.open {
  animation: agentum-menu-in 0.2s ease-out both;
}

header.sticky #mobileMenu > a:not(:last-child),
header.site-header #mobileMenu > a:not(:last-child) {
  padding: 11px 13px;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 12px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

header.sticky #mobileMenu > a:not(:last-child):hover,
header.site-header #mobileMenu > a:not(:last-child):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

header.sticky #mobileMenu > a:last-child,
header.site-header #mobileMenu > a:last-child {
  margin-top: 8px;
  padding-block: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background-color: rgba(64, 122, 184, 0.72);
  color: #fff !important;
  text-align: center;
  font-weight: 700;
}

/* Scrolled floating pill */
header.sticky.is-scrolled,
header.site-header.is-scrolled,
header.sticky.nav-scrolled,
header.site-header.nav-scrolled {
  padding-top: 10px !important;
}

header.sticky.is-scrolled > .container-page,
header.site-header.is-scrolled > .container-page,
header.sticky.nav-scrolled > .container-page,
header.site-header.nav-scrolled > .container-page {
  width: min(calc(100% - 24px), 1120px);
  padding-right: 0 !important;
  padding-left: 0 !important;
}

header.sticky.is-scrolled nav,
header.site-header.is-scrolled nav,
header.sticky.nav-scrolled nav,
header.site-header.nav-scrolled nav {
  min-height: 54px;
  padding: 6px 8px 6px 14px !important;
  border-color: rgba(210, 232, 250, 0.18) !important;
  border-radius: 999px !important;
  background-color: rgba(8, 25, 41, 0.84) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 42px rgba(0, 0, 0, 0.28) !important;
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
}

/* Keep first page section behind the floating nav */
header.sticky + .hero-glow,
header.site-header + .hero-glow,
header.sticky + section.hero-glow,
header.site-header + section.hero-glow {
  margin-top: 0;
}

header.sticky + main,
header.site-header + main {
  padding-top: 88px;
  background-color: #07131f;
  background-image: none;
}

@keyframes agentum-menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 639px) {
  header.sticky nav,
  header.site-header nav {
    min-height: 64px;
  }

  header.sticky.is-scrolled nav,
  header.site-header.is-scrolled nav,
  header.sticky.nav-scrolled nav,
  header.site-header.nav-scrolled nav {
    min-height: 52px;
  }

  header.sticky nav > a:first-child img,
  header.site-header nav > a:first-child img {
    width: 28px;
    height: 28px;
  }

  header.sticky #mobileToggle,
  header.site-header #mobileToggle {
    width: 36px;
    height: 36px;
  }

  header.sticky + main,
  header.site-header + main {
    padding-top: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  header.sticky #mobileMenu.open,
  header.site-header #mobileMenu.open {
    animation: none;
  }
}
