/* Custom styles for Trà sữa olala */

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

/* Base styles */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(250, 248, 240, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

#navbar.scrolled .nav-link {
  color: rgba(6, 78, 59, 0.85) !important;
}

/* Mobile menu */
.mobile-menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

/* Hero animations - above the fold, no hidden state */
.hero-badge {
  animation: fadeInDown 0.8s ease forwards;
}

.hero-badge {
  opacity: 0;
  animation: fadeInDown 0.8s ease forwards;
  animation-delay: 0.1s;
}

/* Scroll reveal animations - below the fold only */
.menu-reveal,
.about-reveal,
.why-reveal,
.cta-reveal,
.contact-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.menu-item-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Animation classes applied by JS */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
}

/* Mobile menu link hover */
.mobile-menu-link {
  position: relative;
}

.mobile-menu-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #059669;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* Subtle hover effects on cards */
.menu-item-reveal {
  transform: translateY(0);
}

/* Button focus states */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Input focus states */
input:focus,
textarea:focus {
  outline: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #6ee7b7;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .hero-badge,
  .menu-reveal,
  .about-reveal,
  .why-reveal,
  .cta-reveal,
  .contact-reveal,
  .menu-item-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Keyframes */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
  .hero-badge {
    animation-delay: 0.1s;
  }
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .font-serif {
    word-spacing: -0.02em;
  }
}
