/* ==========================================================================
   ANIMAÇÕES DE SCROLL E EFEITOS ESPECIAIS
   ========================================================================== */

/* 1. Efeito "Card Sobreposto" (Scroll Sticky) */
.section-card {
    position: sticky;
    top: 0;
    min-height: 100vh;
    width: 100%;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    background-color: var(--c-black); /* Base opaca para impedir que a de trás apareça */
    transform-origin: center top;
    transition: transform 0.5s var(--ease-out);
}

/* Adicionando z-index crescente para empilhamento */
.hero-section { z-index: 1; }
.about-section { z-index: 2; }
.services-section { z-index: 3; }
.portfolio-section { z-index: 4; }
.why-section { z-index: 5; }
.methodology-section { z-index: 6; }
.clients-section { z-index: 7; height: auto; min-height: 50vh; }
.testimonials-section { z-index: 8; }
.contact-section { z-index: 9; }

/* Permite scroll natural dentro da seção se conteúdo for maior que a tela */
.section-card > .container {
    padding-top: max(100px, 10vh);
    padding-bottom: max(100px, 10vh);
}

/* 2. Classes de Reveal (Intersection Observer) */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    will-change: opacity, transform;
}

.reveal-fade {
    opacity: 0;
    transition: opacity 1s var(--ease-out);
}

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

/* Delays para cascade de animações */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* 3. Efeitos Específicos de Seção */

/* Orbes e Fundos */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    animation: float 10s ease-in-out infinite alternate;
}

.hero-orb--1 {
    width: 400px; height: 400px;
    background: rgba(var(--c-olive-rgb), 0.5);
    top: -100px; left: -100px;
}

.hero-orb--2 {
    width: 300px; height: 300px;
    background: rgba(var(--c-blue-rgb), 0.3);
    bottom: -50px; right: 10%;
    animation-delay: -5s;
}

.hero-orb--3 {
    width: 200px; height: 200px;
    background: rgba(var(--c-coral-rgb), 0.2);
    top: 30%; left: 50%;
    animation-delay: -2s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-dot {
    width: 20px; height: 30px;
    border: 2px solid #fff;
    border-radius: 15px;
    position: relative;
}

.scroll-dot::before {
    content: '';
    position: absolute;
    top: 5px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    background: var(--c-lemon);
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Carrossel de Clientes (Infinito) */
.clients-carousel-wrapper {
    overflow: hidden;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.clients-track {
    display: flex;
    width: max-content;
    animation: slideTrack 40s linear infinite;
}

.client-logo {
    padding: 0 2rem;
    opacity: 0.6;
    transition: var(--trans-fast);
}

.client-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

@keyframes slideTrack {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Cursor Customizado */
@media (pointer: fine) {
    body { cursor: none; }
    a, button, input, select, textarea { cursor: none; }
    
    #custom-cursor {
        position: fixed;
        top: 0; left: 0;
        pointer-events: none;
        z-index: 9999;
    }
    
    .cursor-dot {
        width: 8px; height: 8px;
        background: var(--c-lemon);
        border-radius: 50%;
        position: absolute;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s;
    }
    
    .cursor-ring {
        width: 40px; height: 40px;
        border: 1px solid rgba(var(--c-lemon-rgb), 0.5);
        border-radius: 50%;
        position: absolute;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, border-color 0.2s;
    }
    
    body.cursor-hover .cursor-dot {
        width: 12px; height: 12px;
        background: var(--c-coral);
    }
    
    body.cursor-hover .cursor-ring {
        width: 60px; height: 60px;
        border-color: var(--c-coral);
        background: rgba(var(--c-coral-rgb), 0.1);
    }
}

/* Loader */
#bd-loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--c-black);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-logo { margin-bottom: 2rem; animation: pulse 2s infinite; }
.loader-bar { width: 200px; height: 2px; background: rgba(255,255,255,0.1); overflow: hidden; margin-bottom: 1rem; }
.loader-progress { width: 0%; height: 100%; background: var(--c-lemon); transition: width 0.2s; }
.loader-text { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Aplicando Gradientes da Paleta no Fundo de cada Seção como background-image (para manter a base preta opaca) */
.hero-section { background-image: radial-gradient(circle at top right, rgba(var(--c-olive-rgb), 0.15), transparent 60%); }
.about-section { background-image: radial-gradient(circle at bottom left, rgba(var(--c-coral-rgb), 0.1), transparent 70%); }
.services-section { background-image: radial-gradient(circle at center, rgba(var(--c-blue-rgb), 0.1), transparent 80%); }
.portfolio-section { background-image: radial-gradient(circle at top left, rgba(var(--c-lemon-rgb), 0.05), transparent 80%); }
.why-section { background-image: radial-gradient(circle at right, rgba(var(--c-olive-rgb), 0.1), transparent 70%); }
.methodology-section { background-image: radial-gradient(circle at bottom right, rgba(var(--c-coral-rgb), 0.15), transparent 50%); }
.clients-section { background-image: radial-gradient(circle at center, rgba(var(--c-blue-rgb), 0.05), transparent 100%); }
.testimonials-section { background-image: radial-gradient(circle at top, rgba(var(--c-lemon-rgb), 0.1), transparent 60%); }
.contact-section { background-image: var(--grad-radial); }
