/* A real print-sheet layout, with movement confined to the illustration. */
.home .hero { position: relative; isolation: isolate; }
/* A blue printing stage and visible white paper moving behind the tool. */
.home .hero { overflow: clip; }
.home .hero::before, .home .hero::after {
  content: ""; position: absolute; pointer-events: none; border-radius: 4px;
}
.home .hero::before {
  z-index: -2; top: 20px; bottom: 46px; right: 0; width: 46%;
  background: #c5dcef;
}
.home .hero::after {
  z-index: -1; top: 56px; right: 2%; width: 40%; aspect-ratio: 2 / 3;
  background: #ffffff; transform: translate(14px, 0) rotate(-4deg);
}
.home .upload-column { background: transparent; padding: 34px 30px; }
.home .drop { border: 2px solid #d7e3ec; }
.motion-caption { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0 0 14px; text-align: center; }
.motion-demo { gap: 22px; margin: 20px auto; animation: none; }
.motion-demo .motif-single { width: 112px; flex: none; }
.motion-demo .motif-sheet { width: 142px; flex: none; }
.motion-demo .motif-sheet > svg { overflow: visible; }
.motion-demo .motif-flow { width: 28px; color: var(--accent); flex: none; }
.motion-demo .motif-flow svg { width: 100%; }
.motion-demo .demo-copy { opacity: 1; transform: none; }
.copy-a { --from-x: -260px; --from-y: 100px; --copy-delay: 0s; }
.copy-b { --from-x: -360px; --from-y: 100px; --copy-delay: .2s; }
.copy-c { --from-x: -260px; --from-y: 0px; --copy-delay: .4s; }
.copy-d { --from-x: -360px; --from-y: 0px; --copy-delay: .6s; }
.copy-e { --from-x: -260px; --from-y: -100px; --copy-delay: .8s; }
.copy-f { --from-x: -360px; --from-y: -100px; --copy-delay: 1s; }
.motion-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.motion-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; cursor: pointer; color: var(--ink); }
.motion-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.motion-toggle:hover { color: var(--accent); }
.home .hero:has(#pauseHeroMotion:checked)::before,
.home .hero:has(#pauseHeroMotion:checked)::after,
.home .hero:has(#pauseHeroMotion:checked) .demo-copy { animation-play-state: paused; }
@media (prefers-reduced-motion: no-preference) {
  .home .hero::after { animation: paper-arrival 9s cubic-bezier(.22, .8, .3, 1) infinite both; }
  .motion-demo .demo-copy { animation: arrange-copy 12s cubic-bezier(.22, 1, .36, 1) infinite both; animation-delay: var(--copy-delay); }
  @keyframes arrange-copy {
    0%, 9% { opacity: 0; transform: translate(var(--from-x), var(--from-y)) scale(1.08); }
    20%, 88% { opacity: 1; transform: translate(0, 0) scale(1); }
    97%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
  }
  @keyframes paper-arrival {
    0% { transform: translate(88px, 38px) rotate(8deg); }
    27%, 57% { transform: translate(-18px, -8px) rotate(-5deg); }
    84%, 100% { transform: translate(88px, 38px) rotate(8deg); }
  }
}
@media (max-width: 1000px) {
  .home .upload-column { padding: 24px 16px; }
  .motion-demo { gap: 14px; }
  .motion-demo .motif-single { width: 78px; }
  .motion-demo .motif-sheet { width: 110px; }
  .motion-demo .motif-flow { width: 22px; }
}
@media (max-width: 700px) {
  .home .hero { overflow: visible; }
  .home .hero::before, .home .hero::after { display: none; }
  .home .upload-column { position: relative; isolation: isolate; overflow: hidden; background: #c5dcef; padding: 18px; }
  .home .upload-column::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    top: 34px; right: -18px; width: 90%; aspect-ratio: 2 / 3; background: #fff;
    transform: translate(12px, 0) rotate(-5deg);
  }
  .home .drop { border: 0; }
  .motion-demo .motif-single { width: 78px; }
  .motion-demo .motif-sheet { width: 96px; }
  .motion-caption { margin-bottom: 10px; font-size: 18px; }
  .motion-demo { gap: 22px; margin: 18px auto; }

  .motion-demo .motif-flow { width: 22px; }
  .motion-tools { font-size: 14px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .home .hero::before, .home .hero::after, .motion-demo, .motion-demo .demo-copy { animation: none; }
  .motion-demo .demo-copy { opacity: 1; transform: none; }
  .motion-toggle { display: none; }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .home .upload-column::before { animation: mobile-paper-arrival 9s cubic-bezier(.22,.8,.3,1) infinite both; }
  @keyframes mobile-paper-arrival {
    0%, 100% { transform: translate(44px, 22px) rotate(7deg); }
    30%, 60% { transform: translate(-20px, -6px) rotate(-6deg); }
  }
}
.home .hero:has(#pauseHeroMotion:checked) .upload-column::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .home .upload-column::before { animation: none; }
}
