/* Custom styles for Jango's Frozen Treats */

:root {
  --plum-50: #faf0ff;
  --plum-100: #f5e0ff;
  --plum-200: #ebbbff;
  --plum-500: #b833e8;
  --plum-600: #9a1fd0;
  --plum-700: #7d1aaa;
  --plum-800: #66188a;
  --plum-900: #551470;
  --amber-400: #ffc735;
  --amber-500: #f5a623;
  --amber-300: #ffd96d;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Hero content animation */
#heroContent {
  animation: fadeUp 1s ease-out forwards;
}

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

/* Mobile menu */
#mobileMenu {
  transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-link:hover {
  transform: scale(1.05);
}

/* Scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(85, 20, 112, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Menu card hover effect */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #b833e8, #d48514);
}

/* Selection color */
::selection {
  background: #d055ff;
  color: white;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.1) inset !important;
  -webkit-text-fill-color: white !important;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Prevent layout shift on images */
img {
  content-visibility: auto;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #ffc735;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile menu link stagger animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#mobileMenu.open .mobile-link {
  animation: slideIn 0.3s ease forwards;
}

#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; }
#mobileMenu.open .mobile-link:nth-child(6) { animation-delay: 0.3s; }
