/* ===== Custom Styles for Dolce Winery ===== */

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0824;
}
::-webkit-scrollbar-thumb {
    background: #5B2C6F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Selection Color */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #faf5ff;
}

/* ===== Reveal Animations (Progressive Enhancement) ===== */
.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.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state for reduced motion — always visible */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar Transition ===== */
#navbar.scrolled {
    background: rgba(26, 8, 36, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(91, 44, 111, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* Menu lines animation */
.menu-line {
    display: block;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ===== Mobile Link Animation ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ===== Button Ripple Effect ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Image Loading Shimmer ===== */
img {
    background: linear-gradient(135deg, #2d0f3a 0%, #4a1a5e 50%, #2d0f3a 100%);
    background-size: 200% 200%;
}

/* ===== Geometric Shape Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

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

.geometric-float {
    animation: float 6s ease-in-out infinite;
}

.geometric-float-circle {
    animation: floatCircle 8s ease-in-out infinite;
}

/* ===== Wine Card Hover Glow ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ===== Focus Styles for Accessibility ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Responsive Typography ===== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
}

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