/* ============================================
   The Lounge — Premium Dark Luxury Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #1A0E20;
    color: #EDDCF4;
}

/* Selection */
::selection {
    background: rgba(212, 154, 26, 0.3);
    color: #F7F0FB;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(15, 7, 18, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 154, 26, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #D49A1A;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #E8B94A;
}

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

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #D49A1A;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* Menu lines animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
    width: 6px;
}

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

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

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content visible
   even if JS is disabled. JS adds the animated
   state on top of the visible content.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-left {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-right {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* JS adds these classes to trigger animations */
    .reveal-up.animated,
    .reveal-left.animated,
    .reveal-right.animated {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }

    /* Default state: visible (no JS = still readable) */
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* When JS is enabled, set initial hidden state via a small script */
.js-enabled .reveal-up {
    opacity: 0;
    transform: translateY(30px);
}

.js-enabled .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
}

.js-enabled .reveal-right {
    opacity: 0;
    transform: translateX(30px);
}

.js-enabled .reveal-up.animated,
.js-enabled .reveal-left.animated,
.js-enabled .reveal-right.animated {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #1A0E20;
    color: #EDDCF4;
}

/* ============================================
   Smooth scroll offset for fixed nav
   ============================================ */
section[id] {
    scroll-margin-top: 80px;
}

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

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }

    section[id] {
        scroll-margin-top: 60px;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    #hero h1 span.text-3xl {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 360px) {
    #hero h1 {
        font-size: 2.25rem;
    }
}
