/* Custom styles for Cowboy Coffee */

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

/* Hero animations - above the fold, always visible */
.hero-eyebrow {
    animation: fadeInDown 0.8s ease-out both;
}

.hero-title {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Floating stat cards animation */
.stat-card {
    animation: floatCard 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Scroll reveal animations - below the fold only */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Menu card hover */
.menu-card {
    transform: translateY(0);
}

.menu-card:hover {
    transform: translateY(-4px);
}

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(250, 245, 247, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(74, 44, 58, 0.08);
}

#navbar.scrolled .font-serif {
    color: #4A2C3A !important;
}

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

#mobile-menu .mobile-line.open:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu .mobile-line.open:nth-child(2) {
    opacity: 0;
}

#mobile-menu .mobile-line.open:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

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

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

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

/* Image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background-color: #D4A84B;
    color: #4A2C3A;
}
