/**
 * Marketing / app shell top nav — fixed bar, scroll-up reveal, mobile open lock.
 */
:root {
  --tt-site-nav-height: 4rem;
}

.tt-site-nav-spacer {
  height: var(--tt-site-nav-height);
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}

#tt-site-nav[data-nav-hide-on-scroll] {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999 !important;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.32s ease,
    border-color 0.32s ease,
    background-color 0.32s ease;
  will-change: transform;
}

#tt-site-nav.is-nav-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

#tt-site-nav.is-nav-scrolled {
  box-shadow: 0 16px 40px -22px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(148, 163, 184, 0.1);
  border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

/* Soften mobile explore label — less loud amber */
.tt-enterprise-nav-mobile .text-amber-500\/80 {
  color: #94a3b8 !important;
}

.tt-enterprise-nav-mobile .text-amber-200 {
  color: #e2e8f0 !important;
}

/* Mobile bar: brand + hamburger only — no wrap above the title */
@media (max-width: 767px) {
  #tt-site-nav .container > .flex.items-center.justify-between {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
}

html.tt-nav-mobile-open {
  overflow: hidden;
}

/*
 * Mobile drawer: page scroll is locked while open, so the panel itself must
 * scroll — otherwise lower menu items (Docs, Careers, Logout, …) are unreachable.
 */
@media (max-width: 767px) {
  html.tt-nav-mobile-open #tt-site-nav {
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  html.tt-nav-mobile-open #tt-site-nav > .container {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }

  html.tt-nav-mobile-open #mobileMenu:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - var(--tt-site-nav-height, 4rem));
    max-height: calc(100dvh - var(--tt-site-nav-height, 4rem));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  }
}

/* Account actions sit to the right of the mega-menu */
#tt-site-nav .tt-enterprise-nav-links + * {
  margin-left: 0.25rem;
}

#tt-site-nav .hidden.md\:flex.items-center > .tt-enterprise-nav-links {
  margin-right: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  #tt-site-nav[data-nav-hide-on-scroll] {
    transition: none;
  }
}
