/* ==========================================================
   animations.css — todas as animações e transições da LP
   (base: LP Engage — loader, reveals por palavra/letra, fade,
   clip reveal, tilt, faixas e logos em loop)
   ========================================================== */

:root {
    --ease: cubic-bezier(.22, 1, .36, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* loader */

.loader {
    transition: transform 1s var(--ease) .1s;
}

.loader.is-done {
    transform: translateY(-100%);
}

/* hovers e estados */

.button,
.link,
.nav__links a,
.case h3,
.contato__info a,
.footer__cols a,
.footer__bottom a,
.quotes__tabs button {
    transition: background .35s var(--ease), color .35s var(--ease), border-color .35s, transform .2s;
}

.button img {
    transition: transform .45s var(--ease), filter .35s;
}

.button:hover img {
    transform: translate(2px, -2px) rotate(45deg);
}

.nav {
    transition: border-color .3s;
}

.dot {
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    50% {
        opacity: .25;
    }
}

.burger i {
    transition: transform .4s var(--ease);
}

.drawer {
    transition: clip-path .7s var(--ease), visibility 0s linear .7s;
}

.menu-open .drawer {
    transition: clip-path .7s var(--ease), visibility 0s;
}

/* reveal por palavra */

.w {
    display: inline-block;
    white-space: nowrap;
}

.wi {
    display: inline-block;
    opacity: 0;
    transform: translateY(.45em);
    filter: blur(10px);
    transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
    transition-delay: calc(var(--i, 0) * 45ms + var(--d, 0ms));
}

.in .wi {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

/* fade para cima */

.fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--d, 0ms);
}

.fade.in {
    opacity: 1;
    transform: none;
}

/* imagem revelada de baixo para cima */

.reveal {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.3s var(--ease);
    transition-delay: var(--d, 0ms);
}

.reveal img {
    transform: scale(1.18);
    transition: transform 1.6s var(--ease);
    transition-delay: var(--d, 0ms);
}

.reveal.in {
    clip-path: inset(0 0 0 0);
}

.reveal.in img {
    transform: scale(1);
}

/* letras do wordmark */

.chars {
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    padding-right: .2em;
    padding-bottom: .14em;
    margin-bottom: -.14em;
}

.ch {
    display: inline-block;
    transform: translateY(105%);
    transition: transform 1.1s var(--spring);
    transition-delay: calc(var(--i, 0) * 55ms + var(--d, 0ms));
}

.in .ch {
    transform: none;
}

/* tilt — passe o mouse para alinhar */

.tilt {
    transform: rotate(var(--r, 0deg));
    transition: transform .7s var(--spring);
}

.tilt:hover {
    transform: rotate(0deg) scale(1.02);
}

/* cases */

.case__img img {
    transition: transform 1s var(--ease);
}

.reveal.in.case__img img {
    transition: transform 1s var(--ease);
}

/* pilha arrastável do hero */

.stack img {
    transition: transform .6s var(--spring), opacity .4s;
}

.stack.is-dragging img:first-of-type {
    transition: none;
}

/* faixas */

.ribbon__track {
    animation: marquee 30s linear infinite;
}

.ribbon--dark .ribbon__track {
    animation-direction: reverse;
    animation-duration: 36s;
}

#faixas:hover .ribbon__track {
    animation-play-state: paused;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/* logos */

.logos__track {
    animation: marquee 40s linear infinite;
}

.logos__row--reverse .logos__track {
    animation-direction: reverse;
    animation-duration: 46s;
}

.logos__row:hover .logos__track {
    animation-play-state: paused;
}

.logo-card {
    transition: transform .5s var(--spring), border-color .3s;
}

.logo-card:hover {
    transform: rotate(-3deg) scale(1.04);
    border-color: var(--color-primary);
}

#contact-form .dropdown__caret {
    transition: transform .35s var(--ease);
}

#contact-form .dropdown.is-open .dropdown__caret {
    transform: rotate(180deg);
}

#contact-form .dropdown.is-open .dropdown__list {
    animation: dropdown-in .28s var(--ease);
}

#contact-form .dropdown.is-open .dropdown__list.is-up {
    transform-origin: bottom;
}

@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

/* serviços — accordion */

.service {
    transition: background .5s var(--ease), border-color .5s;
}

.service__title,
.service__title em {
    transition: color .3s;
}

.service__icon {
    transition: transform .5s var(--spring), background .3s, color .3s;
}

.service__body {
    transition: grid-template-rows .6s var(--ease);
}

.service__body ul {
    transition: padding .6s var(--ease);
}

/* equipe — reto no estado normal, torto no hover */

.member__photo.tilt {
    transform: none;
}

.member:hover .member__photo.tilt {
    transform: rotate(var(--r, 0deg));
}

.member__photo img {
    filter: grayscale(1);
    transition: filter .5s;
}

.member:hover .member__photo img {
    filter: grayscale(0);
}

/* depoimentos */

.quote.is-active blockquote {
    animation: quote-in .8s var(--ease) both;
}

.quote.is-active figcaption {
    animation: quote-in .8s var(--ease) .12s both;
}

@keyframes quote-in {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(6px);
    }
}

/* movimento reduzido */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .wi,
    .fade,
    .ch {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .reveal {
        clip-path: none !important;
    }

    .reveal img {
        transform: none !important;
    }

    .loader {
        display: none;
    }
}
