/* ===================================================================
   LEADTENDER — Animations & Decorative Elements
   Keyframes, scroll effects, hover transitions, preloader
   =================================================================== */

/* ===== Keyframes ===== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--color-primary-glow); }
  50% { box-shadow: 0 0 40px var(--color-primary-glow); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes lineMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ===== Scroll Progress Bar ===== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: 200;
  width: 0%;
  transition: width 0.1s linear;
  will-change: width;
}

/* ===== Back to Top ===== */

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-base);
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ===== Card Hover Transitions (global) ===== */

.card,
[data-hover] {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

/* ===== Hero Decorative Elements ===== */

.hero-line {
  position: absolute;
  height: 1px;
  width: 300px;
  opacity: 0.15;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.3), transparent);
  animation: lineMove 20s linear infinite;
}

.hero-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.12), transparent 70%);
}

/* ===== Preloader ===== */

.preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease;
}

.preloader.hide {
  opacity: 0;
  pointer-events: none;
}

.preloader img {
  width: 420px;
  max-width: 80vw;
  animation: pulse 1.5s infinite;
}

/* ===== Bento Card Red Stripe (on hover) ===== */


/* ===== Form Success Animation ===== */

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
  text-align: center;
  animation: scaleIn 0.4s ease;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ECFDF5;
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success-icon svg {
  width: 32px;
  height: 32px;
}

.form-success-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.form-success-sub {
  font-size: 14px;
  color: var(--color-text-body);
}

/* ===== Reduced Motion ===== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-progress {
    transition: none;
  }
}
