/* ============================================
   Bake My Day Cupcakes — Custom Styles
   ============================================ */

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Selection color */
::selection {
  background: #a7f3d0;
  color: #064e3b;
}

/* ============================================
   Floating animations for hero stat cards
   ============================================ */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

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

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

.float-slow {
  animation: float-slow 6s ease-in-out infinite;
}

.float-medium {
  animation: float-medium 4.5s ease-in-out infinite;
}

.float-fast {
  animation: float-fast 3.5s ease-in-out infinite;
}

.float-card-1 {
  animation: float-card-1 5s ease-in-out infinite;
}

.float-card-2 {
  animation: float-card-2 4s ease-in-out infinite 0.5s;
}

.float-card-3 {
  animation: float-card-3 4.5s ease-in-out infinite 1s;
}

@keyframes float-card-1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes float-card-2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float-card-3 {
  0%, 100% { transform: translateY(-50%) translateX(0px); }
  50% { transform: translateY(calc(-50% - 10px)) translateX(3px); }
}

/* ============================================
   Scroll reveal animations
   Only applied when JS is active AND user prefers motion
   ============================================ */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Navbar scroll state
   ============================================ */
.nav-scrolled {
  background: rgba(253, 252, 247, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.nav-scrolled #navbar .font-display {
  color: #064e3b !important;
}

/* ============================================
   Mobile menu
   ============================================ */
#mobileMenu.menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

#mobileMenu.menu-open .mobile-link {
  animation: menuLinkIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#mobileMenu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

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

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

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

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

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   Tablet
   ============================================ */
@media (max-width: 768px) {
  .font-display {
    line-height: 1.15;
  }
}

/* ============================================
   Small mobile
   ============================================ */
@media (max-width: 480px) {
  #hero h1 {
    font-size: 2.5rem;
  }

  .float-card-1,
  .float-card-2,
  .float-card-3 {
    display: none;
  }
}
