/* ============================================================
   HERO | css/hero.css
   Fundo: vídeo com fallback para imagem Unsplash
   ============================================================ */

#hero {
    position: relative;
    height: 100dvh;
    min-height: 650px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 8dvh;
    overflow: hidden;
    background-color: var(--bg-main);
    z-index: 2;
}

/* ─── Container do fundo ─── */
.hero-bg-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ─── Mídia do fundo (vídeo e imagem compartilham a mesma base) ─── */
.hero-bg-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease;
}

/* Imagem visível por padrão */
.hero-bg-image {
    opacity: 0.35;
    mix-blend-mode: lighten;
    filter: saturate(0.8) contrast(1.1);
    z-index: 1;
}

/* Vídeo oculto por padrão — JS adiciona a classe .is-active quando pronto */
.hero-bg-video {
    z-index: 2;
    mix-blend-mode: lighten;
    filter: saturate(0.75) contrast(1.1) brightness(0.9);
}

.hero-bg-video.is-active {
    opacity: 0.38;
}

/* Quando vídeo está ativo, escurece a imagem fallback */
.hero-bg-video.is-active ~ .hero-bg-image {
    opacity: 0;
}

/* Overlay gradiente */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
        to top,
        var(--bg-main) 15%,
        rgba(10, 10, 20, 0.4) 60%,
        rgba(123, 97, 255, 0.15) 100%
    );
}

/* ─── Glow ─── */
.hero-glow-1 {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(123, 97, 255, 0.15) 0%, transparent 70%);
    filter: blur(50px);
    z-index: 1;
    pointer-events: none;
}

/* ─── Conteúdo ─── */
.hero-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 850px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Tag superior */
.hero-content .tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--accent);
    border-radius: 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* Tipografia */
.hero-content .tag,
.hero-content .hero-title,
.hero-content .hero-description,
.hero-content .hero-actions {
    opacity: 0; /* Previne piscada antes do GSAP carregar (P2.2) */
}

.hero-title {
    margin-bottom: 30px;
    line-height: 1.05;
    letter-spacing: -2px;
}

.hero-title .title-bold {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 800;
    color: #FFF;
    display: block;
    text-transform: uppercase;
}

.hero-title .title-drama {
    font-family: var(--font-drama);
    font-size: 10rem;
    font-style: italic;
    font-weight: 300;
    color: var(--primary);
    display: block;
    text-transform: none;
    line-height: 0.9;
    margin-top: 10px;
    text-shadow: 0 0 40px var(--primary-glow-strong);
}

.hero-description {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* ─── Responsividade ─── */
@media (max-width: 768px) {
    #hero {
        height: auto;
        min-height: 100dvh;
        padding-top: 150px;
        padding-bottom: 60px;
        align-items: center;
    }

    .hero-wrapper {
        flex-direction: column;
        justify-content: center;
        gap: 40px;
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    .hero-title .title-bold {
        font-size: 4rem;
    }

    .hero-title .title-drama {
        font-size: 6.5rem;
    }

    .hero-description {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .hero-actions {
        justify-content: center;
        width: 100%;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title .title-bold {
        font-size: 3.2rem;
    }

    .hero-title .title-drama {
        font-size: 5rem;
    }
}
