/* Custom styles for Beaver Dam Brewing Company */

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

/* Scroll reveal base - always visible by default (progressive enhancement) */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only animate on hover-preference systems */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animated {
        opacity: 0;
        transform: translateY(24px);
    }
    .scroll-reveal.animated.animate-in {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll effect */
nav.scrolled {
    box-shadow: 0 1px 20px rgba(185, 63, 36, 0.08);
}

/* Custom selection color */
::selection {
    background-color: #f9c4b0;
    color: #742d1f;
}

/* Subtle grain texture overlay for hero */
.hero-grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Beer card shimmer on hover */
.group:hover .shimmer {
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
}

/* Animated gradient border for CTA */
@keyframes border-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

#mobile-menu.open {
    max-height: 400px;
    padding: 0;
}

/* Counter animation */
@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-animated {
    animation: count-up 0.5s ease forwards;
}

/* Remove default focus outline for mouse users, keep for keyboard */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ee7a52;
    outline-offset: 2px;
}
