/* ==========================================================================
   دیگ اول — DIGE AVAL
   animations.css — حرکت و ریتم
   ========================================================================== */

/* -------------------------------- کی‌فریم‌ها ------------------------------- */
@keyframes steam-rise {
  0% {
    opacity: 0;
    transform: translateY(14px) scaleX(0.94);
  }
  22% {
    opacity: 0.75;
  }
  65% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translateY(-46px) scaleX(1.06);
  }
}

@keyframes marquee {
  to {
    transform: translateX(50%);
  }
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes brush-in {
  to {
    transform: scaleX(1);
  }
}

@keyframes steam-drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------- ورود اجزا با اسکرول --------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: opacity, transform;
}
[data-reveal='fade'] {
  transform: none;
}
[data-reveal='scale'] {
  transform: scale(0.965);
}
[data-reveal='lines'] {
  clip-path: inset(0 0 100% 0);
  transform: none;
  opacity: 1;
  transition: clip-path 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

/* ورود متن هیرو — مثل بخاری که می‌نشیند */
.hero__copy [data-steam-in] {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(12px);
  animation: steam-clear 1.5s var(--ease-out) forwards;
  animation-delay: calc(0.18s + var(--d, 0) * 0.14s);
}
@keyframes steam-clear {
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

/* خطوط تیتر با ماسک */
.line-mask {
  display: block;
  overflow: hidden;
}
.line-mask > span {
  display: block;
  transform: translateY(102%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 130ms);
}
.is-in .line-mask > span,
.line-mask.is-in > span {
  transform: none;
}

/* ------------------------------ احترام به کاربر --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  .hero__copy [data-steam-in],
  .line-mask > span {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    clip-path: none !important;
  }
  .ticker__track {
    animation: none !important;
  }
  .steam {
    display: none;
  }
  .steam-divider path {
    stroke-dashoffset: 0 !important;
  }
}
