/* Custom styles for Paletería Oasis */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060d1a;
}
::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Selection color */
::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f0fdfa;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Scroll reveal animations — progressive enhancement, JS-gated */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-enabled .reveal.from-left {
    transform: translateX(-32px);
}

.js-enabled .reveal.from-right {
    transform: translateX(32px);
}

.js-enabled .reveal.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Staggered delays for child elements */
.js-enabled .reveal-delay-1 { transition-delay: 0.1s; }
.js-enabled .reveal-delay-2 { transition-delay: 0.2s; }
.js-enabled .reveal-delay-3 { transition-delay: 0.3s; }
.js-enabled .reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar states */
#navbar.scrolled {
    background: rgba(6, 13, 26, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 58, 95, 0.4);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

#navbar.scrolled .w-10 {
    background: rgba(20, 184, 166, 0.15);
}

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

/* Gold shimmer effect on hover for key elements */
.gold-shimmer {
    position: relative;
    overflow: hidden;
}

.gold-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.08), transparent);
    transition: left 0.6s ease;
}

.gold-shimmer:hover::after {
    left: 100%;
}

/* Subtle pulse for the CTA */
@keyframes pulse-subtle {
    0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.2); }
    50% { box-shadow: 0 0 0 12px rgba(20, 184, 166, 0); }
}

.cta-pulse:hover {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Image hover container */
img {
    -webkit-user-drag: none;
}

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

/* Map filter override for light mode */
@media (prefers-color-scheme: light) {
    iframe[title*="map"] {
        filter: invert(90%) hue-rotate(180deg) brightness(0.95) contrast(1.1) !important;
    }
}

/* Ensure hero text is always readable */
@media (max-width: 1023px) {
    #top h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}

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