/* ============================================
   AURAL EVENTOS — Animations
   Service scroll scenes, organic dividers,
   vivid colors, reveals, micro-interactions
   ============================================ */

/* =============================================
   HERO SCENES — STICKY SCROLL SYSTEM
   ============================================= */

.hero-scenes-wrapper {
    /* JS sets height based on #scenes via this calc */
    height: calc(100vh + var(--scenes-travel, 500vh));
    position: relative;
}

.hero-scenes-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Progress bar at very top */
.hero-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #662A78, #F5851F, #e82ab4, #06b6d4);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 40;
    transition: transform 0.08s linear;
}

/* ── Intro background photo (kept for SEO) ── */
.intro-bg-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 0.18;
    /* subtle — orbs sit on top */
    pointer-events: none;
}

/* ── Intro panel ── */
.scene-intro {
    position: absolute;
    inset: 0;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(160deg, #1a0533 0%, #2d0a5c 35%, #16124a 65%, #0a2340 100%);
    will-change: opacity, transform;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scene-intro.hidden {
    opacity: 0;
    transform: translateY(-40px);
    pointer-events: none;
}

/* Orbs inside intro */
/* Apple-style background image sequence */
.hero-bg-sequence {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #050b14;
    will-change: transform;
    transform-origin: center center;
}

/* Each image starts invisible; the active one is shown via .active class */
.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
    /* slow continuous zoom purely via CSS — no JS needed */
    animation: bg-zoom 25s linear infinite alternate;
    will-change: transform, opacity;
    transform-origin: center center;
}

.hero-bg-img.active {
    opacity: 1;
}

@keyframes bg-zoom {
    from {
        transform: scale(1.0);
    }

    to {
        transform: scale(1.3);
    }
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 5, 51, 0.75) 0%, rgba(10, 35, 64, 0.6) 100%);
    z-index: 10;
    pointer-events: none;
}

.intro-label {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: #F5851F;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.intro-label::before,
.intro-label::after {
    content: '';
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F5851F);
    border-radius: 2px;
}

.intro-label::after {
    background: linear-gradient(90deg, #F5851F, transparent);
}

.intro-title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    font-weight: 900;
    line-height: 1.0;
    color: #fff;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

.intro-title .shimmer-word {
    background: linear-gradient(135deg, #F5851F 0%, #EE4823 35%, #e82ab4 70%, #9333ea 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 4s linear infinite;
    display: block;
}

.intro-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: rgba(255, 255, 255, 0.72);
    max-width: 540px;
    line-height: 1.65;
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.intro-scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: bounce-down 2.4s ease-in-out infinite;
}

.intro-scroll-hint .chevrons span {
    display: block;
    width: 14px;
    height: 14px;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    margin: -4px auto;
    animation: chevron-fade 2.4s ease-in-out infinite;
}

.intro-scroll-hint .chevrons span:nth-child(2) {
    animation-delay: 0.2s;
}

.intro-scroll-hint .chevrons span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ── Generic scene ── */
.scene {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: opacity, transform;
    /* Initial hidden state — CSS transition handles the reveal */
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active scene — fully visible */
.scene.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Scene layout grid ── */
.scene-inner {
    width: 100%;
    max-width: 1100px;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.scene-inner.reverse {
    direction: rtl;
}

.scene-inner.reverse>* {
    direction: ltr;
}

.scene-text {
    z-index: 2;
}

.scene-number {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.scene-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.scene-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 400px;
    margin-bottom: 1.75rem;
}

.scene-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.scene-tag {
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid currentColor;
    opacity: 0.85;
}

/* ── Illustration container (the thing that scales) ── */
.scene-illustration {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    transform-origin: center center;
}

/* ====================================================================
   SCENE 0 — LINE ARRAY / SONIDO
   Background: white/light with purple tint
   ==================================================================== */
.scene--array {
    background: linear-gradient(140deg, #f8f4ff 0%, #f0e8ff 50%, #fff4eb 100%);
}

.scene--array .scene-number {
    color: #662A78;
}

.scene--array .scene-heading {
    color: #1a0533;
}

.scene--array .scene-desc {
    color: #4a4060;
}

.scene--array .scene-tag {
    color: #662A78;
    border-color: #662A78;
    background: rgba(102, 42, 120, 0.07);
}

/* Line Array SVG illustration */
.array-speaker {
    position: relative;
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    filter: drop-shadow(0 20px 60px rgba(102, 42, 120, 0.35));
}

.array-module {
    width: 140px;
    height: 50px;
    background: linear-gradient(135deg, #1a0533 0%, #2d0a5c 100%);
    border-radius: 8px 8px 4px 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1.5px solid rgba(147, 51, 234, 0.4);
}

.array-module::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 5px;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 3px,
            rgba(147, 51, 234, 0.2) 3px,
            rgba(147, 51, 234, 0.2) 4px);
}

.array-module::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 133, 31, 0.9), rgba(238, 72, 35, 0.6));
    box-shadow: 0 0 10px rgba(245, 133, 31, 0.5);
}

/* Sound waves radiating from the array */
.array-waves {
    position: absolute;
    left: -90px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 200px;
    pointer-events: none;
}

.array-wave {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 100%;
    border-left: 2.5px solid rgba(102, 42, 120, 0.5);
    border-radius: 0 50% 50% 0;
    animation: wave-expand 2.2s ease-out infinite;
}

.array-wave:nth-child(2) {
    animation-delay: 0.55s;
    opacity: 0.6;
}

.array-wave:nth-child(3) {
    animation-delay: 1.1s;
    opacity: 0.35;
}

/* ====================================================================
   SCENE 1 — PANTALLA LED
   Background: deep navy with coloured tiles
   ==================================================================== */
.scene--led {
    background: linear-gradient(140deg, #050d1a 0%, #0a1628 50%, #0d0f3a 100%);
}

.scene--led .scene-number {
    color: #06b6d4;
}

.scene--led .scene-heading {
    color: #ffffff;
}

.scene--led .scene-desc {
    color: rgba(255, 255, 255, 0.7);
}

.scene--led .scene-tag {
    color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.08);
}

/* LED panel grid */
.led-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(6, 182, 212, 0.3), 0 0 30px rgba(99, 102, 241, 0.2);
    width: 320px;
    aspect-ratio: 16/10;
}

.led-module {
    aspect-ratio: 1;
    border-radius: 3px;
    animation: led-flicker 4s ease-in-out infinite;
}

/* Colour pattern for the LED modules */
.led-module:nth-child(3n+1) {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.led-module:nth-child(3n+2) {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    animation-delay: 0.3s;
}

.led-module:nth-child(3n) {
    background: linear-gradient(135deg, #e82ab4, #a21caf);
    animation-delay: 0.6s;
}

.led-module:nth-child(7n) {
    background: linear-gradient(135deg, #F5851F, #EE4823);
}

.led-module:nth-child(11n) {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* ====================================================================
   SCENE 2 — ILUMINACIÓN
   Background: dark purple/black with light beams
   ==================================================================== */
.scene--lights {
    background: linear-gradient(160deg, #0a0015 0%, #1a0033 50%, #00021a 100%);
    overflow: hidden;
}

.scene--lights .scene-number {
    color: #e82ab4;
}

.scene--lights .scene-heading {
    color: #ffffff;
}

.scene--lights .scene-desc {
    color: rgba(255, 255, 255, 0.7);
}

.scene--lights .scene-tag {
    color: #e82ab4;
    border-color: rgba(232, 42, 180, 0.45);
    background: rgba(232, 42, 180, 0.08);
}

/* Light beams container */
.lights-stage {
    position: relative;
    width: 340px;
    height: 340px;
}

.light-beam {
    position: absolute;
    bottom: 10%;
    width: 6px;
    height: 70%;
    border-radius: 3px 3px 0 0;
    transform-origin: bottom center;
    animation: beam-sway 3.5s ease-in-out infinite;
}

.light-beam::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: beam-glow 3.5s ease-in-out infinite;
}

.light-beam:nth-child(1) {
    left: 18%;
    background: linear-gradient(to top, rgba(245, 133, 31, 0.9), rgba(245, 133, 31, 0));
    animation-delay: 0s;
}

.light-beam:nth-child(1)::after {
    background: radial-gradient(circle, rgba(245, 133, 31, 0.7), transparent 70%);
}

.light-beam:nth-child(2) {
    left: 35%;
    background: linear-gradient(to top, rgba(232, 42, 180, 0.9), rgba(232, 42, 180, 0));
    animation-delay: 0.7s;
}

.light-beam:nth-child(2)::after {
    background: radial-gradient(circle, rgba(232, 42, 180, 0.7), transparent 70%);
}

.light-beam:nth-child(3) {
    left: 52%;
    background: linear-gradient(to top, rgba(6, 182, 212, 0.9), rgba(6, 182, 212, 0));
    animation-delay: 1.4s;
}

.light-beam:nth-child(3)::after {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.7), transparent 70%);
}

.light-beam:nth-child(4) {
    left: 68%;
    background: linear-gradient(to top, rgba(147, 51, 234, 0.9), rgba(147, 51, 234, 0));
    animation-delay: 2.1s;
}

.light-beam:nth-child(4)::after {
    background: radial-gradient(circle, rgba(147, 51, 234, 0.7), transparent 70%);
}

.light-beam:nth-child(5) {
    left: 82%;
    background: linear-gradient(to top, rgba(245, 133, 31, 0.7), rgba(245, 133, 31, 0));
    animation-delay: 2.8s;
}

.light-beam:nth-child(5)::after {
    background: radial-gradient(circle, rgba(245, 133, 31, 0.5), transparent 70%);
}

/* Spotlight fixtures at top */
.light-fixtures {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 15%;
}

.fixture {
    width: 18px;
    height: 26px;
    background: linear-gradient(180deg, #333, #555);
    border-radius: 4px 4px 0 0;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.fixture::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 8px;
    background: linear-gradient(180deg, #666, #888);
    border-radius: 0 0 8px 8px;
}

/* Floor reflection */
.lights-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(to top, rgba(147, 51, 234, 0.15) 0%, transparent 100%);
    border-radius: 0 0 12px 12px;
}

/* ====================================================================
   SCENE 3 — INTERNET PARA EVENTOS
   Background: white with teal/blue accent
   ==================================================================== */
.scene--internet {
    background: linear-gradient(140deg, #f0fffe 0%, #e8f9ff 40%, #f4f0ff 100%);
}

.scene--internet .scene-number {
    color: #0891b2;
}

.scene--internet .scene-heading {
    color: #0a2340;
}

.scene--internet .scene-desc {
    color: #2d5a70;
}

.scene--internet .scene-tag {
    color: #0891b2;
    border-color: rgba(8, 145, 178, 0.4);
    background: rgba(8, 145, 178, 0.07);
}

/* WiFi waves */
.wifi-visual {
    position: relative;
    width: 300px;
    height: 280px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.wifi-dot {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #6366f1);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
    z-index: 5;
}

.wifi-arc {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    border-top: 3.5px solid transparent;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    animation: wifi-pulse 2s ease-out infinite;
}

.wifi-arc:nth-child(2) {
    width: 70px;
    height: 70px;
    border-top-color: #06b6d4;
    animation-delay: 0s;
}

.wifi-arc:nth-child(3) {
    width: 130px;
    height: 130px;
    border-top-color: #6366f1;
    animation-delay: 0.4s;
}

.wifi-arc:nth-child(4) {
    width: 200px;
    height: 200px;
    border-top-color: #9333ea;
    animation-delay: 0.8s;
}

.wifi-arc:nth-child(5) {
    width: 270px;
    height: 270px;
    border-top-color: rgba(147, 51, 234, 0.35);
    animation-delay: 1.2s;
}

/* ====================================================================
   SCENE 4 — CTA FINAL
   Background: vivid gradient
   ==================================================================== */
.scene--cta {
    background: linear-gradient(135deg, #2d0a5c 0%, #1a0533 40%, #0d1b4a 80%, #0a2340 100%);
    text-align: center;
    flex-direction: column;
}

.scene--cta .scene-inner {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 720px;
}

.scene--cta .scene-illustration {
    display: none;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.cta-title .gradient-span {
    background: linear-gradient(135deg, #F5851F 0%, #EE4823 35%, #e82ab4 70%, #9333ea 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 4s linear infinite;
}

.cta-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: rgba(255, 255, 255, 0.72);
    max-width: 480px;
    line-height: 1.65;
    margin: 0 auto 2.5rem;
}

/* ── CTA glow button ── */
.btn--cta-glow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 18px 46px;
    border-radius: 60px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #F5851F 0%, #EE4823 40%, #e82ab4 100%);
    box-shadow: 0 8px 32px rgba(245, 133, 31, 0.35);
    animation: cta-pulse 2.8s ease-in-out infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn--cta-glow:hover {
    transform: translateY(-3px) scale(1.04);
    color: #fff;
    box-shadow: 0 0 0 8px rgba(245, 133, 31, 0.12), 0 16px 48px rgba(245, 133, 31, 0.5);
}

.btn--cta-glow svg {
    transition: transform 0.25s ease;
}

.btn--cta-glow:hover svg {
    transform: translateX(5px);
}

/* =============================================
   ORGANIC SECTION DIVIDERS
   ============================================= */

/* Wave shape between sections */
.wave-divider {
    position: relative;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
    /* close gap */
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* Diagonal clip sections */
.section-slanted {
    clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%);
    margin-top: -3%;
    padding-top: 6% !important;
    padding-bottom: 6% !important;
    position: relative;
    z-index: 2;
}

.section-slanted--alt {
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
}

/* Swoosh clip */
.section-swoosh {
    clip-path: ellipse(120% 100% at 50% 0%);
    margin-top: -60px;
    padding-top: calc(60px + var(--space-5xl)) !important;
    position: relative;
    z-index: 2;
}

/* Zigzag SVG separator utility */
.zigzag-bottom::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40'%3E%3Cpath d='M0,20 L60,0 L120,20 L180,0 L240,20 L300,0 L360,20 L420,0 L480,20 L540,0 L600,20 L660,0 L720,20 L780,0 L840,20 L900,0 L960,20 L1020,0 L1080,20 L1140,0 L1200,20 L1200,40 L0,40 Z' fill='white'/%3E%3C/svg%3E");
    background-size: cover;
    z-index: 3;
}

/* =============================================
   STANDARD SCROLL REVEALS
   ============================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-blur {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-blur.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.visible>* {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(1) {
    transition-delay: 0.05s;
}

.stagger-children.visible>*:nth-child(2) {
    transition-delay: 0.12s;
}

.stagger-children.visible>*:nth-child(3) {
    transition-delay: 0.19s;
}

.stagger-children.visible>*:nth-child(4) {
    transition-delay: 0.26s;
}

.stagger-children.visible>*:nth-child(5) {
    transition-delay: 0.33s;
}

.stagger-children.visible>*:nth-child(6) {
    transition-delay: 0.40s;
}

.text-reveal .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.text-reveal.visible .word {
    opacity: 1;
    transform: translateY(0);
}

.text-reveal.visible .word:nth-child(1) {
    transition-delay: 0.04s;
}

.text-reveal.visible .word:nth-child(2) {
    transition-delay: 0.08s;
}

.text-reveal.visible .word:nth-child(3) {
    transition-delay: 0.12s;
}

.text-reveal.visible .word:nth-child(4) {
    transition-delay: 0.16s;
}

.text-reveal.visible .word:nth-child(5) {
    transition-delay: 0.20s;
}

.text-reveal.visible .word:nth-child(6) {
    transition-delay: 0.24s;
}

.text-reveal.visible .word:nth-child(7) {
    transition-delay: 0.28s;
}

.text-reveal.visible .word:nth-child(8) {
    transition-delay: 0.32s;
}

.text-reveal.visible .word:nth-child(9) {
    transition-delay: 0.36s;
}

.text-reveal.visible .word:nth-child(10) {
    transition-delay: 0.40s;
}

.text-reveal.visible .word:nth-child(11) {
    transition-delay: 0.44s;
}

.text-reveal.visible .word:nth-child(12) {
    transition-delay: 0.48s;
}

.text-reveal .word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.05em;
    margin-right: 0.25em;
}

/* =============================================
   KEYFRAMES
   ============================================= */
@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -25px) scale(1.06);
    }

    66% {
        transform: translate(-20px, 18px) scale(0.96);
    }
}

@keyframes shimmer-text {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes cta-pulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(245, 133, 31, 0.35);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(245, 133, 31, 0.08), 0 12px 40px rgba(232, 42, 180, 0.45);
    }
}

@keyframes bounce-down {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(9px);
    }
}

@keyframes chevron-fade {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes wave-expand {
    0% {
        transform: translateY(-50%) scaleX(0.5);
        opacity: 0.9;
    }

    100% {
        transform: translateY(-50%) scaleX(1.3);
        opacity: 0;
    }
}

@keyframes led-flicker {

    0%,
    100% {
        opacity: 1;
    }

    45% {
        opacity: 0.75;
    }

    50% {
        opacity: 0.95;
    }

    55% {
        opacity: 0.7;
    }

    60% {
        opacity: 1;
    }
}

@keyframes beam-sway {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

@keyframes beam-glow {

    0%,
    100% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.3);
    }
}

@keyframes wifi-pulse {
    0% {
        transform: translateX(-50%) scaleY(0.5);
        opacity: 0.9;
    }

    100% {
        transform: translateX(-50%) scaleY(1);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes counter-glow {

    0%,
    100% {
        text-shadow: 0 0 0 transparent;
    }

    50% {
        text-shadow: 0 0 20px rgba(102, 42, 120, 0.35);
    }
}

@keyframes bar-pulse {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.4);
    }
}

/* =============================================
   FLOATING EQUIPMENT IMAGES — Decorative
   ============================================= */
.floating-equipment {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    opacity: 0.1;
    filter: grayscale(30%) contrast(1.2);
    mix-blend-mode: multiply;
    animation: equipment-float 8s ease-in-out infinite;
}

.floating-equipment--left {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    height: auto;
}

.floating-equipment--right {
    right: -40px;
    top: 15%;
    width: 180px;
    height: auto;
}

.floating-equipment--bottom-right {
    right: -80px;
    bottom: 5%;
    width: 280px;
    height: auto;
    opacity: 0.08;
}

@keyframes equipment-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1);
    }

    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* =============================================
   MISC HELPERS
   ============================================= */
.shimmer-text {
    background: linear-gradient(90deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 40%, var(--color-accent-primary) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

.stat-item__number.counting {
    animation: counter-glow 2s ease-out;
}

.bg-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 42, 120, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.bg-glow--gold {
    background: radial-gradient(circle, rgba(245, 133, 31, 0.08) 0%, transparent 70%);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .scene-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .scene-inner.reverse {
        direction: ltr;
    }

    /* Move the illustration on top, but don't force a transform that breaks JS zoom */
    .scene-illustration {
        order: -1;
        display: flex;
        justify-content: center;
    }

    .scene-heading {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 0.8rem;
    }

    .scene-desc {
        margin: 0 auto 1.5rem;
        font-size: 0.95rem;
        max-width: 100%;
    }

    .scene-tags {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Scale down the SVG CSS objects so they fit above the text natively */
    .led-grid {
        width: 180px;
        gap: 2px;
    }

    .lights-stage {
        width: 180px;
        height: 180px;
    }

    .wifi-visual {
        width: 160px;
        height: 150px;
    }

    .array-speaker {
        width: 90px;
    }
}

/* =============================================
   REDUCE MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-blur,
    .stagger-children>*,
    .text-reveal .word {
        transition: none;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .intro-orb,
    .array-wave,
    .led-module,
    .light-beam,
    .wifi-arc {
        animation: none;
    }

    .btn--cta-glow {
        animation: none;
    }
}