/* ==============================================
   TECHCORE — ANIMATIONS
   ============================================== */

/* ── KEYFRAMES ──────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes typing-cursor {
  0%, 100% { border-right-color: var(--primary); }
  50%       { border-right-color: transparent; }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

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

/* ── HERO ENTRANCE ──────────────────────────── */
.tc-hero-content {
  animation: fadeInLeft 0.7s cubic-bezier(.4,0,.2,1) both;
}

.tc-hero-visual {
  animation: fadeInRight 0.7s cubic-bezier(.4,0,.2,1) 0.15s both;
}

.tc-hero-card-main {
  animation: float 5s ease-in-out infinite;
}

.tc-float-badge {
  animation: float 4s ease-in-out infinite;
}

.tc-float-1 { animation-delay: 0.5s; }
.tc-float-2 { animation-delay: 1s; }

/* ── SCROLL REVEAL ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ── METRIC BAR ANIMATION ───────────────────── */
.tc-metric-fill {
  width: 0 !important;
  transition: width 1.4s cubic-bezier(.4,0,.2,1) 0.3s;
}

.tc-metric-fill.animate {
  width: var(--target-width, 0) !important;
}

/* ── STATUS DOT PULSE ───────────────────────── */
.tc-status-dot.active::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34,197,94,.4);
  animation: pulse-ring 1.8s ease-out infinite;
}

.tc-status-dot { position: relative; }

/* ── NAV LINK UNDERLINE ──────────────────────── */
.tc-nav-link {
  position: relative;
}

.tc-nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1);
  transform-origin: left;
}

.tc-nav-link:hover::after,
.tc-nav-link.active::after {
  transform: scaleX(1);
}

/* ── BUTTON RIPPLE ──────────────────────────── */
.tc-btn-primary,
.tc-btn-ghost,
.tc-btn-white {
  overflow: hidden;
  position: relative;
}

.tc-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: scale(0);
  animation: ripple-anim 0.5s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── HERO BG GRADIENT ───────────────────────── */
.tc-hero-bg-shape {
  animation: gradient-shift 8s ease infinite;
  background-size: 200% 200%;
}

/* ── FAQ ANSWER SLIDE ───────────────────────── */
.tc-faq-a-inner {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s ease;
}

/* ── CARD HOVER GLOW ─────────────────────────── */
.tc-service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(47,80,164,.08) 0%, transparent 70%);
}

.tc-service-card {
  position: relative;
}

.tc-service-card:hover::after {
  opacity: 1;
}

/* ── TIMELINE REVEAL ─────────────────────────── */
.tc-timeline-item {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.tc-timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.tc-timeline-item:nth-child(1) { transition-delay: 0s; }
.tc-timeline-item:nth-child(2) { transition-delay: 0.1s; }
.tc-timeline-item:nth-child(3) { transition-delay: 0.2s; }
.tc-timeline-item:nth-child(4) { transition-delay: 0.3s; }
.tc-timeline-item:nth-child(5) { transition-delay: 0.4s; }

/* ── PROCESS STEP HOVER ─────────────────────── */
.tc-process-step {
  transition: transform 0.2s ease;
}

.tc-process-step:hover {
  transform: translateY(-4px);
}

/* ── 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;
  }

  .tc-hero-card-main,
  .tc-float-badge {
    animation: none;
  }
}
