/* Ruch istniejącej kompozycji. Kolory i układ pozostają w styles/refinement. */
.motion-title { position: relative; }
.motion-title-source { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.motion-title-visual { display: block; }
.motion-word-mask { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.motion-word { display: inline-block; transform-origin: 0 100%; }
.motion-enabled .hero { isolation: isolate; }
.motion-enabled .hero-copy, .motion-enabled .hero-visual { will-change: translate; }
.motion-enabled .hero-copy { translate: 0 var(--hero-copy-y, 0px); }
.motion-enabled .hero-visual { translate: 0 var(--hero-screen-y, 0px); }
.motion-enabled .hero-phone-preview { translate: 0 var(--hero-phone-y, 0px); }
.motion-enabled .hero-bg { translate: 0 var(--hero-grid-y, 0px); scale: 1.2; }
.motion-enabled .data-evidence { position: relative; z-index: 2; }
.motion-enabled .data-evidence::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: var(--blue-500); transform: scaleX(var(--data-line, 0)); transform-origin: left; }
.motion-enabled .data-evidence-grid > div { translate: 0 var(--stat-y, 0px); opacity: var(--stat-opacity, 1); }
.motion-enabled .audience-copy .section-preview-accent { overflow: hidden; clip-path: inset(var(--image-inset, 0%) 0 0 0); }
.motion-enabled .audience-copy .section-preview-accent img { scale: var(--image-scale, 1); translate: 0 var(--image-y, 0px); }
.motion-enabled .product-section .showcase { perspective: 1200px; }
.motion-enabled .product-section .app-showcase-device { transform: translateY(var(--product-y, 0px)) rotateX(var(--product-tilt, 0deg)); clip-path: inset(var(--product-inset, 0%) round 24px); transform-origin: center bottom; }
.motion-enabled .product-section .product-copy { translate: 0 var(--product-copy-y, 0px); }
.motion-enabled .usecase-card { translate: 0 var(--card-y, 0px); opacity: var(--card-opacity, 1); }
/* Małe ekrany mają odsłanianie tekstu; duże przesunięcia są wyłączone. */
@media (max-width: 768px) {
  .motion-enabled .hero-copy, .motion-enabled .hero-visual, .motion-enabled .hero-phone-preview, .motion-enabled .hero-bg, .motion-enabled .product-section .product-copy { translate: none; }
  .motion-enabled .product-section .app-showcase-device { transform: none; clip-path: none; }
  .motion-enabled .audience-copy .section-preview-accent img { translate: none; scale: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-word { transform: none !important; opacity: 1 !important; }
  .motion-enabled .hero-copy, .motion-enabled .hero-visual, .motion-enabled .hero-phone-preview, .motion-enabled .hero-bg, .motion-enabled .product-section .product-copy, .motion-enabled .usecase-card, .motion-enabled .data-evidence-grid > div { translate: none !important; opacity: 1 !important; }
  .motion-enabled .product-section .app-showcase-device, .motion-enabled .audience-copy .section-preview-accent { transform: none !important; clip-path: none !important; }
  .motion-enabled .audience-copy .section-preview-accent img { scale: 1 !important; translate: none !important; }
}
/* Warstwowe przejście nie wydłuża strony: zakładka kompensuje sticky. */
html:has(.site-theme), body.site-theme { overflow-x: clip; }
.hero-scroll-stage { position: relative; }
.site-theme .hero-bg { opacity: 1; background-image: linear-gradient(#5e8dcb29 1px,transparent 1px),linear-gradient(90deg,#5e8dcb29 1px,transparent 1px); background-size: 76px 76px; }
.site-theme .hero-bg.grid-ready { background: none; }
.site-theme .hero-bg canvas { display: block; width: 100%; height: 100%; }
.motion-enabled .hero-bg[data-hero-grid] { translate: none; scale: 1; }
.grid-motion-toggle { position: absolute; right: 24px; bottom: 26px; z-index: 8; width: 32px; height: 32px; border-radius: 10px; color: var(--app-muted); background: var(--app-surface); }
.grid-motion-toggle svg { width: 16px; height: 16px; }
@media (min-width:900px) and (prefers-reduced-motion:no-preference) {
  .hero-scroll-stage { padding-bottom: 200px; }
  .hero-scroll-stage > .hero { position: sticky; top: -80px; }
  .site-theme .data-evidence { margin-top: -200px; border-radius: 28px 28px 0 0; box-shadow: 0 -24px 70px #06142a18; }
  .motion-enabled .audience-copy .section-preview-accent { translate: 0 var(--audience-frame-y,0px); }
  .motion-enabled .product-section .app-showcase-device { will-change: transform; }
}
@media (min-width:900px) and (prefers-reduced-motion:no-preference) {
  .hero-scroll-stage { padding-bottom: 0; }
  .hero-scroll-stage::after { content: ''; display: block; height: 200px; }
}
