/**
 * DURAT ADVOGADOS - LUXURY MOTION & MICROINTERACTIONS SYSTEM
 * Aesthetic: Dark Luxury / High-End Editorial
 * Performance: 60fps Hardware-Accelerated (transform & opacity only)
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800;900&display=swap');

.font-cinzel {
    font-family: 'Cinzel', serif !important;
}

/* 1. Global Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* 2. Top Scroll Progress Indicator */
#luxury-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2.5px;
    width: 0%;
    background: linear-gradient(90deg, #9E7D3B 0%, #E4BD6E 50%, #FFF5D6 100%);
    box-shadow: 0 0 10px rgba(228, 189, 110, 0.7), 0 0 20px rgba(228, 189, 110, 0.3);
    z-index: 99999;
    pointer-events: none;
    transition: width 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3. Reveal on Scroll (Inertia & Organic Entrance) */
.reveal-init {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

/* Horizontal & Scale Reveal Variants */
.reveal-scale-init {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

/* Staggered Child Delays */
.stagger-children > *:nth-child(1) { transition-delay: 60ms; }
.stagger-children > *:nth-child(2) { transition-delay: 130ms; }
.stagger-children > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children > *:nth-child(4) { transition-delay: 270ms; }
.stagger-children > *:nth-child(5) { transition-delay: 340ms; }
.stagger-children > *:nth-child(6) { transition-delay: 410ms; }

/* 4. Interactive Spotlight Mouse Glow on Glass Panels */
.glass-panel, 
.option-card, 
.spotlight-card {
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s ease;
}

.glass-panel::before,
.option-card::before,
.spotlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(228, 189, 110, 0.075),
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

.glass-panel:hover::before,
.option-card:hover::before,
.spotlight-card:hover::before {
    opacity: 1;
}

/* Subtle Card Elevation on Hover */
.glass-panel:hover, 
.spotlight-card:hover {
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7), 0 0 20px -5px rgba(228, 189, 110, 0.12);
}

/* 5. Tactile Button Physics & Light Sheen Sweep */
a[class*="bg-aged-gold"],
button[class*="bg-aged-gold"],
.btn-tactile {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s ease, 
                color 0.3s ease !important;
}

a[class*="bg-aged-gold"]:hover,
button[class*="bg-aged-gold"]:hover,
.btn-tactile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -4px rgba(228, 189, 110, 0.4), 0 0 15px rgba(228, 189, 110, 0.2);
}

a[class*="bg-aged-gold"]:active,
button[class*="bg-aged-gold"]:active,
.btn-tactile:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: 0 2px 10px -2px rgba(228, 189, 110, 0.3);
}

/* Light Sheen Sweep Effect on Hover */
a[class*="bg-aged-gold"]::after,
button[class*="bg-aged-gold"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transform: skewX(-25deg);
    transition: left 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

a[class*="bg-aged-gold"]:hover::after,
button[class*="bg-aged-gold"]:hover::after {
    left: 140%;
}

/* 6. Dynamic Navbar Morphing on Scroll */
header.nav-scrolled,
nav.nav-scrolled,
.main-navbar.nav-scrolled {
    background-color: rgba(10, 10, 10, 0.94) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(228, 189, 110, 0.25) !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.85);
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                padding 0.3s ease;
}

/* 7. Floating Concierge WhatsApp Widget */
#floating-concierge {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

#floating-concierge.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.concierge-pill {
    background: #111111;
    border: 1px solid rgba(228, 189, 110, 0.4);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.9), 0 0 20px rgba(228, 189, 110, 0.2);
    padding: 10px 18px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e5e2e1;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.concierge-pill:hover {
    background: #1A1A1A;
    border-color: #E4BD6E;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.95), 0 0 25px rgba(228, 189, 110, 0.35);
    color: #ffffff;
}

.concierge-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981;
    box-shadow: 0 0 8px #10B981;
    animation: conciergePulse 2s infinite ease-in-out;
}

@keyframes conciergePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* 8. Luxury Mobile Menu Drawer */
#luxury-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: flex-end;
}

#luxury-mobile-drawer.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer-content {
    width: 100%;
    max-width: 360px;
    height: 100%;
    background: #111111;
    border-left: 1px solid rgba(228, 189, 110, 0.25);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.9);
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#luxury-mobile-drawer.active .mobile-drawer-content {
    transform: translateX(0);
}

/* 9. Luxury Toast Feedback */
#luxury-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #141414;
    border: 1px solid #E4BD6E;
    color: #e5e2e1;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(228, 189, 110, 0.25);
    opacity: 0;
    pointer-events: none;
    z-index: 100000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#luxury-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 10. Mobile Touch & Responsive UX Polish */
@media (max-width: 768px) {
    /* Prevent iOS Safari auto-zoom on input focus */
    input, textarea, select {
        font-size: 16px !important;
    }

    /* Better touch targets */
    nav button, nav a, .filter-btn, .concierge-pill {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Smooth touch scrolling for horizontal filter bars */
    .filter-scroll-container {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 8px;
    }
    .filter-scroll-container::-webkit-scrollbar {
        display: none;
    }

    /* Prevent unintended horizontal shifts */
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* 11. Focus & Accessibility */
:focus-visible {
    outline: 2px solid #E4BD6E !important;
    outline-offset: 2px !important;
}

/* 12. Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal-init,
    .reveal-scale-init {
        opacity: 1 !important;
        transform: none !important;
    }
}
