/* Keep the main site's mobile navigation in the same pill + floating panel layout
   used by the Websites and Automation pages. Desktop navigation is unchanged. */
@media (max-width: 800px) {
  .site-header,
  .site-header.is-open {
    min-height: 3.8rem;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    overflow: visible;
    padding: 0.5rem 0.625rem;
    border-radius: 999px;
    background: rgba(8, 12, 20, 0.5);
    box-shadow:
      0 0.75rem 2rem rgba(0, 0, 0, 0.2),
      inset 0 1px 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
  }

  .site-header.is-scrolled,
  .site-header.is-open {
    background: rgba(8, 12, 20, 0.76);
  }

  .site-header .wordmark,
  .site-header .menu-button {
    position: relative;
    z-index: 2;
  }

  .site-header .menu-button {
    width: 2.5rem;
    height: 2.5rem;
  }

  .site-header .site-nav,
  .site-header.is-open .site-nav {
    position: absolute;
    z-index: 1;
    top: calc(100% + 0.6rem);
    left: 0;
    display: none;
    width: 100%;
    max-height: calc(100svh - 6rem);
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(190, 207, 235, 0.2);
    border-radius: 1.25rem;
    background: rgba(8, 13, 23, 0.94);
    box-shadow:
      0 1.25rem 3rem rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    transform: none;
  }

  .site-header.is-open .site-nav {
    display: grid;
    animation: main-menu-arrive 180ms ease-out both;
  }

  .site-header.is-open .site-nav > a {
    display: flex;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0.9rem 1.1rem;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.35;
    text-align: left;
    transition: color 160ms ease, background-color 160ms ease;
  }

  .site-header.is-open .site-nav > a:last-child {
    border-bottom: 0;
  }

  .site-header.is-open .site-nav > a .mobile-nav-arrow {
    display: block;
    flex: 0 0 auto;
    margin-left: 1rem;
    color: rgba(220, 230, 248, 0.65);
    font-size: 1rem;
    line-height: 1;
  }

  .site-header.is-open .site-nav > a:hover,
  .site-header.is-open .site-nav > a:focus-visible {
    background: rgba(182, 202, 255, 0.07);
    color: #fff;
  }
}

.mobile-nav-arrow {
  display: none;
}

@keyframes main-menu-arrive {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header.is-open .site-nav {
    animation: none;
  }
}
