/* ============================================
   Up Lounge — Custom Styles
   Charcoal + Coral · Classic & Elegant
   ============================================ */

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

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

#navbar.scrolled {
    background-color: rgba(244, 244, 244, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

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

#navbar.scrolled .nav-logo-text {
    color: #3A3A3A;
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #5c5c5c;
}

#navbar.scrolled .nav-link:hover {
    color: #e8735a;
}

#navbar.scrolled .nav-link::after {
    background-color: #e8735a;
}

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Menu button animations */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

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

/* ============================================
   Floating Stat Cards (Hero)
   ============================================ */
.floating-card-1 {
    animation: float-slow 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-medium 5s ease-in-out infinite;
    animation-delay: -1.5s;
}

.floating-card-3 {
    animation: float-fast 4s ease-in-out infinite;
    animation-delay: -3s;
}

.floating-card-4 {
    animation: float-slow 7s ease-in-out infinite;
    animation-delay: -2s;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.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);
}

/* Progressive enhancement: JS adds these classes */
.reveal-animate.reveal-up {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-animate.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
}

.reveal-animate.reveal-right {
    opacity: 0;
    transform: translateX(40px);
}

.reveal-animate.reveal-visible.reveal-up {
    opacity: 1;
    transform: translateY(0);
}

.reveal-animate.reveal-visible.reveal-left {
    opacity: 1;
    transform: translateX(0);
}

.reveal-animate.reveal-visible.reveal-right {
    opacity: 1;
    transform: translateX(0);
}

/* Respect reduced motion preference */
@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-animate.reveal-up,
    .reveal-animate.reveal-left,
    .reveal-animate.reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Image Hover Effects
   ============================================ */
.group img {
    will-change: transform;
}

/* ============================================
   Form Focus States
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background-color: #e8735a;
    color: #1f1f1f;
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f4f4f4;
}

::-webkit-scrollbar-thumb {
    background: #c2c2c2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e8735a;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3,
    .floating-card-4 {
        display: none;
    }
    
    #hero {
        min-height: 100vh;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .floating-card-2 {
        left: 20px;
    }
    
    .floating-card-3 {
        right: 0;
    }
}
