/* Custom styles for Snow Cones and More */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3d5927;
}

/* Reveal animations - Progressive Enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Animation keyframes */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* Ensure text contrast */
.text-forest-700,
.text-forest-800,
.text-forest-900,
.text-offwhite-50,
.text-offwhite-100 {
    /* Colors already set in Tailwind config */
}

/* Image lazy loading optimization */
img {
    max-width: 100%;
    height: auto;
}

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

#mobile-menu.open {
    max-height: 300px;
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Hero gradient animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Hover effects for cards */
.hover\:scale-105:hover {
    transform: translateY(-5px);
}

/* Button ripple effect */
button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after {
    width: 200px;
    height: 200px;
}

/* Form focus states */
input:focus,
textarea:focus {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Custom selection color */
::selection {
    background-color: #9cb97a;
    color: #0f1609;
}

/* Print styles */
@media print {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .animate-bounce {
        display: none;
    }
}
