/* Shared V2 navigation for the rebuilt ScopeX routes. */
.sx-v2-header,
.sx-v2-header *,
.sx-v2-header__drawer,
.sx-v2-header__drawer * {
  box-sizing: border-box;
}

.sx-v2-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  border-bottom: 1px solid var(--sx-g-200);
  background: rgba(250, 250, 247, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sx-v2-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: var(--sx-s-4);
}

.sx-v2-header__brand,
.sx-v2-header__drawer-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.sx-v2-header__brand-mark {
  display: block;
  width: auto;
  height: 32px;
}

.sx-v2-header__desktop-nav,
.sx-v2-header__actions {
  display: none;
}

.sx-v2-header__menu-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--sx-g-200);
  border-radius: 8px;
  background: transparent;
  color: var(--sx-ink);
  cursor: pointer;
}

.sx-v2-header__menu-toggle:hover,
.sx-v2-header__menu-toggle:focus-visible {
  border-color: var(--sx-brand);
  color: var(--sx-brand);
  outline: none;
}

.sx-v2-header__menu-icon {
  display: grid;
  width: 18px;
  gap: 4px;
}

.sx-v2-header__menu-icon i {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}

.sx-v2-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.sx-v2-header__drawer {
  width: min(100%, 450px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 1px solid rgb(250 250 247 / 0.12);
  background: #101820;
  color: var(--sx-surface);
}

.sx-v2-header__drawer[open] {
  display: flex;
  flex-direction: column;
}

.sx-v2-header__drawer::backdrop {
  background: rgb(6 13 22 / 0.62);
}

.sx-v2-header__drawer-inner {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 20px 24px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
}

.sx-v2-header__drawer-top {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: var(--sx-s-4);
  border-bottom: 1px solid rgb(250 250 247 / 0.12);
  padding-bottom: 18px;
}

.sx-v2-header__drawer-brand {
  gap: 10px;
  color: var(--sx-surface);
}

.sx-v2-header__drawer-symbol {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 4px;
}

.sx-v2-header__drawer-wordmark {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.sx-v2-header__drawer-wordmark strong {
  color: var(--sx-surface);
  font-family: var(--sx-font-display);
  font-size: 1rem;
  font-weight: 700;
}

.sx-v2-header__drawer-wordmark span {
  color: #8cc7ff;
  font-family: var(--sx-font-mono);
  font-size: 0.63rem;
  font-weight: 500;
}

.sx-v2-header__drawer-close {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(250 250 247 / 0.22);
  border-radius: 8px;
  background: transparent;
  color: var(--sx-surface);
  cursor: pointer;
}

.sx-v2-header__drawer-close span,
.sx-v2-header__drawer-close span::after {
  position: absolute;
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  content: '';
}

.sx-v2-header__drawer-close span {
  transform: rotate(45deg);
}

.sx-v2-header__drawer-close span::after {
  transform: rotate(90deg);
}

.sx-v2-header__drawer-close:hover,
.sx-v2-header__drawer-close:focus-visible {
  border-color: #8cc7ff;
  color: #8cc7ff;
  outline: none;
}

.sx-v2-header__drawer-nav {
  display: grid;
  gap: 0;
  margin-top: 32px;
}

.sx-v2-header__drawer-nav > a,
.sx-v2-header__drawer-services > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(250 250 247 / 0.12);
  color: var(--sx-surface);
  font-family: var(--sx-font-display);
  font-size: 1.12rem;
  font-weight: 600;
  text-decoration: none;
}

.sx-v2-header__drawer-nav > a:hover,
.sx-v2-header__drawer-nav > a:focus-visible,
.sx-v2-header__drawer-nav > a[aria-current='page'],
.sx-v2-header__drawer-services > summary:hover,
.sx-v2-header__drawer-services > summary:focus-visible {
  color: #8cc7ff;
  outline: none;
}

.sx-v2-header__drawer-services {
  border-bottom: 1px solid rgb(250 250 247 / 0.12);
}

.sx-v2-header__drawer-services > summary {
  list-style: none;
  cursor: pointer;
}

.sx-v2-header__drawer-services > summary::-webkit-details-marker {
  display: none;
}

.sx-v2-header__drawer-services > summary span {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.sx-v2-header__drawer-services[open] > summary span {
  transform: rotate(225deg) translateY(-2px);
}

.sx-v2-header__drawer-services > div {
  display: grid;
  padding: 6px 0 14px;
}

.sx-v2-header__drawer-services a {
  min-height: 42px;
  padding: 10px 0 10px 16px;
  color: rgb(250 250 247 / 0.72);
  font-family: var(--sx-font-body);
  font-size: 0.92rem;
  line-height: 1.35;
  text-decoration: none;
}

.sx-v2-header__drawer-services a:hover,
.sx-v2-header__drawer-services a:focus-visible {
  color: #8cc7ff;
  outline: none;
}

.sx-v2-header__drawer-footer {
  margin-top: auto;
  padding-top: 32px;
}

.sx-v2-header__drawer-footer p {
  max-width: 250px;
  margin: 0 0 16px;
  color: rgb(250 250 247 / 0.62);
  font-size: 0.9rem;
  line-height: 1.55;
}

.sx-v2-header__drawer-footer a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #1870ca;
  border-radius: 8px;
  background: #0755b7;
  color: #fff;
  font-family: var(--sx-font-body);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.sx-v2-header__drawer-footer a:hover,
.sx-v2-header__drawer-footer a:focus-visible {
  border-color: #8cc7ff;
  background: #0d64cc;
  outline: none;
}

body.sx-v2-menu-open {
  overflow: hidden;
}

@media (min-width: 1280px) {
  .sx-v2-header__inner {
    min-height: 76px;
  }

  .sx-v2-header__brand-mark {
    height: 34px;
  }

  .sx-v2-header__desktop-nav {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 1.45vw, 25px);
    margin-inline: auto;
  }

  .sx-v2-header__link,
  .sx-v2-header__services-trigger {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sx-ink);
    font-family: var(--sx-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }

  .sx-v2-header__link,
  .sx-v2-header__services-trigger {
    position: relative;
  }

  .sx-v2-header__link::after,
  .sx-v2-header__services-trigger::after {
    position: absolute;
    right: 0;
    bottom: 7px;
    left: 0;
    height: 1px;
    background: var(--sx-brand);
    content: '';
    opacity: 0;
    transform: scaleX(0.35);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .sx-v2-header__link:hover,
  .sx-v2-header__link:focus-visible,
  .sx-v2-header__link[aria-current='page'],
  .sx-v2-header__services-trigger:hover,
  .sx-v2-header__services-trigger:focus-visible,
  .sx-v2-header__services.is-open .sx-v2-header__services-trigger {
    color: var(--sx-brand);
    outline: none;
  }

  .sx-v2-header__link:hover::after,
  .sx-v2-header__link:focus-visible::after,
  .sx-v2-header__link[aria-current='page']::after,
  .sx-v2-header__services-trigger:hover::after,
  .sx-v2-header__services-trigger:focus-visible::after,
  .sx-v2-header__services.is-open .sx-v2-header__services-trigger::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .sx-v2-header__services {
    position: relative;
  }

  .sx-v2-header__services-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
  }

  .sx-v2-header__chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
  }

  .sx-v2-header__services.is-open .sx-v2-header__chevron {
    transform: rotate(225deg) translateY(-2px);
  }

  .sx-v2-header__services-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: -20px;
    z-index: 2;
    display: grid;
    width: 620px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    border: 1px solid var(--sx-g-200);
    border-radius: 8px;
    background: var(--sx-surface);
    box-shadow: 0 20px 50px rgb(16 24 32 / 0.14);
    opacity: 0;
    padding: 12px 18px;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    visibility: hidden;
  }

  .sx-v2-header__services.is-open .sx-v2-header__services-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .sx-v2-header__services-menu a {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--sx-g-100);
    color: var(--sx-ink);
    font-family: var(--sx-font-body);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
  }

  .sx-v2-header__services-menu a:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .sx-v2-header__services-menu a span {
    color: var(--sx-brand);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .sx-v2-header__services-menu a:hover,
  .sx-v2-header__services-menu a:focus-visible {
    color: var(--sx-brand);
    outline: none;
  }

  .sx-v2-header__services-menu a:hover span,
  .sx-v2-header__services-menu a:focus-visible span {
    opacity: 1;
    transform: translateX(0);
  }

  .sx-v2-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
  }

  .sx-v2-header__cta {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--sx-brand);
    border-radius: 8px;
    background: var(--sx-brand);
    color: #fff;
    font-family: var(--sx-font-body);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

  .sx-v2-header__cta:hover,
  .sx-v2-header__cta:focus-visible {
    border-color: #003c98;
    background: #003c98;
    outline: none;
  }

  .sx-v2-header__menu-toggle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sx-v2-header *,
  .sx-v2-header__drawer * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Keep the primary conversion route visible on tablets and small laptops. */
@media (min-width: 768px) and (max-width: 1279px) {
  .sx-v2-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin-left: auto;
  }

  .sx-v2-header__cta {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--sx-brand);
    border-radius: 8px;
    background: var(--sx-brand);
    color: #fff;
    font-family: var(--sx-font-body);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }

  .sx-v2-header__cta:hover,
  .sx-v2-header__cta:focus-visible {
    border-color: #003c98;
    background: #003c98;
    outline: none;
  }
}
