/* Hero Section Styles */
.hero-section {
    position: relative;
    width: 100%;
    /* Removed min-height: 100vh - let content determine height */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    /* Header offset - keep minimal for visual flow */
    padding-bottom: 40px;
    /* Standardized 40px for 80px total between sections */
}

/* Container */
.hero-container {
    width: 100%;
    max-width: 1440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem;
}

/* VEXML Logo Component (Reusable) */
.vexml-logo-animated {
    position: relative;
    width: 130px;
    height: auto;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
}

.vexml-logo-animated .logo-base {
    width: 100%;
    height: auto;
    display: block;
    z-index: 2;
}

.vexml-logo-animated .logo-trace-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/* Specific Hero Logo Tweaks */
.hero-logo-container {
    width: 130px;
    margin-bottom: 3rem;
}

/* Theater Mode Button within Slide */
.slide-theater-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.carousel-slide.active:hover .slide-theater-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.slide-theater-btn:hover {
    background: rgba(239, 64, 92, 0.8);
    border-color: #FD724C;
    box-shadow: 0 0 20px rgba(239, 64, 92, 0.6);
    transform: scale(1.1);
}

.slide-theater-btn svg {
    width: 22px;
    height: 22px;
    fill: #ffffff;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slide-theater-btn:hover svg {
    transform: scale(1.15);
}

/* Modal Theater Viewer */
.theater-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.theater-modal.active {
    display: flex;
    opacity: 1;
}

.theater-modal-content {
    position: relative;
    width: 98vw;
    height: auto;
    max-height: 95vh;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    overflow: hidden;
    transform: scale(0.98);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theater-modal.active .theater-modal-content {
    transform: scale(1);
}

.theater-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.theater-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    font-family: 'Sui Generis', sans-serif;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease, color 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.theater-close:hover {
    color: #FD724C;
    transform: rotate(90deg);
}

/* Multi-Piece Vegas Chase Styles */
.vegas-snake {
    stroke-dashoffset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(2px) drop-shadow(0 0 10px #FD724C);
}

/* Vegas Dash Pattern: multiple chasing light segments */
.snake-top {
    stroke-dasharray: 20 200 40 150 30 250;
}

.snake-bottom-left {
    stroke-dasharray: 15 120 25 150;
}

.snake-bottom-right {
    stroke-dasharray: 15 120 25 150;
}

.vexml-logo-animated:hover .vegas-snake {
    opacity: 1;
}

.vexml-logo-animated:hover .snake-top {
    animation: vegas-chase 10s linear infinite;
}

.vexml-logo-animated:hover .snake-bottom-left {
    animation: vegas-chase 8s linear infinite reverse;
}

.vexml-logo-animated:hover .snake-bottom-right {
    animation: vegas-chase 8s linear infinite reverse;
}

@keyframes vegas-chase {
    from {
        stroke-dashoffset: 2500;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Static Solid Nodes (Middle Layer) */
.static-nodes circle {
    opacity: 0.25;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.vexml-logo-animated:hover .static-nodes circle {
    opacity: 0.6;
}

/* Node Flash Sequential "Random" Chase (Top Layer) */
.node-flash {
    opacity: 0;
    pointer-events: none;
}

.vexml-logo-animated:hover .node-flash {
    animation-name: random-flash;
    animation-duration: 4s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* High-Specificity Randomized Delays (Individually Staggered) */
.node-flash.f-1 {
    animation-delay: -0.15s;
}

.node-flash.f-2 {
    animation-delay: -6.45s;
}

.node-flash.f-3 {
    animation-delay: -0.05s;
}

.node-flash.f-4 {
    animation-delay: -2.28s;
}

.node-flash.f-5 {
    animation-delay: -8.52s;
}

.node-flash.f-6 {
    animation-delay: -0.18s;
}

.node-flash.f-7 {
    animation-delay: -4.33s;
}

.node-flash.f-8 {
    animation-delay: -0.08s;
}

.node-flash.f-9 {
    animation-delay: -7.41s;
}

.node-flash.f-10 {
    animation-delay: -0.15s;
}

.node-flash.f-11 {
    animation-delay: -9.58s;
}

.node-flash.f-12 {
    animation-delay: -0.22s;
}

.node-flash.f-13 {
    animation-delay: -2.37s;
}

.node-flash.f-14 {
    animation-delay: -7.02s;
}

.node-flash.f-15 {
    animation-delay: -0.49s;
}

.node-flash.f-16 {
    animation-delay: -4.11s;
}

.node-flash.f-17 {
    animation-delay: -1.81s;
}

.node-flash.f-18 {
    animation-delay: -6.94s;
}

.node-flash.f-19 {
    animation-delay: -0.69s;
}

.node-flash.f-20 {
    animation-delay: -3.73s;
}

.node-flash.f-21 {
    animation-delay: -8.96s;
}

.node-flash.f-22 {
    animation-delay: -0.89s;
}

@keyframes random-flash {

    0%,
    1% {
        opacity: 0;
    }

    3% {
        opacity: 1;
        filter: brightness(4) drop-shadow(0 0 15px white);
    }

    30%,
    100% {
        opacity: 0;
    }
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(253, 114, 76, 0.15) 0%, rgba(253, 114, 76, 0) 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 1;
}

/* Content Wrapper (Stacked Layout) */
.hero-content-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    /* Wider for side images */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* No gap - text overlays carousel */
}

/* 3D Carousel Styles */
.hero-carousel {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: auto;
    perspective: 1000px;
    overflow: visible;
    z-index: 1;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 80px;
}

.carousel-track {
    position: relative;
    width: 100%;
    aspect-ratio: 100 / 31;
    /* Matches 55% width 16:9 images */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Align to top */
}

.carousel-slide {
    position: absolute;
    width: 55%;
    /* Let height be determined by children or aspect-ratio */
    transition: all 0.5s ease-in-out;
    opacity: 0;
    z-index: 0;
    z-index: 0;
    top: 50%;
    /* Start from vertical center */
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
}

.carousel-slide video,
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Active Slide (Center) */
.carousel-slide.active {
    opacity: 1;
    z-index: 3;
    opacity: 1;
    z-index: 3;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6));
}

/* Previous Slide (Left) */
.carousel-slide.prev {
    opacity: 0.35;
    z-index: 1;
    opacity: 0.35;
    z-index: 1;
    left: 15%;
    transform: translate(-50%, -50%) scale(0.75);
    display: block;
    filter: brightness(0.7);
}

/* Next Slide (Right) */
.carousel-slide.next {
    opacity: 0.35;
    z-index: 1;
    opacity: 0.35;
    z-index: 1;
    left: 85%;
    transform: translate(-50%, -50%) scale(0.75);
    display: block;
    filter: brightness(0.7);
}

/* Video Buffering State */
.carousel-slide.buffering {
    animation: video-buffering 1.5s ease-in-out infinite;
}

@keyframes video-buffering {

    0%,
    100% {
        filter: brightness(0.7) saturate(0.8);
    }

    50% {
        filter: brightness(0.9) saturate(1);
    }
}

/* Active video buffering has different treatment */
.carousel-slide.active.buffering {
    animation: video-buffering-active 1.2s ease-in-out infinite;
}

@keyframes video-buffering-active {

    0%,
    100% {
        filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6)) brightness(1);
    }

    50% {
        filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6)) brightness(0.85);
    }
}

/* Text Card Overlay (Desktop) */
.hero-description {
    position: absolute;
    top: 50%;
    left: 0;
    /* Flush left */
    transform: translateY(-50%);
    width: fit-content;
    max-width: 500px;
    z-index: 10;
    margin: 0;
    pointer-events: none;
}

/* Wrapper for unified text background - 3D Beveled Optical Glass */
.description-text {
    background: rgba(5, 5, 5, 0.2);
    /* Even more translucent charcoal */
    padding: 1.5rem;
    border-radius: 0;
    /* Sharp square corners */
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);

    /* Subtle 1px beveled edge highlight */
    /* Borders - Unified to remove beveled look */
    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 12px;
    z-index: 5;
    pointer-events: auto;
    position: relative;
    overflow: hidden;

    /* Flex Layout for Spacing and Alignment */
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: flex-start;
}

/* Extra elements for Top/Bottom refraction - keeping as they are not "on the sides" */
.glass-refraction-extra::before,
.glass-refraction-extra::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 10;
    backdrop-filter: url(#refractive-aberration) blur(2px);
    -webkit-backdrop-filter: url(#refractive-aberration) blur(2px);
    opacity: 0.9;
}

/* Top Edge Refraction Strip */
.glass-refraction-extra::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

/* Bottom Edge Refraction Strip */
.glass-refraction-extra::after {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.desc-main {
    font-family: 'Sui Generis', sans-serif;
    font-size: 18px;
    /* Restored larger size */
    line-height: 1.6;
    color: #f0f0f0;
    text-shadow: none;
    margin: 0;
    min-height: 90px;
    /* Reserve space for ~4 lines of text to prevent layout shift during typing */
}

/* Responsive BR controls */
.br-desktop {
    display: inline;
}

.br-all {
    display: inline;
}

.desc-files {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Xirod', sans-serif;
    font-size: 28px;
    margin: 0;
}

.file-type {
    color: #ffffff;
}

.arrow-icon {
    font-size: 28px;
    color: #FD724C;
}

/* CTA Button */
.btn-get-started {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    padding: 0 40px;
    height: 50px;
    background: linear-gradient(90deg, #FD724C 0%, #EF405C 100%);
    color: white;
    font-family: 'Xirod', sans-serif;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(253, 114, 76, 0.4);
}

.btn-get-started:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 64, 92, 0.6);
}

/* Navigation Controls (Below Carousel) */
.hero-navigation {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.nav-arrow {
    background: transparent;
    border: none;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-arrow svg {
    width: 28px;
    height: 30px;
    transition: transform 0.3s ease;
}

.nav-arrow:hover svg {
    transform: scale(1.2);
}

.nav-dots {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #EF405C;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dot.active {
    background: linear-gradient(180deg, #FD724C 0%, #EF405C 100%);
    box-shadow: 0 0 8px rgba(239, 64, 92, 0.6);
}

.dot:hover:not(.active) {
    background: rgba(239, 64, 92, 0.3);
}


/* Responsive - Mobile Stack */
@media (max-width: 1350px) {
    .hero-content-wrapper {
        display: flex;
        flex-direction: column;
        /* Stack */
        position: relative;
    }

    .hero-description {
        position: relative;
        /* Return to flow */
        top: auto;
        left: auto;
        transform: none;
        max-width: 100%;
        margin-bottom: 2rem;
        /* Space below card */
        width: 100%;
        display: flex;
        justify-content: center;
        /* Center the text content */
        margin-left: auto;
        margin-right: auto;
    }

    /* Constrain only the text to match video width */
    .desc-main {
        max-width: 55%;
        margin-left: auto;
        margin-right: auto;
    }

    .description-text {
        width: 100%;
        align-items: center;
        /* Center flex items */
        text-align: center;
        padding: 1rem;
        /* Reduced padding from 1.5rem */
        gap: 2rem;
    }

    .desc-files {
        justify-content: center;
    }

    .hero-carousel {
        height: auto;
        perspective: 1000px;
        /* Keep perspective for depth */
    }

    .carousel-track {
        aspect-ratio: 100 / 31;
        /* Matches 55% width 16:9 images */
    }

    .carousel-slide {
        width: 55%;
        /* Reduced to 55% to match desktop proportions */
    }

    .carousel-slide.prev {
        display: block;
        left: 25%;
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.5;
    }

    .carousel-slide.next {
        display: block;
        left: 75%;
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.5;
    }

    .carousel-slide.active {
        transform: translate(-50%, -50%) scale(1);
    }

    /* Synchronized text wrap with layout shift */
    .br-desktop {
        display: none;
    }

    .br-all {
        display: inline;
    }

    /* Navigation for stacked layout - beneath carousel */
    .hero-navigation {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 20px;
    }

    .hero-carousel {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        overflow: hidden;
    }

    .hero-container {
        padding: 0;
    }

    .hero-content-wrapper {
        gap: 1rem;
    }

    .hero-description {
        margin-bottom: 0;
        /* No overlap on mobile for better stacking */
        max-width: 100%;
        padding: 0.5rem;
        /* Reduced from 1rem */
        background: transparent;
    }

    .description-text {
        gap: 0.5rem;
        /* Reduced from 1rem */
    }

    .desc-main {
        font-size: 16px;
        /* Balanced mobile size */
        line-height: 1.4;
        max-width: 100%;
        margin: 0 auto;
        background: none;
        padding: 0;
        text-shadow: none;
    }

    /* Responsive line breaks moved to synchronise with 1350px breakpoint */

    .hero-carousel {
        height: auto;
        aspect-ratio: 16/9;
        /* Scales with width to prevent overflow overlap */
        margin-bottom: 0.5rem;
    }

    .carousel-track {
        aspect-ratio: auto;
        height: 200px;
        /* Approximate mobile height */
    }

    .carousel-slide {
        width: calc(100% - 160px);
    }

    .carousel-slide.prev {
        left: 40px;
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.5;
    }

    .carousel-slide.next {
        left: calc(100% - 40px);
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.5;
    }

    .hero-navigation {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 5px;
    }

    .desc-files {
        font-size: 20px;
        flex-direction: row;
        /* Back to 1 line */
        gap: 0.75rem;
        text-shadow: none;
        width: 100%;
        justify-content: center;
    }

    .arrow-icon {
        transform: none;
        /* No rotation */
        font-size: 20px;
    }
}