/* components/nav.css */
nav.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(10, 11, 30, 0.65);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
nav.site-nav.scrolled {
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  width: 150px;
  position: relative;
  z-index: 102;
}
.nav-content {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-grow: 1;
  justify-content: flex-end;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a {
  transition: color 0.2s;
  position: relative;
}
.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}
.nav-cta-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Mobile Hamburger Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 102;
}
.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s var(--ease);
}

/* Mobile Menu Overlay */
@media (max-width: 980px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-content {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-elevated);
    flex-direction: column;
    justify-content: flex-start; /* Changed from center */
    padding-top: 120px; /* Pushes everything down below the logo */
    padding-bottom: 40px; /* Gives some breathing room at the bottom */
    align-items: center;
    transition: right 0.4s var(--ease);
    z-index: 101;
    overflow-y: auto; /* Allows scrolling if the screen is very short */
  }
  .nav-content.is-open {
    right: 0;
  }
  .nav-links {
    flex-direction: column;
    gap: 32px;
    font-size: 20px;
    text-align: center;
  }
  .nav-cta-group {
    flex-direction: column;
    margin-top: 40px;
    width: 100%;
    max-width: 300px;
  }
  .nav-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* Hamburger to X Animation */
  .mobile-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
