/* ===== Custom Styles for Cheboygan Brewery ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #d4582e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c24320;
}

/* Selection color */
::selection {
    background: #f3bda8;
    color: #6b2718;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: visible (progressive enhancement) */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS adds the hidden state (progressive enhancement) */
.scroll-reveal.is-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Stagger children */
.scroll-reveal.stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-reveal.stagger.is-visible > *:nth-child(1) { transition-delay: 0.1s; }
.scroll-reveal.stagger.is-visible > *:nth-child(2) { transition-delay: 0.2s; }
.scroll-reveal.stagger.is-visible > *:nth-child(3) { transition-delay: 0.3s; }
.scroll-reveal.stagger.is-visible > *:nth-child(4) { transition-delay: 0.4s; }

.scroll-reveal.stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.is-hidden {
        opacity: 0;
        transform: translateY(30px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal,
    .scroll-reveal.is-hidden,
    .scroll-reveal.stagger > *,
    .scroll-reveal.stagger.is-visible > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== Navbar Styles ===== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(61, 17, 11, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 8px;
}

/* ===== Hero parallax subtle effect ===== */
#hero img {
    will-change: transform;
}

/* ===== Beer card hover glow ===== */
.group:hover .group-hover\:scale-110 {
    filter: brightness(1.05);
}

/* ===== Button focus states ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #d4582e;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ===== Input focus glow ===== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 88, 46, 0.15);
}

/* ===== Floating card animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ===== Pulse dot ===== */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ===== Back to top button ===== */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:not(.visible) {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    
    #hero h1 br {
        display: none;
    }
    
    .font-display.text-4xl,
    .font-display.text-5xl {
        font-size: 2.25rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #hero h1 {
        font-size: 3.5rem;
    }
}

/* ===== Loading state for images ===== */
img {
    background-color: #faefda;
}

/* ===== Print styles ===== */
@media print {
    #navbar,
    #back-to-top,
    .scroll-reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
