/* components/hero.css — Home hero section, with a looping background video
 * behind the original copy + product-image layout.
 */

.hero {
    position: relative;
    min-height: calc(90vh - var(--nav-height));
    display: flex;
    align-items: center;
    padding-block: var(--space-12);
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: var(--color-dark);
}

.hero-bg-poster,
.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg-video {
    /* Sits above the poster; if the browser can't play it, the poster shows through. */
    z-index: 1;
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* Dark scrim so the original text colors (set for a light page background)
       stay readable over an unpredictable video. */
    background: rgba(20, 23, 26, 0.55);
}

.hero-inner {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-16);
}

.hero-inner .eyebrow {
    color: var(--color-accent);
}

.hero-title {
    color: var(--color-white);
    margin-bottom: var(--space-5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 42ch;
    margin-bottom: var(--space-8);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* .btn-primary and .btn-secondary are borderless-on-fill / dark-on-transparent
   by default, tuned for a light page background — give them a light border
   here so their shape stays visible against the dark video overlay. */
.hero-actions .btn-primary {
    border-color: rgba(255, 255, 255, 0.35);
}

.hero-actions .btn-primary:hover {
    border-color: var(--color-cta-primary-hover-bg);
}

.hero-actions .btn-secondary {
    border-color: var(--color-white);
    color: var(--color-white);
}

.hero-actions .btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-dark);
}

.hero-media-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    /* @keyframes hero-float lives in featured-product.css, its other user. */
    animation: hero-float 8s ease-in-out infinite;
}

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

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding-block: var(--space-16) var(--space-8);
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: var(--space-10);
        text-align: center;
    }

    .hero-subtitle {
        max-width: none;
        margin-inline: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-media {
        order: -1;
        max-width: 420px;
        margin-inline: auto;
    }
}
