/* Custom styles for Vinify Wine Services */

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

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

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Ensure reveal content is visible without JS */
.no-js .reveal,
:not(.js) .reveal {
    opacity: 1;
    transform: none;
}

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

#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(184, 92, 56, 0.1);
}

#navbar.scrolled .nav-logo {
    color: #7d4028;
}

#navbar.scrolled a:not(.bg-terracotta-500) {
    color: #5c4033;
}

#navbar.scrolled a:not(.bg-terracotta-500):hover {
    color: #b85c38;
}

/* Mobile menu animations */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Nav lines animation */
#menu-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .nav-line:nth-child(2) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Subtle hover effects */
a {
    transition: color 0.3s ease;
}

/* Image hover container */
.overflow-hidden {
    position: relative;
}

.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.05));
    pointer-events: none;
}

/* Selection color */
::selection {
    background-color: rgba(184, 92, 56, 0.2);
    color: #552d1e;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #b85c38;
    outline-offset: 4px;
    border-radius: 2px;
}

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

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

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

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* Print styles */
@media print {
    nav, #mobile-menu, .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-gradient-to-br {
        background: #b85c38 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
