/* ROYAL PACKERS & MOVERS — animations */

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes roadDash { to { background-position: -66px 0; } }
@keyframes scrollLine { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }
@keyframes dust {
  0% { opacity: 0; transform: translate(0,0) scale(0.6); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(-150px,-46px) scale(1.7); }
}
@keyframes arrowNudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

/* Hero cinematic sequence */
.hero__logo-mark { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.is-ready .hero__logo-mark { opacity: 1; transform: none; transition-delay: 0.15s; }

.hero__line > span { transition: transform 1.2s var(--ease); }
.is-ready .hero__line > span { transform: translateY(0); transition-delay: 0.3s; }
.is-ready .hero__line:nth-child(2) > span { transition-delay: 0.42s; }
.is-ready .hero__line:nth-child(3) > span { transition-delay: 0.54s; }

.hero__sub, .hero__text, .hero__actions, .hero__marks, .hero__scroll {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.is-ready .hero__sub { opacity: 1; transform: none; transition-delay: 0.75s; }
.is-ready .hero__text { opacity: 1; transform: none; transition-delay: 0.88s; }
.is-ready .hero__actions { opacity: 1; transform: none; transition-delay: 1s; }
.is-ready .hero__marks { opacity: 1; transform: none; transition-delay: 1.12s; }
.is-ready .hero__scroll { opacity: 1; transform: none; transition-delay: 2.2s; }

.hero__grid { opacity: 0; transition: opacity 1.2s ease 0.1s; }
.is-ready .hero__grid { opacity: 0.8; }
.hero__word { opacity: 0; transform: translateY(24px); transition: opacity 1.4s var(--ease) 0.2s, transform 1.4s var(--ease) 0.2s; }
.is-ready .hero__word { opacity: 1; transform: none; }

.hero__road { opacity: 0; transition: opacity 0.9s ease 1s; }
.is-ready .hero__road { opacity: 1; }

.hero__truck { transition: transform 3.6s cubic-bezier(0.17, 0.75, 0.2, 1); }
.is-ready .hero__truck { transform: translateX(0); transition-delay: 1.2s; }
.is-ready .hero__dust { opacity: 1; transition: opacity 0.7s ease 1.5s; }

.header, .logo { animation: fadeUp 0.9s var(--ease) both; }

/* Scroll reveals */
[data-anim] { opacity: 0; transition: opacity 1s var(--ease), transform 1.1s var(--ease), clip-path 1.3s var(--ease); will-change: transform, opacity; }
[data-anim="up"] { transform: translateY(42px); }
[data-anim="left"] { transform: translateX(-46px); }
[data-anim="right"] { transform: translateX(46px); }
[data-anim="scale"] { transform: scale(0.94); }
[data-anim="clip"] { clip-path: inset(0 100% 0 0); opacity: 1; }
[data-anim="clip-up"] { clip-path: inset(100% 0 0 0); opacity: 1; }
[data-anim].is-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }

[data-stagger] > * { opacity: 0; transform: translateY(28px); transition: opacity 0.95s var(--ease), transform 0.95s var(--ease); }
[data-stagger].is-in > * { opacity: 1; transform: none; }
.why-list[data-stagger].is-in > .why-item:nth-child(even) { transform: translateY(30px); }

/* Masked text reveal for section headings */
.reveal-mask { display: block; overflow: hidden; }
.reveal-mask > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-in .reveal-mask > span, .reveal-mask.is-in > span { transform: translateY(0); }
.is-in .reveal-mask:nth-child(2) > span { transition-delay: 0.1s; }
.is-in .reveal-mask:nth-child(3) > span { transition-delay: 0.2s; }


.parallax { will-change: transform; }
.arrow-nudge { animation: arrowNudge 2.2s var(--ease) infinite; display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero__truck { transform: translateX(0) !important; }
  .hero__line > span, .reveal-mask > span { transform: none !important; }
  [data-anim], [data-stagger] > *, .hero__sub, .hero__text, .hero__actions, .hero__marks, .hero__scroll, .hero__word, .hero__logo-mark { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .clip-reveal::before { display: none !important; }
  html { scroll-behavior: auto; }
}
