/* Custom styles for Gambino's Pizza */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f1621;
}
::-webkit-scrollbar-thumb {
    background: #2d3a4a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3e4e61;
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(15, 22, 33, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45, 58, 74, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #fbbf24, #10b981);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animations */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
#mobile-menu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

/* Mobile nav links */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .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; }
}

/* Menu card shimmer on hover */
.menu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, transparent 50%, rgba(16, 185, 129, 0.05) 100%);
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.menu-card:hover::before {
    opacity: 1;
}
.menu-card {
    position: relative;
    overflow: hidden;
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #fcd34d, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle pattern overlay for dark sections */
.section-pattern {
    background-image: radial-gradient(rgba(251, 191, 36, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

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

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1a2332 0%, #2d3a4a 100%);
}

/* Hero text shadow for readability */
#hero h1 {
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

/* Mobile menu backdrop */
#mobile-menu {
    background: rgba(15, 22, 33, 0.98);
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure contrast on all text */
.text-midnight-300,
.text-midnight-200,
.text-midnight-100 {
    color: #d9e2ec;
}

/* Smooth card transitions */
.menu-card,
.bg-midnight-900 {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gallery image hover overlay */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Gold glow on focus for interactive elements */
button:focus-visible,
a:focus-visible {
    outline-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}
