/* Custom styles for The Cellar Bar */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFFBF7;
}
::-webkit-scrollbar-thumb {
    background: #d4a0aa;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #962137;
}

/* Selection color */
::selection {
    background: #f9d0d9;
    color: #5c1f2a;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: content always visible if JS disabled */
.no-js .reveal,
:not(.no-js) .reveal {
    opacity: 1;
    transform: none;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(255, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* Hero parallax-like subtle effect */
#hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4455d;
    outline-offset: 2px;
}

/* Gallery hover overlay */
.rounded-2xl.overflow-hidden {
    position: relative;
}

.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(92, 31, 42, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.rounded-2xl.overflow-hidden:hover::after {
    opacity: 1;
}

/* Subtle pattern for cream sections */
.bg-cream-50 {
    background-image: radial-gradient(circle at 20% 20%, rgba(249, 208, 217, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(252, 231, 235, 0.1) 0%, transparent 50%);
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B2D3B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FFFBF7 inset !important;
    -webkit-text-fill-color: #3D2B1F !important;
}

/* Active nav link */
.nav-link.active {
    background: rgba(123, 45, 59, 0.08);
    color: #7B2D3B;
}

/* Touch device optimizations */
@media (hover: none) {
    .rounded-2xl.overflow-hidden:hover::after {
        opacity: 0;
    }
    .rounded-2xl.overflow-hidden:hover .w-full {
        transform: none;
    }
}
