/**
 * Hero Block — Static Styles.
 *
 * BEM: boost-hero
 * Layout modifiers: --layout-{centered|left|right|split-left|split-right|full-image}
 * Media modifiers: --media-{background|foreground|none}
 * Alignment: --align-{center|right} (left is default, no modifier)
 *
 * @package Boost Theme Framework
 * @since 3.6.0
 */

/* /blocks/hero/style.css */

/* =============================================================================
   BASE
   ============================================================================= */

.boost-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 90vh; /* overridden dynamically */
    background: var(--boost-bg);
}

/* =============================================================================
   INNER CONTAINER
   ============================================================================= */

.boost-hero__inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

/* =============================================================================
   BACKGROUND MEDIA
   ============================================================================= */

.boost-hero__bg-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.boost-hero__video,
.boost-hero__bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* YouTube/Vimeo iframes as background: scale to cover. */
.boost-hero__video--yt,
.boost-hero__video--vimeo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1.2);
    pointer-events: none;
}

.boost-hero__bg-image {
    position: absolute;
    inset: 0;
}

/**
 * Parallax containment fix.
 * When data-boost-scroll="parallax" is on .boost-hero__bg-image (not the section),
 * the image must be taller than the container so translateY movement doesn't
 * expose the edges. .boost-hero__bg-media has overflow:hidden to clip it.
 *
 * Overshoot math: speed=0.15, hero=100vh≈900px, max offset≈200px → 200px margin.
 * will-change promotes to compositor layer for smooth 60fps.
 */
.boost-hero__bg-image[data-boost-scroll="parallax"],
.boost-hero__bg-image[data-boost-scroll="scale"] {
    top: -200px;
    bottom: -200px;
    left: 0;
    right: 0;
    will-change: transform;
}

.boost-hero__bg-image[data-boost-scroll="parallax"] img,
.boost-hero__bg-image[data-boost-scroll="scale"] img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.boost-hero__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    /* background: rgba(0,0,0,N) set dynamically. */
}

/* =============================================================================
   CONTENT
   ============================================================================= */

.boost-hero__content {
    max-width: 800px;
}

/* Centered layout. */
.boost-hero--layout-centered .boost-hero__content,
.boost-hero--layout-full-image .boost-hero__content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Left layout. */
.boost-hero--layout-left .boost-hero__content {
    max-width: 650px;
    margin-right: auto;
}

/* Right layout. */
.boost-hero--layout-right .boost-hero__content {
    max-width: 650px;
    margin-left: auto;
    text-align: right;
}

/* =============================================================================
   BADGE (spacing within hero content)
   ============================================================================= */

.boost-hero__content > .boost-badge {
    margin-bottom: 1.25rem;
}

/* =============================================================================
   TITLE
   ============================================================================= */

.boost-hero__title {
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
    color: var(--boost-text);
}

/* =============================================================================
   SUBTITLE
   ============================================================================= */

.boost-hero__subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0 0 2rem;
    color: var(--boost-text-muted, rgba(255, 255, 255, 0.7));
    max-width: 600px;
}

.boost-hero--align-center .boost-hero__subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.boost-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.boost-hero--align-center .boost-hero__buttons {
    justify-content: center;
}

.boost-hero--align-right .boost-hero__buttons {
    justify-content: flex-end;
}

/* =============================================================================
   SPLIT LAYOUT
   ============================================================================= */

.boost-hero__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* split-right: content on right, image on left. */
.boost-hero--layout-split-right .boost-hero__content {
    order: 2;
}

.boost-hero--layout-split-right .boost-hero__media {
    order: 1;
}

/* Split content inherits left alignment by default. */
.boost-hero__split .boost-hero__content {
    max-width: none;
}

/* =============================================================================
   MEDIA (foreground images)
   ============================================================================= */

.boost-hero__media img,
.boost-hero__full-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.boost-hero__full-image {
    margin-top: 3rem;
    text-align: center;
}

.boost-hero__full-image img {
    max-width: 1000px;
    display: inline-block;
}

/* =============================================================================
   FOCUS
   ============================================================================= */

.boost-hero .boost-btn:focus-visible {
    outline: 2px solid var(--boost-primary, #2563eb);
    outline-offset: 4px;
    border-radius: 4px;
}

/* =============================================================================
   REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    .boost-hero__video {
        animation: none;
    }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .boost-hero__inner {
        padding: 3rem 1.5rem;
    }

    .boost-hero__split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .boost-hero--layout-split-right .boost-hero__content,
    .boost-hero--layout-split-right .boost-hero__media,
    .boost-hero--layout-split-left .boost-hero__content,
    .boost-hero--layout-split-left .boost-hero__media {
        order: unset;
    }

    .boost-hero__title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    /* Center everything on mobile. */
    .boost-hero--layout-left .boost-hero__content,
    .boost-hero--layout-right .boost-hero__content {
        text-align: center;
        margin: 0 auto;
    }

    .boost-hero--layout-right .boost-hero__buttons,
    .boost-hero--layout-left .boost-hero__buttons {
        justify-content: center;
    }
}
/* =============================================================================
   OVERLAY: Backdrop Mega-Text + Handwritten Annotation
   ============================================================================= */

.boost-overlay-backdrop {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    font-size: clamp(5rem, 15vw, 14rem);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    opacity: .06;
    color: var(--boost-text, #1e293b);
    letter-spacing: -.02em;
    max-width: 100%;
    text-overflow: clip;
}

.boost-overlay-backdrop--bottom-left { bottom: 0; left: 0; }
.boost-overlay-backdrop--bottom-right { bottom: 0; right: 0; text-align: right; }
.boost-overlay-backdrop--top-left { top: 0; left: 0; }
.boost-overlay-backdrop--top-right { top: 0; right: 0; text-align: right; }
.boost-overlay-backdrop--center { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }

[data-scheme="dark"] .boost-overlay-backdrop {
    color: var(--boost-text, #f8fafc);
}

.boost-overlay-annotation {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    font-family: "Caveat", cursive;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--boost-accent, #6366f1);
    opacity: .85;
    line-height: 1.4;
    max-width: 220px;
    transform: rotate(-3deg);
}

.boost-overlay-annotation--left { left: 1rem; top: 50%; transform: translateY(-50%) rotate(-5deg); }
.boost-overlay-annotation--right { right: 1rem; top: 50%; transform: translateY(-50%) rotate(3deg); }
.boost-overlay-annotation--top-right { right: 2rem; top: 1rem; transform: rotate(2deg); }
.boost-overlay-annotation--bottom-left { left: 2rem; bottom: 1.5rem; transform: rotate(-4deg); }

@media (max-width: 768px) {
    .boost-overlay-backdrop {
        font-size: clamp(3rem, 12vw, 8rem);
    }
    .boost-overlay-annotation {
        font-size: 1rem;
        max-width: 160px;
    }
    .boost-overlay-annotation--left,
    .boost-overlay-annotation--right {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        transform: rotate(-2deg);
        margin: 1rem auto;
        text-align: center;
    }
}