/* ============================================
   DETAILCRAFT PRO — animations.css
   Keyframes, transitions, motion effects
   ============================================ */

/* ---- PAGE LOAD ANIMATIONS ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

/* ---- SCROLL INDICATOR ---- */
@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ---- WHATSAPP PULSE ---- */
@keyframes waPulse {
  0%, 100% { box-shadow: 0 6px 28px rgba(37, 211, 102, 0.38); }
  50%       { box-shadow: 0 6px 48px rgba(37, 211, 102, 0.65); }
}

.whatsapp-btn {
  animation: waPulse 2.8s ease-in-out infinite;
}

/* ---- HERO SHIMMER LINE ---- */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.chrome-shimmer {
  background: linear-gradient(
    90deg,
    var(--chrome-dim) 0%,
    var(--chrome-bright) 40%,
    var(--chrome-dim) 60%,
    var(--chrome-dim) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ---- COUNTER ANIMATION ---- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-animated {
  animation: countUp 0.6s var(--ease-out) both;
}

/* ---- SECTION REVEAL ---- */
/* Base handled in main.css .reveal class */
/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.15s; }
.stagger > *:nth-child(3) { transition-delay: 0.25s; }
.stagger > *:nth-child(4) { transition-delay: 0.35s; }
.stagger > *:nth-child(5) { transition-delay: 0.45s; }

/* ---- HOVER EFFECTS ---- */

/* Chrome glow on hover for cards */
.glow-hover {
  transition: box-shadow var(--duration-base);
}
.glow-hover:hover {
  box-shadow: var(--glow-chrome);
}

/* Gold underline sweep */
.gold-underline {
  position: relative;
}
.gold-underline::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--duration-base) var(--ease-smooth);
}
.gold-underline:hover::after { width: 100%; }

/* ---- VIDEO OVERLAY PULSE (subtle) ---- */
@keyframes overlayBreath {
  0%, 100% { opacity: 0.62; }
  50%       { opacity: 0.56; }
}

.hero-overlay-base {
  animation: overlayBreath 8s ease-in-out infinite;
}

/* ---- FORM INPUT FOCUS EFFECT ---- */
.form-input, .form-select, .form-textarea {
  position: relative;
}
.form-group {
  position: relative;
}
.form-group::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--chrome);
  transition: width 0.4s var(--ease-smooth);
  pointer-events: none;
}
.form-group:focus-within::after { width: 100%; }

/* ---- BUTTON RIPPLE ---- */
.btn-submit {
  position: relative;
  overflow: hidden;
}

/* ---- STAT COUNTER TICK ---- */
.hero-stat-num.ticking {
  animation: countUp 0.3s var(--ease-out) both;
}

/* ---- MOBILE: respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
