/* Motion layer for the Takt landing page (loaded by /index.html only).
   Without it the page is complete and static; motion.js adds the moving parts. */

::selection { background: rgba(78,234,255,.28); color: #FFFFFF; }
:focus-visible { outline: 2px solid #4EEAFF; outline-offset: 3px; border-radius: 6px; }

.m-btn { transition: filter .2s ease, transform .18s cubic-bezier(.16,1,.3,1); }
.m-btn:hover { filter: brightness(1.12); }
.m-btn:active { transform: scale(.975); transition-duration: .08s; }

/* headline: the first line rises out of a mask, the second is cut in by a playhead moving in reading direction */
.m-mask { display: inline-block; overflow: hidden; vertical-align: top; padding: .14em .06em .1em; margin: -.14em -.06em -.1em; }
.m-rise { display: inline-block; animation: m-rise 1s cubic-bezier(.16,1,.3,1) .1s both; }
@keyframes m-rise { from { transform: translateY(112%); } }
.m-wipe { position: relative; display: inline-block; animation: m-wipe 1.05s cubic-bezier(.65,0,.35,1) .5s both; }
.m-wipe::after {
  content: ""; position: absolute; top: 6%; bottom: 10%; left: 0; width: 3px; border-radius: 2px;
  background: #4EEAFF; box-shadow: 0 0 22px 2px rgba(78,234,255,.75);
  animation: m-head 1.05s cubic-bezier(.65,0,.35,1) .5s both;
}
@keyframes m-wipe { from { clip-path: inset(-14% -6% -14% 100%); } to { clip-path: inset(-14% -6% -14% -6%); } }
@keyframes m-head { 0% { left: 100%; opacity: 1; } 80% { opacity: 1; } 100% { left: 0; opacity: 0; } }

/* first paint while motion.js is on its way (html.m-js is set by a line in <head>): the timelines start empty */
.m-js .m-clip, .m-js .m-lay > :first-child > [style*="background"] { visibility: hidden; }
.m-js .m-cap, .m-js .m-pfoot, .m-js .m-playhead { opacity: 0; }
.m-js .m-cut { transform: scaleY(0); }

/* the comparison's sentence before it is cut: plain text that wraps like a paragraph */
.m-merged .m-split-row { display: block !important; }
.m-merged .lp-chip { display: inline; white-space: nowrap; padding: 0 !important; background-color: transparent !important; border-color: transparent !important; }
.m-merged .m-cut { display: none; }

/* parts motion.js adds */
.m-cover { position: absolute; z-index: 1; transform-origin: right center; pointer-events: none; }
.m-playhead { z-index: 3; }
.m-kbd {
  position: absolute; left: 50%; bottom: -15px; z-index: 4; display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 10px; border-radius: 10px; background: #1B1D22; border: 1px solid #30343B;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.8); font-size: 12.5px; color: #C9CDD4; white-space: nowrap;
  opacity: 0; transform: translate(-50%, 0); pointer-events: none;
}
.m-keys { display: inline-flex; gap: 4px; }
.m-kbd kbd {
  display: inline-block; min-width: 12px; padding: 1px 6px; border-radius: 5px; border: 1px solid #3B3F46; border-bottom-width: 2px;
  background: #26282D; font: 500 11px/1.4 'IBM Plex Mono', monospace; color: #EEF0F4; text-align: center;
}
.m-tick { position: absolute; z-index: 2; width: 2px; border-radius: 1px; background: #4EEAFF; box-shadow: 0 0 10px #4EEAFF; opacity: 0; pointer-events: none; }
.m-fill { position: absolute; inset: 0; background: rgba(255,255,255,.2); transform: scaleX(0); transform-origin: right center; pointer-events: none; }
.m-cursor { position: absolute; top: 0; left: 0; z-index: 4; width: 22px; height: 22px; opacity: 0; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.65)); }
.m-flyer { position: absolute; top: 0; left: 0; z-index: 3; margin: 0; box-sizing: border-box; white-space: nowrap; pointer-events: none; }
.m-roll { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; }
.m-roll > span { display: inline-block; }
.m-marquee { position: absolute; border: 1px dashed rgba(78,234,255,.95); background: rgba(78,234,255,.08); border-radius: 5px; opacity: 0; pointer-events: none; }
.m-pill { position: absolute; top: 0; left: 0; border-radius: 9px; border: 1px solid rgba(78,234,255,.5); background: rgba(37,99,255,.16); box-shadow: 0 0 18px -6px rgba(78,234,255,.55); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .m-rise, .m-wipe { animation: none; }
  .m-wipe::after { display: none; }
  .m-btn, .m-btn:active { transition: none; transform: none; }
}
