/* ─── Base & Utilities ─── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ─── Nav Transition ─── */
#nav.scrolled {
  background: rgba(128, 24, 160, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fbbf24;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ─── Mobile Menu ─── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #fbbf24;
  transition: width 0.3s ease;
  margin: 4px auto 0;
}

.mobile-link:hover::after {
  width: 60%;
}

/* ─── Animations ─── */
@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(25px) scale(1.03); }
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 10s ease-in-out infinite;
  animation-delay: -3s;
}

/* ─── 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; }

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #faf0ff;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #a020c8, #ffaa30);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #8018a0, #e07000);
}

/* ─── Selection ─── */
::selection {
  background: #e098ff;
  color: #400850;
}
