@keyframes reveal-rise {
  from {
    opacity: 0;
    translate: 0 calc(var(--reveal-shift, 0px) * var(--reveal-from, 1));
    scale: var(--reveal-scale, 1);
  }
}

@keyframes reveal-wipe-up {
  from {
    opacity: 0.4;
    clip-path: inset(100% 0 0 0 round 12px);
  }
  to {
    clip-path: inset(0 round 12px);
  }
}

@keyframes reveal-wipe {
  from {
    opacity: 0.4;
    clip-path: inset(0 0 100% 0 round 12px);
  }
  to {
    clip-path: inset(0 round 12px);
  }
}

.reveal:not(.is-visible) {
  opacity: 0;
}

.reveal.is-visible {
  animation: reveal-rise var(--motion-reveal) var(--motion-ease-out) var(--reveal-delay, 0ms) backwards;
}

.reveal[data-reveal="title"] {
  --reveal-shift: var(--motion-shift-title);
}

.reveal[data-reveal="text"] {
  --reveal-shift: var(--motion-shift-text);
}

.reveal[data-reveal="card"] {
  --reveal-shift: var(--motion-shift-card);
  --reveal-scale: var(--motion-scale-card);
}

.reveal[data-reveal="pill"] {
  --reveal-shift: var(--motion-shift-pill);
}

.reveal[data-reveal="button"] {
  --reveal-shift: var(--motion-shift-button);
}

.reveal.is-visible[data-reveal="media"] {
  animation-name: reveal-wipe;
  animation-duration: var(--motion-reveal-media);
}

.reveal[data-reveal-from="above"] {
  --reveal-from: -1;
}

.reveal.is-visible[data-reveal="media"][data-reveal-from="above"] {
  animation-name: reveal-wipe-up;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal:not(.is-visible) {
    opacity: 1;
    animation: none;
  }
}
