/* ============================================
   ModForge Hub — Animations
   Hover · Glow · Shimmer · Fade · Particles
   ============================================ */

/* ── Keyframes ── */

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.7);
  }
}

@keyframes pulse-glow-green {
  0%, 100% {
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.6);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(1deg);
  }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes border-glow-pulse {
  0%, 100% {
    border-color: rgba(139, 92, 246, 0.3);
  }
  50% {
    border-color: rgba(139, 92, 246, 0.6);
  }
}

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

@keyframes slide-in-bottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6),
                 0 0 20px rgba(139, 92, 246, 0.4),
                 0 0 40px rgba(139, 92, 246, 0.2);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* ── Animation Classes ── */

.animate-fade-in {
  animation: fade-in 0.6s ease forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 0.7s ease forwards;
}

.animate-fade-in-left {
  animation: fade-in-left 0.6s ease forwards;
}

.animate-fade-in-right {
  animation: fade-in-right 0.6s ease forwards;
}

.animate-scale-in {
  animation: scale-in 0.5s ease forwards;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-slow {
  animation: float-slow 6s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-pulse-glow-green {
  animation: pulse-glow-green 2s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* ── Scroll Animation (Moved to GSAP) ── */

/* ── Shimmer Loading ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card-solid) 25%,
    rgba(148, 163, 184, 0.08) 50%,
    var(--bg-card-solid) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  width: 80%;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 20px;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-image {
  width: 100%;
  height: 200px;
}

/* ── Hover Effects ── */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: var(--glow-purple);
}

.hover-glow-green:hover {
  box-shadow: var(--glow-green);
}

.hover-border-glow {
  transition: border-color var(--transition-base);
}

.hover-border-glow:hover {
  border-color: rgba(139, 92, 246, 0.55);
}

/* ── Background Particles Container ── */
.particles-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--purple);
  border-radius: 50%;
  opacity: 0.15;
  animation: float-slow 8s ease-in-out infinite;
}

.particle:nth-child(odd) {
  background: var(--cyan);
  opacity: 0.1;
  animation-duration: 12s;
}

.particle:nth-child(3n) {
  background: var(--green);
  opacity: 0.08;
  width: 3px;
  height: 3px;
  animation-duration: 10s;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

/* Removed reveal reduced motion overrides as GSAP handles it */
}

/* ══════════════════════════════════════════════
   Efeitos inspirados no Craftify
   ══════════════════════════════════════════════ */

/* ── Botão de cadastro do menu aparece com um "pulo" ── */
.navbar-actions .btn-primary {
  animation: navCtaPop 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

@keyframes navCtaPop {
  0% { transform: scale(0.72) translateY(-8px); opacity: 0; }
  60% { transform: scale(1.06) translateY(0); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Parede de imagens rolando (seção "Need something Unique") ── */
.reel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 440px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
}

.reel-col {
  overflow: hidden;
}

.reel-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: reelUp 36s linear infinite;
}

.reel-track.reverse {
  animation-direction: reverse;
}

.reel:hover .reel-track {
  animation-play-state: paused;
}

.reel-track img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--bg-card-solid);
}

/* Metade do trilho = uma cópia completa das imagens + meio gap */
@keyframes reelUp {
  to { transform: translateY(calc(-50% - 6px)); }
}

@media (max-width: 968px) {
  .reel { height: 320px; }
}

/* ── Marquee de depoimentos ── */
.testimonials-section {
  overflow: hidden;
}

.marquee {
  overflow: hidden;
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee + .marquee {
  margin-top: var(--space-4);
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marqueeLeft 55s linear infinite;
}

.marquee-track.reverse {
  animation-name: marqueeRight;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeLeft {
  to { transform: translateX(calc(-50% - 8px)); }
}

@keyframes marqueeRight {
  from { transform: translateX(calc(-50% - 8px)); }
  to { transform: translateX(0); }
}

.quote-card {
  width: 340px;
  flex-shrink: 0;
  margin: 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: transform 0.25s, border-color 0.25s;
}

.quote-card:hover {
  transform: translateY(-3px);
  border-color: var(--purple-border);
}

.quote-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.quote-avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-cyber);
}

.quote-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.quote-who strong {
  color: var(--text-heading);
  font-size: var(--text-base);
}

.quote-who span {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.quote-rating {
  margin-left: auto;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--purple-light);
}

.quote-card blockquote {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.quote-link {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--purple-light);
  text-decoration: none;
}

/* ── Linha do processo (página How it works) ── */
.process {
  position: relative;
  list-style: none;
  padding: 0;
  margin: var(--space-10) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.process::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(var(--purple), var(--cyan));
  transform-origin: top;
}

.process-step {
  position: relative;
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.process-num {
  flex: 0 0 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 1px solid var(--purple-border);
  color: var(--purple-light);
  font-family: var(--font-heading);
  font-weight: 700;
  box-shadow: var(--glow-purple);
  position: relative;
  z-index: 1;
}

.process-step h3 {
  margin-bottom: 6px;
}

.process-step p {
  color: var(--text-secondary);
}

/* Estado inicial só quando o JS "arma" a animação (sem JS, tudo aparece) */
.process.is-armed::before {
  transform: scaleY(0);
}

.process.is-armed .process-step {
  opacity: 0;
  transform: translateY(14px);
}

.process.is-play::before {
  animation: processDraw 1.8s cubic-bezier(0.4, 0, 0.15, 1) forwards;
}

.process.is-play .process-step {
  animation: processIn 0.55s ease forwards;
}

.process.is-play .process-step:nth-child(2) { animation-delay: 0.35s; }
.process.is-play .process-step:nth-child(3) { animation-delay: 0.7s; }
.process.is-play .process-step:nth-child(4) { animation-delay: 1.05s; }

@keyframes processDraw {
  to { transform: scaleY(1); }
}

@keyframes processIn {
  to { opacity: 1; transform: none; }
}
