/* ============================================
   Pleasant Valley Vineyard — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1d23;
}
::-webkit-scrollbar-thumb {
    background: #444b57;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff5c1a;
}

/* Selection */
::selection {
    background: rgba(255, 92, 26, 0.3);
    color: #fff;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 15, 19, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Hero Animations
   ============================================ */
.hero-line {
    display: inline-block;
    transform: translateY(105%);
    animation: heroSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
.hero-line:nth-child(3) { animation-delay: 0.3s; }
.hero-line:nth-child(4) { animation-delay: 0.4s; }
.hero-line:nth-child(5) { animation-delay: 0.5s; }

.hero-tagline {
    transform: translateY(20px);
    opacity: 0;
    animation: heroFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes heroSlideUp {
    from {
        transform: translateY(105%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes heroFadeUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   Only applied when JS runs and user prefers motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Default state: always visible for accessibility */
.reveal {
    opacity: 1;
    transform: none;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    position: relative;
}

/* ============================================
   Product Card Hover
   ============================================ */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ============================================
   Form Styles
   ============================================ */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23858b93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select option {
    background: #1a1d23;
    color: #e2e3e5;
}

/* ============================================
   Focus Visible
   ============================================ */
:focus-visible {
    outline: 2px solid #ff5c1a;
    outline-offset: 2px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .hero-line {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-line {
        font-size: 3.5rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, #mobile-menu, button {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
