/* Custom styles for Brothers Bakery */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(200, 164, 90, 0.3);
    color: #f0f3f9;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0f1729;
}

::-webkit-scrollbar-thumb {
    background: rgba(200, 164, 90, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 164, 90, 0.5);
}

/* Navigation styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c8a45a;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(9, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200, 164, 90, 0.1);
}

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

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

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

/* Scroll reveal animations */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion preference */
@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;
    }
    
    .reveal-on-scroll {
        /* Content is always visible */
    }
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Image hover effects */
img {
    transition: transform 0.7s ease;
}

/* Custom focus visible styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #c8a45a;
    outline-offset: 2px;
}

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

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}
