/* ========== NAVIGATION ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

nav.scrolled {
  border-bottom-color: var(--border);
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--text);
  color: var(--bg);
  padding: 8px 18px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.nav-cta:hover {
  transform: scale(1.03);
  background: #fff;
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  nav {
    padding: 14px 20px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
    order: 3;
  }

  /* Keep CTA compact and visible on mobile */
  .nav-cta {
    margin-left: auto;
    margin-right: 8px;
    padding: 7px 14px;
    font-size: 12px;
    order: 2;
  }

  .logo {
    order: 1;
    font-size: 16px;
  }

  /* Mobile menu: full-width dropdown panel under the nav bar */
  .nav-links {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, margin-top 0.35s ease;
    margin-top: 0;
  }

  .nav-links.open {
    max-height: 320px;
    margin-top: 12px;
  }

  .nav-links li {
    width: 100%;
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 14px 4px;
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  nav {
    padding: 12px 16px;
  }

  .nav-cta {
    padding: 6px 12px;
    font-size: 11px;
  }

  .logo {
    font-size: 15px;
  }
}
