/* ============================================================
   NAVIGATION — Mobile-First | 320px → 3840px
   ============================================================ */

/* ── BASE (all screens) ──────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition-base);
}

.navbar.nav-top {
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
}

.navbar.nav-scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

/* ── LOGO ────────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 6px;
}

@media (min-width: 480px) {
  .nav-logo-img { height: 42px; }
}

.nav-logo-text-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: clamp(0.9375rem, 3vw, 1.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  transition: color var(--transition-base);
}

.navbar.nav-scrolled .nav-logo-name,
[data-theme="dark"] .navbar.nav-scrolled .nav-logo-name {
  color: var(--text-heading);
}

.nav-logo-sub {
  display: none; /* hidden on smallest screens */
  font-family: var(--font-body);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition-base);
  white-space: nowrap;
}

@media (min-width: 400px) {
  .nav-logo-sub { display: block; }
}

.navbar.nav-scrolled .nav-logo-sub { color: var(--text-muted); }
.nav-logo-accent { color: var(--amber); }

/* ── DESKTOP NAV LINKS — hidden on mobile ────────────────── */
.nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  list-style: none;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.navbar.nav-scrolled .nav-links a { color: var(--text-body); }

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.navbar.nav-scrolled .nav-links a:hover,
.navbar.nav-scrolled .nav-links a.active {
  background: var(--surface-3);
  color: var(--blue);
}

/* ── NAV ACTIONS ─────────────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .nav-actions { gap: 12px; }
}

/* Desktop-only CTA button */
.nav-cta-desktop { display: none; }

@media (min-width: 900px) {
  .nav-cta-desktop { display: inline-flex; }
}

/* ── THEME TOGGLE ────────────────────────────────────────── */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
  position: relative;
}

.navbar.nav-scrolled .theme-toggle {
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: var(--text-body);
}

.theme-toggle:hover { background: rgba(255,255,255,0.2); transform: rotate(20deg); }
.navbar.nav-scrolled .theme-toggle:hover { background: var(--surface-2); color: var(--blue); }

.theme-icon-sun,
.theme-icon-moon {
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  position: absolute;
}

[data-theme="dark"]  .theme-icon-sun  { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"]  .theme-icon-moon { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .theme-icon-sun  { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .theme-icon-moon { opacity: 1; transform: rotate(0deg); }

/* ── HAMBURGER — visible on mobile, hidden on desktop ─────── */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  background: none;
  border: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger:hover { background: rgba(255,255,255,0.1); }
.navbar.nav-scrolled .hamburger:hover { background: var(--surface-3); }

.hamburger-line {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
  display: block;
}

.navbar.nav-scrolled .hamburger-line { background: var(--text-heading); }

.hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 900px) {
  .hamburger { display: none; }
}

/* ── MOBILE MENU ─────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: var(--navy);
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1),
              visibility 0s linear 0.4s;
  z-index: 999;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .mobile-menu {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
}

.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1),
              visibility 0s linear 0s;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: clamp(1rem, 4vw, 1.0625rem);
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  min-height: 48px;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}

.mobile-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 0;
  flex-shrink: 0;
}

.mobile-menu-cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.mobile-menu-cta-group .btn {
  justify-content: center;
  border-radius: var(--radius-lg);
  width: 100%;
}
