/* ============================================
   TAYLOR FAMILY VINEYARDS — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #0d9488;
    color: #ffffff;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-link {
    position: relative;
}

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

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

/* Scrolled nav state */
nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

nav.scrolled .nav-text-color,
nav.scrolled .nav-line-color {
    color: #0f172a;
    background-color: #0f172a;
}

nav.scrolled .nav-border-color {
    border-color: #e2e8f0;
}

nav.scrolled .hamburger-line {
    background-color: #0f172a !important;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
}

/* ============================================
   HERO
   ============================================ */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #042f2e 0%, #134e4a 40%, #1e293b 100%);
    z-index: 0;
}

#hero > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   WINE CARDS
   ============================================ */
.wine-card {
    position: relative;
}

.wine-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.wine-card:hover::before {
    opacity: 1;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.from-bottom {
        transform: translateY(40px);
    }

    .reveal.from-left {
        transform: translateX(-40px);
    }

    .reveal.from-right {
        transform: translateX(40px);
    }

    .reveal.scale-in {
        transform: scale(0.95);
    }

    /* Active state applied by JS */
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }

    /* Staggered delays */
    .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; }
}

/* When JS is disabled or reduced motion preferred, all content stays visible */
.no-js .reveal,
@media (prefers-reduced-motion: reduce) .reveal {
    opacity: 1;
    transform: none;
}

/* ============================================
   FORM STYLES
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
