/*
   Hero - MBNF 2027  secao #inicio / .hero).
 */
.hero-first #render { border-top: 0; }

.hero {
    height: 100svh;
    min-height: 700px;
    max-height: 1080px;
    isolation: isolate;
    position: relative;
    background: #9b7763;
    overflow: hidden;
    display: block;
}

.hero .hero-photo { inset: 0; z-index: -2; position: absolute; }
.hero .hero-photo picture { display: block; width: 100%; height: 100%; }
.hero .hero-photo img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    transform: none;
    display: block;
}

.hero .hero-brands {
    position: absolute;
    left: 6.4%;
    top: 13.3%;
    width: 34%;
    height: 12%;
    gap: 3.6%;
    z-index: 2;
    display: flex;
    align-items: center;
}
.hero .hero-brands img {
    filter: brightness(0) saturate(100%) invert(94%) sepia(10%) saturate(482%) hue-rotate(331deg) brightness(98%) contrast(92%);
    object-fit: contain;
    max-height: 100%;
    height: auto;
}
.hero .hero-brand-main { width: 48%; max-width: 240px; }
.hero .hero-brand-expo { width: 38%; max-width: 195px; }
.hero .hero-brands > span { height: 80%; width: 1px; background: #f0decd55; display: none; }

.hero .hero-agency { position: absolute; right: 6.8%; top: 7%; width: 13%; height: 8%; z-index: 2; }
.hero .hero-agency picture { display: block; width: 100%; height: 100%; }
.hero .hero-agency img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(94%) sepia(10%) saturate(482%) hue-rotate(331deg) brightness(98%) contrast(92%);
}

.hero .hero-message {
    position: absolute;
    left: 13.8%;
    top: 39.4%;
    color: var(--cream);
    z-index: 2;
    margin: 0;
    padding: 0;
    font-size: clamp(72px, 5.85vw, 106px);
    width: max-content;
    max-width: 60%;
}

.hero h1 {
    font-weight: 300;
    line-height: .84;
    color: inherit;
    font-size: 1em;
    margin: 0;
    letter-spacing: -9%;
}
.hero h1 em {
    font-family: var(--font-accent);
    font-weight: 400; /* preview: em { font-weight: 400 } (base) - sem isso herdava 300 do h1 */
    font-size: 1.3em;
    line-height: .89;
    letter-spacing: -.055em;
    display: inline-block;
    margin-left: -5px;
}

.hero .hero-title-shape {
    position: absolute;
    left: -4.25vw;
    top: .1em;
    width: 3.6vw;
    height: 3.6vw;
    max-width: 56px;
    max-height: 56px;
    min-width: 35px;
    min-height: 35px;
    background: #830f36;
    border-radius: 0 0 0 100%;
}

.hero .hero-tagline {
    font-weight: 400;
    color: inherit;
    font-size: .22em;
    margin-top: .95em;
    width: 100%;
    line-height: 1.3;
    letter-spacing: 23%;
}

.hero .hero-inscription {
    position: absolute;
    left: 13.1%;
    top: 71.4%;
    z-index: 3;
    background: #860d36;
    color: #f2dfcf;
    padding: 11px 24px 12px;
    border-radius: 0 20px 0 20px;
    font-weight: 600;
    line-height: 1.2;
    transition: background .2s, transform .2s;
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-size: clamp(17px, 1.65vw, 25px);
    letter-spacing: -3%;
}
.hero .hero-inscription:hover { background: #a41a4a; transform: translateY(-2px); }
.hero .hero-inscription span { font-size: 1.15em; line-height: 1; }

.hero .hero-date { position: absolute; right: 6.2%; bottom: 3.5%; width: 20.5%; height: 29%; z-index: 3; color: var(--cream); }
.hero .hero-date-shape { position: absolute; width: 84%; height: 94%; border-radius: 0 0 0 100%; background-color: var(--wine); overflow: hidden; }
.hero .hero-date-shape.back { left: 17%; right: auto; top: -9%; background-color: #860f36; opacity: .96; }
.hero .hero-date-shape.front { left: 0; right: auto; top: 5%; background-color: var(--wine); }
.hero .hero-date-copy {
    position: absolute;
    inset: 23% 0 0 16%;
    width: 69%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    line-height: 1.08;
}
.hero .hero-date-days,
.hero .hero-date-month,
.hero .hero-date-year {
    font-weight: 600;
    margin: 0;
    font-size: clamp(20px, 1.75vw, 30px);
}
.hero .hero-date-month { margin-top: 3px; }
.hero .hero-date-year { margin-top: 2px; }
.hero .hero-date-place {
    line-height: 1.3;
    margin-top: 10px;
    font-weight: 600;
    white-space: nowrap;
    font-size: clamp(7px, .57vw, 10px);
}
.hero .hero-date-rule { width: 36%; height: 2px; background: currentColor; margin-top: 13px; }

/* Telas muito largas (ultrawide) */
@media (min-aspect-ratio: 2/1) {
    .hero { min-height: 650px; }
    .hero .hero-photo img { object-position: 50% 42%; }
    .hero .hero-brands { top: 10%; }
    .hero .hero-message { top: 35%; }
    .hero .hero-inscription { top: 74%; }
}

/* Tablet (701-1000px) */
@media (min-width: 701px) and (max-width: 1000px) {
    .hero { min-height: 650px; max-height: 800px; }
    .hero .hero-photo img { object-position: 54% 50%; }
    .hero .hero-brands { width: 44%; left: 5%; height: 11%; top: 9%; }
    .hero .hero-message { left: 11%; top: 37%; width: 45%; font-size: 72px; }
    .hero .hero-tagline { font-size: 12px; }
    .hero .hero-title-shape { left: -42px; min-width: 31px; min-height: 31px; }
    .hero .hero-inscription { left: 10.5%; top: 70%; font-size: 17px; }
    .hero .hero-date { width: 25%; right: 5%; height: 26%; }
    .hero .hero-agency { right: 6%; width: 12%; height: 7%; }
}

/* Parallax sutil da foto ao rolar a pagina - ligado quando o JS setar --hero-photo-shift (etapa futura). */
@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
    .hero .hero-photo img { transform: translate3d(0, var(--hero-photo-shift, 0px), 0); will-change: transform; }
}

/* Faixa de largura onde as 3 regras abaixo se sobrepoem - ordem replicada do preview. */
@media (min-width: 1001px) {
    .hero .hero-brands { width: 27.2%; height: 10%; }
}
@media (min-width: 701px) and (max-width: 1000px) {
    .hero .hero-brands { width: 35.2%; height: 9%; }
}
@media (min-width: 701px) {
    .hero .hero-brands { top: 7%; height: 13.5%; align-items: center; }
}

/* Entrada do hero (so textos/elementos - a foto fica estatica, ela e o LCP e uma
   animacao de opacidade nela atrasaria a metrica). CSS puro, sem JS: comeca junto
   com o primeiro paint, sem depender de load/scroll. */
@keyframes hero-enter-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-enter-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: translateX(0); } }
@keyframes hero-enter-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: translateX(0); } }
@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
    /* fill-mode backwards (nao "both"): some durante a animacao, mas nao trava o
       transform depois - .hero-inscription:hover precisa continuar funcionando. */
    .hero .hero-brands { animation: hero-enter-left .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .1s; }
    .hero .hero-agency { animation: hero-enter-right .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .15s; }
    .hero .hero-message { animation: hero-enter-up .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .3s; }
    .hero .hero-date { animation: hero-enter-right .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .4s; }
    .hero .hero-inscription { animation: hero-enter-up .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .5s; }
}

.hero-mobile-art { display: none; }
@media (max-width: 700px) {
    .hero {
        display: block;
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 0;
        aspect-ratio: 1080.89 / 1729.96;
        background: #a97f6d;
        overflow: hidden;
    }
    .hero > .hero-mobile-art {
        display: block;
        width: 100%;
        height: auto;
        position: relative;
        inset: auto;
        z-index: 1;
        aspect-ratio: 1080.89 / 1729.96;
        overflow: hidden;
    }
    .hero > .hero-photo,
    .hero > .hero-brands,
    .hero > .hero-agency,
    .hero > .hero-inscription,
    .hero > .hero-date {
        display: none;
    }
    /* Oculto so visualmente: o h1 continua indexavel no mobile */
    .hero > .hero-message {
        position: absolute;
        width: 1px;
        height: 1px;
        max-width: none;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .hero-mobile-art .mobile-art-cta { cursor: pointer; }
    .hero-mobile-art .mobile-art-cta:focus-visible { outline: 3px solid #efdfd9; outline-offset: 8px; }
}

/* Entrada da arte mobile - mesma ideia do desktop: so nos grupos de logos/data/texto/
   botao da arte SVG, nunca nas camadas de foto de fundo (camada-1/2), que sao o LCP
   do mobile. Os keyframes hero-enter-* sao os mesmos usados no hero desktop acima. */
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
    .hero-mobile-art [data-hero-part="brand-main"] { animation: hero-enter-left .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .1s; }
    .hero-mobile-art [data-hero-part="brand-expo"] { animation: hero-enter-left .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .18s; }
    .hero-mobile-art [data-hero-part="agency"] { animation: hero-enter-right .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .15s; }
    .hero-mobile-art [data-hero-part="headline"] { animation: hero-enter-up .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .3s; }
    .hero-mobile-art [data-hero-part="date"] { animation: hero-enter-right .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .4s; }
    .hero-mobile-art [data-hero-part="cta"] { animation: hero-enter-up .85s cubic-bezier(.22, .75, .25, 1) backwards; animation-delay: .5s; }
}
