/* Custom styles for Weinlesen Vineyard */

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

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #0f172a;
}

#navbar.scrolled .nav-logo-sub {
    color: #64748b;
}

#navbar.scrolled .nav-link {
    color: #475569;
}

/* Marquee animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Reveal animations — progressive enhancement, only applies when JS runs */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

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

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

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

#mobile-menu.open span {
    display: block;
}

/* Menu icon animation */
#menu-icon span:nth-child(1) {
    transform-origin: center;
}

#menu-icon span:nth-child(2) {
    opacity: 1;
}

#menu-icon span:nth-child(3) {
    transform-origin: center;
}

#menu-btn.active #menu-icon span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn.active #menu-icon span:nth-child(2) {
    opacity: 0;
}

#menu-btn.active #menu-icon span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Selection color */
::selection {
    background-color: #0d9488;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
