/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Navbar transition ── */
#navbar.scrolled {
  background: rgba(6, 15, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* ── Mobile menu ── */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-link:last-child { border-bottom: none; }

/* ── Menu button animation ── */
#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Back to top ── */
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Product card image hover ── */
.group:hover img {
  transform: scale(1.08);
}

/* ── Subtle pattern overlay on hero ── */
#inicio::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 1;
}
#inicio > * { position: relative; z-index: 2; }

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a1628; }
::-webkit-scrollbar-thumb { background: #14b8a6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2dd4bf; }

/* ── Focus styles ── */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
}

/* ── Selection ── */
::selection { background: rgba(20, 184, 166, 0.3); color: #f0fdf9; }
</style>
