
.home-topbar {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 60px;
  padding: 0 28px;
  
  background: rgba(18, 18, 18, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-brand {
  justify-self: start;
  transition: opacity 0.2s ease;
}

.home-brand:hover {
  background: transparent;
  opacity: 0.85;
}

.home-topbar-nav {
  justify-self: center;
  flex: none;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  gap: 2px;
  justify-content: center;
  align-items: center;
}

.home-topbar-nav a {
  color: inherit;
  font-weight: inherit;
}

.home-topbar-nav .home-nav-link {
  font-size: 15px;
}

.home-topbar-cta {
  justify-self: end;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home-topbar-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 6px 18px rgba(14, 99, 156, 0.35);
}

.home-topbar-cta:active {
  transform: translateY(0);
}

.home-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.home-nav-divider {
  display: inline-block;
  width: 1px;
  height: 12px;
  margin: 0 8px 0 10px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  opacity: 0.9;
}

.home-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(232, 232, 232, 0.55);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
  border: none;
  background: transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
}

.home-nav-link:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}

.home-nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.home-nav-dropdown-trigger::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-top: 1px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.45;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-nav-item--dropdown:hover .home-nav-dropdown-trigger,
.home-nav-item--dropdown:focus-within .home-nav-dropdown-trigger {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.06);
}

.home-nav-item--dropdown:hover .home-nav-dropdown-trigger::after,
.home-nav-item--dropdown:focus-within .home-nav-dropdown-trigger::after {
  opacity: 0.8;
  transform: rotate(180deg);
}

.home-nav-item--dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  z-index: 29;
}

.home-nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  min-width: 15.5rem;
  padding: 8px;
  background: rgba(28, 28, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 50px rgba(0, 0, 0, 0.5),
    0 4px 14px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px) scale(0.98);
  transform-origin: top left;
  transition:
    opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.2s;
}

.home-nav-item--dropdown:hover .home-nav-dropdown-panel,
.home-nav-item--dropdown:focus-within .home-nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.home-nav-dropdown-panel--cols {
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.98);
  transform-origin: top center;
  min-width: 26rem;
  max-width: min(30rem, calc(100vw - 32px));
  padding: 10px;
}

.home-nav-item--dropdown-wide:hover .home-nav-dropdown-panel--cols,
.home-nav-item--dropdown-wide:focus-within .home-nav-dropdown-panel--cols {
  transform: translateX(-50%) translateY(0) scale(1);
}

.home-nav-dropdown-heading {
  margin: 0 0 4px;
  padding: 6px 10px 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-nav-dropdown-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-nav-dropdown-head-row .home-nav-dropdown-heading {
  margin: 0;
  padding: 4px 8px;
  border-bottom: none;
}

.home-nav-dropdown-all {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: #4fc1ff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.home-nav-dropdown-all:hover {
  background: rgba(79, 193, 255, 0.12);
  color: #8ad9ff;
}

.home-nav-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 4px;
}

.home-nav-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  color: rgba(232, 232, 232, 0.78);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.home-nav-dropdown-grid .home-nav-dropdown-link {
  justify-content: flex-start;
  min-height: 38px;
  padding: 7px 12px;
  font-size: 15px;
}

.home-nav-dropdown-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-nav-dropdown-link:hover,
.home-nav-dropdown-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.home-nav-tier {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  min-width: 2.4rem;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

.home-nav-tier--free {
  color: #a6dfa6;
  background: rgba(61, 107, 61, 0.4);
  border: 1px solid rgba(110, 175, 110, 0.35);
}

.home-nav-tier--pro {
  color: #8ad9ff;
  background: rgba(14, 99, 156, 0.4);
  border: 1px solid rgba(79, 193, 255, 0.35);
}

@media (max-width: 1100px) {
  .home-topbar {
    padding: 0 18px;
    gap: 14px;
  }

  .home-nav-link {
    padding: 0 10px;
  }

  .home-nav-divider {
    margin: 0 6px;
  }

  .home-nav-dropdown-panel--cols {
    min-width: 20rem;
  }
}

@media (max-width: 900px) {
  .home-topbar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    min-height: 0;
    padding: 10px 14px 8px;
    row-gap: 0;
  }

  .home-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .home-topbar-cta {
    grid-column: 2;
    grid-row: 1;
  }

  .home-topbar-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .home-nav-link {
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
  }

  .home-nav-link[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }

  .home-nav-divider {
    display: none;
  }

  .home-nav-item--dropdown::before {
    display: none;
  }

  .home-nav-dropdown-panel,
  .home-nav-dropdown-panel--cols {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 2px 0 6px;
    padding: 6px 4px 6px 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
  }

  .home-nav-item--dropdown:hover .home-nav-dropdown-panel,
  .home-nav-item--dropdown:focus-within .home-nav-dropdown-panel {
    display: block;
  }

  .home-nav-item--dropdown-wide:hover .home-nav-dropdown-panel--cols,
  .home-nav-item--dropdown-wide:focus-within .home-nav-dropdown-panel--cols {
    display: block;
  }

  .home-nav-dropdown-grid {
    grid-template-columns: 1fr;
  }

  .home-nav-dropdown-heading,
  .home-nav-dropdown-head-row {
    border-bottom: none;
    padding-bottom: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-topbar,
  .home-brand,
  .home-nav-link,
  .home-topbar-cta,
  .home-nav-dropdown-trigger::after,
  .home-nav-dropdown-panel,
  .home-nav-dropdown-link,
  .home-nav-dropdown-all {
    transition: none;
  }

  .home-topbar-cta:hover {
    transform: none;
  }
}
