/* =============================================
   Milord Lounge — Custom Styles
   ============================================= */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #f0f7f7;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #041415;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 83, 0.5);
}

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

#navbar.scrolled {
    background: rgba(4, 20, 21, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

#navbar.scrolled .font-serif {
    color: #f0f7f7;
}

/* ---- Nav Links ---- */
.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #D4A853 !important;
}

/* ---- Mobile Menu ---- */
.mobile-link {
    position: relative;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeSlideUp 0.4s ease forwards;
    opacity: 1;
}

#mobileMenu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu .mobile-link:nth-child(5) { animation-delay: 0.25s; }

/* ---- Menu Button ---- */
#menuBtn.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.open .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.open .menu-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ---- Hero Content ---- */
.hero-content {
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content p:first-of-type {
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

.hero-content h1 {
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
    opacity: 0;
}

.hero-content p:nth-of-type(2) {
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
    opacity: 0;
}

.hero-content > div {
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
    opacity: 0;
}

/* ---- Scroll Indicator ---- */
@keyframes scroll-down {
    0% { top: -16px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scroll-down {
    animation: scroll-down 1.8s ease-in-out infinite;
}

/* ---- Scroll Reveal ---- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        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: 0;
        transform: translateX(-40px);
        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: 0;
        transform: translateX(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

/* ---- Animations ---- */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Image Parallax ---- */
#heroImg {
    transition: transform 8s ease;
}

/* ---- Cards ---- */
.reveal-up {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Button Focus ---- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #D4A853;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ---- 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;
    }
}
