/* Custom styles for Sra Churros */

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

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

::-webkit-scrollbar-track {
    background: #2d1219;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #8b3d56;
}

/* Menu card hover effect */
.menu-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px -15px rgba(251, 191, 36, 0.15);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(45, 18, 25, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(94, 42, 59, 0.5);
}

.nav-scrolled .menu-line {
    background: #fbbf24;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

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

/* Floating cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
}

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

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

/* Apply floating animations with prefers-reduced-motion check */
@media (prefers-reduced-motion: no-preference) {
    .absolute.top-8.left-0 > div {
        animation: float 4s ease-in-out infinite;
    }
    
    .absolute.bottom-24.left-4 > div {
        animation: float-slow 5s ease-in-out infinite;
    }
    
    .absolute.bottom-0.right-12 > div {
        animation: float-reverse 4.5s ease-in-out infinite;
    }
}

/* Scroll reveal base state */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll reveal hidden state (progressive enhancement via JS) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .menu-card:hover {
        transform: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* Selection */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #faf5f7;
}
