/* Custom styles for Grand Donuts */

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

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

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

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
    animation-duration: 5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
    animation-duration: 4.5s;
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(254, 252, 246, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(63, 22, 22, 0.08);
}

/* Selection color */
::selection {
    background: #943636;
    color: #fefcf6;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #943636;
}

/* Fade-in animation on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Image hover zoom */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #943636;
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .fade-in,
    .fade-in-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    img {
        transition: none;
    }
}
