/* ============================================================
   RIOFIX — ANIMATIONS.CSS
   ============================================================ */

/* --- HERO ENTRANCE ----------------------------------------- */
.hero-badge    { animation: fade-up 0.6s ease 0.1s both; }
.hero-headline { animation: fade-up 0.7s ease 0.2s both; }
.hero-subtext  { animation: fade-up 0.7s ease 0.35s both; }
.hero-actions  { animation: fade-up 0.7s ease 0.5s both; }
.hero-trust    { animation: fade-up 0.7s ease 0.65s both; }
.hero-form-card{ animation: fade-left 0.8s ease 0.3s both; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-left {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fade-right {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- STAT COUNTER ------------------------------------------ */
.stat-number {
  transition: color 0.3s ease;
}

/* --- PRODUCT CARDS ----------------------------------------- */
.product-card {
  animation: none;
}

/* --- STEP HOVER -------------------------------------------- */
.step-number {
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease,
              box-shadow 0.3s ease;
}

.step-item:hover .step-number {
  box-shadow: 0 0 0 6px rgba(255,184,0,0.15);
}

/* --- BORDER GLOW ON CARDS (subtle animated border) --------- */
@keyframes border-glow {
  0%, 100% { border-color: rgba(255,255,255,0.06); }
  50%       { border-color: rgba(255,184,0,0.14); }
}

.diferencial-card:nth-child(1) { animation: border-glow 4s ease 0s infinite; }
.diferencial-card:nth-child(2) { animation: border-glow 4s ease 1s infinite; }
.diferencial-card:nth-child(3) { animation: border-glow 4s ease 2s infinite; }
.diferencial-card:nth-child(4) { animation: border-glow 4s ease 0.5s infinite; }
.diferencial-card:nth-child(5) { animation: border-glow 4s ease 1.5s infinite; }
.diferencial-card:nth-child(6) { animation: border-glow 4s ease 2.5s infinite; }

/* stop glow on hover for clean state */
.diferencial-card:hover { animation: none; }

/* --- NAV LINK UNDERLINE ------------------------------------ */
.nav-links a::after {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:active::after { opacity: 1; }

/* --- SEGMENT CARD HOVER ------------------------------------ */
.segment-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease,
              background 0.3s ease;
}

/* --- FAQ SMOOTH OPEN --------------------------------------- */
.faq-answer {
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- CHUMBADOR VISUAL SHIMMER ------------------------------ */
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.chumbador-visual::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,184,0,0.03), transparent);
  animation: shimmer 3s ease infinite;
  pointer-events: none;
}

/* --- STATS NUMBER HIGHLIGHT -------------------------------- */
@keyframes number-pop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.stat-number.counting {
  animation: number-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* --- STAGGER GRID ITEMS ------------------------------------ */
.products-grid .product-card:nth-child(1) { transition-delay: 0s; }
.products-grid .product-card:nth-child(2) { transition-delay: 0.1s; }
.products-grid .product-card:nth-child(3) { transition-delay: 0.2s; }
.products-grid .product-card:nth-child(4) { transition-delay: 0.3s; }

.diferenciais-grid .diferencial-card:nth-child(1) { transition-delay: 0s; }
.diferenciais-grid .diferencial-card:nth-child(2) { transition-delay: 0.08s; }
.diferenciais-grid .diferencial-card:nth-child(3) { transition-delay: 0.16s; }
.diferenciais-grid .diferencial-card:nth-child(4) { transition-delay: 0.24s; }
.diferenciais-grid .diferencial-card:nth-child(5) { transition-delay: 0.32s; }
.diferenciais-grid .diferencial-card:nth-child(6) { transition-delay: 0.40s; }

.segments-grid .segment-card:nth-child(1) { transition-delay: 0s; }
.segments-grid .segment-card:nth-child(2) { transition-delay: 0.08s; }
.segments-grid .segment-card:nth-child(3) { transition-delay: 0.16s; }
.segments-grid .segment-card:nth-child(4) { transition-delay: 0.24s; }
.segments-grid .segment-card:nth-child(5) { transition-delay: 0.32s; }

/* --- SCROLL INDICATOR (hero) ------------------------------- */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%       { transform: translateY(6px); opacity: 1; }
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scroll-bounce 2s ease infinite;
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
}

/* --- CTA GLOW PULSE ---------------------------------------- */
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.08); }
}

.cta-glow { animation: glow-pulse 4s ease infinite; }

/* --- YELLOW LINE DRAW (hero accent) ------------------------ */
.hero-line {
  display: inline-block;
  position: relative;
}

.hero-line::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--yellow);
  transform-origin: left;
  transform: scaleX(0);
  border-radius: 2px;
}

.hero-line.line-visible::after {
  animation: line-draw 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s both;
}

@keyframes line-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
