/* ============================================
   JJUGGL.com - Styles
   Kinetic Juggling Playground
   ============================================ */

/* CSS Custom Properties - Physics Vocabulary */
:root {
    /* Colors */
    --deep-stage: #0b0e1a;
    --spotlight-amber: #f4a926;
    --arc-trace: #e8e4dc;
    --performer-red: #c0392b;
    --physics-blue: #4a90d9;
    --tent-canvas: #1a1510;
    --peak-glow: #ffcf48;
    --shadow-line: #2a2d3a;
    --stripe-alt: #0f1224;

    /* Physics */
    --gravity: 0.004;
    --air-time: 1.2s;
    --apex-pause: 0.15s;

    /* Typography */
    --font-display: 'Righteous', cursive;
    --font-body: 'Nunito Sans', sans-serif;
    --font-accent: 'Azeret Mono', monospace;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background: var(--deep-stage);
    color: var(--arc-trace);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ============================================
   INTRO OVERLAY
   ============================================ */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: none;
}

#intro-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.6s ease;
}

#intro-overlay.hidden {
    display: none;
}

#intro-dot {
    position: absolute;
    bottom: 10%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--spotlight-amber);
    border-radius: 50%;
    transform: translateX(-50%);
    opacity: 0;
    box-shadow: 0 0 20px var(--spotlight-amber), 0 0 40px rgba(244, 169, 38, 0.4);
}

#intro-dot.launch {
    animation: dotLaunch 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes dotLaunch {
    0% {
        bottom: 10%;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    70% {
        bottom: 55%;
        opacity: 1;
        transform: translateX(-50%) scale(1.5);
    }
    100% {
        bottom: 50%;
        opacity: 0;
        transform: translateX(-50%) scale(3);
    }
}

#intro-trail {
    position: absolute;
    bottom: 10%;
    left: 50%;
    width: 4px;
    height: 0;
    background: linear-gradient(to top, transparent, var(--spotlight-amber));
    transform: translateX(-50%);
    opacity: 0;
    border-radius: 2px;
}

#intro-trail.active {
    animation: trailGrow 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes trailGrow {
    0% {
        height: 0;
        opacity: 0.8;
    }
    60% {
        height: 40vh;
        opacity: 0.6;
    }
    100% {
        height: 45vh;
        opacity: 0;
    }
}

#intro-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 9rem);
    letter-spacing: 0.04em;
    color: var(--spotlight-amber);
    opacity: 0;
    transform: rotate(2deg);
    text-shadow: 0 0 60px rgba(244, 169, 38, 0.5), 0 0 120px rgba(244, 169, 38, 0.2);
}

#intro-title.visible {
    opacity: 1;
}

#intro-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#intro-title.visible .letter {
    opacity: 1;
    transform: translateY(0);
}

#intro-title.visible .letter[data-index="0"] { transition-delay: 0s; }
#intro-title.visible .letter[data-index="1"] { transition-delay: 0.08s; }
#intro-title.visible .letter[data-index="2"] { transition-delay: 0.16s; }
#intro-title.visible .letter[data-index="3"] { transition-delay: 0.24s; }
#intro-title.visible .letter[data-index="4"] { transition-delay: 0.32s; }
#intro-title.visible .letter[data-index="5"] { transition-delay: 0.4s; }

#intro-tagline {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    color: var(--arc-trace);
    opacity: 0;
    margin-top: 1rem;
    letter-spacing: 0.1em;
    transition: opacity 0.6s ease;
}

#intro-tagline.visible {
    opacity: 0.8;
}

/* ============================================
   TIMING RING (persistent metronome)
   ============================================ */
#timing-ring {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9000;
    animation: ringRotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#timing-ring.visible {
    opacity: 1;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ring-dot-1 {
    animation: ringDotPulse 1.5s ease-in-out infinite;
    animation-delay: 0s;
}

.ring-dot-2 {
    animation: ringDotPulse 1.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.ring-dot-3 {
    animation: ringDotPulse 1.5s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes ringDotPulse {
    0%, 100% { r: 3; opacity: 0.5; }
    50% { r: 5; opacity: 1; }
}

/* ============================================
   NAVIGATION DOTS
   ============================================ */
#act-nav {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8000;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#act-nav.visible {
    opacity: 1;
}

.nav-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--shadow-line);
    background: transparent;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: microOrbit 4s ease-in-out infinite;
    transition: border-color 0.3s ease;
}

.nav-dot:nth-child(2) { animation-delay: -0.8s; }
.nav-dot:nth-child(3) { animation-delay: -1.6s; }
.nav-dot:nth-child(4) { animation-delay: -2.4s; }
.nav-dot:nth-child(5) { animation-delay: -3.2s; }

@keyframes microOrbit {
    0% { transform: translate(0, 0); }
    25% { transform: translate(3px, 2px); }
    50% { transform: translate(0, 4px); }
    75% { transform: translate(-3px, 2px); }
    100% { transform: translate(0, 0); }
}

.nav-dot-inner {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--shadow-line);
    transition: background 0.3s ease, transform 0.3s ease;
}

.nav-dot.active {
    border-color: var(--spotlight-amber);
}

.nav-dot.active .nav-dot-inner {
    background: var(--spotlight-amber);
    animation: navPulse 1.5s ease-in-out infinite;
}

@keyframes navPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

.nav-dot:hover {
    border-color: var(--arc-trace);
}

.nav-dot:hover .nav-dot-inner {
    background: var(--arc-trace);
}

/* ============================================
   MAIN STAGE
   ============================================ */
#stage {
    width: 100%;
    position: relative;
}

.act {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   ARC BACKGROUND SVGs
   ============================================ */
.arc-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   RADIATING STRIPES
   ============================================ */
.radiating-stripes {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: repeating-conic-gradient(
        from 0deg,
        var(--deep-stage) 0deg 5deg,
        var(--stripe-alt) 5deg 10deg
    );
    opacity: 0.15;
    animation: stripeRotate 120s linear infinite;
    z-index: 0;
    pointer-events: none;
}

.stripes-alt {
    animation-direction: reverse;
    opacity: 0.1;
}

@keyframes stripeRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   ACT CONTENT
   ============================================ */
.act-content {
    position: relative;
    z-index: 5;
    max-width: 800px;
    padding: 2rem;
}

.act-label {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--physics-blue);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.label-num {
    color: var(--spotlight-amber);
    margin-right: 0.8em;
}

.act-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.04em;
    color: var(--arc-trace);
    line-height: 1.05;
    transform: rotate(2deg);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(232, 228, 220, 0.1);
}

.act-description {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--arc-trace);
    opacity: 0.8;
    max-width: 600px;
    margin-bottom: 2rem;
}

/* ============================================
   HERO (ACT 0)
   ============================================ */
.hero-content {
    text-align: center;
    max-width: 1000px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 14vw, 12rem);
    letter-spacing: 0.06em;
    color: var(--spotlight-amber);
    line-height: 1;
    transform: rotate(2deg);
    text-shadow: 0 0 80px rgba(244, 169, 38, 0.4), 0 0 160px rgba(244, 169, 38, 0.15);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    color: var(--arc-trace);
    opacity: 0.7;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
}

.hero-counter {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.counter-label {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--physics-blue);
    opacity: 0.7;
}

.counter-value {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 2.5rem;
    color: var(--peak-glow);
    letter-spacing: 0.15em;
}

/* ============================================
   CIRCLE CLUSTERS
   ============================================ */
.circle-cluster {
    position: absolute;
    z-index: 3;
    pointer-events: none;
}

.cluster-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--spotlight-amber);
    position: absolute;
}

.cluster-1 {
    top: 15%;
    left: 10%;
}

.cluster-1 .cluster-dot:nth-child(1) { top: 0; left: 0; }
.cluster-1 .cluster-dot:nth-child(2) { top: 12px; left: 14px; }
.cluster-1 .cluster-dot:nth-child(3) { top: -4px; left: 20px; }

.cluster-2 {
    bottom: 20%;
    right: 12%;
}

.cluster-2 .cluster-dot:nth-child(1) { top: 0; left: 0; }
.cluster-2 .cluster-dot:nth-child(2) { top: -8px; left: 16px; }
.cluster-2 .cluster-dot:nth-child(3) { top: 10px; left: 8px; }
.cluster-2 .cluster-dot:nth-child(4) { top: 4px; left: 28px; }
.cluster-2 .cluster-dot:nth-child(5) { top: 16px; left: 22px; }

.cluster-3 {
    top: 20%;
    right: 8%;
}

.cluster-3 .cluster-dot:nth-child(1) { top: 0; left: 0; }
.cluster-3 .cluster-dot:nth-child(2) { top: 14px; left: 12px; }
.cluster-3 .cluster-dot:nth-child(3) { top: -6px; left: 24px; }
.cluster-3 .cluster-dot:nth-child(4) { top: 8px; left: 36px; }
.cluster-3 .cluster-dot:nth-child(5) { top: 20px; left: 4px; }
.cluster-3 .cluster-dot:nth-child(6) { top: 22px; left: 28px; }
.cluster-3 .cluster-dot:nth-child(7) { top: -2px; left: 42px; }

.cluster-4 {
    bottom: 15%;
    left: 8%;
}

.cluster-4 .cluster-dot:nth-child(1) { top: 0; left: 0; }
.cluster-4 .cluster-dot:nth-child(2) { top: 12px; left: 16px; }
.cluster-4 .cluster-dot:nth-child(3) { top: -4px; left: 28px; }

/* Gravity well - dots attracted to cursor */
.cluster-dot.attracted {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cluster-dot.released {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   CASCADE VISUAL (ACT 1)
   ============================================ */
.cascade-visual {
    position: relative;
    width: 200px;
    height: 120px;
    margin-top: 2rem;
}

.cascade-ball {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
}

.ball-amber {
    background: var(--spotlight-amber);
    box-shadow: 0 0 20px rgba(244, 169, 38, 0.6);
    animation: cascadeBall1 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.ball-red {
    background: var(--performer-red);
    box-shadow: 0 0 20px rgba(192, 57, 43, 0.6);
    left: 88px;
    animation: cascadeBall2 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    animation-delay: -0.8s;
}

.ball-blue {
    background: var(--physics-blue);
    box-shadow: 0 0 20px rgba(74, 144, 217, 0.6);
    left: 176px;
    animation: cascadeBall3 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    animation-delay: -1.6s;
}

@keyframes cascadeBall1 {
    0% { transform: translate(0, 0); }
    15% { transform: translate(44px, -90px); }
    30% { transform: translate(88px, 0); }
    45% { transform: translate(132px, -90px); }
    60% { transform: translate(176px, 0); }
    75% { transform: translate(88px, -90px); }
    100% { transform: translate(0, 0); }
}

@keyframes cascadeBall2 {
    0% { transform: translate(0, 0); }
    15% { transform: translate(44px, -90px); }
    30% { transform: translate(88px, 0); }
    45% { transform: translate(44px, -90px); }
    60% { transform: translate(-88px, 0); }
    75% { transform: translate(-44px, -90px); }
    100% { transform: translate(0, 0); }
}

@keyframes cascadeBall3 {
    0% { transform: translate(0, 0); }
    15% { transform: translate(-44px, -90px); }
    30% { transform: translate(-88px, 0); }
    45% { transform: translate(-44px, -90px); }
    60% { transform: translate(-176px, 0); }
    75% { transform: translate(-88px, -90px); }
    100% { transform: translate(0, 0); }
}

/* ============================================
   PIN DIVIDER
   ============================================ */
.pin-divider {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    opacity: 0.4;
}

/* ============================================
   PHYSICS EQUATIONS (ACT 2)
   ============================================ */
.physics-equations {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.equation {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    padding: 0.6rem 1rem;
    border-left: 2px solid var(--physics-blue);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.equation.visible {
    opacity: 1;
    transform: translateX(0);
}

.eq-label {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--physics-blue);
    min-width: 100px;
}

.eq-formula {
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: 15px;
    color: var(--peak-glow);
    letter-spacing: 0.03em;
}

/* ============================================
   RHYTHM VISUALIZER (ACT 3)
   ============================================ */
.rhythm-visualizer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2rem;
    max-width: 500px;
}

.rhythm-bar {
    display: flex;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--shadow-line);
}

.rhythm-bar-offset {
    margin-left: 60px;
}

.rhythm-bar-offset-2 {
    margin-left: 120px;
}

.rhythm-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.seg-throw {
    background: rgba(244, 169, 38, 0.15);
    color: var(--spotlight-amber);
    animation: segPulse 2.4s ease-in-out infinite;
}

.seg-peak {
    background: rgba(255, 207, 72, 0.1);
    color: var(--peak-glow);
    flex: 0.3;
    animation: segPulse 2.4s ease-in-out infinite;
    animation-delay: 0.4s;
}

.seg-catch {
    background: rgba(192, 57, 43, 0.15);
    color: var(--performer-red);
    animation: segPulse 2.4s ease-in-out infinite;
    animation-delay: 0.8s;
}

.rhythm-bar-offset .seg-throw { animation-delay: 0.8s; }
.rhythm-bar-offset .seg-peak { animation-delay: 1.2s; }
.rhythm-bar-offset .seg-catch { animation-delay: 1.6s; }

.rhythm-bar-offset-2 .seg-throw { animation-delay: 1.6s; }
.rhythm-bar-offset-2 .seg-peak { animation-delay: 2.0s; }
.rhythm-bar-offset-2 .seg-catch { animation-delay: 2.4s; }

@keyframes segPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ============================================
   OP ART BAND (transition zone)
   ============================================ */
.op-art-band {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 4px,
            rgba(74, 144, 217, 0.08) 4px,
            rgba(74, 144, 217, 0.08) 6px
        ),
        repeating-linear-gradient(
            3deg,
            transparent 0px,
            transparent 4px,
            rgba(244, 169, 38, 0.06) 4px,
            rgba(244, 169, 38, 0.06) 6px
        );
    z-index: 2;
    pointer-events: none;
    animation: opArtShift 8s linear infinite;
}

@keyframes opArtShift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 12px, 0 -12px; }
}

/* ============================================
   MASTERY RINGS (ACT 4)
   ============================================ */
.mastery-rings {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto 0;
}

.mastery-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--spotlight-amber);
    top: 50%;
    left: 50%;
    opacity: 0.3;
}

.ring-1 {
    width: 40px; height: 40px;
    margin: -20px 0 0 -20px;
    animation: ringExpand 4s ease-in-out infinite;
    border-color: var(--spotlight-amber);
    opacity: 0.8;
}

.ring-2 {
    width: 80px; height: 80px;
    margin: -40px 0 0 -40px;
    animation: ringExpand 4s ease-in-out infinite;
    animation-delay: -0.57s;
    border-color: var(--performer-red);
    opacity: 0.6;
}

.ring-3 {
    width: 120px; height: 120px;
    margin: -60px 0 0 -60px;
    animation: ringExpand 4s ease-in-out infinite;
    animation-delay: -1.14s;
    border-color: var(--physics-blue);
    opacity: 0.5;
}

.ring-4 {
    width: 160px; height: 160px;
    margin: -80px 0 0 -80px;
    animation: ringExpand 4s ease-in-out infinite;
    animation-delay: -1.71s;
    border-color: var(--spotlight-amber);
    opacity: 0.4;
}

.ring-5 {
    width: 200px; height: 200px;
    margin: -100px 0 0 -100px;
    animation: ringExpand 4s ease-in-out infinite;
    animation-delay: -2.28s;
    border-color: var(--peak-glow);
    opacity: 0.3;
}

.ring-6 {
    width: 240px; height: 240px;
    margin: -120px 0 0 -120px;
    animation: ringExpand 4s ease-in-out infinite;
    animation-delay: -2.85s;
    border-color: var(--performer-red);
    opacity: 0.2;
}

.ring-7 {
    width: 280px; height: 280px;
    margin: -140px 0 0 -140px;
    animation: ringExpand 4s ease-in-out infinite;
    animation-delay: -3.42s;
    border-color: var(--physics-blue);
    opacity: 0.15;
}

@keyframes ringExpand {
    0%, 100% { transform: scale(1); opacity: var(--ring-opacity, 0.3); }
    50% { transform: scale(1.1); opacity: calc(var(--ring-opacity, 0.3) * 1.5); }
}

/* ============================================
   BORDER ANIMATE (card hover effect)
   ============================================ */
.border-animate {
    position: relative;
    overflow: hidden;
}

.border-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: none;
    pointer-events: none;
}

.border-animate:hover::before {
    animation: borderDraw 0.6s linear forwards;
    border-color: var(--spotlight-amber);
}

@keyframes borderDraw {
    0% {
        clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
    }
    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* ============================================
   RIPPLE EFFECTS
   ============================================ */
#ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9500;
}

.ripple-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--spotlight-amber);
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* ============================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================ */
.act-content {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.act.in-view .act-content {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.act.in-view .act-label {
    animation: fadeSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.act.in-view .act-title {
    animation: fadeSlideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.act.in-view .act-description {
    animation: fadeSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.35s;
    opacity: 0;
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Override for act-title which has rotation */
.act.in-view .act-title {
    animation-name: fadeSlideInRotated;
}

@keyframes fadeSlideInRotated {
    0% {
        opacity: 0;
        transform: translateY(30px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(2deg);
    }
}

/* ============================================
   THREE-BALL CASCADE LOADER
   ============================================ */
.loader {
    width: 80px;
    height: 60px;
    position: relative;
}

.loader-ball {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
}

.loader-ball:nth-child(1) {
    background: var(--spotlight-amber);
    animation: loaderFigure8 1.8s ease-in-out infinite;
}

.loader-ball:nth-child(2) {
    background: var(--performer-red);
    animation: loaderFigure8 1.8s ease-in-out infinite;
    animation-delay: -0.6s;
}

.loader-ball:nth-child(3) {
    background: var(--physics-blue);
    animation: loaderFigure8 1.8s ease-in-out infinite;
    animation-delay: -1.2s;
}

@keyframes loaderFigure8 {
    0% { left: 10px; top: 30px; }
    12.5% { left: 25px; top: 5px; }
    25% { left: 40px; top: 30px; }
    37.5% { left: 55px; top: 5px; }
    50% { left: 70px; top: 30px; }
    62.5% { left: 55px; top: 55px; }
    75% { left: 40px; top: 30px; }
    87.5% { left: 25px; top: 55px; }
    100% { left: 10px; top: 30px; }
}

/* ============================================
   MAGNETIC HOVER (applied via JS)
   ============================================ */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    #act-nav {
        right: 12px;
        gap: 14px;
    }

    .nav-dot {
        width: 12px;
        height: 12px;
    }

    .nav-dot-inner {
        width: 4px;
        height: 4px;
    }

    #timing-ring {
        top: 12px;
        right: 12px;
        transform: scale(0.75);
    }

    .act-content {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: clamp(3rem, 12vw, 8rem);
    }

    .rhythm-bar-offset {
        margin-left: 30px;
    }

    .rhythm-bar-offset-2 {
        margin-left: 60px;
    }

    .mastery-rings {
        width: 220px;
        height: 220px;
        transform: scale(0.75);
    }

    .physics-equations {
        gap: 0.8rem;
    }

    .equation {
        flex-direction: column;
        gap: 0.3rem;
    }

    .cluster-2,
    .cluster-3 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 15vw, 5rem);
    }

    .act-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .cascade-visual {
        transform: scale(0.7);
        transform-origin: left center;
    }
}
