/* ============================================
   CIDERSOFT ANIMATIONS — home page
   ============================================ */

/* --- Hero gradient pulse --- */
@keyframes heroPulse {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero {
  background: linear-gradient(135deg, #0a1628 0%, #1e3a6e 30%, #1a56c4 60%, #0f2a5c 100%);
  background-size: 300% 300%;
  animation: heroPulse 12s ease infinite;
}

/* --- Floating dots parallax in hero --- */
@keyframes floatDots {
  0%   { transform: translateY(0px) translateX(0px); }
  33%  { transform: translateY(-18px) translateX(8px); }
  66%  { transform: translateY(-8px) translateX(-10px); }
  100% { transform: translateY(0px) translateX(0px); }
}
.hero::before {
  animation: floatDots 18s ease-in-out infinite;
}

/* --- Base reveal state (hidden before JS fires) --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grouped children */
.reveal-group > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-group > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-group > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-group > *:nth-child(6) { transition-delay: 0.55s; }
.reveal-group > *:nth-child(n+7) { transition-delay: 0.65s; }

/* Slide from left variant */
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* --- Hero entrance (CSS-only, fires on load) --- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-badge  { animation: heroFadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.15s both; }
.hero h1     { animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.30s both; }
.hero p      { animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.45s both; }
.hero-cta    { animation: heroFadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.60s both; }

/* Hero image fade-in */
@keyframes heroImgReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hero-bg-image { animation: heroImgReveal 1.2s ease 0.5s both; }

/* --- Trust bar count targets --- */
.t-num {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* --- Card hover lifts --- */
.service-card {
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.28s cubic-bezier(0.22,1,0.36,1);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.18);
}

.ai-card, .portfolio-card, .pain-card {
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.28s cubic-bezier(0.22,1,0.36,1);
}
.ai-card:hover, .portfolio-card:hover, .pain-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.14);
}

/* Tech badge hover */
.tech-badge {
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1),
              background 0.22s ease,
              box-shadow 0.22s ease;
}
.tech-badge:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 20px rgba(30,90,180,0.18);
}

/* CTA button pulse on hover */
.btn-primary {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,90,180,0.35);
}

/* --- Section label slide --- */
.section-label {
  display: inline-block;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --- Animated underline on section titles --- */
.section-title {
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #1a56c4, #7eb3ff);
  border-radius: 2px;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.section-title.revealed::after {
  transform: translateX(-50%) scaleX(1);
}

/* --- Smooth scroll for whole page --- */
html { scroll-behavior: smooth; }
