/* Custom styles for San Antonio Winery */

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

/* Base styles */
body {
    background-color: #030712;
    color: #ffffff;
}

/* Selection color */
::selection {
    background-color: rgba(125, 211, 192, 0.3);
    color: #ffffff;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(125, 211, 192, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(125, 211, 192, 0.5);
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(3, 7, 18, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(125, 211, 192, 0.1);
}

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

/* Link hover underline animation */
a {
    text-decoration: none;
}

/* Image loading placeholder */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid rgba(125, 211, 192, 0.5);
    outline-offset: 2px;
}

/* Reduced motion preference */
@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;
    }
}

/* Fade-in animation for scroll reveals */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for grid items */
.fade-in-up.delay-100 { transition-delay: 0.1s; }
.fade-in-up.delay-200 { transition-delay: 0.2s; }
.fade-in-up.delay-300 { transition-delay: 0.3s; }
.fade-in-up.delay-400 { transition-delay: 0.4s; }
.fade-in-up.delay-500 { transition-delay: 0.5s; }

/* Mobile menu button animation */
#menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 100%;
}
