/* ============================================
   Hero Modes — Multi-Layout Hero System
   Modes: cinematic, slideshow, video, split, minimal, kenburns
   ============================================ */

/* Wrapper — handles fade transitions between modes */
.hero-wrapper {
    position: relative;
    transition: opacity 0.4s ease;
    margin: 0 0 var(--spacing-xl, 24px);
}
.hero-wrapper.transitioning {
    opacity: 0;
}

/* ============================================
   MODE 1: CINEMATIC IMAGE
   Full-bleed dramatic photo with gradient overlay
   ============================================ */
/* Cinematic inherits from .hero base class in style.css — only override what's needed */
.hero-cinematic {
    margin: 0; /* wrapper handles margin */
}

/* ============================================
   MODE 2: IMAGE SLIDESHOW
   Multi-slide carousel with crossfade
   ============================================ */
.hero-slideshow {
    position: relative;
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    background: #1a1a2e;
}

.slideshow-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.slideshow-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
}

/* Dark overlay on all slides for text readability */
.hero-slideshow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-slideshow .hero-content-wrapper {
    z-index: 2;
}

/* Navigation dots */
.slideshow-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slideshow-dot.active,
.slideshow-dot:hover {
    background: white;
    border-color: white;
}

/* ============================================
   MODE 3: VIDEO BACKGROUND
   Autoplay loop with overlay + static fallback
   ============================================ */
.hero-video {
    position: relative;
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    background: #1a1a2e;
}

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

.hero-video-fallback {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* When video loads, hide fallback */
.hero-video .hero-video-bg ~ .hero-video-fallback {
    z-index: -1;
}

/* Overlay for text readability */
.hero-video.overlay-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-video.overlay-gradient[data-overlay-dir="tl"]::before {
    background: linear-gradient(135deg, var(--hero-overlay-color, rgba(0,0,0,0.6)), transparent var(--hero-overlay-extent, 70%));
}
.hero-video.overlay-gradient[data-overlay-dir="tr"]::before {
    background: linear-gradient(225deg, var(--hero-overlay-color, rgba(0,0,0,0.6)), transparent var(--hero-overlay-extent, 70%));
}
.hero-video.overlay-gradient[data-overlay-dir="bl"]::before {
    background: linear-gradient(45deg, var(--hero-overlay-color, rgba(0,0,0,0.6)), transparent var(--hero-overlay-extent, 70%));
}
.hero-video.overlay-gradient[data-overlay-dir="br"]::before {
    background: linear-gradient(315deg, var(--hero-overlay-color, rgba(0,0,0,0.6)), transparent var(--hero-overlay-extent, 70%));
}
.hero-video.overlay-gradient[data-overlay-dir="top"]::before {
    background: linear-gradient(to bottom, var(--hero-overlay-color, rgba(0,0,0,0.6)), transparent var(--hero-overlay-extent, 70%));
}
.hero-video.overlay-gradient[data-overlay-dir="bottom"]::before {
    background: linear-gradient(to top, var(--hero-overlay-color, rgba(0,0,0,0.6)), transparent var(--hero-overlay-extent, 70%));
}

.hero-video .hero-content-wrapper {
    z-index: 2;
}

/* ============================================
   MODE 4: SPLIT CONTENT
   Two-column: text + value props / image
   ============================================ */
.hero-split {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    background: #fafafa;
    overflow: hidden;
}

.hero-split-left {
    flex: 1;
    padding: 48px 48px 48px 64px;
    max-width: 55%;
}

.hero-split-left .hero-title {
    font-size: var(--hero-title-size, 36px);
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.hero-split-left .hero-subtitle {
    font-size: var(--hero-subtitle-size, 18px);
    color: #555;
    margin-bottom: 28px;
    line-height: 1.5;
}

.hero-split-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.hero-split-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 16px;
    color: #333;
}

.hero-split-features li svg {
    flex-shrink: 0;
    color: #27ae60;
}

.hero-split-right {
    flex: 1;
    max-width: 45%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.hero-split-right img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ============================================
   MODE 5: MINIMAL TYPOGRAPHY
   Bold oversized text, clean background
   ============================================ */
.hero-minimal {
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.hero-minimal-content {
    text-align: center;
    max-width: 800px;
    padding: 48px 32px;
    z-index: 1;
    animation: heroMinimalFadeIn 1s ease-out;
}

.hero-minimal-title {
    font-size: calc(clamp(40px, 6vw, 72px) * var(--hero-text-scale, 1));
    font-weight: 800;
    line-height: 1.05;
    color: #1a1a2e;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero-minimal-divider {
    width: 60px;
    height: 3px;
    background: var(--color-primary, #3498db);
    margin: 0 auto 20px;
}

.hero-minimal-subtitle {
    font-size: calc(clamp(16px, 2vw, 22px) * var(--hero-text-scale, 1));
    color: #666;
    line-height: 1.5;
    margin-bottom: 36px;
    font-weight: 400;
}

.hero-minimal .btn-dark {
    background: #1a1a2e;
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-minimal .btn-dark:hover {
    background: #2d2d4a;
}

@keyframes heroMinimalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Minimal — Video background layer */
.hero-minimal-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-minimal-fallback {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Hide fallback when video is present and loaded */
.hero-minimal-video ~ .hero-minimal-fallback {
    z-index: -1;
}

/* Dark overlay for text readability over video */
.hero-minimal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
    pointer-events: none;
}

/* Color overrides when video is present */
.hero-minimal.has-video {
    background: #1a1a2e;
}

.hero-minimal.has-video .hero-minimal-content {
    z-index: 2;
}

.hero-minimal.has-video .hero-minimal-title {
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-minimal.has-video .hero-minimal-divider {
    background: white;
}

.hero-minimal.has-video .hero-minimal-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.hero-minimal.has-video .btn-dark {
    background: white;
    color: #1a1a2e;
}

.hero-minimal.has-video .btn-dark:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* ============================================
   MODE 6: KEN BURNS — Animated zoom/pan
   Cinematic slow movement on curated images
   ============================================ */
.hero-kenburns {
    position: relative;
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    background: #1a1a2e;
}

.kenburns-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.kenburns-slide {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.kenburns-slide.active {
    opacity: 1;
}

/* 4 different Ken Burns animation variations */
.kenburns-slide.active.kenburns-fx-1 {
    animation: kenburns1 8s ease-in-out forwards;
}
.kenburns-slide.active.kenburns-fx-2 {
    animation: kenburns2 8s ease-in-out forwards;
}
.kenburns-slide.active.kenburns-fx-3 {
    animation: kenburns3 8s ease-in-out forwards;
}
.kenburns-slide.active.kenburns-fx-4 {
    animation: kenburns4 8s ease-in-out forwards;
}

@keyframes kenburns1 {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.15) translate(-2%, -1%); }
}
@keyframes kenburns2 {
    from { transform: scale(1.1) translate(-2%, 0); }
    to   { transform: scale(1) translate(1%, 1%); }
}
@keyframes kenburns3 {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.12) translate(2%, -2%); }
}
@keyframes kenburns4 {
    from { transform: scale(1.08) translate(1%, 1%); }
    to   { transform: scale(1) translate(-1%, 0); }
}

/* Dark overlay for text readability */
.hero-kenburns::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.15) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-kenburns .hero-content-wrapper {
    z-index: 2;
}

/* ============================================
   SHARED — Content wrapper (used by most modes)
   ============================================ */
.hero-cinematic .hero-content-wrapper,
.hero-slideshow .hero-content-wrapper,
.hero-video .hero-content-wrapper,
.hero-kenburns .hero-content-wrapper {
    position: relative;
    display: inline-block;
    text-align: var(--hero-text-align, left);
    max-width: 600px;
    padding: 20px;
    z-index: 2;
    transform: translate(var(--hero-content-x, 0px), var(--hero-content-y, 0px));
}

.hero-cinematic .hero-title,
.hero-slideshow .hero-title,
.hero-video .hero-title,
.hero-kenburns .hero-title {
    font-size: var(--hero-title-size, 36px);
    font-weight: 700;
    margin-bottom: var(--spacing-md, 16px);
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-cinematic .hero-subtitle,
.hero-slideshow .hero-subtitle,
.hero-video .hero-subtitle,
.hero-kenburns .hero-subtitle {
    font-size: var(--hero-subtitle-size, 18px);
    opacity: 0.95;
    margin-bottom: var(--spacing-xl, 24px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Cinematic overlay — reuse from existing hero system */
.hero-cinematic.overlay-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.hero-cinematic.overlay-gradient[data-overlay-dir="tl"]::before {
    background: linear-gradient(135deg, var(--hero-overlay-color, rgba(0,0,0,0.7)), transparent var(--hero-overlay-extent, 70%));
}
.hero-cinematic.overlay-gradient[data-overlay-dir="tr"]::before {
    background: linear-gradient(225deg, var(--hero-overlay-color, rgba(0,0,0,0.7)), transparent var(--hero-overlay-extent, 70%));
}
.hero-cinematic.overlay-gradient[data-overlay-dir="bl"]::before {
    background: linear-gradient(45deg, var(--hero-overlay-color, rgba(0,0,0,0.7)), transparent var(--hero-overlay-extent, 70%));
}
.hero-cinematic.overlay-gradient[data-overlay-dir="br"]::before {
    background: linear-gradient(315deg, var(--hero-overlay-color, rgba(0,0,0,0.7)), transparent var(--hero-overlay-extent, 70%));
}
.hero-cinematic.overlay-gradient[data-overlay-dir="top"]::before {
    background: linear-gradient(to bottom, var(--hero-overlay-color, rgba(0,0,0,0.7)), transparent var(--hero-overlay-extent, 70%));
}
.hero-cinematic.overlay-gradient[data-overlay-dir="bottom"]::before {
    background: linear-gradient(to top, var(--hero-overlay-color, rgba(0,0,0,0.7)), transparent var(--hero-overlay-extent, 70%));
}
.hero-cinematic.overlay-solid::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: var(--hero-overlay-color, rgba(0,0,0,0.5));
}

/* ============================================
   CONTAINED MODE — Non-fullscreen banner
   Overrides any mode to a contained, shorter hero
   ============================================ */
.hero-wrapper.hero-contained > section,
.hero-wrapper.hero-contained > .hero-split {
    min-height: 450px !important;
    max-width: var(--container-max, 1200px);
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--border-radius, 8px);
    overflow: hidden;
}

/* ============================================
   RESPONSIVE — Mobile adaptations
   ============================================ */
@media (max-width: 768px) {
    /* Ken Burns — still full screen on mobile */
    .hero-kenburns {
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Split — stack vertically, still full screen */
    .hero-split {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .hero-split-left {
        max-width: 100%;
        padding: 32px 24px;
    }
    .hero-split-right {
        max-width: 100%;
        padding: 0 24px 32px;
    }
    .hero-split-right img {
        max-height: 40vh;
    }

    /* Minimal — full screen on mobile */
    .hero-minimal {
        min-height: 100vh;
        min-height: 100dvh;
    }
    .hero-minimal-content {
        padding: 32px 20px;
    }
}

@media (max-width: 480px) {
    .hero-split-features li {
        font-size: 14px;
    }
    .hero-split-left .hero-title {
        font-size: 28px;
    }
}

/* ============================================
   MODE 7: OVERLAP
   Full-screen video/image — header overlays on top
   ============================================ */
.hero-overlap {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    color: white;
    overflow: hidden;
    background: #1a1a2e;
    padding: 0 clamp(24px, 5vw, 64px);
}

.hero-overlap-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlap-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Hide fallback when video loads */
.hero-overlap-video ~ .hero-overlap-bg {
    z-index: -1;
}

/* Fog overlay — direction + intensity set via --fog CSS var from PHP.
   z-index 3: above videos (0/1/2) but below content (4). */
.hero-overlap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--fog, linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 100%));
    z-index: 3;
    pointer-events: none;
}

.hero-overlap .hero-content-wrapper {
    z-index: 4;
    text-align: center;
    max-width: 700px;
    padding: 32px;
    margin: auto;  /* flex auto-margin = bombproof centering */
    transform: none;  /* kill legacy --hero-content-x/y offset from style.css */
}

.hero-overlap .hero-title {
    font-size: calc(clamp(36px, 5.5vw, 64px) * var(--hero-text-scale, 1));
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1px;
    margin-bottom: 14px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-overlap .hero-subtitle {
    font-size: calc(clamp(13px, 1.3vw, 15px) * var(--hero-text-scale, 1));
    opacity: 0.5;
    line-height: 1.5;
    margin-bottom: 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Hide CTA in overlap mode — the configs ARE the interaction */
.hero-overlap .hero-cta {
    display: none;
}

/* Text position — 9-point grid via margin on the wrapper.
   In a flex container, margin:auto eats remaining space = reliable positioning.
   Format: margin: top right bottom left — 'auto' pushes AWAY from that edge.
   e.g. margin: 0 auto auto 0 = top-left (no push from top/left, auto pushes from right/bottom) */
.hero-overlap[data-text-pos="tl"] .hero-content-wrapper { margin: 0 auto auto 0; text-align: left; padding-top: 120px; }
.hero-overlap[data-text-pos="tc"] .hero-content-wrapper { margin: 0 auto auto auto; padding-top: 120px; }
.hero-overlap[data-text-pos="tr"] .hero-content-wrapper { margin: 0 0 auto auto; text-align: right; padding-top: 120px; }
.hero-overlap[data-text-pos="cl"] .hero-content-wrapper { margin: auto auto auto 0; text-align: left; }
.hero-overlap[data-text-pos="cc"] .hero-content-wrapper { margin: auto; }
.hero-overlap[data-text-pos="cr"] .hero-content-wrapper { margin: auto 0 auto auto; text-align: right; }
.hero-overlap[data-text-pos="bl"] .hero-content-wrapper { margin: auto auto 0 0; text-align: left; padding-bottom: 60px; }
.hero-overlap[data-text-pos="bc"] .hero-content-wrapper { margin: auto auto 0 auto; padding-bottom: 60px; }
.hero-overlap[data-text-pos="br"] .hero-content-wrapper { margin: auto 0 0 auto; text-align: right; padding-bottom: 60px; }

/* ============================================
   MODE 8: DIAGONAL
   Clip-path split — color block + image
   ============================================ */
.hero-diagonal {
    position: relative;
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    display: flex;
    overflow: hidden;
    background: #1a1a2e;
}

.hero-diagonal-content {
    position: relative;
    z-index: 2;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 48px 48px 64px;
    color: white;
}

.hero-diagonal-content .hero-title {
    font-size: calc(clamp(32px, 5vw, 48px) * var(--hero-text-scale, 1));
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-diagonal-content .hero-subtitle {
    font-size: 18px;
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 32px;
}

.hero-diagonal-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background-size: cover;
    background-position: center;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ============================================
   MODE 9: MOSAIC
   Grid of workspace images with text overlay
   ============================================ */
.hero-mosaic {
    position: relative;
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #1a1a2e;
}

.mosaic-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
}

.mosaic-tile {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark overlay for text readability */
.hero-mosaic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
    pointer-events: none;
}

.mosaic-content {
    z-index: 2;
    text-align: center;
    color: white;
}

.mosaic-content .hero-title {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.mosaic-content .hero-subtitle {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* ============================================
   MODE 10: GRADIENT
   Bold gradient background, large typography
   ============================================ */
.hero-gradient {
    min-height: calc(100vh - var(--header-h, 0px));
    min-height: calc(100dvh - var(--header-h, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #1a6b7a 75%, #1a9b8a 100%);
    background-size: 200% 200%;
    animation: gradientShift 12s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-gradient-content {
    text-align: center;
    max-width: 900px;
    padding: 48px 32px;
    color: white;
    animation: heroMinimalFadeIn 1s ease-out;
}

.hero-gradient-title {
    font-size: calc(clamp(48px, 8vw, 88px) * var(--hero-text-scale, 1));
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -2px;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-gradient-subtitle {
    font-size: calc(clamp(18px, 2.5vw, 24px) * var(--hero-text-scale, 1));
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-gradient .btn-white {
    background: white;
    color: #1a1a2e;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-gradient .btn-white:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ============================================
   RESPONSIVE — New layouts mobile adaptations
   ============================================ */
@media (max-width: 768px) {
    /* Overlap — still full screen */
    .hero-overlap {
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Diagonal — stack vertically */
    .hero-diagonal {
        flex-direction: column;
    }
    .hero-diagonal-content {
        flex: none;
        padding: 48px 24px;
        min-height: 50vh;
    }
    .hero-diagonal-image {
        position: relative;
        width: 100%;
        height: 50vh;
        clip-path: polygon(0 10%, 100% 0, 100% 100%, 0% 100%);
    }

    /* Mosaic — still full screen */
    .hero-mosaic {
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Gradient — still full screen */
    .hero-gradient {
        min-height: 100vh;
        min-height: 100dvh;
    }
    .hero-gradient-content {
        padding: 32px 20px;
    }
}

/* ============================================
   CONFIG SWITCHER — Desk config buttons on hero video
   Zero-lag: all videos play simultaneously, visibility swap
   ============================================ */

/* All videos stacked at full opacity — z-index controls which is on top.
   Browser keeps ALL playing because they're all technically visible.
   Crossfade: old gets .fading-out (opacity→0), revealing new behind it. */
.hero-overlap .hero-overlap-video {
    z-index: 0;
    pointer-events: none;
}
.hero-overlap .hero-overlap-video.active {
    z-index: 1;
}
.hero-overlap .hero-overlap-video.fading-out {
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Config switcher — positioned near bottom of hero */
.hero-config-switcher {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.hero-cfg-dots {
    display: flex;
    gap: 0;  /* padding on dots provides visual spacing */
    align-items: flex-end;
}
.hero-cfg-dot {
    position: relative;
    width: 120px;
    height: 40px;  /* full clickable area */
    border-radius: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    overflow: visible;
}
/* Track bar — the visible 6px strip at bottom of clickable area */
.hero-cfg-dot::before {
    content: '';
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 10px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s ease;
}
.hero-cfg-dot:hover::before {
    background: rgba(255, 255, 255, 0.3);
}
.hero-cfg-dot.active::before {
    background: rgba(255, 255, 255, 0.2);
}
/* Progress fill bar — overlays the track */
.hero-cfg-fill {
    position: absolute;
    left: 4px;
    bottom: 10px;
    height: 6px;
    width: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    z-index: 1;
}
.hero-cfg-dot.active .hero-cfg-fill {
    width: calc(100% - 8px);  /* minus left+right 4px offsets */
    transition: width var(--autoplay-interval, 2s) linear;
}
.hero-cfg-dot.active.reset .hero-cfg-fill {
    width: 0;
    transition: none;
}
/* Config name label — above the track bar */
.hero-cfg-name {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.4px;
    white-space: nowrap;
    pointer-events: none;
    transition: color 0.3s ease;
}
.hero-cfg-dot:hover .hero-cfg-name,
.hero-cfg-dot.active .hero-cfg-name {
    color: rgba(255, 255, 255, 0.85);
}
/* "View configuration" CTA below dots — glassmorphism pill */
.hero-cfg-cta {
    font-size: 15px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 12px 32px;
    transition: all 0.3s ease;
}
.hero-cfg-cta:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}
@media (max-width: 768px) {
    .hero-config-switcher {
        bottom: 24px;
        gap: 10px;
    }
    .hero-cfg-dots {
        gap: 4px;
    }
    .hero-cfg-dot {
        width: 80px;
    }
    .hero-cfg-name {
        font-size: 9px;
    }
    .hero-cfg-cta {
        font-size: 11px;
    }
}

/* Hero lighting controls — day/night + warmth buttons */
.hero-light-controls {
    position: absolute;
    right: 16px;
    bottom: 14%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0.45;
    transition: opacity 0.3s;
}
.hero-light-controls:hover {
    opacity: 1;
}
.hero-lc-group {
    display: flex;
    gap: 3px;
}
.hero-lc-btn {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 3px 5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-lc-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
}
.hero-lc-btn.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}
.hero-lc-btn svg {
    display: block;
}
@media (max-width: 768px) {
    .hero-light-controls {
        right: 10px;
        bottom: 18%;
        gap: 4px;
    }
    .hero-lc-btn {
        font-size: 8px;
        padding: 2px 4px;
    }
}

/* Batch switcher — dropdown select at bottom of hero */
.hero-batch-switcher {
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    opacity: 0.2;
    transition: opacity 0.3s;
}
.hero-batch-switcher:hover {
    opacity: 0.85;
}
.hero-batch-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 24px 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.6)' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.hero-batch-select:hover,
.hero-batch-select:focus {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}
.hero-batch-select option {
    background: #1a1a1a;
    color: #fff;
}

/* New layouts — contained mode support */
.hero-wrapper.hero-contained > .hero-overlap,
.hero-wrapper.hero-contained > .hero-diagonal,
.hero-wrapper.hero-contained > .hero-mosaic,
.hero-wrapper.hero-contained > .hero-gradient {
    min-height: 450px !important;
    max-width: var(--container-max, 1200px);
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--border-radius, 8px);
    overflow: hidden;
}
