/* ============================================
   KROPF FAMILY VINEYARD — Custom Styles
   ============================================ */

/* Base Reset & Smooth Scroll */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */
.hero-subtitle {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-desc {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-card {
    animation: heroCardIn 1s ease forwards;
    animation-delay: 1s;
    opacity: 0;
    transform: translateX(30px);
}

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

@keyframes heroCardIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Indicator */
@keyframes scrollDown {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* ============================================
   SCROLL REVEAL (Progressive Enhancement)
   Only activates when JS runs & motion is preferred
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* When JS is enabled, elements start hidden */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

#navbar.scrolled {
    background-color: rgba(3, 11, 23, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(167, 243, 208, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(167, 243, 208, 0.6);
    transition: width 0.3s ease;
}

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

/* Mobile Nav Links */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* ============================================
   WINE CARD HOVER EFFECTS
   ============================================ */
.wine-card-hover {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

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

/* ============================================
   BUTTON FOCUS STATES (Accessibility)
   ============================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(167, 243, 208, 0.8);
    outline-offset: 2px;
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background-color: rgba(167, 243, 208, 0.3);
    color: #f0f3f9;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2d5194;
}

/* ============================================
   FORM INPUTS
   ============================================ */
input::placeholder,
textarea::placeholder {
    color: #4168b0;
    opacity: 0.6;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 767px) {
    .hero-card {
        position: relative;
        right: auto;
        top: auto;
        transform: none !important;
        opacity: 1 !important;
        margin-top: 2rem;
        max-width: 100%;
    }
}
