/* =============================================
   VIBRAS × MANDALA — nav.css
   Navbar + mobile menu + nav dots
   ============================================= */

/* ---- Navbar ---- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
}

#navbar.nav-scrolled {
  background: rgba(251,242,255,0.96);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom-color: rgba(219,148,242,0.3);
}

#navbar.nav-scrolled .nav-logo-text { color: var(--dark, #0D0B12); }
#navbar.nav-scrolled .nav-links a { color: rgba(13,11,18,0.5); }
#navbar.nav-scrolled .nav-links a:hover,
#navbar.nav-scrolled .nav-links a.active { color: var(--dark, #0D0B12); }
#navbar.nav-scrolled .nav-links a::after { background: var(--dark, #0D0B12); }
#navbar.nav-scrolled .nav-cta {
  border-color: rgba(0,0,0,0.25) !important;
  color: var(--dark, #0D0B12) !important;
}
#navbar.nav-scrolled .nav-cta:hover {
  background: var(--dark, #0D0B12) !important;
  color: #fff !important;
}
#navbar.nav-scrolled .nav-hamburger span { background: var(--dark, #0D0B12); }

/* Logo del grupo — rotante */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Contenedor con fondo oscuro para que los logos SVG sean visibles
   tanto en nav transparente (sobre hero oscuro) como en nav scrolled (claro) */
.nav-logo-switcher {
  position: relative;
  width: 108px;
  height: 36px;
  background: linear-gradient(135deg, rgba(85,35,89,0.80) 0%, rgba(105,105,204,0.70) 100%);
  border-radius: 10px;
  padding: 2px 4px;
  overflow: hidden;
  transition: background 0.4s;
}

/* En nav scrolled mantener el pill púrpura visible sobre el fondo claro */
#navbar.nav-scrolled .nav-logo-switcher {
  background: linear-gradient(135deg, rgba(85,35,89,0.90) 0%, rgba(105,105,204,0.85) 100%);
  box-shadow: 0 1px 8px rgba(85,35,89,0.25);
}

.nav-logo-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 30px;
  width: auto;
  max-width: 104px;
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

/* Vibras: empieza visible, cede a los 2s */
.logo-show-vibras {
  animation: nav-logo-pulse 4s ease-in-out infinite !important;
}
/* Mandala: entra a los 2s */
.logo-show-mandala {
  animation: nav-logo-pulse 4s ease-in-out infinite 2s !important;
}

@keyframes nav-logo-pulse {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  8%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  42%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%  { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
}

/* Imágenes gestionadas por nav-include.js (cards, heroes, collage, equipo, sliders) —
   ocultas hasta que JS confirme y aplique el src versionado correcto. Cubre TODAS las
   img[data-pos] sin importar su estrategia de loading, para que ninguna muestre una
   versión vieja/cacheada del navegador ni siquiera una fracción de segundo. */
img[data-pos] {
  opacity: 0;
}

/* Textos heredados — ya no usados en nav pero mantenidos por referencia */
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-logo-text span { color: var(--v-violet); }
.nav-logo-sub {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}

/* Nav links desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  transition: color 0.25s var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* CTA nav */
.nav-cta {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  color: var(--white) !important;
  transition: all 0.3s var(--ease) !important;
}

.nav-cta:hover {
  background: var(--white) !important;
  color: var(--bg) !important;
  border-color: var(--white) !important;
}

.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.35s var(--ease);
  transform-origin: center;
}

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

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

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

/* ---- Mobile Menu Overlay ---- */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: linear-gradient(145deg,
    #3A0860 0%,
    #6B18B0 35%,
    #4A0E90 65%,
    #1E0440 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  clip-path: circle(0% at calc(100% - 40px) 40px);
  transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.175, 1);
  pointer-events: none;
  overflow: hidden;
}

/* Orb de luz interna */
#mobile-menu::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(219,148,242,0.35) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
#mobile-menu::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(105,105,204,0.3) 0%, transparent 70%);
  bottom: -80px; left: -60px;
  pointer-events: none;
}

#mobile-menu.open {
  clip-path: circle(150% at calc(100% - 40px) 40px);
  pointer-events: all;
}

.mobile-menu-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-links a {
  font-family: var(--font-display);
  font-size: clamp(24px, 6.5vw, 38px);
  font-style: italic;
  font-weight: 700;
  color: var(--v-violet);
  padding: 0.4rem 1.8rem;
  border-radius: 100px;
  border: 1.5px solid rgba(219,148,242,0.3);
  background: rgba(219,148,242,0.08);
  text-align: center;
  transition: all 0.25s var(--ease);
  text-shadow: 0 0 28px rgba(219,148,242,0.5);
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: var(--white);
  background: rgba(219,148,242,0.22);
  border-color: rgba(219,148,242,0.7);
  box-shadow: 0 0 30px rgba(219,148,242,0.35), inset 0 0 20px rgba(219,148,242,0.1);
  transform: scale(1.04);
}

.mobile-menu-brands {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
}

.mobile-menu-brands a {
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
  color: rgba(219,148,242,0.5);
  letter-spacing: 0.1em;
  transition: color 0.25s;
}

.mobile-menu-brands a:hover { color: var(--v-violet); }

.mobile-menu-social {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 1.5rem;
}

.mobile-menu-social a {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(199,166,254,0.45);
  transition: color 0.25s;
}

.mobile-menu-social a:hover {
  color: var(--v-mauve);
}

/* ---- Nav dots (lateral) ---- */
#nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.nav-dot.active {
  background: var(--white);
  transform: scale(1.5);
}

.nav-dot:hover {
  background: rgba(255,255,255,0.7);
}

/* Tooltip del dot */
.nav-dot::before {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(13,11,18,0.85);
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.nav-dot:hover::before {
  opacity: 1;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  #navbar { padding: 0 20px; }
}

@media (max-width: 639px) {
  #nav-dots { display: none; }
}

/* ---- Logos de marca en el menú móvil ---- */
.mobile-menu-brand-logos {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-top: 0.5rem;
}

.mobile-brand-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: filter 0.25s;
}

.mobile-brand-logo--vibras {
  color: #DB94F2;
  text-shadow: 0 0 16px rgba(219,148,242,0.8), 0 0 38px rgba(219,148,242,0.45);
}

.mobile-brand-logo--mandala {
  color: #67B7E6;
  text-shadow: 0 0 16px rgba(103,183,230,0.8), 0 0 38px rgba(246,218,82,0.35);
}

.mobile-brand-logo:hover {
  filter: brightness(1.25);
}
