/* ===== Custom Styles for Charlie's West Indian Bakery & Restaurant ===== */

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

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

/* Selection color */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #faf8f4;
}

/* ===== Navbar transitions ===== */
#navbar {
    transition: background-color 0.5s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(11, 28, 11, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(212, 168, 67, 0.1);
}

#navbar.scrolled .menu-line {
    background-color: #faf8f4;
}

/* ===== Mobile menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* Mobile menu button animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* ===== Scroll reveal animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered reveals */
.reveal-stagger-1 { transition-delay: 0.1s; }
.reveal-stagger-2 { transition-delay: 0.2s; }
.reveal-stagger-3 { transition-delay: 0.3s; }
.reveal-stagger-4 { transition-delay: 0.4s; }

/* ===== Gold shimmer effect on hover ===== */
.gold-shimmer {
    position: relative;
    overflow: hidden;
}

.gold-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 168, 67, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.gold-shimmer:hover::after {
    left: 100%;
}

/* ===== Menu category hover ===== */
.menu-category {
    position: relative;
}

.menu-category::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(212, 168, 67, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-category:hover::before {
    opacity: 1;
}

/* ===== Button press effect ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active, a:active {
    transform: scale(0.98);
}

/* ===== Form focus states ===== */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .gold-shimmer::after {
        display: none;
    }
    
    .menu-category::before {
        display: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ===== Image loading placeholder ===== */
img {
    background-color: #1c451c;
}

/* ===== Focus visible for accessibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(212, 168, 67, 0.6);
    outline-offset: 2px;
}
