/* Custom styles for Birch Creek Vineyard */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #d09d62;
}

/* Selection color */
::selection {
    background: #d14a32;
    color: white;
}

/* Fade-in animation for scroll reveals */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.3s ease, opacity 0.3s ease, pointer-events 0.3s ease;
}

#mobile-menu.open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#mobile-menu.closed {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(253, 249, 243, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* Image hover zoom container */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d14a32;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading state for button */
button:active {
    transform: scale(0.98);
}
