/* ========================================
   Dotti's Diner — Custom Styles
   ======================================== */

/* Grain texture overlay */
.grain-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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");
    background-size: 128px 128px;
    pointer-events: none;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f0;
}
::-webkit-scrollbar-thumb {
    background: #7B2D3B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a11535;
}

/* Navigation transitions */
.nav-logo-text {
    transition: color 0.5s ease;
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-link {
    color: #1a0f08;
}

#navbar.scrolled .nav-link {
    color: #3d2b1f;
}

/* Menu tabs */
.menu-tab {
    color: #3d2b1f;
    background: transparent;
}

.menu-tab.active {
    color: #ffffff;
    background: #7B2D3B;
    box-shadow: 0 4px 12px rgba(123, 45, 59, 0.3);
}

.menu-tab:not(.active):hover {
    color: #7B2D3B;
    background: rgba(123, 45, 59, 0.08);
}

/* Mobile menu animations */
.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; }

/* Scroll reveal animations */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: none;
    }
    img, .menu-panel {
        transition: none;
    }
    img:hover {
        transform: none;
    }
}

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

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

/* Selection color */
::selection {
    background: rgba(123, 45, 59, 0.2);
    color: #1a0f08;
}
