/* Navigation refinements introduced with the simplified information architecture. */

.site-header__inner {
  gap: clamp(.75rem, 1.4vw, 1.5rem);
  max-width: 1440px;
}

.site-header .brand {
  flex: 0 1 auto;
  min-width: 0;
}

.site-header .brand__text {
  min-width: 0;
}

.site-header .brand__name {
  white-space: nowrap;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  gap: clamp(.55rem, 1.05vw, 1.1rem);
}

.main-nav a {
  font-size: clamp(.7rem, .7vw, .8rem);
  letter-spacing: .06em;
}

.header-actions {
  flex: 0 0 auto;
}

.main-nav a:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--c-purple);
  outline-offset: 4px;
}

@media (min-width: 1321px) {
  .onetap-container-toggle .onetap-toggle {
    /* Keep the existing accessibility launcher clear of the header CTA. */
    top: auto !important;
    bottom: 20px !important;
  }

  .main-nav li:focus-within > .sub-menu {
    display: flex;
  }
}

@media (max-width: 1320px) {
  .nav-open .a2a_floating_style,
  .nav-open .onetap-container-toggle {
    /* Floating widgets must not cover links or open another panel over this one. */
    display: none !important;
  }

  .site-header {
    /* Keep the fixed drawer relative to the viewport, not the filtered header. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
  }

  html,
  body {
    overflow-x: clip;
  }

  body.nav-open {
    overflow: hidden;
  }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    width: min(360px, 88vw);
    margin-left: 0;
    padding: 2rem;
    overflow-y: auto;
    background: #fff;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform .3s ease, opacity .2s ease, visibility 0s linear .3s;
  }

  .admin-bar .main-nav {
    inset: calc(var(--header-h) + 32px) 0 0 auto;
  }

  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }

  .main-nav a {
    display: block;
    padding: .75rem 0;
    font-size: 1rem;
  }

  .main-nav .sub-menu {
    position: static;
    display: flex;
    margin-top: -.25rem;
    padding: 0 0 0 1rem;
    border: none;
    box-shadow: none;
  }

  .main-nav .sub-menu a {
    padding-block: .6rem;
    white-space: normal;
  }

  .nav-toggle {
    display: grid;
  }

  .header-actions .btn {
    display: none;
  }
}

@media screen and (max-width: 782px) {
  .admin-bar .main-nav {
    inset: calc(var(--header-h) + 46px) 0 0 auto;
  }
}

@media (max-width: 560px) {
  .site-header__inner {
    gap: .65rem;
  }

  .brand {
    gap: .5rem;
  }

  .brand__mark {
    width: 36px;
    height: 36px;
  }

  .brand__kicker {
    font-size: .5rem;
    letter-spacing: .16em;
  }

  .brand__name {
    font-size: clamp(.8rem, 4vw, 1rem);
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .main-nav {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav,
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    transition: none;
  }
}
