/* ─── Custom Styles for Sticky's West Indian Restaurant ─── */

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

/* ─── Hero Animations ─── */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.2s; }
.hero-elem:nth-child(2) { animation-delay: 0.4s; }
.hero-elem:nth-child(3) { animation-delay: 0.6s; }
.hero-elem:nth-child(4) { animation-delay: 0.8s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Scroll Indicator ─── */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ─── Reveal on Scroll (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        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);
    }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ─── Navbar Transition ─── */
#navbar.scrolled {
    background: rgba(54, 11, 16, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ─── Mobile Menu Animations ─── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ─── Menu Item Hover ─── */
#menu .border-b {
    transition: border-color 0.3s ease;
}

#menu .border-b:hover {
    border-color: rgba(255, 184, 168, 0.3);
}

#menu h4 {
    transition: color 0.3s ease;
}

#menu .border-b:hover h4 {
    color: #ffd9cf;
}

/* ─── Card Hover Effects ─── */
section > div > div > div.group {
    transition: transform 0.4s ease;
}

/* ─── Custom Selection ─── */
::selection {
    background: #8A1A2B;
    color: #FFF8F0;
}

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

/* ─── Image Lazy Load Fallback ─── */
img {
    background-color: #F5E6D3;
}

/* ─── Subtle Grain Texture (optional overlay) ─── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

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

/* ─── Button Ripple Effect ─── */
button, a {
    -webkit-tap-highlight-color: transparent;
}
