html {
    scrollbar-gutter: stable;
}

.hero-a {
    position: relative;
    /*background: var(--bg-default);*/
}

    .hero-a .hero-a__stage {
        position: relative;
        height: calc(100vh - 96px);
        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;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: 70% center;
        }

    .hero-a .hero-a__content {
        --w0: clamp(640px, 49.2vw, 792px);
        position: absolute;
        left: 0;
        bottom: 0;
        z-index: 2;
        width: var(--w0);
        min-height: 488px;
        max-width: 100%;
        background: var(--bg-default);
        padding: 56px 40px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
    }

    .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__title {
        margin: 0;
        width: fit-content;
        max-width: 100%;
        font-family: var(--font-sans);
        font-weight: var(--fw-extralight);
    }

    .hero-a .hero-a__body {
        margin: 0;
        width: 100%;
        font-family: var(--font-sans);
        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-sans);
        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: 40px;
    }

    .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: 101vh;
    }

        .hero-a.hero-a--expand-enabled .hero-a__stage {
            position: sticky;
            top: 0;
        }

    .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);
    }

    .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(60px);
    }
}

/* 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);
    }
}
