/* ─── Custom Animations ─── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

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

.animate-float-delayed {
  animation: float-delayed 5s ease-in-out infinite;
  animation-delay: 1s;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ─── Navbar Transition ─── */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(123, 45, 139, 0.08);
}

#navbar.scrolled .nav-link {
  color: #4a1752;
}

/* ─── Mobile Menu Animation ─── */
#mobile-menu.open {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Mobile Menu Button ─── */
.menu-line {
  transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(5px, -5px);
}

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

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

::-webkit-scrollbar-thumb {
  background: #f9a8d4;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #f472b6;
}

/* ─── Selection Color ─── */
::selection {
  background: #fbcfe8;
  color: #4a1752;
}

/* ─── Smooth Scroll ─── */
html {
  scroll-behavior: smooth;
}

/* ─── Focus Styles ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #f472b6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Utility ─── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7B2D8B, #E8A838);
  transition: width 0.3s ease;
  border-radius: 1px;
}

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

.mobile-nav-link {
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid #fbcfe8;
  transition: border-color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-link:hover {
  border-left-color: #7B2D8B;
  padding-left: 1.25rem;
}
