/* ===== Custom Styles for Hoke Town Nutrition ===== */

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

/* Selection color */
::selection {
    background-color: #b5364b;
    color: #fefcf6;
}

/* ===== Reveal Animations ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only apply hidden state when JS is enabled AND user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger delays */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Navbar Scroll State ===== */
.navbar-scrolled {
    background-color: rgba(254, 252, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(181, 54, 75, 0.08);
}

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

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

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

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

/* ===== Button Hover Effects ===== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Image Loading ===== */
img {
    background-color: #f5f0e6;
}

/* ===== Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== Mobile Menu Transition ===== */
#mobileMenu {
    transition: opacity 0.3s ease, 
                transform 0.3s ease, 
                pointer-events 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#mobileMenu.closed {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* ===== Subtle Pattern Overlay ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b5364b' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== Playfair Display Italic Correction ===== */
.font-display em,
.font-display i {
    font-style: italic;
}

/* ===== Form Select Arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b5364b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

/* ===== Print Styles ===== */
@media print {
    nav, button, #contactForm, #mobileMenu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-burgundy-950, .bg-burgundy-900 {
        background: white !important;
        color: black !important;
    }
}
