html {
    scrollbar-gutter: stable;
}

.hero-a {
    position: relative;
    /*background: var(--bg-default);*/
}

    .hero-a .hero-a__stage {
        position: relative;
        /*height: calc(100vh - 96px);*/
        height: 100vh; 
        min-height: auto;
        overflow: hidden;
    }

    .hero-a.hero-a--expand-enabled .hero-a__stage {
        height: 100vh;
        /*min-height: 640px;*/
    }

    .hero-a .hero-a__media {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    /* FIX: o wrapper (div) precisa de altura própria — antes era a <img> direta, agora é um
       <div> em volta do partial slimsy-picture, que não tem altura intrínseca. */
    .hero-a .hero-a__img {
        /*display: block;
        width: 100%;
        */
        height: 100%;
    }

        .hero-a .hero-a__img picture,
        .hero-a .hero-a__img img,
        .hero-a .hero-a__img video {
            /*display: block;
            object-position: 70% center;*/
            height: 100%;
            max-height: 896px;
            width: 100%;
            object-fit: cover;
        }

    .hero-a .hero-a__content {
        --we: max(calc(calc(100vw - 1920px)/2), 0px);
        --w0: clamp(640px, 49.2vw, calc(792px + var(--we)));
        position: absolute;
        left: 0;
        bottom: 0;
        z-index: 2;
        width: calc(var(--w0) + var(--we));
        min-height: 280px;
        --h0: 280px;
        max-width: 100%;
        background: var(--bg-default);
        padding: 56px 40px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        padding-left: max(var(--we), 40px);
    }

    .hero-a .hero-a__copy {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        width: calc(var(--w0) - 80px);
        max-width: 100%;
    }

    /*.hero-a .hero-a__copy {
        padding: 0 var(--section-horizontal);
    }*/

    .hero-a .hero-a__title {
        margin: 0;
        width: fit-content;
        max-width: 100%;
        font-family: var(--font-tpSans-exLight);
        font-weight: var(--fw-extralight);
    }

    .hero-a .hero-a__body {
        margin: 0;
        width: 100%;
        font-family: var(--font-tpSans-light);
        font-weight: var(--fw-light);
        color: var(--body-default);
    }

    .hero-a .hero-a__scroll {
        position: absolute;
        right: 40px;
        bottom: 40px;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        gap: 16px;
        color: var(--title-inverse);
        text-decoration: none;
    }

    .hero-a .hero-a__scroll-icon {
        display: block;
        flex: none;
        width: 46px;
        height: 46px;
        animation: heroAScrollBob 2.4s var(--ease) infinite;
    }

        .hero-a .hero-a__scroll-icon svg {
            display: block;
            width: 100%;
            height: 100%;
        }

    .hero-a .hero-a__scroll-text {
        font-family: var(--font-tpSans-light);
        font-weight: var(--fw-light);
        white-space: nowrap;
    }

@keyframes heroAScrollBob {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

.hero-a .hero-a__curtain {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-default);
    pointer-events: none;
}

.hero-a .hero-a__reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 614px;
    height: 160px;
    transform: translate(-50%, -50%);
    overflow: hidden;
    will-change: width, height;
}

    .hero-a .hero-a__reveal picture,
    .hero-a .hero-a__reveal img,
    .hero-a .hero-a__reveal video {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 70% center;
    }

.hero-a .hero-a__mask {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 307px);
    z-index: 2;
    width: 614px;
    background: var(--bg-default);
    will-change: left, width;
}

.hero-a .site-header--hero-hidden {
    transform: translateY(-100%);
}

.hero-a .site-header--hero-in {
    transform: translateY(0);
    transition: transform 900ms cubic-bezier(0.76, 0, 0.24, 1);
}

@media (max-width: 1024.98px) {
    .hero-a .hero-a__stage,
    .hero-a.hero-a--expand-enabled .hero-a__stage {
        height: auto;
        min-height: 0;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }

    .hero-a .hero-a__media {
        position: relative;
        inset: auto;
        width: 100%;
        aspect-ratio: 768 / 484;
    }

    .hero-a .hero-a__img picture,
    .hero-a .hero-a__img img,
    .hero-a .hero-a__img video {
        object-position: 78% center;
    }

    .hero-a .hero-a__content {
        position: relative;
        left: auto;
        bottom: auto;
        width: 100%;
        min-height: 0;
        justify-content: flex-start;
        padding: var(--section-vertical) var(--section-horizontal);
    }

    .hero-a .hero-a__copy {
        width: 100%;
    }

    .hero-a .hero-a__scroll {
        display: none;
    }

    .hero-a .hero-a__curtain {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .hero-a .hero-a__media {
        /*aspect-ratio: 360 / 392;*/
    }

    .hero-a .hero-a__img picture,
    .hero-a .hero-a__img img,
    .hero-a .hero-a__img video {
        object-position: 77% center;
    }

    /*.hero-a .hero-a__content {
        padding: 40px 20px;
    }*/
}

    /* ============================================================
   PIN / EXPANSÃO no scroll — só desktop (>1024). Controlado por .is-expanded (JS), que só é
   ligado quando o toggle ActiveExpand estiver true (ver hero.js).
   ============================================================ */
    @media (min-width: 1025px) {

        .hero-a.hero-a--expand-enabled {
            /*margin-top: -96px;*/
        }

        .hero-a.hero-a--expand-enabled {
            /*height: calc(101vh - 96px);
            max-height: 896px;*/
            height: auto;
            max-height: none;
        }

            .hero-a.hero-a--expand-enabled .hero-a__stage {
                position: relative; /* sem sticky: nada para pinar, nada sobrando abaixo */
                height: calc(100vh - 96px);
                max-height: 896px; /* o seu cap, no elemento visível */
            }

        .hero-a .hero-a__content {
            transition: width 850ms cubic-bezier(0.41, 0, 0.08, 1), min-height 850ms cubic-bezier(0.41, 0, 0.08, 1);
            height: 280px;
            --w0: 508px;
            --h0: 280px;
        }

        .hero-a.is-expanded .hero-a__content {
            width: 100%;
            min-height: 100%;
            /*justify-content: flex-end !important;*/ /* trava embaixo, evita "subir" junto com o crescimento do card */
        }

        /* NOVO: pequeno deslocamento extra pra baixo, sincronizado com a mesma transição acima */
        .hero-a .hero-a__copy {
            transition: transform 850ms cubic-bezier(0.41, 0, 0.08, 1);
        }

        .hero-a.is-expanded .hero-a__copy {
            /*transform: translateY(54px);*/
        }
        /* molas: centram a copy na abertura e animam a descida no expand
   (flex-grow é animável; justify-content não é) */
        /*.hero-a .hero-a__content::before,
        .hero-a .hero-a__content::after {
            content: "";
            flex: 1 1 0;
            transition: flex-grow 850ms cubic-bezier(0.41, 0, 0.08, 1);
        }

        .hero-a.is-expanded .hero-a__content::after {
            flex-grow: 0;*/ /* a mola de baixo colapsa → a copy desce até a base */
        /*}*/
        .hero-a.hero-a--expand-enabled .hero-a__copy {
            position: absolute;
            bottom: calc(var(--h0) / 2); /* centro do copy a meia-altura do card de repouso */
            transform: translateY(50%); /* ancora pelo CENTRO — independe da altura do texto */
        }
    }

@media (min-width: 1440px) and (max-width: 1919px) {
    .hero-a .hero-a__content {
        height: 328px;
        --w0: 708px;
        --h0: 328px;
    }
}
@media (min-width: 1920px) {
    .hero-a .hero-a__content {
        height: 488px;
        --w0: 948px;
        --h0: 488px;
    }

    .hero-a .hero-a__copy {
        padding: 0 var(--section-horizontal);
    }
}
    /* reduced-motion no desktop: sem pin/expansão (só relevante se o expand estava ligado) */
    @media (prefers-reduced-motion: reduce) and (min-width: 1025px) {
        .hero-a.hero-a--expand-enabled {
            height: auto;
        }

            .hero-a.hero-a--expand-enabled .hero-a__stage {
                position: relative;
            }
    }

    @media (prefers-reduced-motion: reduce) {
        .hero-a .hero-a__scroll-icon {
            animation: none;
        }
    }

    /* ============================================================
   ABERTURA on-load — pré-estado via CSS (independe do JS ter rodado ainda), só desktop +
   sem reduced-motion. A classe .hero-a--intro-done (aplicada pelo JS, inclusive no caminho
   "toggle desligado") sempre desfaz isso, então esse pré-estado nunca "vaza" quando o toggle
   está false — o JS marca intro-done imediatamente nesse caso.
   ============================================================ */
    @media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
        .js .hero-a .hero-a__curtain {
            display: flex;
        }

        .js .hero-a .hero-a__content,
        .js .hero-a .hero-a__scroll {
            opacity: 0;
        }

        .js .hero-a .hero-a__scroll {
            pointer-events: none;
        }
    }

    .hero-a.hero-a--intro-done .hero-a__curtain {
        display: none;
    }

    .hero-a.hero-a--intro-done .hero-a__content,
    .hero-a.hero-a--intro-done .hero-a__scroll {
        opacity: 1;
        pointer-events: auto;
    }

    .hero-a.hero-a--intro .hero-a__mask {
        animation: heroAMaskShrink 1001ms cubic-bezier(0.54, 0, 0.20, 1) 0ms both, heroAMaskHide 200ms linear 1001ms forwards;
    }

    @keyframes heroAMaskShrink {
        from {
            left: calc(50% - 307px);
            width: 614px;
        }

        to {
            left: calc(50% - 382px);
            width: 51px;
        }
    }

    @keyframes heroAMaskHide {
        to {
            opacity: 0;
        }
    }

    .hero-a.hero-a--intro .hero-a__reveal {
        animation: heroARevealGrow 1335ms cubic-bezier(0.54, 0, 0.20, 1) 1001ms both;
    }

    @keyframes heroARevealGrow {
        from {
            width: 614px;
            height: 160px;
        }

        to {
            width: min(100vw, var(--site-max));
            height: 100vh;
        }
    }

    .hero-a.hero-a--intro .hero-a__curtain {
        animation: heroACurtainFade 450ms ease 2336ms both;
    }

    @keyframes heroACurtainFade {
        from {
            opacity: 1;
        }

        to {
            opacity: 0;
        }
    }

    .hero-a.hero-a--intro .hero-a__scroll {
        animation: heroAScrollIn 1501ms cubic-bezier(0.54, 0, 0.20, 1) 2786ms both;
    }

    @keyframes heroAScrollIn {
        from {
            opacity: 0;
            transform: translateY(112px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hero-a.hero-a--intro .hero-a__content {
        animation: heroACardUp 1335ms cubic-bezier(0.54, 0, 0.20, 1) 3086ms both;
    }

    @keyframes heroACardUp {
        from {
            opacity: 0;
            transform: translateY(576px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
