/* Custom styles for Mayberry M Products */

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

/* Base transitions */
.nav-link, .mobile-link, a {
    transition: all 0.3s ease;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s 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.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu button animations */
.menu-line {
    transition: all 0.3s ease;
}

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

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

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

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal.revealed,
    .reveal.animate {
        opacity: 1;
        transform: translateY(0);
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7c3f5c;
}

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

/* Image loading placeholder */
img {
    background-color: #e8d6df;
}

/* Form focus states */
input:focus,
textarea:focus {
    background-color: rgba(92, 51, 76, 0.6);
}

/* Subtle hover effects for product cards */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Print styles */
@media print {
    nav,
    #contact-form,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}
