/* ========== CUSTOM STYLES ========== */

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

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

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 95, 70, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ========== MOBILE MENU ========== */
.mobile-link {
    position: relative;
}

/* ========== FLOATING CIRCLES ========== */
.floating-circle {
    animation: float 8s ease-in-out infinite;
}

.floating-circle:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 10s;
}

.floating-circle:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 12s;
}

.floating-circle:nth-child(4) {
    animation-delay: -6s;
    animation-duration: 9s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* ========== SCROLL REVEAL ========== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .floating-circle {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ========== HERO ========== */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #fdfcf8, transparent);
    pointer-events: none;
}

/* ========== BEER CARDS ========== */
.beer-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

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

/* ========== FORM ========== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

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

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

/* ========== BUTTON HOVER EFFECTS ========== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ========== SELECTION ========== */
::selection {
    background: #d1fae5;
    color: #064e3b;
}

/* ========== MOBILE MENU ANIMATION ========== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

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

/* ========== CARD IMAGE OVERLAY ========== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE FINE-TUNING ========== */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .floating-circle {
        display: none;
    }
}

/* ========== LOADING STATE ========== */
body.loading {
    overflow: hidden;
}

body:not(.loading) {
    overflow-x: hidden;
}
