/**
 * Hero Block — Frontend styles (v2).
 *
 * Supports centered + split layouts, trust badges, rating,
 * companion image, highlight text, and entrance animations.
 *
 * Core layout (.vtx-hero base) is in assets/css/blocks.css.
 *
 * @package VTX_Theme
 */

/* ── Inner container (centered vs split) ──────────── */

.vtx-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--vtx-container-max-width, 1200px);
    margin-inline: auto;
    padding: var(--vtx-space-2xl, 4rem) var(--vtx-space-lg, 2rem);
}

.vtx-hero--centered .vtx-hero__inner {
    display: flex;
    justify-content: center;
}

.vtx-hero--centered .vtx-hero__content {
    max-width: 780px;
    text-align: center;
}

.vtx-hero--split .vtx-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--vtx-space-2xl, 4rem);
    align-items: center;
}

.vtx-hero--split .vtx-hero__content {
    text-align: left;
}

/* ── Video background ─────────────────────────────── */

.vtx-hero__bg--video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vtx-hero__bg-fallback {
    display: none;
}

/* ── YouTube background ───────────────────────────── */

.vtx-hero__bg--youtube {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.vtx-hero__bg--youtube iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110vw;
    height: 110vh;
    min-width: 110vw;
    min-height: 110vh;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}

.vtx-hero__bg--youtube .vtx-hero__bg-fallback {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* ── Badge ────────────────────────────────────────── */

.vtx-hero__badge {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.45);
    padding: 0.4rem 1.25rem;
    border-radius: var(--vtx-radius-full, 9999px);
    margin-bottom: var(--vtx-space-md, 1.5rem);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── Heading highlight ────────────────────────────── */

.vtx-hero__highlight {
    color: var(--vtx-color-accent, #FFAC27);
    position: relative;
}

/* ── Companion image (split layout) ───────────────── */

.vtx-hero__companion {
    position: relative;
}

.vtx-hero__companion-frame {
    position: relative;
    border-radius: var(--vtx-radius-xl, 0.5rem);
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.vtx-hero__companion-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.vtx-hero__companion-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ── Rating ───────────────────────────────────────── */

.vtx-hero__rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: var(--vtx-space-lg, 2rem);
    flex-wrap: wrap;
}

.vtx-hero--centered .vtx-hero__rating {
    justify-content: center;
}

.vtx-hero__stars {
    display: flex;
    gap: 0.125rem;
    color: #facc15;
}

.vtx-hero__star {
    width: 1.125rem;
    height: 1.125rem;
}

.vtx-hero__rating-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 1);
}

.vtx-hero__rating-source {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Trust badges ─────────────────────────────────── */

.vtx-hero__trust {
    display: flex;
    gap: var(--vtx-space-lg, 2rem);
    flex-wrap: wrap;
    margin-top: var(--vtx-space-lg, 2rem);
    padding-top: var(--vtx-space-md, 1.5rem);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.vtx-hero--centered .vtx-hero__trust {
    justify-content: center;
}

.vtx-hero__trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 1);
    font-weight: 500;
}

.vtx-hero__trust-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--vtx-color-accent, #FFAC27);
}

/* ── Stats bar ────────────────────────────────────── */

.vtx-hero__stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: var(--vtx-space-xl, 3rem);
    justify-content: center;
    flex-wrap: wrap;
    max-width: var(--vtx-container-max-width, 1200px);
    margin-inline: auto;
    padding: var(--vtx-space-lg, 2rem) var(--vtx-space-lg, 2rem) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.vtx-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.vtx-hero__stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--vtx-color-white, #ffffff);
    font-family: var(--vtx-font-heading);
}

.vtx-hero__stat-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Button icon ──────────────────────────────────── */

.btn__icon {
    margin-left: 0.5rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn:hover .btn__icon {
    transform: translateX(3px);
}

/* ── Outline button variant ───────────────────────── */

.btn--outline {
    background: rgba(255, 255, 255, 0.08);
    color: var(--vtx-color-white, #ffffff);
    border: 2px solid rgba(255, 255, 255, 0.7);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.btn--outline:hover {
    border-color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.12);
}

/* ── Scroll indicator ─────────────────────────────── */

.vtx-hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.vtx-hero__scroll-indicator:hover {
    opacity: 1;
}

.vtx-hero__scroll-dot {
    animation: vtx-scroll-bounce 2s ease-in-out infinite;
}

@keyframes vtx-scroll-bounce {
    0%, 100% { cy: 12; opacity: 1; }
    50% { cy: 32; opacity: 0.3; }
}

/* ── Entrance animations ──────────────────────────── */

.vtx-hero--animated .vtx-hero__anim {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.vtx-hero--animated.vtx-hero--visible .vtx-hero__anim {
    opacity: 1;
    transform: translateY(0);
}

.vtx-hero--animated.vtx-hero--visible .vtx-hero__anim[data-delay="0"] { transition-delay: 0s; }
.vtx-hero--animated.vtx-hero--visible .vtx-hero__anim[data-delay="1"] { transition-delay: 0.1s; }
.vtx-hero--animated.vtx-hero--visible .vtx-hero__anim[data-delay="2"] { transition-delay: 0.2s; }
.vtx-hero--animated.vtx-hero--visible .vtx-hero__anim[data-delay="3"] { transition-delay: 0.35s; }
.vtx-hero--animated.vtx-hero--visible .vtx-hero__anim[data-delay="4"] { transition-delay: 0.45s; }
.vtx-hero--animated.vtx-hero--visible .vtx-hero__anim[data-delay="5"] { transition-delay: 0.55s; }

/* ── Light color scheme ───────────────────────────── */

.vtx-hero--light .vtx-hero__heading {
    color: var(--vtx-color-text-primary, #1A1A1A);
}

.vtx-hero--light .vtx-hero__subheading {
    color: var(--vtx-color-text-secondary, #4b5563);
}

.vtx-hero--light .vtx-hero__badge {
    color: var(--vtx-color-text-primary, #1A1A1A);
    background: rgba(255, 172, 39, 0.12);
    border-color: rgba(255, 172, 39, 0.35);
}

.vtx-hero--light .vtx-hero__rating-text {
    color: var(--vtx-color-text-primary, #1A1A1A);
}

.vtx-hero--light .vtx-hero__rating-source {
    color: var(--vtx-color-text-secondary, #6b7280);
}

.vtx-hero--light .vtx-hero__trust {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.vtx-hero--light .vtx-hero__trust-item {
    color: var(--vtx-color-text-secondary, #4b5563);
    background: #f5f5f5;
    padding: 0.375rem 0.875rem;
    border-radius: var(--vtx-radius-full, 9999px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.vtx-hero--light .vtx-hero__stats {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.vtx-hero--light .vtx-hero__stat-value {
    color: var(--vtx-color-text-primary, #1A1A1A);
}

.vtx-hero--light .vtx-hero__stat-label {
    color: var(--vtx-color-text-secondary, #6b7280);
}

.vtx-hero--light .btn--outline {
    color: var(--vtx-color-text-primary, #1A1A1A);
    border-color: rgba(0, 0, 0, 0.25);
}

.vtx-hero--light .btn--outline:hover {
    border-color: rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.03);
}

.vtx-hero--light .vtx-hero__companion-frame {
    box-shadow:
        0 8px 30px -8px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
}

.vtx-hero--light .vtx-hero__companion-frame::after {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.vtx-hero--light .vtx-hero__scroll-indicator {
    opacity: 0.5;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 960px) {
    .vtx-hero--split .vtx-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .vtx-hero--split .vtx-hero__content {
        text-align: center;
    }

    .vtx-hero--split .vtx-hero__rating,
    .vtx-hero--split .vtx-hero__trust,
    .vtx-hero--split .vtx-hero__actions {
        justify-content: center;
    }

    .vtx-hero__companion {
        order: -1;
        max-width: 480px;
        margin-inline: auto;
    }
}

@media (max-width: 640px) {
    .vtx-hero__inner {
        padding: var(--vtx-space-xl, 3rem) var(--vtx-space-sm, 1rem);
    }

    .vtx-hero__stats {
        gap: var(--vtx-space-lg, 2rem);
    }

    .vtx-hero__stat-value {
        font-size: 1.375rem;
    }

    .vtx-hero__badge {
        font-size: 0.75rem;
        padding: 0.375rem 1rem;
    }

    .vtx-hero__trust {
        gap: var(--vtx-space-sm, 1rem);
    }

    .vtx-hero__scroll-indicator {
        bottom: 1rem;
    }

    .vtx-hero__scroll-indicator svg {
        width: 24px;
        height: 40px;
    }
}
