/* ===== Custom Styles for San Miguel Market & Deli ===== */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: always visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When JS is enabled and prefers-reduced-motion is off, animate on scroll */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal.delay-100 { transition-delay: 0.1s; }
    .reveal.delay-200 { transition-delay: 0.2s; }
    .reveal.delay-300 { transition-delay: 0.3s; }
    .reveal.delay-400 { transition-delay: 0.4s; }
}

/* ===== Navbar Styles ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 252, 251, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(163, 22, 53, 0.08);
}

#navbar.scrolled .font-serif {
    color: #6f142a !important;
}

#navbar.scrolled .tracking-widest {
    color: #dc4060 !important;
}

/* ===== Hero Section ===== */
#hero {
    position: relative;
}

/* ===== Button & Link Hover Effects ===== */
a {
    text-decoration: none;
}

/* ===== Mobile Menu ===== */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(163, 22, 53, 0.08);
}

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

/* ===== Card Hover Effects ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== Selection Color ===== */
::selection {
    background-color: #fce7eb;
    color: #6f142a;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #dc4060;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image Loading ===== */
img {
    display: block;
    max-width: 100%;
}

/* ===== Subtle Pattern Overlay ===== */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(163, 22, 53, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}

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

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

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

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

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .group:hover .group-hover\:scale-105 {
        transform: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* ===== Tablet ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 360px) {
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
