/* ==============================
   Animation System
   Scroll-triggered reveals, text wipe,
   3D tilt, tab crossfade
   ============================== */

/* ==============================
   1. Reveal System (IntersectionObserver)
   ============================== */
[data-reveal],
[data-reveal-child] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-reveal].reveal--visible,
[data-reveal-child].reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   2. Text Color Wipe (Intro Heading)
   ============================== */
.problem__heading--wipe {
    background: linear-gradient(90deg,
        var(--color-white) 0%, var(--color-white) 50%,
        rgba(255, 255, 255, 0.2) 50.01%, rgba(255, 255, 255, 0.2) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0ms;
}


/* ==============================
   3. Glossy Highlight (Testimonial Cards)
   ============================== */
@media (hover: hover) {
    [data-glossy] {
        position: relative;
    }

    [data-glossy]::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient(
            circle at var(--glossy-x, 50%) var(--glossy-y, 50%),
            rgba(255, 255, 255, 0.08) 0%,
            transparent 60%
        );
        pointer-events: none;
        opacity: 0;
        transition: opacity 400ms ease;
        z-index: 2;
    }

    [data-glossy]:hover::after {
        opacity: 1;
    }
}

/* ==============================
   4. Tab Content Crossfade
   ============================== */

/* Differentiators panels */
.differentiators__panels {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    min-height: 550px;
}

.differentiators__panel {
    display: none;
    align-items: center;
    justify-content: center;
}

.differentiators__panel--active {
    display: flex;
}

.differentiators__panel img {
    width: 100%;
    height: auto;
    border-radius: 16px;
}

/* Benefits panels */
.benefits__panels {
    position: relative;
}

.benefits__panel {
    display: none;
}

.benefits__panel--active {
    display: block;
}

/* ==============================
   5. Timeline Draw Animation
   ============================== */
.how-it-works__timeline::before {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s;
}

[data-reveal].reveal--visible .how-it-works__timeline::before {
    clip-path: inset(0 0 0% 0);
}

/* ==============================
   6. Reduced Motion
   ============================== */
.no-motion [data-reveal],
.no-motion [data-reveal-child] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
}

.no-motion .problem__heading--wipe {
    background-position: 0% 0 !important;
    transition: none !important;
}

.no-motion .how-it-works__timeline::before {
    clip-path: none !important;
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-reveal-child] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        will-change: auto !important;
    }

    .problem__heading--wipe {
        background-position: 0% 0 !important;
    }

    .how-it-works__timeline::before {
        clip-path: none !important;
        transition: none !important;
    }

    @keyframes marquee {
        0%, 100% { transform: translateX(0); }
    }
}

/* ==============================
   7. Responsive overrides for panels
   ============================== */
@media (max-width: 1024px) {
    .differentiators__panels {
        min-height: 400px;
    }
}

@media (max-width: 767px) {
    .differentiators__panels {
        min-height: 250px;
    }
}
