/* Makario Coffee Roasters — Custom Styles */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDFBF7;
}
::-webkit-scrollbar-thumb {
    background: #d4a966;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b5654a;
}

/* Selection color */
::selection {
    background: #b5654a;
    color: #FDFBF7;
}

/* Base animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .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; }
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(181, 101, 74, 0.1);
}

#navbar.scrolled #nav-logo-text {
    color: #311710 !important;
}

/* Mobile menu animation */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
.menu-toggle-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle-active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle-active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hover underline effect for nav links */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #b5654a;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Coffee card subtle lift */
.group:hover {
    transform: translateY(-4px);
}

/* Mobile link underline */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #b5654a;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 80%;
}

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

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

/* Print styles */
@media print {
    #navbar,
    #hero,
    .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
