/* Custom styles for Bella Terra Vineyards */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Stat card hover animation */
.stat-card {
    transform: translateY(0);
    transition: transform 0.3s ease, background 0.3s ease;
}

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

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

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

/* Hero stat card entrance */
.stat-card {
    opacity: 0;
    animation: fadeUp 0.6s ease-out forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.5s; }
.stat-card:nth-child(4) { animation-delay: 0.6s; }

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

/* Scroll reveal animations - progressive enhancement */
/* Default: content is visible (no JS required) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS adds .revealed, animate from hidden state */
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .stat-card {
        opacity: 1;
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Mobile menu active state */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

/* Image aspect ratio fallbacks */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Form focus styles */
input:focus {
    outline: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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