/* Below-the-fold activity is decorative and runs only while its card is visible. */
.home-scroll-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 2000; pointer-events: none; }
.home-scroll-progress > span { display: block; height: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #12bfdc, #55e2b5); }
.home-page-motion-toggle { position: fixed; left: 16px; bottom: 18px; z-index: 900; font-size: .72rem; padding: 9px 12px; margin: 0; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.home-page-motion-toggle[hidden] { display: none; }
.home-motion-label { display: inline-flex; align-items: center; gap: 7px; margin-top: 17px; font-size: .7rem; color: var(--preview-muted); }
.home-motion-label i { display: block; width: 6px; height: 6px; background: #60d9b4; border-radius: 50%; }
.motion-reveal { transition: opacity .55s, translate .55s, transform .3s, border-color .3s, box-shadow .3s !important; }
body[data-home-motion="running"] .motion-reveal:not(.is-revealed) { opacity: .5; translate: 0 16px; }
.motion-reveal.is-revealed { opacity: 1; translate: 0 0; }
.motion-pipeline { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 10px 12px; margin: -6px 0 20px; border-radius: 8px; background: var(--preview-card); font-size: .65rem; color: var(--preview-muted); overflow: hidden; }
.motion-pipeline b { font-weight: 400; opacity: .5; }
.motion-pipeline::before { content: ''; position: absolute; left: 0; bottom: 0; width: 35%; height: 2px; background: linear-gradient(90deg, transparent, var(--primary-color), transparent); transform: translateX(-100%); }
.workflow-card { position: relative; overflow: hidden; }
.workflow-card::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, transparent, var(--primary-color), transparent); transform: scaleX(0); }
.workflow-card:nth-child(2) { --workflow-delay: 3s; }
.workflow-card:nth-child(3) { --workflow-delay: 6s; }
.motion-reveal:nth-child(3n + 2) { --reveal-delay: .07s; }
.motion-reveal:nth-child(3n) { --reveal-delay: .14s; }
body[data-home-motion="running"] .motion-reveal.is-revealed { transition-delay: var(--reveal-delay, 0s), var(--reveal-delay, 0s), 0s, 0s, 0s !important; }
body[data-home-motion="running"] [data-scroll-active="true"] .home-motion-label i,
body[data-home-motion="running"] .case-card[data-scroll-active="true"] .status-dot { animation: engine-heartbeat 2.4s ease-in-out infinite; }
body[data-home-motion="running"] .case-card[data-scroll-active="true"] .motion-pipeline::before { animation: workflow-signal 4s linear infinite; }
body[data-home-motion="running"] .case-card[data-scroll-active="true"] .motion-pipeline span { animation: lower-workflow-step 6s ease-in-out infinite; }
.motion-pipeline span:nth-of-type(2) { animation-delay: -4s !important; }
.motion-pipeline span:nth-of-type(3) { animation-delay: -2s !important; }
body[data-home-motion="running"] .workflow-card[data-scroll-active="true"] .step-badge { animation: lower-step-pulse 9s ease-in-out infinite; animation-delay: var(--workflow-delay, 0s); }
body[data-home-motion="running"] .workflow-card[data-scroll-active="true"]::after { animation: lower-step-rail 9s ease-in-out infinite; animation-delay: var(--workflow-delay, 0s); }
body[data-home-motion="running"] [data-scroll-active="true"] .service-illustration .art-tile { animation: lower-art-float 4s ease-in-out infinite; }
body[data-home-motion="running"] [data-scroll-active="true"] .service-illustration .art-panel,
body[data-home-motion="running"] [data-scroll-active="true"] .service-illustration .art-phone { animation: lower-panel-float 4s ease-in-out infinite; animation-delay: -2s; }
body[data-home-motion="running"] [data-scroll-active="true"] .art-chart > span { animation: activity-wave 2.5s ease-in-out infinite; transform-origin: bottom; }
.art-chart > span:nth-child(2) { animation-delay: -.6s !important; }
.art-chart > span:nth-child(3) { animation-delay: -1.2s !important; }
.art-chart > span:nth-child(4) { animation-delay: -1.8s !important; }
body[data-home-motion="running"] .showcase-widget[data-scroll-active="true"] .tab-pane.active .mock-log > div { animation: lower-log-highlight 6s ease-in-out infinite; }
.mock-log > div:nth-child(2) { animation-delay: -4s !important; }
.mock-log > div:nth-child(3) { animation-delay: -2s !important; }
body[data-home-motion="running"] .about-visual[data-scroll-active="true"] .timeline-circle { animation: lower-step-pulse 6s ease-in-out infinite; }
.timeline-circle:nth-of-type(3) { animation-delay: 3s !important; }
body[data-home-motion="paused"] *, body[data-home-motion="paused"] *::before, body[data-home-motion="paused"] *::after,
body[data-home-motion="offscreen"] *, body[data-home-motion="offscreen"] *::before, body[data-home-motion="offscreen"] *::after { animation-play-state: paused !important; }
@keyframes lower-workflow-step { 0%, 38%, 100% { color: var(--preview-muted); } 10%, 28% { color: var(--primary-color); } }
@keyframes lower-step-pulse { 0%, 30%, 100% { box-shadow: 0 0 0 0 rgba(0, 193, 216, 0); } 8%, 22% { box-shadow: 0 0 0 7px rgba(0, 193, 216, .1), 0 0 25px rgba(0, 193, 216, .2); } }
@keyframes lower-step-rail { 0%, 30%, 100% { transform: scaleX(0); opacity: .3; } 8%, 22% { transform: scaleX(1); opacity: 1; } }
@keyframes lower-art-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes lower-panel-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 4px; } }
@keyframes lower-log-highlight { 0%, 40%, 100% { opacity: .6; } 10%, 28% { opacity: 1; } }
@media (max-width: 600px) { .home-page-motion-toggle { left: 12px; bottom: 14px; font-size: .67rem; } }
@media (prefers-reduced-motion: reduce) { .motion-reveal { opacity: 1 !important; translate: none !important; } }
