/* ============================ NAV ============================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: height var(--speed) var(--ease), background var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease), backdrop-filter var(--speed) var(--ease);
}
/* Condensed state after scrolling past hero */
.nav.scrolled {
  height: 64px;
  background: rgba(14, 14, 18, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--border), 0 10px 30px rgba(0,0,0,0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
}
.nav-logo img {
  width: 135px; height: 135px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(157, 78, 221, 0.45));
  transition: width var(--speed), height var(--speed);
}
.nav.scrolled .nav-logo img { width: 90px; height: 90px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.9rem);
}
.nav-links > a:not(.nav-cta) {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-muted);
  position: relative;
  transition: color var(--speed) var(--ease);
}
.nav-links > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--purple-gradient);
  border-radius: 2px;
  transition: width var(--speed) var(--ease);
}
.nav-links > a:not(.nav-cta):hover { color: var(--text); }
.nav-links > a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta { padding: 0.6rem 1.25rem; font-size: 0.95rem; }

/* --- Language toggle --- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--glass);
}
.lang-btn {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  transition: color var(--speed) var(--ease);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  color: var(--purple-glow);
  text-shadow: 0 0 14px rgba(157, 78, 221, 0.6);
}
.lang-sep { color: var(--text-dim); }

/* --- Fullscreen toggle (icon-only) --- */
.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--speed) var(--ease), background var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.nav-icon-btn .nav-icon { display: block; }
.nav-icon-btn:hover {
  color: var(--text);
  background: var(--glass-strong, rgba(255, 255, 255, 0.08));
  border-color: var(--purple-glow);
}
.nav-icon-btn:focus-visible {
  outline: 2px solid var(--purple-glow);
  outline-offset: 2px;
}

/* --- Hamburger --- */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}
.nav-burger span {
  display: block;
  width: 20px; height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 8, 11, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
}
.nav-overlay.show { opacity: 1; }

/* --- Mobile --- */
@media (max-width: 920px) {
  .nav-burger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    width: min(82vw, 360px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem 2.2rem;
    background: linear-gradient(160deg, #15151d, #0d0d11);
    border-left: 1px solid var(--border-strong);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    transform: translateX(105%);
    transition: transform var(--speed) var(--ease);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > a:not(.nav-cta) { font-size: 1.3rem; color: var(--text); }
  .nav-cta { width: 100%; margin-top: 0.5rem; }
  .lang-toggle { margin-top: 0.5rem; }
}
