/* ==========================================================================
   Seguiu — Motion & Animation System
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-press: cubic-bezier(.3, .7, .3, 1);
}

@keyframes sg-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sg-rise-h {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sg-pop {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  60% {
    opacity: 1;
    transform: scale(1.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes sg-pen {
  from {
    stroke-dashoffset: 1.02px;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes sg-press {
  35%, 55% {
    transform: translateY(3px);
    border-bottom-width: 1px;
  }
}

@keyframes sg-drift {
  to {
    transform: translateX(-50%);
  }
}

@keyframes sg-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Revelação por scroll: nada fica escondido se o JS falhar */
.js [data-reveal] {
  opacity: 0;
}

[data-reveal].is-in {
  opacity: 1;
  animation: sg-rise 0.62s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

[data-reveal].is-in [data-pop] {
  animation: sg-pop 0.38s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms + 260ms);
}

[data-reveal].is-in [data-pen] path {
  stroke-dasharray: 1px 1px;
  animation: sg-pen 0.28s cubic-bezier(.45, 0, .2, 1) both;
}

/* Speed lines animation in Hero */
.sg-speed-lines path {
  animation: sg-rise-h 0.5s var(--ease-out) both;
}
.sg-speed-lines .sg-spd-1 { animation-delay: 100ms; }
.sg-speed-lines .sg-spd-2 { animation-delay: 140ms; }
.sg-speed-lines .sg-spd-3 { animation-delay: 180ms; }

/* Marquee / Visto em track */
.sg-marquee-track {
  display: flex;
  width: max-content;
  animation: sg-drift 30s linear infinite;
}
.sg-marquee-track:hover {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-reveal] {
    opacity: 1 !important;
  }
  .sg-marquee-track {
    animation: none !important;
    transform: none !important;
  }
}
