
/* ================================================
   TEXT MOTION — ANIMATION SETTINGS
================================================ */

:root {
  --tm-reveal-distance: 22px;
  --tm-reveal-duration: 850ms;
  --tm-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Applied automatically by text-motion.js */

.tm-text {
  translate: 0 var(--tm-scroll-y, 0px);

  transition:
    opacity var(--tm-reveal-duration) var(--tm-reveal-ease),
    transform var(--tm-reveal-duration) var(--tm-reveal-ease);

  transition-delay: var(--tm-delay, 0ms);
}

/* Before entering the viewport */

.tm-text.tm-before {
  opacity: 0;
  transform: translateY(var(--tm-reveal-distance));
}

/* After entering the viewport */

.tm-text.tm-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile: entrance animation only */

@media (max-width: 700px) {
  .tm-text {
    translate: none;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  .tm-text {
    translate: none !important;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}
