/* Custom styles for Sabor San Pedro */

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

/* Selection color */
::selection {
    background-color: rgba(200, 150, 62, 0.3);
    color: #f5f0f8;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f0a16;
}
::-webkit-scrollbar-thumb {
    background: #5c3065;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #724080;
}

/* Reveal animations — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Ensure content is visible without JS */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(8, 5, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(200, 150, 62, 0.1);
}

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

/* Mobile menu line animation */
.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) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
    margin-left: 0;
}

/* Gold shimmer on hover for buttons */
button[class*="bg-amber"],
a[class*="bg-amber"] {
    position: relative;
    overflow: hidden;
}
button[class*="bg-amber"]::after,
a[class*="bg-amber"]::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.6s;
}
button[class*="bg-amber"]:hover::after,
a[class*="bg-amber"]:hover::after {
    transform: rotate(30deg) translate(20%, 20%);
}

/* Image hover zoom container */
.rounded-xl.overflow-hidden {
    overflow: hidden;
}
.rounded-xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle gold border animation on focus */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(200, 150, 62, 0.3), inset 0 0 20px rgba(200, 150, 62, 0.03);
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
