/* Advanced micro-animations & motion system — brand-safe */

/* ---------- Base reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grids */
[data-reveal].is-revealed .card,
[data-reveal].is-revealed .step,
[data-reveal].is-revealed .industry-card,
[data-reveal].is-revealed .principle-card {
  animation: rise-in 0.6s var(--ease-out) both;
}

[data-reveal].is-revealed .card:nth-child(1),
[data-reveal].is-revealed .step:nth-child(1),
[data-reveal].is-revealed .industry-card:nth-child(1),
[data-reveal].is-revealed .principle-card:nth-child(1) { animation-delay: 0.05s; }
[data-reveal].is-revealed .card:nth-child(2),
[data-reveal].is-revealed .step:nth-child(2),
[data-reveal].is-revealed .industry-card:nth-child(2),
[data-reveal].is-revealed .principle-card:nth-child(2) { animation-delay: 0.12s; }
[data-reveal].is-revealed .card:nth-child(3),
[data-reveal].is-revealed .step:nth-child(3),
[data-reveal].is-revealed .industry-card:nth-child(3),
[data-reveal].is-revealed .principle-card:nth-child(3) { animation-delay: 0.19s; }
[data-reveal].is-revealed .card:nth-child(4),
[data-reveal].is-revealed .step:nth-child(4),
[data-reveal].is-revealed .industry-card:nth-child(4),
[data-reveal].is-revealed .principle-card:nth-child(4) { animation-delay: 0.26s; }
[data-reveal].is-revealed .card:nth-child(5),
[data-reveal].is-revealed .step:nth-child(5),
[data-reveal].is-revealed .industry-card:nth-child(5),
[data-reveal].is-revealed .principle-card:nth-child(5) { animation-delay: 0.33s; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Button micro-interactions ---------- */
.btn {
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.2s var(--ease-out);
}

.btn--primary:hover {
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.btn--secondary:hover {
  transform: translateY(-1px);
}

/* Shine sweep on primary (subtle) */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.22) 52%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease-out);
  pointer-events: none;
}

.btn--primary:hover::after {
  transform: translateX(120%);
}

/* ---------- Card hover polish ---------- */
.card {
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

.card--interactive:hover {
  transform: translateY(-5px);
}

.card__icon {
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease),
    background 0.3s var(--ease);
}

.card--interactive:hover .card__icon {
  transform: scale(1.08) translateY(-2px);
}

.card__link {
  transition: gap 0.25s var(--ease), color 0.2s var(--ease);
}

.card__link svg {
  transition: transform 0.25s var(--ease-out);
}

.card__link:hover svg {
  transform: translateX(3px);
}

/* ---------- Node / hero ambient ---------- */
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(8, 122, 193, 0.25); }
  70% { box-shadow: 0 0 0 12px rgba(8, 122, 193, 0); }
  100% { box-shadow: 0 0 0 0 rgba(8, 122, 193, 0); }
}

@keyframes pulse-ring-coral {
  0% { box-shadow: 0 0 0 0 rgba(244, 119, 107, 0.3); }
  70% { box-shadow: 0 0 0 14px rgba(244, 119, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 119, 107, 0); }
}

/* ---------- Step number entrance ---------- */
.step__number {
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease);
}

.step:hover .step__number {
  transform: scale(1.1);
}

/* ---------- Focus & accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal].is-revealed .card,
  [data-reveal].is-revealed .step,
  [data-reveal].is-revealed .industry-card,
  [data-reveal].is-revealed .principle-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .btn--primary::after,
  .node,
  .node--center {
    animation: none !important;
  }

  .btn:hover,
  .card--interactive:hover {
    transform: none !important;
  }
}
