/* Shared navigation: a centred floating pill. Expects the page to define
   --shell, --line, --ink-deep, --body, --blue, --blue-deep, --white. */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 0 6px;
}

.nav-inner {
  position: relative;
  display: flex;
  width: max-content;
  max-width: calc(100% - 32px);
  height: auto;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px -18px rgba(20, 22, 26, 0.45);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
}

.brand span {
  color: #0d2843;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links > a,
.nav-services-trigger {
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  color: var(--body);
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.nav-links > a:hover,
.nav-services-trigger:hover,
.nav-services-trigger[aria-expanded="true"] {
  background: rgba(20, 22, 26, 0.05);
  color: var(--ink-deep);
}

/* A disclosure with a complete service index, shared by every public page. */
.nav-services-trigger > span { margin-left: 4px; }
.services-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 3;
  width: min(620px, calc(100vw - 40px));
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white, #fff);
  box-shadow: 0 18px 42px -24px rgba(20, 22, 26, 0.48);
  transform: translateX(-50%);
}
.services-menu[hidden] { display: none; }
.services-menu-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 650;
}
.service-menu-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 18px;
}
.service-menu-groups > :first-child { grid-row: span 3; }
.service-menu-label {
  margin: 0 0 6px;
  color: var(--body);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.service-menu-group ul { margin: 0; padding: 0; list-style: none; }
.service-menu-group a {
  display: block;
  padding: 7px 8px;
  margin-inline: -8px;
  border-radius: 6px;
  color: var(--ink-deep);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
}
.service-menu-group a:hover, .service-menu-group a:focus-visible {
  color: var(--blue);
  background: #f2f8fd;
}
.services-menu-all:hover { color: var(--blue-deep); }

.nav-cta {
  margin-left: 4px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  color: var(--white, #fff);
  background: var(--ink-deep);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease;
}

.nav-cta { background: var(--blue); }
.nav-cta:hover { background: var(--blue-deep); }

/* Outlined companion to the solid CTA: look around before booking a call. */
.nav-demo {
  margin-left: 4px;
  padding: 8px 17px;
  border: 1px solid var(--blue, #2563eb);
  border-radius: 999px;
  color: var(--blue, #2563eb);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 620;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}

.nav-demo:hover {
  color: var(--white, #fff);
  background: var(--blue, #2563eb);
}

.mobile-nav-demo {
  display: block;
  margin-top: 6px;
  padding: 11px 16px;
  border: 1px solid var(--blue, #2563eb);
  border-radius: 12px;
  color: var(--blue, #2563eb);
  font-weight: 620;
  text-align: center;
}

.nav-toggle, .mobile-nav { display: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 980px) {
  .nav-inner { gap: 22px; }
  .nav-links { gap: 18px; }
  .nav-links > a, .nav-services-trigger { font-size: 0.88rem; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-demo { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-toggle {
    display: grid; width: 44px; height: 44px; margin-left: 12px; place-content: center;
    gap: 5px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
    color: var(--ink-deep); background: var(--white); cursor: pointer;
  }
  .nav-toggle > span:not(.sr-only) {
    display: block; width: 19px; height: 2px; border-radius: 99px; background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }
  .nav-toggle.is-open > span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open > span:nth-of-type(3) { opacity: 0; }
  .nav-toggle.is-open > span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-nav {
    display: grid; width: min(420px, calc(100% - 32px)); margin: 8px auto 0;
    max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain;
    padding: 10px 20px 20px; border-radius: 20px; background: var(--white);
    box-shadow: 0 18px 40px -26px rgba(20, 22, 26, 0.5);
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav > a:not(.mobile-nav-cta):not(.mobile-nav-demo) {
    display: flex; align-items: center; padding: 13px 2px;
    border-bottom: 1px solid var(--line); color: var(--ink-deep);
    font-size: 0.98rem; font-weight: 600;
  }
  .mobile-services { display: grid; gap: 20px; padding: 8px 0 20px; border-bottom: 1px solid var(--line); }
  .mobile-services .service-menu-group a { padding-block: 11px; font-size: 0.9rem; }
  .mobile-nav-cta {
    width: 100%; min-height: 48px; margin-top: 16px; border: 0; border-radius: 7px;
  color: var(--white, #fff); background: var(--blue, #2563eb); font: inherit; font-size: 0.96rem;
    font-weight: 650; white-space: nowrap; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
  }
}

@media (max-width: 620px) {
  .nav-inner { gap: 8px; }
  .brand img { width: 25px; height: 25px; }
  .brand span { font-size: 1.06rem; }
  .nav-cta { display: none; }
  .nav-toggle { margin-left: 0; }
}
