/* ============================================
   AJ'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 {
    margin: 0;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #065F46;
    color: #FDFBF7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF6EE;
}
::-webkit-scrollbar-thumb {
    background: #A7F3D0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

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

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-3px) rotate(-45deg);
    width: 1.5rem;
}

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

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

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

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .group:hover img,
    img.transition-transform {
        transition: none;
    }
}

/* ============================================
   Image aspect ratios (no layout shift)
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Focus styles
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 3px;
    border-radius: 2px;
}

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