/* =============================================
   MINDCORP WEB — Advanced Scroll Effects (GSAP)
   Replicating Agero-style 3D perspective & parallax
   ============================================= */

/* === Text Reveal System === */
.word-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.08em;  /* prevents descender clipping */
}

.word-reveal {
    display: inline-block;
    will-change: transform, opacity;
}

.char-reveal {
    display: inline-block;
    will-change: transform, opacity;
}

.line-reveal-mask {
    display: block;
    overflow: hidden;
}

.line-reveal-inner {
    display: block;
    will-change: transform, opacity;
}

/* Ensure text-accent spans inside word-mask still show correctly */
.word-mask .text-accent {
    color: var(--accent);
}

/* === Perspective Wrapper for 3D Showcase === */
.showcase-perspective {
    perspective: 1200px;
    perspective-origin: 50% 50%;
    overflow: visible;
}

.showcase-banner {
    overflow: visible;
}

/* === Hero Split Text Animation === */
.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotateX(-40deg);
    transform-origin: bottom center;
}

/* === Section Titles Scroll Scale === */
.section-title-animate {
    will-change: transform, opacity;
}

/* === Stat Card 3D Tilt on Scroll === */
.stat-card {
    will-change: transform;
    transform-style: preserve-3d;
}

/* === Diferencial Cards Stagger with Scale === */
.diferencial-card {
    will-change: transform, opacity;
    transform-origin: center bottom;
}

/* === Processo Steps Horizontal Slide === */
.processo-step {
    will-change: transform, opacity;
}

/* === Pricing Cards 3D Flip Entry === */
.pricing-card {
    will-change: transform, opacity;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* === Parallax Marquee Speed Control via GSAP === */
.marquee-track {
    will-change: transform;
}

/* === Section Divider Lines (animate width) === */
.section-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        transparent
    );
    width: 0;
    max-width: 200px;
    margin: 0 auto 40px;
    will-change: width;
}

/* === CTA Section Zoom Effect === */
.cta-section {
    will-change: transform;
}

/* === Smooth Scale Transforms for Cards === */
.showcase-card {
    will-change: transform, opacity;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* === Magnetic Button Effect === */
.btn-primary,
.btn-secondary,
.nav-cta {
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Text Reveal Line Animation === */
.text-reveal-line {
    overflow: hidden;
    display: block;
}

.text-reveal-line > span {
    display: block;
    transform: translateY(105%);
    will-change: transform;
}

/* === Smooth Parallax Layers === */
[data-speed] {
    will-change: transform;
}

/* === Image Scale Container === */
.img-scale-wrapper {
    overflow: hidden;
    border-radius: inherit;
}

.img-scale-wrapper img {
    will-change: transform;
    transition: none; /* GSAP handles this */
}

/* === FAQ Items Stagger === */
.faq-item {
    will-change: transform, opacity;
}

/* === Depoimento Parallax Depth === */
.depoimentos-carousel {
    will-change: transform;
    transform-style: preserve-3d;
}

/* === Horizontal Scroll Text Effect === */
.scroll-text-horizontal {
    white-space: nowrap;
    will-change: transform;
    font-size: clamp(60px, 10vw, 140px);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
    user-select: none;
    line-height: 1;
    overflow: hidden;
}

/* === Overlay Gradient for Dark/Light Transitions === */
.section-transition-gradient {
    position: relative;
}

.section-transition-gradient::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
    pointer-events: none;
    z-index: 1;
}

/* === Navbar Progress Bar === */
.nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #ff6a33);
    width: 0%;
    z-index: 1002;
    will-change: width;
    transition: none;
}

/* === Custom Cursor Follow (optional premium touch) === */
.cursor-follower {
    position: fixed;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
    mix-blend-mode: difference;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.cursor-follower.visible {
    opacity: 1;
}

.cursor-follower.hover-grow {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
}

/* === Responsive: Reduce animations on mobile === */
@media (max-width: 768px) {
    .cursor-follower {
        display: none !important;
    }

    .showcase-perspective {
        perspective: none;
    }

    .scroll-text-horizontal {
        display: none;
    }
}

/* === 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;
    }
    
    .cursor-follower {
        display: none !important;
    }
}
