/* ====================================
   HERO SECTION - LAYOUT BASE
   ==================================== */

.hero {
    position: relative;
    min-height: 100svh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        min-height: max(100svh, 760px);
    }
}

/* Camada 1: Background da onça */
.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    z-index: 1;
    animation: heroBackgroundFadeIn 1s ease-out forwards;
}

@media (max-width: 768px) {
    .hero__background {
        background-attachment: scroll;
        background-position: center 35%;
    }
}

@media (max-width: 480px) {
    .hero__background {
        background-position: center 30%;
    }
}

/* Handoff background — Fase 01 cinematográfico, crossfade durante o pin */
.hero__handoff-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/phase-01-bg.webp');
    background-size: cover;
    background-position: center 25%;
    background-repeat: no-repeat;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero__handoff-bg {
        display: none;
    }
}

/* ====================================
   ARTWORK ZONE (Composição Artística)
   ==================================== */

.hero__artwork {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    height: clamp(60svh, 66svh, 72svh);
    z-index: 10;
}

@media (max-width: 768px) {
    .hero__artwork {
        height: clamp(50svh, 56svh, 62svh);
    }
}

@media (max-width: 480px) {
    .hero__artwork {
        height: clamp(46svh, 52svh, 58svh);
    }
}

/* Camada 2: Luz de integração do produto */
.hero__product-light {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(215, 168, 74, 0.08) 0%, transparent 70%);
    z-index: 5;
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero__product-light {
        width: 240px;
        height: 240px;
        bottom: 8%;
    }
}

@media (max-width: 480px) {
    .hero__product-light {
        width: 200px;
        height: 200px;
        bottom: 6%;
    }
}

/* ====================================
   HEADER
   ==================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 50px;
    width: 100%;
    background-color: transparent;
    transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal), padding var(--transition-normal);
}

.header--scrolled {
    background-color: rgba(5, 4, 3, 0.85);
    backdrop-filter: blur(8px);
    padding: 20px 50px;
}

/* Botão "Comprar agora" no header (foco de conversão) */
.header__cta {
    font-family: var(--font-sans);
    font-size: clamp(11px, 1vw, 13px);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-black);
    background: linear-gradient(120deg, var(--color-gold) 0%, var(--color-gold-light) 50%, var(--color-gold) 100%);
    padding: 12px 30px;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 4px 18px rgba(215, 168, 74, 0.35);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    animation: heroElementFadeIn 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.header__cta:hover {
    color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(215, 168, 74, 0.5);
}

/* No mobile, o CTA do header cede protagonismo à barra fixa de compra:
   menor e com menos brilho (mas continua visível e clicável). Desktop intacto. */
@media (max-width: 768px) {
    .header__cta {
        padding: 10px 22px;
        font-size: 11px;
        letter-spacing: 0.1em;
        box-shadow: 0 2px 10px rgba(215, 168, 74, 0.22);
    }
}

@media (max-width: 480px) {
    .header__cta {
        padding: 9px 18px;
        font-size: 11px;
        letter-spacing: 0.08em;
    }
}

.header__logo {
    display: flex;
    align-items: center;
    animation: heroElementFadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.header__logo-img {
    height: clamp(28px, 4vw, 44px);
    width: auto;
    max-width: 200px;
}

/* Navegação inline (desktop) — sempre aberta na barra */
.header__nav-desktop {
    display: flex;
    align-items: center;
    animation: heroElementFadeIn 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.header__nav-desktop-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(24px, 3vw, 52px);
    margin: 0;
    padding: 0;
}

.header__nav-desktop-list a {
    font-family: var(--font-sans);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-cream);
    position: relative;
    padding: 4px 0;
    transition: color var(--transition-normal);
}

.header__nav-desktop-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: var(--color-gold);
    transition: width var(--transition-normal);
}

.header__nav-desktop-list a:hover {
    color: var(--color-gold);
}

.header__nav-desktop-list a:hover::after {
    width: 100%;
}

/* No desktop, o hambúrguer some (nav inline assume) */
@media (min-width: 769px) {
    .header__menu {
        display: none;
    }
}

.header__menu {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 101;
    transition: opacity var(--transition-normal);
    animation: heroElementFadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
    padding: 8px;
    cursor: pointer;
}

.header__menu span {
    width: 100%;
    height: 1px;
    background-color: var(--color-gold);
    transition: all var(--transition-normal);
}

.header__menu:hover span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.header__menu:hover span:nth-child(2) {
    opacity: 0;
}

.header__menu:hover span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ====================================
   CAMADA 2: TÍTULO MADEMOISELLE
   ==================================== */

.hero__title {
    position: absolute;
    z-index: 10;
    font-size: clamp(5rem, 10vw, 10rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--color-gold);
    text-transform: uppercase;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: 95vw;
    white-space: nowrap;
    opacity: 0;
    animation: heroTitleIn 1s ease-out 0.3s forwards;

    background: linear-gradient(
        135deg,
        var(--color-gold) 0%,
        var(--color-gold-light) 50%,
        var(--color-gold) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 1024px) {
    .hero__title {
        font-size: clamp(3.5rem, 8vw, 6rem);
    }
}

@media (max-width: 768px) {
    .hero__title {
        font-size: clamp(3rem, 14vw, 5rem);
        white-space: nowrap;
        line-height: 1.1;
        letter-spacing: 0.05em;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: clamp(2.5rem, 12vw, 4rem);
        letter-spacing: 0.03em;
    }
}

/* ====================================
   CAMADA 3: PRODUTO
   ==================================== */

.hero__product-container {
    position: absolute;
    z-index: 15;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    opacity: 0;
    animation: heroProductIn 1s ease-out 0.5s forwards;
}

.hero__product {
    height: clamp(320px, 56svh, 650px);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
}

@media (max-width: 768px) {
    .hero__product {
        height: clamp(280px, 38svh, 380px);
    }
}

@media (max-width: 480px) {
    .hero__product {
        height: clamp(240px, 34svh, 340px);
    }
}

/* ====================================
   TEXTOS LATERAIS (DESKTOP)
   ==================================== */

.hero__side-texts {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(40px, 5vw, 90px);
    z-index: 12;
    pointer-events: none;
}

.hero__text-left,
.hero__text-right {
    font-family: var(--font-sans);
    font-size: clamp(12px, 1.2vw, 16px);
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-cream);
    opacity: 0;
    animation: heroElementFadeIn 0.8s ease-out 0.6s forwards;
}

/* O título MADEMOISELLE só deixa folga para os textos laterais quando sua
   fonte atinge o teto (telas grandes, ~1700px+). Abaixo disso eles colidem
   com o título — então escondemos os laterais e mostramos a versão compacta
   (BODY SPLASH · CHIPRE FLORAL) abaixo do slogan. */
@media (max-width: 1700px) {
    .hero__side-texts {
        display: none;
    }
}

/* ====================================
   TEXTOS LATERAIS (MOBILE)
   ==================================== */

.hero__meta-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    animation: heroElementFadeIn 0.8s ease-out 0.6s forwards;
}

.hero__meta-text {
    font-family: var(--font-sans);
    font-size: clamp(11px, 2.8vw, 13px);
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-cream);
}

.hero__meta-separator {
    color: var(--color-cream);
    opacity: 0.6;
}

@media (max-width: 1700px) {
    .hero__meta-mobile {
        display: flex;
    }
}

/* ====================================
   CAMADA 4: CONTEÚDO INFERIOR (fluxo normal)
   ==================================== */

.hero__bottom-content {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    margin-top: clamp(32px, 4svh, 48px);
    width: 100%;
    padding: 0 20px;
    padding-bottom: clamp(20px, 3svh, 40px);
}

.hero__slogan {
    text-align: center;
    font-family: var(--font-sans);
    font-size: clamp(12px, 1vw, 16px);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-cream);
    opacity: 0;
    animation: heroElementFadeIn 0.8s ease-out 0.7s forwards;
    max-width: 85%;
    line-height: 1.6;
}

.hero__cta {
    z-index: 20;
    opacity: 0;
    animation: heroElementFadeIn 0.8s ease-out 0.8s forwards,
               ctaShimmer 5.5s ease-in-out 1.4s infinite;

    padding: 17px 46px;
    border: 1px solid var(--color-gold-light);
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-black);
    background: linear-gradient(120deg,
        var(--color-gold) 0%,
        var(--color-gold-light) 42%,
        #fff4d8 50%,
        var(--color-gold-light) 58%,
        var(--color-gold) 100%);
    background-size: 220% 100%;
    background-position: 0% 50%;
    display: inline-block;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    min-height: auto;
    white-space: nowrap;
    box-shadow: 0 6px 22px rgba(215, 168, 74, 0.4), 0 0 34px rgba(215, 168, 74, 0.28);
}

.hero__cta:hover {
    color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 10px 42px rgba(215, 168, 74, 0.6), 0 0 64px rgba(215, 168, 74, 0.42);
}

/* Brilho suave que desliza no botão (efeito de luz) */
@keyframes ctaShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero__cta:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* Indicador de scroll — botão (reset visual) com entrada por CSS.
   O fade durante o scroll é aplicado no .hero__scroll-inner (via JS), para não
   conflitar com esta animação de entrada. */
.hero__scroll-indicator {
    z-index: 20;
    color: var(--color-gold);
    opacity: 0;
    animation: heroElementFadeIn 0.8s ease-out 0.9s forwards;
    cursor: pointer;
    /* reset de <button> */
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    padding: 8px;
    line-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__scroll-indicator:focus-visible {
    outline: 1px solid var(--color-gold);
    outline-offset: 5px;
    border-radius: 4px;
}

/* Camada que recebe o fade controlado pelo scroll (JS escreve só opacity). */
.hero__scroll-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    will-change: opacity;
}

/* Microcopy editorial — apenas mobile. */
.hero__scroll-hint {
    display: none;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--color-cream);
    opacity: 0.55;
}

/* Chevron fino, com "respiração" lenta e cinematográfica (não é bounce). */
.hero__scroll-chevron {
    width: 26px;
    height: 16px;
    animation: heroScrollBreath 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .hero__bottom-content {
        gap: 18px;
        margin-top: clamp(20px, 3svh, 32px);
        padding: 0 16px;
        /* safe-area: nunca deixa o indicador atrás da barra inferior do navegador/iPhone */
        padding-bottom: calc(clamp(16px, 2svh, 32px) + env(safe-area-inset-bottom));
    }

    .hero__slogan {
        font-size: clamp(12px, 3vw, 14px);
        letter-spacing: 0.18em;
        max-width: 320px;
        line-height: 1.5;
        white-space: normal;
    }

    .hero__cta {
        padding: 15px 32px;
        font-size: clamp(12px, 2.2vw, 13px);
        width: min(82vw, 320px);
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero__scroll-indicator {
        margin-top: 4px;
    }

    /* No mobile, a microcopy editorial aparece acima do chevron. */
    .hero__scroll-hint {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero__bottom-content {
        gap: 16px;
        margin-top: clamp(16px, 2.5svh, 24px);
        padding: 0 14px;
        padding-bottom: calc(clamp(12px, 1.5svh, 20px) + env(safe-area-inset-bottom));
    }

    .hero__slogan {
        font-size: clamp(12px, 3vw, 14px);
        letter-spacing: 0.18em;
        max-width: 310px;
        line-height: 1.5;
    }

    .hero__cta {
        padding: 14px 28px;
        font-size: clamp(11px, 2.5vw, 12px);
        width: min(80vw, 310px);
        min-height: 46px;
    }
}

/* ====================================
   ANIMAÇÕES
   ==================================== */

@keyframes heroBackgroundFadeIn {
    from {
        opacity: 0.8;
    }
    to {
        opacity: 1;
    }
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes heroProductIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes heroElementFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Respiração lenta: desce ~7px e a opacidade cai levemente, retornando suave.
   Sensação de flutuação/descoberta — não de bounce chamando atenção. */
@keyframes heroScrollBreath {
    0%   { transform: translateY(0);   opacity: 0.6; }
    50%  { transform: translateY(7px); opacity: 0.38; }
    100% { transform: translateY(0);   opacity: 0.6; }
}

/* Acessibilidade: sem movimento infinito; indicador estático e visível.
   O clique/toque continua funcionando. */
@media (prefers-reduced-motion: reduce) {
    .hero__scroll-indicator {
        animation: none;
        opacity: 1;
    }
    .hero__scroll-chevron {
        animation: none;
        opacity: 0.6;
    }
}

/* ====================================
   RESPONSIVIDADE - HEADER MOBILE
   ==================================== */

/* ====================================
   MENU OVERLAY MOBILE
   ==================================== */

.header__nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background-color: rgba(5, 4, 3, 0.95);
    backdrop-filter: blur(12px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%);
    transition: transform 0.4s ease-out;
    pointer-events: none;
}

.header__nav-overlay.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.header__nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 40px;
    text-align: center;
}

.header__nav-list a {
    font-family: var(--font-serif);
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gold);
    transition: color var(--transition-normal);
}

.header__nav-list a:hover {
    color: var(--color-gold-light);
}

@media (max-width: 768px) {
    .header {
        padding: 20px 24px;
    }

    .header--scrolled {
        padding: 16px 24px;
    }

    .header__nav-overlay {
        display: flex;
    }

    /* No mobile, o nav inline some (hambúrguer + overlay assumem) */
    .header__nav-desktop {
        display: none;
    }

    .header__logo-img {
        height: clamp(24px, 3.5vw, 36px);
    }

    .header__menu {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 16px 18px;
    }

    .header--scrolled {
        padding: 12px 18px;
    }

    .header__logo-img {
        height: clamp(22px, 3vw, 32px);
    }

    .header__nav-list {
        gap: 32px;
    }

    .header__nav-list a {
        font-size: clamp(20px, 5.5vw, 28px);
    }
}

/* ====================================
   SUPORTE PARA NAVEGADORES ANTIGOS
   ==================================== */

@supports not (height: 100svh) {
    .hero {
        min-height: 100vh;
    }
}
