/* Custom styles for MP Produce */

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

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

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

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

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

/* Selection color */
::selection {
    background: #F9D0D8;
    color: #7B1A2E;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 248, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 58, 0.08);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

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

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D44562;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #FCE7EA 0%, #FDF0EC 100%);
}

/* Subtle hover lift for cards */
.reveal group:hover .relative {
    transform: translateY(-4px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Parallax-like subtle movement for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-12px) translateX(4px); }
}

@media (prefers-reduced-motion: no-preference) {
    .reveal .absolute:first-child {
        animation: float 6s ease-in-out infinite;
    }
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FDF9F4 inset !important;
    -webkit-text-fill-color: #5C1220 !important;
    transition: background-color 0.3s ease 0s, color 0.3s ease 0s;
}

/* Print styles */
@media print {
    #navbar, #mobileMenu, #contactForm {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .bg-burgundy-700 {
        background-color: ButtonText;
    }
    
    .text-burgundy-700 {
        color: ButtonText;
    }
}

/* Ensure hero content is always visible */
#hero h1,
#hero p,
#hero a,
#hero .inline-flex {
    opacity: 1 !important;
    transform: none !important;
}

/* Mobile navigation links */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #FCE7EA;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    color: #7B1A2E;
    padding-left: 0.5rem;
}

.mobile-link:last-child {
    border-bottom: none;
}
