/*
 * MADINC — slide no estilo GHMC e entrada de texto como o data-anime do GHMC.
 * O texto começa mais abaixo, sobe e aparece. Carrega depois de style.min.css.
 */

.hero[data-hero-slider] .hero-track {
    position: absolute;
    inset: 0 0 -4px 0;
    z-index: -2;
    display: flex;
    width: 100%;
    height: calc(100% + 4px);
    transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero[data-hero-slider] .hero-track > .hero-slide {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    opacity: 1 !important;
    z-index: auto !important;
}

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

.hero-title .md-char {
    display: inline-block;
    opacity: 0;
    animation: md-char-in 1000ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-delay: calc(500ms + (var(--md-i, 0) * 50ms));
}

@keyframes md-char-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes md-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes md-rise-in {
    from { opacity: 0; transform: translate3d(0, 14px, 0); }
    to { opacity: 1; transform: none; }
}

/*
 * Entrada suave, definida já no CSS para o texto não aparecer,
 * desaparecer e voltar. O header e o menu ficam de fora.
 */
@keyframes md-ghmc-in {
    from { opacity: 0; transform: translate3d(0, 30px, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes md-ghmc-contact {
    from { opacity: 0; transform: translate3d(0, 50px, 0); }
    to { opacity: 1; transform: none; }
}

.intro-text > *,
.intro-video-text > *,
.living-spaces-heading > *,
.living-space-card,
.section-heading-left > *,
.service-intro-copy > *,
.madinc-process-step,
.portfolio-item,
.portfolio-detalhe,
.cta-dark > .container > *,
section:not(.page-banner):not(.hero) .container > .row > [class*="col-"] > * {
    animation: md-ghmc-in 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-delay: 100ms;
}

.intro-text > *:nth-child(2),
.intro-video-text > *:nth-child(2),
.living-spaces-heading > *:nth-child(2),
.section-heading-left > *:nth-child(2),
.service-intro-copy > *:nth-child(2),
.cta-dark > .container > *:nth-child(2),
.living-space-card:nth-child(2),
.madinc-process-step:nth-child(2),
.portfolio-item:nth-child(2) { animation-delay: 400ms; }

.intro-text > *:nth-child(3),
.intro-video-text > *:nth-child(3),
.living-spaces-heading > *:nth-child(3),
.section-heading-left > *:nth-child(3),
.service-intro-copy > *:nth-child(3),
.cta-dark > .container > *:nth-child(3),
.living-space-card:nth-child(3),
.madinc-process-step:nth-child(3),
.portfolio-item:nth-child(3) { animation-delay: 700ms; }

.intro-text > *:nth-child(4),
.living-spaces-heading > *:nth-child(4),
.section-heading-left > *:nth-child(4),
.service-intro-copy > *:nth-child(4),
.living-space-card:nth-child(4),
.madinc-process-step:nth-child(4),
.portfolio-item:nth-child(4) { animation-delay: 1000ms; }

.md-contact__intro,
.md-contact__item,
.md-contact__social {
    animation: md-ghmc-contact 1200ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.service-intro-copy > .checklist {
    animation: none;
    opacity: 1;
    transform: none;
}

.service-intro-copy > .section-kicker,
.service-intro-copy > .titulo,
.service-intro-copy > .texto,
.service-intro-copy .checklist > li {
    animation: md-ghmc-contact 1200ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.service-intro-copy > .section-kicker { animation-delay: 50ms; }
.service-intro-copy > .titulo { animation-delay: 200ms; }
.service-intro-copy > .texto:nth-of-type(1) { animation-delay: 350ms; }
.service-intro-copy > .texto:nth-of-type(2) { animation-delay: 500ms; }
.service-intro-copy .checklist > li:nth-child(1) { animation-delay: 650ms; }
.service-intro-copy .checklist > li:nth-child(2) { animation-delay: 800ms; }
.service-intro-copy .checklist > li:nth-child(3) { animation-delay: 950ms; }
.service-intro-copy .checklist > li:nth-child(4) { animation-delay: 1100ms; }
.service-intro-copy .checklist > li:nth-child(5) { animation-delay: 1250ms; }
.service-intro-copy .checklist > li:nth-child(6) { animation-delay: 1400ms; }

.md-contact__intro { animation-delay: 50ms; }
.md-contact__details > .md-contact__item:nth-child(1) { animation-delay: 200ms; }
.md-contact__details > .md-contact__item:nth-child(2) { animation-delay: 350ms; }
.md-contact__details > .md-contact__item:nth-child(3) { animation-delay: 500ms; }
.md-contact__details > .md-contact__item:nth-child(4) { animation-delay: 650ms; }
.md-contact__social { animation-delay: 800ms; }

.page-banner,
.page-banner *,
#mainNav,
#mainNav *,
.hero,
.hero * {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero[data-hero-slider] .hero-track,
    .hero-title .md-char,
    .md-line,
    .hero-count,
    .hero-link,
    .md-ghmc,
    .md-contact__intro,
    .md-contact__item,
    .md-contact__social,
    .intro-text,
    .intro-video-text,
    .living-spaces-heading,
    .living-space-card,
    .section-heading-left,
    .service-intro-copy,
    .madinc-process-step,
    .portfolio-item,
    .portfolio-detalhe,
    .cta-dark > .container,
    .intro-text > *,
    .intro-video-text > *,
    .living-spaces-heading > *,
    .section-heading-left > *,
    .service-intro-copy > *,
    .service-intro-copy .checklist > li,
    .cta-dark > .container > * {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
