/* Protecao da landing page contra deslocamento lateral em navegadores moveis. */
html.landing-root {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    background: #fffaf4;
}

html.landing-root body.landing {
    width: min(1500px, 100%);
    max-width: 1500px;
    min-width: 0;
    overflow-x: clip;
}

.landing > header,
.landing > main,
.landing > footer,
.landing main > section,
.hero-section > *,
.steps-security > *,
.template-groups > *,
.site-footer > * {
    min-width: 0;
    max-width: 100%;
}

.phone-flow {
    width: 100%;
    max-width: 100%;
    overscroll-behavior-inline: contain;
}

@keyframes heroCopyResponsive {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes heroCardResponsive {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 1180px) {
    html.landing-root,
    html.landing-root body.landing {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .hero-copy {
        animation-name: heroCopyResponsive;
    }

    .login-card {
        animation-name: heroCardResponsive;
    }

    .reveal.reveal-left,
    .reveal.reveal-right {
        transform: translate3d(0, 26px, 0);
    }

    .reveal.reveal-left.is-visible,
    .reveal.reveal-right.is-visible {
        transform: none;
    }
}

@media (max-width: 850px) {
    .site-header {
        width: 100%;
        max-width: 100%;
        padding-left: max(clamp(18px, 3.5vw, 28px), env(safe-area-inset-left));
        padding-right: max(clamp(18px, 3.5vw, 28px), env(safe-area-inset-right));
    }

    .site-header .brand-logo-link {
        max-width: calc(100% - 68px);
    }

    .hero-section {
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
        padding-left: max(clamp(16px, 4vw, 22px), env(safe-area-inset-left));
        padding-right: max(clamp(16px, 4vw, 22px), env(safe-area-inset-right));
        overflow: hidden;
    }

    .hero-copy,
    .hero-visual {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .login-card {
        width: min(520px, 100%);
        max-width: 100%;
        min-width: 0;
        justify-self: center;
    }

    .hero-copy h1,
    .hero-copy > p {
        width: min(100%, 570px);
        max-width: 100%;
        text-wrap: balance;
    }

    .hero-buttons,
    .pet-only {
        max-width: 100%;
    }

    .hero-buttons .btn {
        min-width: 0;
        max-width: 100%;
    }

    .hero-visual > img {
        width: 100%;
        max-width: 100%;
    }

    .steps-security,
    .mobile-flow-section,
    .templates-section,
    .campaign-banner,
    .site-footer {
        max-width: 100%;
    }

    .phone-flow {
        overflow-x: auto;
        overflow-y: hidden;
        contain: inline-size;
        -webkit-overflow-scrolling: touch;
    }

    .phone-flow > * {
        flex-shrink: 0;
    }
}

@media (max-width: 560px) {
    .steps-row .step {
        width: 100%;
        min-width: 0;
    }

    .hero-copy h1 {
        font-size: clamp(30px, 9vw, 34px);
        letter-spacing: -1.3px;
    }

    .hero-buttons {
        width: 100%;
    }

    .pet-only {
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .pet-only .scribble {
        margin-left: 0;
        font-size: 29px;
    }

    .templates-section {
        width: calc(100% - 28px);
        margin-left: auto;
        margin-right: auto;
    }

    .title-with-lines {
        gap: 10px;
    }

    .title-with-lines h2 {
        max-width: calc(100% - 40px);
        white-space: normal;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-copy,
    .login-card,
    .reveal.reveal-left,
    .reveal.reveal-right {
        animation: none !important;
        transform: none !important;
    }
}
