/* css/clips-art.css — the AI clone picture and "film it yourself" (js/clips/clips-art.js). .cart-* ONLY.
 *
 * The motion of docs/projects/coach-app/upgrade-moments/README.md, in CSS. The picture is drawn at its finished
 * moment, so with no animation (reduce motion, an old browser) the finished picture is what shows.
 *
 * idle: one loop of 5.6 s. 0 to 0.4 still · 0.4 to 0.6 the line and corners fade in · 0.5 to 2.0 the line sweeps
 * down (smooth start and stop) · 2.0 to 2.25 they fade out · 2.1 to 3.0 the copy slides out, 74 units apart, each
 * frame turned 5 degrees, overshooting and settling (back out) · 3.0 to 3.35 the sparkles pop · glow rises with the
 * copy and eases to a third by 3.8 · rest · 5.0 to 5.6 the copy slides back. As percentages of 5.6 s:
 * 0.4 = 7.1, 0.5 = 8.9, 0.6 = 10.7, 2.0 = 35.7, 2.1 = 37.5, 2.25 = 40.2, 3.0 = 53.6, 3.35 = 59.8, 3.8 = 67.9, 5.0 = 89.3.
 * preparing: the copy breathes every 2.4 s (strength 0.55 to 1, glow 0.2 to 0.7). film: the record dot's halo
 * breathes every 2.4 s (9 to 12.5 units, strength 0.35 to 0.14). The icon size never moves.
 */
.cart { display: inline-flex; line-height: 0; vertical-align: middle; }
.cart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.cart-icon { width: 28px; height: 28px; }
.cart .cart-cp, .cart .cart-og, .cart .cart-sp, .cart .cart-halo { transform-box: fill-box; transform-origin: center; }
/* The scan is only seen while it moves. */
.cart .cart-scan { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .cart.is-idle .cart-cp { animation: cart-cp 5.6s infinite; }
  .cart.is-idle .cart-og { animation: cart-og 5.6s infinite; }
  .cart.is-idle .cart-sp { animation: cart-sp 5.6s infinite; }
  .cart.is-idle .cart-gl { animation: cart-gl 5.6s infinite; }
  .cart.is-idle .cart-scan { animation: cart-scan 5.6s infinite linear; }
  .cart.is-idle .cart-line { animation: cart-line 5.6s infinite; }
  .cart.is-preparing .cart-cp { animation: cart-breath 2.4s infinite ease-in-out; }
  .cart.is-preparing .cart-gl { animation: cart-breath-gl 2.4s infinite ease-in-out; }
  .cart.is-film .cart-halo { animation: cart-halo 2.4s infinite ease-in-out; }
  /* Off the screen, nothing moves (clips-art.js watch). */
  .cart.is-off * { animation-play-state: paused !important; }
}

/* The copy, from behind the first frame to its place: measured from the finished place. */
@keyframes cart-cp {
  0%, 37.5% { transform: translateX(-37px) rotate(-5deg); animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  53.6% { transform: none; }
  89.3% { transform: none; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100% { transform: translateX(-37px) rotate(-5deg); }
}
@keyframes cart-og {
  0%, 37.5% { transform: translateX(37px) rotate(5deg); animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  53.6% { transform: none; }
  89.3% { transform: none; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100% { transform: translateX(37px) rotate(5deg); }
}
@keyframes cart-sp {
  0%, 53.6% { transform: scale(0); opacity: 0; animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  59.8% { transform: none; opacity: 1; }
  89.3% { transform: none; opacity: 1; animation-timing-function: ease-in; }
  100% { transform: scale(0); opacity: 0; }
}
@keyframes cart-gl {
  0%, 37.5% { opacity: 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  53.6% { opacity: 1; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  67.9% { opacity: .35; }
  89.3% { opacity: .35; animation-timing-function: ease-in; }
  100% { opacity: 0; }
}
@keyframes cart-scan {
  0%, 7.1% { opacity: 0; }
  10.7%, 35.7% { opacity: 1; }
  40.2%, 100% { opacity: 0; }
}
@keyframes cart-line {
  0%, 8.9% { transform: translateY(0); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  35.7%, 100% { transform: translateY(96px); }
}
@keyframes cart-breath { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes cart-breath-gl { 0%, 100% { opacity: .7; } 50% { opacity: .2; } }
@keyframes cart-halo {
  0%, 100% { transform: scale(.837); opacity: .35; }
  50% { transform: scale(1.163); opacity: .14; }
}
