/* Custom styles for Robbie T's Pizza */

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

/* Nav transition states */
.nav-scrolled .nav-logo-text {
    color: #052e16;
}

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

.nav-scrolled .nav-logo-text {
    color: #052e16;
}

/* Mobile menu animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s 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; }

/* Hamburger animation */
#bar1.open {
    transform: rotate(45deg) translate(5px, 5px);
}

#bar2.open {
    opacity: 0;
}

#bar3.open {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Reveal animations - below the fold only */
.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);
}

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

/* Initial state for reveals - only applied when JS is available */
@media (prefers-reduced-motion: no-preference) {
    .reveal:not(.revealed) {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection color */
::selection {
    background: #166534;
    color: #fefdf8;
}

/* Image loading placeholder */
img {
    background-color: #dcfce7;
}

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

/* Print styles */
@media print {
    nav, #hero, #gallery, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
