/* ===== More kinetic motion: letter-by-letter title, drawn highlight stripes, label wipes, rising text and staggered lists.
   Every hidden starting state applies only once the script has run (html.kx-on), so nothing is lost without JavaScript. ===== */
@keyframes kx-rise { from { opacity: 0; translate: 0 1.4rem; } to { opacity: 1; translate: 0 0; } }
@keyframes kx-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes kx-pop { 0% { scale: 0; } 70% { scale: 1.6; } 100% { scale: 1; } }

/* the opening title, letter by letter: each letter rises out of its word's slot with a slight turn */
.kinetic[data-k="chars"] .kw { overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; padding-inline: .02em; margin-inline: -.02em; }
.kinetic[data-k="chars"] .kw-i { transform: none; opacity: 1; filter: none; }
.kinetic[data-k="chars"] .kc { display: inline-block; transform: translateY(112%) rotate(14deg); transform-origin: 0 100%; opacity: 0;
  transition: transform 1s cubic-bezier(.16, .84, .24, 1) calc(var(--c) * 26ms + var(--d, 0ms)), opacity .6s ease calc(var(--c) * 26ms + var(--d, 0ms)); }
.kinetic[data-k="chars"].in .kc { transform: none; opacity: 1; }

/* gradient words: once a title has landed, the turquoise → sky blue fill drifts slowly back and forth through its letters */
@keyframes kx-drift { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.kx-on .kinetic.in .kw-host .kw-i, .kx-on .perf blockquote.in i { animation: kx-drift 3.2s ease-in-out 1.2s infinite alternate; }
.kx-on .kinetic[data-k="chars"].in .kw-host .kw-i { animation-delay: calc(var(--cn, 30) * 26ms + var(--d, 0ms) + 900ms); }
/* the opening title's gradient word rises as one piece, in its place in the letter sequence */
.kinetic[data-k="chars"] .kw-host .kw-i { transform: translateY(112%) rotate(8deg); transform-origin: 0 100%; opacity: 0;
  transition: transform 1s cubic-bezier(.16, .84, .24, 1) calc(var(--c) * 26ms + var(--d, 0ms)), opacity .6s ease calc(var(--c) * 26ms + var(--d, 0ms)); }
.kinetic[data-k="chars"].in .kw-host .kw-i { transform: none; opacity: 1; }

/* section labels wipe in, their dot pops */
.kx-on .label.kx { clip-path: inset(0 100% 0 0); }
.kx-on .label.kx.in { animation: kx-wipe .9s cubic-bezier(.65, 0, .35, 1) both; }
.kx-on .label.kx.in::before { animation: kx-pop .5s ease .55s both; }

/* single blocks (paragraphs, buttons, panels) rise into place */
.kx-on .kx-up { opacity: 0; }
.kx-on .kx-up.in { animation: kx-rise .9s cubic-bezier(.16, .84, .24, 1) var(--kd, 0ms) both; }

/* lists: the items arrive one after another */
.kx-on .kx-list > * { opacity: 0; }
.kx-on .kx-list.in > * { animation: kx-rise .85s cubic-bezier(.16, .84, .24, 1) calc(var(--ki, 0) * 90ms + var(--kd, 0ms)) both; }

@media (prefers-reduced-motion: reduce) {
  .kx-on .label.kx, .kx-on .kx-up, .kx-on .kx-list > * { opacity: 1; clip-path: none; animation: none; }
}
