/* Shared per-letter headline motion used by Domain Search and PLM Studio. */
.plm-animated-headline-stage {
  position: relative;
  display: block;
  min-height: 1.24em;
  overflow: visible;
  isolation: isolate;
}

.plm-animated-headline-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  width: 100%;
  white-space: nowrap;
}

.plm-animated-headline-layer.is-active {
  z-index: 1;
}

.plm-animated-headline-letter {
  display: inline-block;
  color: var(--plm-headline-settled-color, currentColor);
  will-change: transform, opacity, filter;
}

.plm-animated-headline-layer.is-entering .plm-animated-headline-letter {
  animation: plm-headline-letter-in var(--plm-headline-enter-duration, 700ms) cubic-bezier(.22, .74, .28, 1) both;
  animation-delay: calc(var(--plm-headline-letter-index) * var(--plm-headline-stagger, 11ms));
}

.plm-animated-headline-layer.is-leaving .plm-animated-headline-letter {
  animation: plm-headline-letter-out var(--plm-headline-exit-duration, 700ms) cubic-bezier(.3, .05, .55, 1) both;
  animation-delay: calc(var(--plm-headline-letter-index) * var(--plm-headline-exit-stagger, 11ms));
}

@keyframes plm-headline-letter-in {
  from {
    opacity: 0;
    color: var(--plm-headline-enter-color, currentColor);
    filter: blur(2px);
    transform: translateY(.15em);
  }

  68% {
    opacity: 1;
    color: var(--plm-headline-enter-color, currentColor);
    filter: blur(0);
    transform: translateY(-.022em);
  }

  to {
    opacity: 1;
    color: var(--plm-headline-settled-color, currentColor);
    filter: none;
    transform: translateY(0);
  }
}

@keyframes plm-headline-letter-out {
  from {
    opacity: 1;
    filter: none;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    filter: blur(2.5px);
    transform: translateY(-.16em);
  }
}

@media (prefers-reduced-motion: reduce) {
  .plm-animated-headline-layer.is-entering .plm-animated-headline-letter,
  .plm-animated-headline-layer.is-leaving .plm-animated-headline-letter {
    animation: none !important;
  }
}
