/* ============================================================
   PPI GUIDEBOOK — ANIMATIONS
   ============================================================ */

/* ── Hero network background float ─────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-8px) rotate(1deg); }
  66%       { transform: translateY(4px) rotate(-0.5deg); }
}

/* ── Glow pulse ─────────────────────────────────────────────── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,201,167,0.2); }
  50%       { box-shadow: 0 0 40px rgba(0,201,167,0.5), 0 0 60px rgba(0,201,167,0.2); }
}

/* ── Shimmer ────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--teal) 0%,
    #a8f7e8 40%,
    var(--teal) 60%,
    var(--amber) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ── Orbit ring (hero decoration) ──────────────────────────── */
@keyframes orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

/* ── Node appear ────────────────────────────────────────────── */
@keyframes node-appear {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Edge draw (SVG stroke) ─────────────────────────────────── */
@keyframes edge-draw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* ── Fade up (utility) ──────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up { animation: fade-up 0.7s var(--ease) both; }
.animate-fade-up--d1 { animation-delay: 0.1s; }
.animate-fade-up--d2 { animation-delay: 0.2s; }
.animate-fade-up--d3 { animation-delay: 0.3s; }
.animate-fade-up--d4 { animation-delay: 0.5s; }
.animate-fade-up--d5 { animation-delay: 0.7s; }

/* ── Scale in ───────────────────────────────────────────────── */
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-scale-in { animation: scale-in 0.5s var(--ease-spring) both; }

/* ── Typing cursor ──────────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.cursor { animation: blink 1s step-end infinite; }

/* ── Hero blob background ───────────────────────────────────── */
@keyframes blob-morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25%       { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50%       { border-radius: 50% 60% 30% 60% / 30% 40% 70% 50%; }
  75%       { border-radius: 40% 50% 60% 30% / 60% 30% 40% 70%; }
}

.blob {
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: blob-morph 12s ease-in-out infinite;
  pointer-events: none;
  filter: blur(60px);
}

/* ── Tab transition ─────────────────────────────────────────── */
@keyframes tab-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Number count up ────────────────────────────────────────── */
.count-up { font-variant-numeric: tabular-nums; }

/* ── Hover lift ─────────────────────────────────────────────── */
.hover-lift {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

/* ── Stagger children ───────────────────────────────────────── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.0s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: none; }
