.stage {
  perspective: 1000px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  pointer-events: none;
}

.navbar-card {
  position: relative;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) skewY(calc(var(--scroll-velocity) * 0.1deg));
  width: 92%;
  max-width: var(--nav-width-expanded);
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(17, 29, 44, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: max-width 0.8s var(--ease-elastic), height 0.8s var(--ease-elastic), padding 0.8s var(--ease-elastic), top 0.7s var(--ease-smooth), background 0.5s ease, border-radius 0.7s var(--ease-smooth), box-shadow 0.5s ease, transform 0.1s linear;
  pointer-events: auto;
}
.navbar-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(39, 175, 230, 0.4), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.5s ease;
}
body.scrolled .navbar-card {
  top: 16px;
  max-width: var(--nav-width-collapsed);
  height: 60px;
  padding: 0 0.875rem;
  border-radius: 999px;
  background: rgba(17, 29, 44, 0.82);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(39, 175, 230, 0.12);
}

.brand-container {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  width: 210px;
  height: 40px;
  transition: width 0.7s var(--ease-smooth);
}
body.scrolled .brand-container {
  width: 44px;
}

.logo-full {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  width: auto;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s var(--ease-smooth);
}
body.scrolled .logo-full {
  opacity: 0;
  transform: translateY(-50%) translateX(-12px);
  pointer-events: none;
}

.logo-small {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  height: 36px;
  width: auto;
  opacity: 0;
  transition: opacity 0.4s ease 0.05s, transform 0.4s var(--ease-smooth) 0.05s;
}
body.scrolled .logo-small {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 4px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-indicator {
  position: absolute;
  top: 4px;
  left: 5px;
  height: calc(100% - 8px);
  background: rgba(39, 175, 230, 0.12);
  border-radius: 99px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  box-shadow: 0 0 12px rgba(39, 175, 230, 0.15);
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.nav-link {
  position: relative;
  padding: 10px 20px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 300;
  font-size: 14px;
  border-radius: 99px;
  z-index: 2;
  white-space: nowrap;
  transition: color 0.3s ease, padding 0.5s var(--ease-smooth), font-size 0.5s var(--ease-smooth);
}
.nav-link:hover {
  color: var(--color-text-primary);
}
body.scrolled .nav-link {
  padding: 8px 14px;
  font-size: 13px;
}

.actions-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-cta {
  background: linear-gradient(135deg, var(--color-blue-primary), var(--color-teal));
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 12px;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(39, 175, 230, 0.25);
  transition: all 0.5s var(--ease-smooth);
  transform-origin: center;
}
.btn-cta:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 28px rgba(39, 175, 230, 0.4);
}
body.scrolled .btn-cta {
  padding: 9px 18px;
  border-radius: 99px;
  box-shadow: 0 4px 18px rgba(39, 175, 230, 0.35);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  transition: background 0.3s ease, border-radius 0.5s var(--ease-smooth);
}
.mobile-toggle:hover {
  background: rgba(39, 175, 230, 0.12);
}
.mobile-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text-primary);
  transition: transform 0.35s var(--ease-smooth), opacity 0.25s ease, width 0.3s ease;
  transform-origin: center;
}
.mobile-toggle.open {
  background: rgba(39, 175, 230, 0.12);
  border-radius: 99px;
}
.mobile-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.open .bar:nth-child(2) {
  opacity: 0;
  width: 50%;
}
.mobile-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
body.scrolled .mobile-toggle {
  border-radius: 99px;
}

.mobile-drawer {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: 100%;
  background: rgba(10, 16, 26, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 16px;
  border: 1px solid rgba(39, 175, 230, 0.1);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-smooth);
}
.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mobile-drawer .drawer-link {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 300;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}
.mobile-drawer .drawer-link:hover {
  background: rgba(39, 175, 230, 0.08);
  color: var(--color-text-primary);
}
.mobile-drawer .drawer-cta {
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-blue-primary), var(--color-teal));
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.mobile-drawer .drawer-cta:hover {
  opacity: 0.9;
}

@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .btn-cta {
    display: none;
  }
  body.scrolled .navbar-card {
    top: 24px;
    max-width: var(--nav-width-expanded);
    height: 80px;
    padding: 0 1.5rem;
    border-radius: 20px;
    background: rgba(17, 29, 44, 0.65);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
  body.scrolled .brand-container {
    width: 210px;
  }
  body.scrolled .logo-full {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  body.scrolled .logo-small {
    opacity: 0;
    transform: translateY(-50%) scale(0.85);
  }
  body.scrolled .nav-link {
    padding: 10px 20px;
    font-size: 14px;
  }
  body.scrolled .mobile-toggle {
    border-radius: 12px;
  }
}
