/* Video hero — full-bleed background video + readability overlay + content.
 * Mirrors the kabdalis2 .hero proportions/tokens so it reads as part of the
 * theme. The poster (video poster attr) is the fallback before the clip loads
 * and when autoplay is suppressed (handled by the shared video/view.js). */

.b-vhero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: var(--b-vhero-h, 100svh);
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}

/* Media layer (z:0) — the <video> object-fit:covers it; poster fills until load. */
.b-vhero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--surface2, #f5f1ea) center / cover no-repeat;
}
.b-vhero__media .kab-video__el,
.b-vhero .kab-video__el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Readability wash (z:1) — strength via --b-vhero-overlay (0–.85), set inline. */
.b-vhero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(12, 18, 26, calc(var(--b-vhero-overlay, .45) * .55)) 0%,
        rgba(12, 18, 26, calc(var(--b-vhero-overlay, .45) * .35)) 45%,
        rgba(12, 18, 26, var(--b-vhero-overlay, .45)) 100%
    );
}

.b-vhero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--maxw, 1140px);
    margin: 0 auto;
    padding: 0 clamp(18px, 5vw, 40px) clamp(56px, 11vh, 110px);
}
.b-vhero__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 720px;
}
.b-vhero--center .b-vhero__inner { display: flex; justify-content: center; text-align: center; }
.b-vhero--center .b-vhero__content { align-items: center; margin: 0 auto; }
.b-vhero--left .b-vhero__content { align-items: flex-start; text-align: left; }

.b-vhero .eyebrow { color: rgba(255, 255, 255, .92); }
.b-vhero__title {
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 4.2rem);
    line-height: 1.03;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.b-vhero__lead {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    line-height: 1.5;
    max-width: 60ch;
    opacity: .95;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .35);
}
.b-vhero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.b-vhero--center .b-vhero__cta { justify-content: center; }

/* Scroll-down chevron, centred at the foot of the hero. */
.b-vhero__scroll {
    position: absolute;
    z-index: 2;
    bottom: clamp(16px, 3vh, 30px);
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45));
    animation: bvheroBob 2.4s ease-in-out infinite;
}
@keyframes bvheroBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}

@media (max-width: 520px) {
    .b-vhero__cta { width: 100%; }
    .b-vhero__cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* Editor placeholder when no video is set yet. */
.b-vhero__media-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

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