/* Custom styles for Leon's Ice Cream Shop */

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

/* Floating card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

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

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

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

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

/* Set rotation variables for each card */
.floating-card:nth-child(1) { --rotate: 3deg; }
.floating-card:nth-child(2) { --rotate: -2deg; }
.floating-card:nth-child(3) { --rotate: 1deg; }
.floating-card:nth-child(4) { --rotate: -1deg; }

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(254, 252, 251, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(112, 21, 67, 0.1);
}

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

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

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

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

/* Selection color */
::selection {
    background: #fad0d9;
    color: #430a23;
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #fce7eb 25%, #fad0d9 50%, #fce7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #c49a3c;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #contactForm, #successMessage {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
