/**
 * Keyframes and reusable animation / transition utility classes.
 */

@keyframes pulse-soft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(196, 105, 82, 0.35);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(196, 105, 82, 0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.section--observe {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.65s var(--ease-out-smooth),
    transform 0.65s var(--ease-out-smooth);
}

.section--observe.section--visible {
  opacity: 1;
  transform: translateY(0);
}

.button--pulse {
  animation: pulse-soft 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .section--observe {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button--pulse {
    animation: none;
  }
}

.lightbox--open .lightbox__overlay {
  animation: fade-in 0.25s var(--ease-out-smooth) forwards;
}

.lightbox--open .lightbox__dialog {
  animation: scale-in 0.28s var(--ease-out-smooth) forwards;
}
