:root {
  --bb-nav-h: 80px;
}

body {
  padding-top: 0;
}

nav.bb-site-nav, .topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--bb-nav-h);
  display: flex;
  align-items: center;
  background: var(--theme-component-page-16) !important;
  border-bottom: 1px solid var(--theme-component-primary-58) !important;
  backdrop-filter: blur(10px);
}

nav > .bb-container, .topbar .nav-inner {
  width: min(1490px, calc(100% - 32px)) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) 180px !important;
  align-items: center !important;
  gap: 20px !important;
}

nav > .bb-container > div:last-child, .topbar .nav-inner > div:last-child {
  display: contents !important;
}

nav .logo, .topbar .brand {
  justify-self: start !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  min-width: 0 !important;
}

nav .logo a, .topbar .brand {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
}

nav .logo img, .topbar .brand img {
  width: 45px !important;
  height: 45px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 0 7px var(--theme-component-primary-59)) !important;
}

.topbar .brand span {
  display: none !important;
}

nav ul, .topbar .nav-links {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  background: transparent !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
  width: max-content !important;
  max-width: 100%;
  grid-column: 2 !important;
  justify-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  font-family: 'Geist', sans-serif;
}

nav ul li {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

nav ul li a, .topbar .nav-links a {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0;
  flex: 1 1 auto;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  color: var(--theme-component-ink-27) !important;
  font-family: 'Geist', sans-serif;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  font-variant-ligatures: none !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: geometricPrecision !important;
}

nav ul li a:hover, nav ul li a.active, .topbar .nav-links a:hover, .topbar .nav-links a[aria-current="page"] {
  color: var(--theme-component-ink-18) !important;
}

nav ul li a::after, .topbar .nav-links a::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  bottom: -11px !important;
  width: 0 !important;
  height: 2px !important;
  background: var(--bb-kelly, var(--theme-component-primary-1)) !important;
  box-shadow: 0 0 10px var(--theme-component-primary-59) !important;
  transition: width 0.2s ease !important;
}

nav ul li a:hover::after, nav ul li a.active::after, .topbar .nav-links a:hover::after, .topbar .nav-links a[aria-current="page"]::after {
  width: 100% !important;
}

nav li[data-bb-content="members"] {
  display: none !important;
}

nav ul li a:focus-visible, .topbar .nav-links a:focus-visible {
  outline: 2px solid var(--bb-kelly, var(--theme-component-primary-1));
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  nav ul li a::after, .topbar .nav-links a::after {
    transition: none !important;
  }
}

.hero, .coming-soon-wrapper, .main-content, main:first-of-type {
  scroll-margin-top: var(--bb-nav-h);
}

/* Phones and tablets get the slide-out Menu at any width, including "Desktop site" mode (Brett 10/29). */
@media (max-width: 980px), (hover: none) and (pointer: coarse) {

  nav > .bb-container, .topbar .nav-inner {
    grid-template-columns: auto 1fr !important;
  }

  nav ul, .topbar .nav-links {
    display: none !important;
  }
}

/* Nav "tilt pop": logo, nav links and the account pill tip clockwise, grow and glow on hover. Nav only, on purpose. */
nav .logo img, .topbar .brand img, .topbar .nav-links a, #bbNavAuth .bb-nav-pill {
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1), filter 0.25s, color 0.2s ease;
}
nav .logo a:hover img, .topbar .brand:hover img, #bbNavAuth .bb-nav-pill:hover {
  transform: rotate(4deg) scale(1.06);
  filter: drop-shadow(0 0 10px var(--theme-component-primary-60));
}
nav ul li a:hover, .topbar .nav-links a:hover, .topbar .nav-links a:focus-visible {
  transform: rotate(4deg) scale(1.08);
  filter: drop-shadow(0 0 8px var(--theme-component-primary-60));
}
@media (prefers-reduced-motion: reduce) {
  nav .logo a:hover img, .topbar .brand:hover img, #bbNavAuth .bb-nav-pill:hover,
  nav ul li a:hover, .topbar .nav-links a:hover { transform: none; }
}
