/* =============================================
   stats-marquee.css — Stats Strip + Brand Marquee
   Riparazioni Ricci — Component Library
   ============================================= */

/* ===================== STATS STRIP ===================== */
.stats-strip {
  background: var(--slate-900);
  padding: 56px 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stats-strip.visible {
  opacity: 1;
  transform: translateY(0);
}

.stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 40px;
  cursor: default;
  transition: transform 0.2s ease;
}
.stat-item:hover {
  transform: scale(1.03);
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  color: #fff;
  line-height: 1;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  white-space: nowrap;
}
.stat-item:hover .stat-number {
  color: var(--color-primary-light);
  text-shadow: 0 0 24px rgba(59, 130, 246, 0.3);
}

.stat-number.pop {
  animation: numberPop 300ms ease-out;
}

@keyframes numberPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.stat-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.3s ease;
}
.stat-item:hover .stat-label {
  color: rgba(255, 255, 255, 0.7);
}

.stat-dot {
  color: rgba(255, 255, 255, 0.2);
  font-size: 24px;
  line-height: 1;
  user-select: none;
  padding: 0 8px;
  align-self: center;
}

/* ===================== BRAND MARQUEE ===================== */
.brand-marquee {
  background: var(--surface-warm);
  padding: 24px 0;
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}

.brand-marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted);
  cursor: default;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  flex-shrink: 0;
}
.brand-chip:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--color-primary);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.brand-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* ===================== ICON HOVER ANIMATIONS ===================== */
.brand-chip[data-anim="needle"]:hover svg {
  animation: bobNeedle 0.5s ease-in-out infinite alternate;
}
@keyframes bobNeedle {
  0%   { transform: translateY(-2px); }
  100% { transform: translateY(2px); }
}

.brand-chip[data-anim="wheel"]:hover svg {
  animation: spinWheel 0.8s linear infinite;
}
@keyframes spinWheel {
  to { transform: rotate(360deg); }
}

.brand-chip[data-anim="thread"]:hover svg {
  animation: waveThread 0.6s ease-in-out infinite alternate;
}
@keyframes waveThread {
  0%   { transform: rotate(-6deg) translateX(-1px); }
  100% { transform: rotate(6deg) translateX(1px); }
}

.brand-chip[data-anim="pulse"]:hover svg {
  animation: pulseIcon 0.6s ease-in-out infinite alternate;
}
@keyframes pulseIcon {
  0%   { transform: scale(1); }
  100% { transform: scale(1.2); }
}

/* ===================== MOBILE — STATS ===================== */
@media (max-width: 767px) {
  .stats-strip {
    padding: 32px 16px;
  }
  .stats-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
    max-width: 100%;
    overflow: visible;
  }
  .stat-dot { display: none; }
  .stat-item {
    flex: none;
    min-width: 0;
    padding: 12px 8px;
    gap: 4px;
  }
  .stat-number {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }
  .stat-label {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-align: center;
  }
}

/* ===================== MOBILE — MARQUEE ===================== */
@media (max-width: 767px) {
  .brand-marquee {
    padding: 16px 0;
  }
  .marquee-track {
    animation-duration: 45s;
    gap: 10px;
  }
  .brand-chip {
    padding: 6px 14px;
    font-size: 12px;
    gap: 6px;
  }
  .brand-chip svg {
    width: 13px;
    height: 13px;
  }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .stats-strip {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .stat-number.pop {
    animation: none;
  }
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 20px;
  }
  .brand-chip:hover {
    transform: none;
  }
  .brand-chip:hover svg {
    animation: none;
  }
}
