/* ============================================
   Warmerdam Vineyards — Custom Styles
   Classic & Elegant · Burgundy + Blush
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #722F37;
    color: #fefdfb;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f0;
}
::-webkit-scrollbar-thumb {
    background: #d48060;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #722F37;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(114, 47, 55, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #722F37;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #722F37 !important;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
    transform: translateX(0);
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #722F37;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

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

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Hero Animations --- */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Indicator --- */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Prefers-reduced-motion: keep content visible always */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-anim {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .scroll-line {
        animation: none;
        opacity: 0.5;
    }
    .wine-card:hover .wine-card-img {
        transform: none;
    }
}

/* --- Wine Cards --- */
.wine-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.wine-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(58, 15, 22, 0.15);
}

/* --- Buttons --- */
button[type="submit"]:active {
    transform: scale(0.98);
}

/* --- Form Focus States --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #d48060 !important;
    box-shadow: 0 0 0 3px rgba(212, 128, 96, 0.1);
}

/* --- Smooth image loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --- Section dividers --- */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d48060, transparent);
}

/* --- Gold accent line animation --- */
.w-16.h-px.bg-burgundy-300 {
    transition: width 0.6s ease;
}

/* --- Responsive adjustments --- */
@media (max-width: 767px) {
    #navbar {
        background: rgba(254, 253, 251, 0.97);
        backdrop-filter: blur(10px);
        box-shadow: 0 1px 0 rgba(114, 47, 55, 0.08);
    }
    
    .hero-anim {
        opacity: 1;
        transform: translateY(0);
        animation: none;
    }
}

/* --- Page load transition --- */
@media (prefers-reduced-motion: no-preference) {
    body {
        animation: pageLoad 0.5s ease;
    }
    
    @keyframes pageLoad {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* --- Print styles --- */
@media print {
    #navbar, .scroll-indicator, #mobile-menu {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
