/* Custom Styles for Chicanos' Pastries */

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

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

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

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

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

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

/* Hero Animation - only for below-fold content via JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .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; }
}

/* Navbar transition */
.nav-link {
    position: relative;
}

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

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

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

#mobile-menu.closed {
    max-height: 0;
    opacity: 0;
}

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

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

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-emerald-950, .bg-emerald-800 {
        background: #166534 !important;
        color: #fff !important;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
