/* Short, one-time entrances and restrained interaction feedback. */
@keyframes pa-arrive {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pa-panel {
  from { opacity: .25; translate: 0 7px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes pa-card-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}
@keyframes pa-book {
  from { opacity: .1; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes pa-connect {
  0% { transform: scale(.96); }
  65% { transform: scale(1.012); }
  100% { transform: scale(1); }
}
@keyframes pa-check {
  from { opacity: .2; scale: .75; }
  to { opacity: 1; scale: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .motion-enabled .product-hero-copy > * {
    animation: pa-arrive 650ms cubic-bezier(.2,.7,.2,1) both;
  }
  .motion-enabled .product-hero-copy > h1 { animation-delay: 50ms; }
  .motion-enabled .product-hero-copy > p:not(.eyebrow) { animation-delay: 100ms; }
  .motion-enabled .product-hero-copy > .hero-actions { animation-delay: 150ms; }
  .motion-enabled .product-stage {
    animation: pa-arrive 800ms 160ms cubic-bezier(.2,.7,.2,1) both;
  }
  .motion-enabled .membership-pass {
    animation: pa-card-drift 2100ms 400ms ease-in-out 2;
  }
  .motion-enabled .motion-arrived {
    animation: pa-arrive 620ms cubic-bezier(.2,.7,.2,1) both;
  }
  .motion-enabled .motion-arrived .book-cover {
    animation: pa-book 580ms 100ms cubic-bezier(.2,.7,.2,1) both;
  }
  .motion-enabled .motion-arrived .book-shelf > div:nth-child(2) .book-cover { animation-delay: 170ms; }
  .motion-enabled .motion-arrived .book-shelf > div:nth-child(3) .book-cover { animation-delay: 240ms; }
  .motion-enabled .motion-arrived .workflow-scene i {
    animation: pa-check 360ms 180ms ease-out both;
  }
  .motion-enabled .motion-arrived .workflow-scene > div:nth-of-type(2) i { animation-delay: 350ms; }
  .motion-enabled .motion-arrived .workflow-scene > div:nth-of-type(3) i { animation-delay: 520ms; }
  .motion-enabled .product-content > [role=tabpanel]:not([hidden]) {
    animation: pa-panel 330ms ease-out;
  }
  .motion-enabled .module-demo > * { animation: pa-panel 300ms ease-out; }
  .motion-enabled .puzzle-piece.is-selected { animation: pa-connect 360ms cubic-bezier(.2,.7,.2,1); }
  .motion-enabled .complete-summary:not([hidden]),
  .motion-enabled .faq-list details[open] > p { animation: pa-panel 250ms ease-out; }

  /* Animate the actual UI colours, not custom properties themselves. */
  .motion-enabled .identity-top,
  .motion-enabled .identity-top i,
  .motion-enabled .identity-inner,
  .motion-enabled .identity-inner > span,
  .motion-enabled .identity-panels > div,
  .motion-enabled .identity-panels i,
  .motion-enabled .identity-panels span,
  .motion-enabled .identity-bottom,
  .motion-enabled .identity-bottom > b,
  .motion-enabled .identity-badge > strong,
  .motion-enabled .identity-badge i {
    transition: background-color 380ms ease, color 380ms ease, border-color 380ms ease;
  }
  .motion-enabled .book-cover,
  .motion-enabled .event-ticket-new,
  .motion-enabled .button > svg,
  .motion-enabled .text-link > svg,
  .motion-enabled .project-type-option {
    transition: translate 240ms ease, box-shadow 240ms ease, background-color 240ms ease, border-color 240ms ease;
  }
  .motion-enabled .skin-controls button { transition: scale 200ms ease, border-color 200ms ease; }
  .motion-enabled .skin-controls button[aria-pressed=true] { scale: 1.08; }

  /* Focus must never wait for an entrance; background tabs do no animation work. */
  .motion-enabled .motion-arrived:focus-within,
  .motion-enabled .product-stage:focus-within,
  .motion-enabled .hero-actions:focus-within { animation: none; }
  .motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .motion-enabled .book-shelf > div:hover .book-cover { translate: 0 -5px; box-shadow: 4px 10px 15px #26311b22; }
  .motion-enabled .usecase-event:hover .event-ticket-new { translate: 0 -3px; }
  .motion-enabled .button:hover > svg,
  .motion-enabled .text-link:hover > svg { translate: 3px 0; }
  .motion-enabled .project-type-option:hover { translate: 0 -2px; }
  .motion-enabled .project-type-option:active { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
