/* Custom styles for The Original Sno Cone Factory */

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

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(44, 4, 19, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav.scrolled .menu-line {
    background: white;
}

/* Mobile menu animations */
#mobileMenu.open {
    animation: slideDown 0.3s ease-out;
}

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

/* Mobile menu button active state */
#mobileMenuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Flavor card hover effects */
.flavor-card {
    transform-origin: center;
}

.flavor-card:hover {
    transform: translateY(-4px);
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    50% {
        transform: translateY(-20px) rotate(45deg);
    }
}

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

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal.hidden {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* For browsers that don't support prefers-reduced-motion, JS will add .reveal class */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

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

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

::-webkit-scrollbar-track {
    background: #3b0419;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #be185d, #fbbf24);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #db2777, #fcd34d);
}

/* Selection color */
::selection {
    background: rgba(190, 24, 93, 0.3);
    color: white;
}

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

/* Mobile menu link hover */
.mobile-menu-link {
    position: relative;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.mobile-menu-link:hover::after {
    width: 100%;
}

/* Hero text shadow for readability */
#hero h1 {
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

#hero p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive font sizing */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
}

/* Print styles */
@media print {
    nav, #mobileMenu, .flavor-card {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
