/* ==========================================
   Sonny's Lounge — Custom Styles
   ========================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(5, 150, 105, 0.3);
    color: #fefdf8;
}

/* ==========================================
   Scroll Reveal (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);
    }
    
    /* Stagger children */
    .reveal-stagger > * {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
    .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
    .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
    .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
    .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
    .reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }
    
    .reveal-stagger.revealed > * {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Navbar
   ========================================== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(6, 10, 8, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#navbar.scrolled .menu-line {
    background: rgba(254, 253, 248, 0.8);
}

/* ==========================================
   Mobile Menu
   ========================================== */
.mobile-link {
    opacity: 0;
    transform: translateY(-10px);
    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.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ==========================================
   Mobile hamburger animation
   ========================================== */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* ==========================================
   Smooth image loading
   ========================================== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ==========================================
   Focus styles for accessibility
   ========================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* ==========================================
   Input autofill styling
   ========================================== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a0f0d inset !important;
    -webkit-text-fill-color: #fefdf8 !important;
    caret-color: #fefdf8;
}

/* ==========================================
   Custom scrollbar
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #060a08;
}

::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.5);
}

/* ==========================================
   Print styles
   ========================================== */
@media print {
    nav, #contact-form, button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
    }
}
