/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #f9e4e6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #4a0e1c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6b1426;
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Wine card hover effect */
.wine-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.5s ease;
}

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

/* Navbar transition */
.nav-scrolled {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 14, 28, 0.3);
}

.nav-scrolled #navbar {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Fade-in animation for scroll reveals */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Gold shimmer on hover for buttons */
button::after,
a::after {
    content: '';
}

/* Custom select styling */
select option {
    background: #1a1a1a;
    color: #f2c4cd;
}

/* Image lazy load placeholder */
img {
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
}

/* Smooth focus styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3);
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu close animation */
#mobile-menu.hiding {
    animation: slideUp 0.2s ease-in forwards;
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Hero image parallax-like subtle movement */
@media (prefers-reduced-motion: no-preference) {
    .hero-image-container {
        will-change: transform;
        transition: transform 0.1s linear;
    }
}

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a0a0a inset !important;
    -webkit-text-fill-color: #f2c4cd !important;
    caret-color: #f2c4cd;
}

/* Date input styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.6) sepia(1) saturate(5) hue-rotate(10deg);
    cursor: pointer;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
    
    #hero h1 {
        font-size: 2.75rem;
    }
    
    .wine-card {
        padding: 1.5rem;
    }
    
    .floating-badge {
        position: relative;
        margin-top: 1rem;
    }
}

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