/* Newden — shared liquid glass navbar */

.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 40px);
  max-width: 1180px;
  padding: 0;
  overflow: visible;
  border-radius: 999px;
  color: var(--n0, #fff);
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.05) 100%);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(255,255,255,0.05) inset,
    0 16px 40px -16px rgba(3,7,18,0.45),
    0 4px 12px -4px rgba(3,7,18,0.25);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 22px;
  gap: 16px;
  min-width: 0;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
  flex: 1 1 auto;
}
.brand {
  flex-shrink: 0;
}
.brand img { height: 44px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-links a.active { background: rgba(255,255,255,0.16); color: #fff; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-shrink: 0;
}
.nav-right .btn { padding: 9px 18px; font-size: 14px; }
.nav-right .nav-contact.active {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35) inset;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.lang-toggle:hover { color: var(--cyan, #00d2ff); transform: translateY(-1px); }

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}
.nav-burger svg { display: block; flex-shrink: 0; }
.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(37,47,199,0.96) 0%, rgba(14,18,79,0.98) 100%);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 22px;
  box-shadow: 0 24px 60px -20px rgba(3,7,18,0.6);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height .35s ease, opacity .25s ease;
}
.mobile-menu.open {
  max-height: min(85vh, 720px);
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-inner { padding: 14px; display: flex; flex-direction: column; gap: 4px; min-height: min-content; }
.mobile-menu a {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  transition: background 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a.active { background: rgba(255,255,255,0.1); color: #fff; }
.mobile-menu .btn { margin-top: 8px; justify-content: center; }

@media (max-width: 900px) {
  .nav {
    width: calc(100% - 24px);
    top: 14px;
    overflow: visible;
  }
  .mobile-menu {
    left: 0;
    right: 0;
    width: 100%;
  }
  .nav-inner {
    padding: 8px 10px 8px 14px;
    gap: 8px;
  }
  .nav-left { gap: 0; }
  .brand img { height: 36px; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .mobile-menu { display: block; }
  /* Contact + Log in live in the slide-down menu on phones */
  .nav-right .nav-contact,
  .nav-right .nav-auth-link,
  .nav-right a.btn-gradient[href*="Contact"] {
    display: none !important;
  }
  .lang-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
}

@media (max-width: 380px) {
  .nav { width: calc(100% - 16px); }
  .nav-inner { padding: 8px 8px 8px 12px; gap: 6px; }
  .brand img { height: 32px; }
}

/* Over white / light page sections — dark text + glass tuned for light bg */
.nav.nav-on-light,
.nav[data-nav-tone="light"] {
  color: var(--ink, #030712) !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.75) 100%
  ) !important;
  border-color: rgba(3, 7, 18, 0.14) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 -1px 0 rgba(3, 7, 18, 0.05) inset,
    0 12px 32px -14px rgba(3, 7, 18, 0.2),
    0 4px 10px -4px rgba(3, 7, 18, 0.1) !important;
}
.nav.nav-on-light .nav-links a,
.nav[data-nav-tone="light"] .nav-links a {
  color: var(--ink, #030712) !important;
}
.nav.nav-on-light .nav-links a:hover,
.nav.nav-on-light .nav-links a.active,
.nav[data-nav-tone="light"] .nav-links a:hover,
.nav[data-nav-tone="light"] .nav-links a.active {
  background: rgba(3, 7, 18, 0.08) !important;
  color: var(--ink, #030712) !important;
}
.nav.nav-on-light .lang-toggle,
.nav.nav-on-light .nav-burger,
.nav[data-nav-tone="light"] .lang-toggle,
.nav[data-nav-tone="light"] .nav-burger {
  color: var(--ink, #030712) !important;
}
.nav.nav-on-light .lang-toggle:hover,
.nav[data-nav-tone="light"] .lang-toggle:hover {
  color: var(--blue, #252fc7) !important;
}
.nav.nav-on-light .nav-right .nav-contact.active,
.nav[data-nav-tone="light"] .nav-right .nav-contact.active {
  box-shadow: 0 0 0 2px rgba(3, 7, 18, 0.15) inset;
}
