/* ============================================
   Scoop N' Boba — Custom Styles
   ============================================ */

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

/* --- Navbar transitions --- */
#navbar {
  backdrop-filter: blur(0px);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(253, 249, 243, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

/* --- Mobile menu --- */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* --- Hamburger animation --- */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.25rem;
}

/* --- Floating stat cards --- */
@keyframes float-1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(1deg); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes float-3 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

.floating-card-1 {
  animation: float-1 5s ease-in-out infinite;
}
.floating-card-2 {
  animation: float-2 6s ease-in-out infinite;
}
.floating-card-3 {
  animation: float-3 5.5s ease-in-out infinite;
}

/* --- Marquee --- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  animation: marquee 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* --- Reveal animations (below the fold only) --- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Selection color --- */
::selection {
  background-color: #047857;
  color: #FDF9F3;
}

/* --- Focus visible --- */
:focus-visible {
  outline: 2px solid #10B981;
  outline-offset: 2px;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF9F3;
}
::-webkit-scrollbar-thumb {
  background: #065F46;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* --- Smooth image loading --- */
img {
  image-rendering: auto;
}

/* --- Print styles --- */
@media print {
  #navbar, .marquee-track, #contact-form { display: none; }
  body { background: white; color: black; }
}
