/* ============================================
   Michael Pozzan Winery — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #faf8f4;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 67, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 67, 0.5);
}

/* --- Floating Card Animations --- */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.5s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -3s;
    animation-duration: 5.5s;
}

.floating-card:nth-child(4) {
    animation-delay: -4.5s;
    animation-duration: 6.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* --- Reveal Animations --- */
.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[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

.reveal[data-reveal="left"] {
    transform: translateX(-30px);
}

.reveal[data-reveal="right"] {
    transform: translateX(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal[data-reveal="left"] {
        transform: translateX(-30px);
    }
    
    .reveal[data-reveal="right"] {
        transform: translateX(30px);
    }
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(4, 8, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 67, 0.1);
}

/* --- Mobile Menu --- */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* --- Menu Button Animation --- */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 20px;
    margin-left: 0;
}

/* --- Form Styles --- */
select option {
    background: #0d1a12;
    color: #faf8f4;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(212, 168, 67, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

/* --- Gold accent line on section dividers --- */
.divider-gold {
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.2), transparent);
}

/* --- Wine card hover glow --- */
.group:hover .group-hover\\:scale-105 {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

/* --- Button press effect --- */
button:active, a:active {
    transform: scale(0.98);
}

/* --- Image lazy load placeholder --- */
img {
    background: linear-gradient(135deg, #0d1a12 0%, #081009 100%);
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    #hero {
        min-height: 100vh;
        min-height: 100dvh;
    }
}

/* --- Focus visible for accessibility --- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid rgba(212, 168, 67, 0.6);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Print styles --- */
@media print {
    nav, #contact, footer, .floating-card {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
