/* ============================================================
   animations.css — MotorWorks
   ============================================================ */

/* ─── Reveal on scroll ─── */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity .75s ease, transform .75s ease;
}
.reveal-up    { transform: translateY(36px); }
.reveal-left  { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }

.reveal-up.in,
.reveal-left.in,
.reveal-right.in {
  opacity: 1;
  transform: translate(0);
}

/* ─── Hero load animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content .hero-badge,
.hero-content .hero-title,
.hero-content .hero-desc,
.hero-content .hero-actions,
.hero-content .hero-stats {
  animation: fadeUp .9s ease both;
}
.hero-content .hero-badge   { animation-delay: .1s; }
.hero-content .hero-title   { animation-delay: .22s; }
.hero-content .hero-desc    { animation-delay: .36s; }
.hero-content .hero-actions { animation-delay: .48s; }
.hero-content .hero-stats   { animation-delay: .6s; }

/* ─── Gear spin on logo hover ─── */
.logo-svg:hover g { animation: spin 1.5s ease-in-out; }
@keyframes spin {
  from { transform: rotate(0deg); transform-origin: 26px 26px; }
  to   { transform: rotate(360deg); transform-origin: 26px 26px; }
}

/* ─── Background hero parallax ─── */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg img {
    will-change: transform;
    transition: transform .1s linear;
  }
}

/* ─── Card pulse on hover ─── */
@keyframes cardGlow {
  0%   { box-shadow: 0 8px 32px rgba(255,92,0,.2); }
  50%  { box-shadow: 0 8px 48px rgba(255,92,0,.4); }
  100% { box-shadow: 0 8px 32px rgba(255,92,0,.2); }
}
.sv-card:hover,
.precio-card:hover {
  animation: cardGlow .8s ease-in-out;
}

/* ─── Formulario respuesta ─── */
@keyframes responseIn {
  from { opacity: 0; transform: scale(.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.form-response.visible {
  animation: responseIn .5s cubic-bezier(.34,1.56,.64,1) both;
}

/* ─── Floating dots deco ─── */
@keyframes floatDot {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}

/* ─── Scroll progress bar ─── */
.progress-bar-top {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff5c00, #ff7a28);
  z-index: 9999;
  width: 0%;
  transition: width .1s linear;
}

/* ─── Typing cursor on badge ─── */
@keyframes cursorBlink {
  0%,100% { border-right-color: transparent; }
  50%     { border-right-color: #ff5c00; }
}

/* ─── Stat counter ─── */
@keyframes countUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.hstat-n { animation: countUp .6s .7s both; }

/* ─── Neon line accent ─── */
@keyframes lineGrow {
  from { width: 0; }
  to   { width: 60px; }
}
.section-tag::after {
  content: '';
  display: block;
  height: 1px;
  background: #ff5c00;
  margin-top: 8px;
  animation: lineGrow .5s ease both;
}

/* ─── Form submit shake on error ─── */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  60%     { transform: translateX(-6px); }
  80%     { transform: translateX(6px); }
}
.form-card.error { animation: shake .4s ease; }

/* ─── Success checkmark draw ─── */
@keyframes checkDraw {
  from { stroke-dashoffset: 50; }
  to   { stroke-dashoffset: 0; }
}
.check-path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkDraw .4s .3s ease forwards;
}

/* ─── Hover underline links ─── */
.nav-a { position: relative; }
.nav-a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 1px;
  background: #ff5c00;
  transform: scaleX(0);
  transition: transform .25s ease;
  transform-origin: left;
}
.nav-a:not(.nav-cta):hover::after { transform: scaleX(1); }
