/* ══════════════════════════════════════
   MOBILE NAV
   Visible solo en ≤ 640px
   No toca nada del nav desktop
══════════════════════════════════════ */

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger:hover {
  background: rgba(45,48,56,0.06);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* X state */
.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Drawer ── */
.mobile-menu {
  display: none; /* JS lo muestra */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--bg);

  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem 2rem 3rem;

  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.mobile-menu.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Links dentro del drawer ── */
.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin-bottom: 2.5rem;
}

.mobile-menu-links li {
  border-bottom: 1px solid rgba(45,48,56,0.08);
}

.mobile-menu-links li:first-child {
  border-top: 1px solid rgba(45,48,56,0.08);
}

.mobile-menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s;
}

.mobile-menu-links a::after {
  content: '→';
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  transition: transform 0.15s;
}

.mobile-menu-links a:hover {
  color: var(--accent);
}

.mobile-menu-links a:hover::after {
  transform: translateX(4px);
}

/* ── CTA dentro del drawer ── */
.mobile-menu-cta {
  font-size: 0.82rem;
}

/* ── Overlay oscuro detrás del drawer (opcional, actualmente no usado) ── */

/* ── Activar en mobile ── */
@media (max-width: 640px) {
  .nav-hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }
}
