/* ═══════════════════════════════════════════════════════════════
   CoreX Solutions — animations.css
   All animations are scroll-triggered and respect
   prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Generic reveal class (Animation 1 + 8) ─────────────────── */
.cx-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.cx-reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Card hover micro (Animation 6) ────────────────────────── */
/* Targets dark cards only — excludes problem-section pills */
.card:not(.pgrid .card):not(.cookie-inner) {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.card:not(.pgrid .card):not(.cookie-inner):hover {
  transform: translateY(-6px) !important;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.22),
    inset 3px 0 0 #ff6500 !important;
}
/* Light card variant — softer */
.card-light:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), inset 3px 0 0 #ff6500 !important;
}
/* Sync svc-card hover with above */
.svc-card.in:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), inset 3px 0 0 #ff6500 !important;
}
.why-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), inset 3px 0 0 #ff6500 !important;
}

/* ── Hero particles canvas (Animation 4) ───────────────────── */
#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ── Stat callout boxes (Animation 7) ───────────────────────── */
.cx-stats-section {
  padding: 72px 0;
  background: #0a0a0a;
}
.cx-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .cx-stats-row { grid-template-columns: 1fr; }
}
.cx-stat-box {
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 36px 24px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cx-stat-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.cx-stat-num {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ff6500;
  text-shadow: 0 0 28px rgba(255, 101, 0, 0.35);
  display: block;
  margin-bottom: 14px;
}
.cx-stat-label {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.45;
  margin-bottom: 8px;
}
.cx-stat-source {
  font-size: 12px;
  color: #9898a2;
  line-height: 1.4;
  font-style: italic;
}

/* ── Progress bars (Animation 3) ────────────────────────────── */
.cx-progress-section {
  margin: 32px 0 0;
  padding: 28px 32px;
  background: rgba(255, 101, 0, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(255, 101, 0, 0.12);
}
.cx-progress-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff6500;
  margin-bottom: 20px;
}
.cx-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.cx-progress-row:last-child { margin-bottom: 0; }
.cx-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: #9898a2;
  width: 50px;
  flex-shrink: 0;
  text-align: right;
}
.cx-progress-bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
}
.cx-progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  width: 0%;
  transition: width 1.2s ease-out;
}
.cx-progress-bar-fill.before-bar { background: #3a3a3a; }
.cx-progress-bar-fill.after-bar {
  background: #ff6500;
  box-shadow: 0 0 10px rgba(255, 101, 0, 0.4);
}
.cx-progress-value {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  width: 48px;
  flex-shrink: 0;
}

/* ── Step connector line (Animation 5) ─────────────────────── */
.cx-step-line {
  display: none;
}
@media (min-width: 861px) {
  .cx-step-line {
    display: block;
    height: 2px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
  }
  .cx-step-line-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: repeating-linear-gradient(
      to right,
      #ff6500 0px,
      #ff6500 7px,
      transparent 7px,
      transparent 15px
    );
    transition: width 1.5s ease-out;
    border-radius: 100px;
  }
  .cx-step-line-fill.in { width: 100%; }
}

/* ── Case Study Screenshot (Change 16) ─────────────────────── */
.case-study-screenshot {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.15);
  margin: 40px 0;
  background: #f5f5f5;
}

.case-study-browser-bar {
  background: #e8e8e8;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d0d0d0;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
}

.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
  flex: 1;
  background: white;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: #666;
  border: 1px solid #d0d0d0;
  font-family: var(--font-body, sans-serif);
}

.case-study-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.case-study-img-caption {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-top: 1px solid #eee;
}

.case-study-img-caption p {
  font-size: 13px;
  color: #888;
  margin: 0;
}

.case-study-visit-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #ff6500;
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.case-study-visit-btn:hover {
  background: #e55a00;
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .case-study-img-caption {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
