/* Shared motion safeguards for the six public XOXOMO pages. */

/* Only the status light pulses. Carousel navigation dots stay still. */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hot);
  display: inline-block;
  animation: pulse 1.4s ease-in-out infinite;
}

/* Keep the outgoing slide visible until its opacity fade has completed. */
.case .slide {
  visibility: hidden;
  transition: opacity 350ms ease, visibility 0s linear 350ms;
}

.case .slide.active {
  visibility: visible;
  transition-delay: 0s;
}

/* Opacity is cheaper to animate than a live brightness filter. */
.case-media img,
.case .slide img {
  transition-property: opacity, transform;
}

.case:hover .case-media img,
.case:hover .slide.active img {
  filter: none;
  opacity: 0.8;
}

/* Moving the arrow provides the hover cue without relaying out the link. */
.case-link,
.case-toggle {
  transition-property: color, border-color;
}

.case-link:hover {
  gap: 8px;
}

/* Keep the 6px carousel dot, but give each control a reliable 24px hit area. */
.case .dots {
  gap: 0;
  padding: 0 4px;
}

.case .dot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: transparent;
  transform: none;
  transition: none;
}

.case .dot::before {
  content: "";
  position: static;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(236, 230, 218, 0.4);
  pointer-events: none;
  transform: scale(1);
  transition: background-color 200ms, transform 200ms;
}

.case .dot:hover {
  background: transparent;
}

.case .dot:hover::before {
  background: var(--paper);
}

.case .dot.active {
  background: transparent;
  transform: none;
}

.case .dot.active::before {
  background: var(--hot);
  transform: scale(1.4);
}

/* Geometry is read with the magnetic transform fully neutralized. */
[data-motion-measuring] {
  transform: none !important;
  transition: none !important;
}

/* The script applies this only to loop containers outside the viewport. */
[data-motion-paused],
[data-motion-paused] *,
[data-motion-document-hidden],
[data-motion-document-hidden] * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  [data-magnetic] {
    transform: none !important;
  }
}
