/* ============================================
   Boyds Cardinal Hollow Winery — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #C0593A;
    color: #FFFCF8;
}

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

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

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

/* Navbar scrolled state */
.navbar-scrolled {
    background: rgba(255, 252, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(61, 43, 31, 0.08);
}

.navbar-scrolled .nav-logo-text {
    color: #3D2B1F !important;
}

.navbar-scrolled .nav-logo-sub {
    color: #C0593A !important;
}

.navbar-scrolled .nav-link {
    color: rgba(61, 43, 31, 0.7) !important;
}

/* --- Hero Animations --- */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-headline {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-sub {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

.hero-scroll {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* --- Marquee --- */
.marquee-track {
    overflow: hidden;
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
    will-change: transform;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-eyebrow,
    .hero-headline,
    .hero-sub,
    .hero-ctas,
    .hero-scroll {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .marquee-content {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* --- About Section --- */
.about-img {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-text {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* --- Wine Cards --- */
.wines-header {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.wine-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.wines-cta {
    opacity: 1;
    transition: opacity 0.8s ease;
}

/* --- Visit Section --- */
.visit-info {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.visit-map {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* --- Events --- */
.events-header {
    opacity: 1;
    transition: opacity 0.8s ease;
}

.event-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.events-cta {
    opacity: 1;
    transition: opacity 0.8s ease;
}

/* --- Testimonials --- */
.testimonials-grid {
    opacity: 1;
    transition: opacity 0.8s ease;
}

/* --- Contact --- */
.contact-info {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-form-wrap {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* --- Mobile Menu --- */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* --- Mobile Menu Icon Animation --- */
.menu-icon-active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-icon-active #bar2 {
    opacity: 0;
}

.menu-icon-active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.75rem;
    }
    
    .hero-headline br {
        display: none;
    }
}

/* --- Focus styles for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C0593A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Smooth image loading --- */
img {
    loading: lazy;
    decoding: async;
}
