:root {
  --desiq-motion-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --desiq-motion-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* Clip at the page edge without creating a scroll container around motion. */
[data-desiq-motion-page-clip] #page-container:has([data-desiq-motion]),
[data-desiq-motion-page-clip]:has([data-desiq-motion]:not(#page-container *)),
[data-desiq-motion-page-clip]:has([data-desiq-motion]:not(#page-container *)) > body {
  overflow-x: clip;
}

[data-desiq-motion] {
  backface-visibility: hidden;
}

[data-desiq-motion] img {
  backface-visibility: hidden;
}

[data-desiq-motion-inspecting="true"] {
  outline-color: #326bff;
  outline-style: solid !important;
  outline-width: 3px !important;
  outline-offset: 5px !important;
  animation: desiq-motion-target-focus 500ms ease-out forwards;
}

@keyframes desiq-motion-target-focus {
  0%, 55% { outline-color: #326bff; }
  100% { outline-color: rgba(50, 107, 255, 0); }
}

[data-desiq-motion-marker] {
  position: relative;
  outline: 1px dashed rgba(23, 105, 255, 0.72);
  outline-offset: 3px;
}

[data-desiq-motion-marker]::after {
  position: absolute;
  z-index: 99998;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1769ff;
  color: #fff;
  box-shadow: 0 5px 16px rgba(23, 105, 255, 0.28);
  content: attr(data-desiq-motion-marker-order);
  font: 700 11px/1 system-ui, sans-serif;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-desiq-motion] {
    scroll-behavior: auto;
  }

  [data-desiq-motion-inspecting="true"] {
    animation: none;
  }
}
