/* ============================================================
   TWIN RIDE — Animations
   ============================================================ */

/* ---- Keyframes ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-12px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes loadBar {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---- Hero animations ---- */
.hero__badge   { animation: fadeInDown 0.8s 0.3s both ease; }
.hero__title   { animation: fadeInUp 0.9s 0.5s both ease; }
.hero__tagline { animation: fadeInUp 0.9s 0.65s both ease; }
.hero__desc    { animation: fadeInUp 0.9s 0.8s both ease; }
.hero__actions { animation: fadeInUp 0.9s 0.95s both ease; }
.hero__scroll  { animation: bounce 2.5s 1.5s infinite ease-in-out; }

/* ---- Scroll-reveal classes ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.fade-in.visible { opacity: 1; }

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* Staggered children */
.stagger-children .fade-in-up:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .fade-in-up:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .fade-in-up:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .fade-in-up:nth-child(6) { transition-delay: 0.5s; }

/* ---- Button hover pulse ---- */
@keyframes btnPulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(var(--primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}
.btn-pulse:hover { animation: btnPulse 1s infinite; }

/* ---- Card reveal ---- */
.circuit-card {
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    opacity 0.7s ease;
}

/* ---- Navbar transition ---- */
.navbar {
  transition:
    background 0.4s ease,
    height 0.4s ease,
    box-shadow 0.4s ease;
}

/* ---- Lightbox animation ---- */
.lightbox { transition: opacity 0.3s ease; }
.lightbox__img {
  animation: scaleIn 0.3s ease;
}

/* ---- Gallery hover ---- */
.gallery-item {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gallery-item:hover { transform: scale(1.02); }

/* ---- Feature card icon spin on hover ---- */
.feature-card:hover .feature-card__icon svg {
  animation: spin 0.5s ease-in-out;
}

/* ---- Info card hover ---- */
.info-card { transition: transform 0.35s ease, box-shadow 0.35s ease; }

/* ---- Contact item hover ---- */
.contact-item { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }

/* ---- Form control focus ---- */
.form-control { transition: border-color 0.2s ease, box-shadow 0.2s ease; }

/* ---- Success icon ---- */
.form-success__icon { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ---- Stats counter ---- */
.stat-item__number { transition: all 0.1s ease; }

/* ---- Scroll indicator ---- */
.hero__scroll { transition: opacity 0.3s ease; }
