/* ── Base & Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', sans-serif; background: #141820; color: #fff; }

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Fallback: always show content if JS is disabled or reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ── Navbar scroll state ── */
#nav.scrolled {
  background: rgba(20, 24, 32, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ── Mobile menu ── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: auto;
}
#mobileMenu.open .mobile-link {
  animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hamburger animation ── */
body.menu-open .menu-line:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
body.menu-open .menu-line:nth-child(2) { opacity: 0; }
body.menu-open .menu-line:nth-child(3) { width: 20px; transform: rotate(-45deg) translate(4px, -4px); }

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #141820; }
::-webkit-scrollbar-thumb { background: #1F2530; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #FF5E6E; }

/* ── Selection ── */
::selection { background: rgba(255, 94, 110, 0.3); color: #fff; }
