/* ── Custom styles for Yummy Yummy Fruits and Snacks ── */

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

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal-up {
    transform: translateY(30px);
  }
  .reveal-left {
    transform: translateX(-30px);
  }
  .reveal-right {
    transform: translateX(30px);
  }
  .reveal-up.visible,
  .reveal-left.visible,
  .reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
  }
}

/* ── Floating fruit animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-20px) rotate(5deg); }
}
@keyframes float-delay {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-15px) rotate(-5deg); }
}
.animate-float {
  animation: float 4s ease-in-out infinite;
}
.animate-float-delay {
  animation: float-delay 5s ease-in-out infinite;
  animation-delay: 1s;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0fdf9;
}
::-webkit-scrollbar-thumb {
  background: #7edfc1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #45c9a3;
}

/* ── Selection color ── */
::selection {
  background: #b8ecd7;
  color: #122254;
}

/* ── Focus visible ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #45c9a3;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Mobile menu transition ── */
#mobileMenu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
#mobileMenu.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
#mobileMenu:not(.hidden) {
  max-height: 300px;
  opacity: 1;
}
