/* =============================================
   MOA PELÍCULAS - Professional Styles
   ============================================= */

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0a0a;
    color: #f3f4f6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

/* Smooth scroll offset for fixed header */
html {
    scroll-padding-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c5a059; }

/* Selection Color */
::selection { background: rgba(197, 160, 89, 0.3); color: #fff; }

/* =============================================
   PRELOADER
   ============================================= */
.preloader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(197, 160, 89, 0.15);
    border-top-color: #c5a059;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#preloader.loaded {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* =============================================
   HEADER
   ============================================= */
#header {
    background: transparent;
    border-bottom: none;
    outline: none;
}

#header.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hamburger Animation */
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #9ca3af;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
}

.hamburger-line.top { transform: translateY(-7px); }
.hamburger-line.bottom { transform: translateY(7px); }

#btn-menu.active .hamburger-line {
    background: #fff;
}

#btn-menu.active .hamburger-line.top {
    transform: rotate(45deg);
}

#btn-menu.active .hamburger-line.middle {
    opacity: 0;
    transform: scaleX(0);
}

#btn-menu.active .hamburger-line.bottom {
    transform: rotate(-45deg);
}

/* =============================================
   HERO
   ============================================= */
.hero-bg {
    background: linear-gradient(rgba(10, 10, 10, 0.65), rgba(10, 10, 10, 0.90)),
                url('img/logo-inicio/logo-meio.jpg') center/cover no-repeat;
}

@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}

.animate-scroll-dot {
    animation: scroll-dot 1.5s ease-in-out infinite;
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */
.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-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-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-up.revealed,
.reveal-right.revealed,
.reveal-left.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* Staggered delays for siblings */
.reveal-up:nth-child(2), .reveal-right:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3), .reveal-right:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4), .reveal-right:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5), .reveal-right:nth-child(5) { transition-delay: 0.4s; }
.reveal-up:nth-child(6), .reveal-right:nth-child(6) { transition-delay: 0.5s; }

/* =============================================
   NAV LINK HOVER
   ============================================= */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: none;
}

/* =============================================
   WHATSAPP FLOAT
   ============================================= */
@keyframes whatsapp-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#whatsapp-btn.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: whatsapp-appear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* =============================================
   COUNTER ANIMATION
   ============================================= */
.counter {
    font-variant-numeric: tabular-nums;
}

/* =============================================
   GALLERY HOVER
   ============================================= */
.group:hover .gallery-overlay {
    opacity: 1;
}

/* =============================================
   FORM FOCUS
   ============================================= */
input:focus, textarea:focus {
    outline: none;
    border-color: #c5a059 !important;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

/* =============================================
   FLUID TYPE + RESPONSIVE
   ============================================= */
h1 { font-size: clamp(2rem, 5vw + 1rem, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3.5vw + 1rem, 3rem); line-height: 1.15; }
img, video, iframe { max-width: 100%; height: auto; }
section { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }

@media (max-width: 1024px) {
    .hero-bg { background-position: center; }
}

@media (max-width: 768px) {
    .hero-bg {
        background-position: center right;
    }
    #header .h-20 {
        height: 4.25rem;
    }
    #header img {
        height: 54px;
    }
    #inicio {
        min-height: 88svh;
        padding-top: 5.5rem;
        padding-bottom: 4.5rem;
    }
    #inicio h1 {
        font-size: 0.68rem;
        letter-spacing: 0.14em;
        margin-bottom: 1rem;
    }
    #inicio a {
        min-height: 52px;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }
    #inicio .animate-bounce {
        display: none;
    }
    #heroSoundBtn {
        bottom: 5.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    h1 { font-size: clamp(1.7rem, 7vw + 0.6rem, 2.4rem); line-height: 1.12; }
    h2 { font-size: clamp(1.45rem, 5.5vw + 0.6rem, 2rem); line-height: 1.18; }
    section { padding-top: 2.75rem; padding-bottom: 2.75rem; }
    .grid { gap: 1rem; }
    .reveal-up, .reveal-right, .reveal-left { transform: none; }
    .counter { font-size: 1.65rem; }
    .servicos-slide {
        flex: 0 0 84%;
        max-width: 84%;
    }
    .servicos-slide .aspect-\[9\/16\] {
        max-height: 430px;
    }
    .servicos-slide .p-6 {
        padding: 1rem 1.1rem;
    }
    .servicos-slide h3 { font-size: 1.05rem; }
    .servicos-slide p { font-size: 0.83rem; }
    #galleryGrid { gap: 0.65rem; }
    .feedback-slide { padding: 1.4rem; }
    #diferenciais img.h-\[400px\] { height: 300px; }
    #contato .p-8 { padding: 1.4rem; }
    #cookie-banner .container { padding-top: 1rem; padding-bottom: 1rem; }
    #lightbox .h-\[70vh\] { height: 62vh; }
    #whatsapp-btn .w-14 { width: 3.25rem; height: 3.25rem; }
    #preloader .preloader-ring {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 380px) {
    body { font-size: 15px; }
}

/* =============================================
   UTILITY
   ============================================= */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Text selection highlight */
.text-accent::selection {
    background: rgba(197, 160, 89, 0.4);
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #c5a059;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* Servicos video carousel */
.servicos-track,
.feedback-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}
.servicos-track::-webkit-scrollbar,
.feedback-track::-webkit-scrollbar {
    display: none;
}
.feedback-slide {
    flex: 0 0 100%;
    max-width: 100%;
}
@media (min-width: 768px) {
    .feedback-slide {
        flex: 0 0 calc(50% - 12px);
        max-width: calc(50% - 12px);
    }
}
@media (min-width: 1024px) {
    .feedback-slide {
        flex: 0 0 calc(33.333% - 16px);
        max-width: calc(33.333% - 16px);
    }
}
.feedback-track + * + #feedbackDots,
#feedbackDots {
    display: flex;
}
.servicos-slide {
    flex: 0 0 78%;
    max-width: 78%;
}
@media (min-width: 768px) {
    .servicos-slide {
        flex: 0 0 300px;
        max-width: 300px;
    }
}
@media (min-width: 1024px) {
    .servicos-slide {
        flex: 0 0 300px;
        max-width: 300px;
    }
}
.servicos-track video {
    background: #000;
    cursor: pointer;
}
.servicos-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #374151;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    padding: 0;
}
.servicos-dot.active {
    width: 24px;
    background: #c5a059;
}
@media (prefers-reduced-motion: reduce) {
    .servicos-track {
        scroll-behavior: auto;
    }
}

/* Lightbox galeria */
#lightbox {
    display: none;
}
#lightbox.open {
    display: flex;
}
#lightboxImg {
    user-select: none;
}
