/* ═══════════════════════════════════════════════════════════
   Chillie Willie Mustang Lounge — Custom Styles
   ═══════════════════════════════════════════════════════════ */

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

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

body {
    margin: 0;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    /* Stagger children */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ─── Navbar scroll state ─── */
#site-header.scrolled {
    background: rgba(8, 14, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(69, 190, 125, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#site-header.scrolled .line {
    background: #aee5c5;
}

/* ─── Mobile menu animation ─── */
#mobile-menu.open {
    transform: translateY(0);
}

/* ─── Hamburger animation ─── */
#menu-toggle.active .line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menu-toggle.active .line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active .line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* ─── Focus styles ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #45be7d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Selection ─── */
::selection {
    background: rgba(69, 190, 125, 0.3);
    color: #f0faf5;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f1a2e;
}
::-webkit-scrollbar-thumb {
    background: #2e4e7d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #45be7d;
}

/* ─── Image hover wrapper ─── */
article img,
#gallery img {
    will-change: transform;
}

/* ─── Smooth section transitions ─── */
section {
    position: relative;
}

/* ─── Form focus ring fallback for Safari ─── */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px #45be7d;
}

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