/* ==========================================================================
   SAC — Voiceflow-Inspired Navigation
   Clean, minimal, pill-shaped nav with glass effect
   ========================================================================== */

/* Base nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.site-nav[data-state="scrolled"] {
  padding: 0.5rem 1rem;
}

/* Nav bar — the pill container */
.nav-bar {
  max-width: 85rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 18px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
}

.site-nav[data-state="scrolled"] .nav-bar {
  padding: 7px 12px 7px 18px;
  max-width: 55rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  z-index: 10;
  padding-left: 6px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1e23;
  letter-spacing: -0.3px;
}

.nav-logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #318FDB, #2196F3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

/* Nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.875rem;
  z-index: 10;
}

@media (min-width: 992px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3e4852;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  color: #1a1e23;
  background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
  color: #1a1e23;
}

/* Small dot indicator */
.link-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #318FDB;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-link:hover .link-dot,
.nav-link.active .link-dot {
  opacity: 1;
}

/* Chevron for dropdown */
.link-chevron {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.nav-link[aria-expanded="true"] .link-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.nav-sub {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 44px -18px rgba(22, 26, 30, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: all 0.2s ease;
  z-index: 100;
}

.nav-link[aria-expanded="true"] + .nav-sub,
.nav-sub:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-sub-link {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  color: #515a63;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-sub-link:hover {
  background: #f1f2f2;
  color: #1a1e23;
}

/* Nav actions (right side) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

/* Auth button (ghost) */
.nav-auth {
  display: none;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3e4852;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.nav-auth:hover {
  color: #1a1e23;
  background: rgba(0, 0, 0, 0.04);
}

@media (min-width: 992px) {
  .nav-auth {
    display: flex;
  }
}

/* Primary CTA button */
.nav-cta {
  display: none;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #318FDB;
  border: none;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.nav-cta:hover {
  background: #2a7cc7;
  box-shadow: 0 4px 12px rgba(49, 143, 219, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

@media (min-width: 992px) {
  .nav-cta {
    display: inline-flex;
  }
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.2s;
  border: none;
  background: none;
  z-index: 10;
}

.nav-hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #3e4852;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 992px) {
  .nav-hamburger {
    display: none;
  }
}

/* Mobile menu */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-drawer.active {
  opacity: 1;
  visibility: visible;
}

.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: #fff;
  padding: 5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  z-index: 999;
}

.nav-mobile.active {
  transform: translateX(0);
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #3e4852;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: rgba(49, 143, 219, 0.06);
  color: #318FDB;
}

.nav-mobile .nav-cta-mobile {
  display: block;
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: #318FDB;
  color: #fff;
  text-align: center;
  border-radius: 100px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-mobile .nav-cta-mobile:hover {
  background: #2a7cc7;
  color: #fff;
}

@media (min-width: 992px) {
  .nav-drawer,
  .nav-mobile {
    display: none !important;
  }
}

/* Spacer to push content below fixed nav */
.nav-spacer {
  height: 5rem;
}

/* Transition for scrolled state */
.site-nav[data-transitions="on"] .nav-bar,
.site-nav[data-transitions="on"] .nav-links,
.site-nav[data-transitions="on"] .nav-cta {
  transition: all 0.3s ease;
}
