/* ─── SCROLL REVEALS ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children inside grids */
.research-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.research-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.apps-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.apps-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.apps-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.projects-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.counters-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.counters-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.counters-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.counters-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.counters-grid .reveal:nth-child(6) { transition-delay: 0.30s; }
.infra-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.infra-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.infra-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.infra-grid .reveal:nth-child(5) { transition-delay: 0.32s; }

/* Hero stagger */
.hero-content .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.2s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.3s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.4s; }
.hero-content .reveal:nth-child(5) { transition-delay: 0.6s; }
.hero-content .reveal:nth-child(6) { transition-delay: 0.8s; }

/* ─── CARD HOVER GLOW ─── */
@keyframes cardGlow {
  0%, 100% { border-color: rgba(129, 140, 248, 0.1); }
  50% { border-color: rgba(129, 140, 248, 0.2); }
}

/* ─── CTA ARROW BOUNCE ─── */
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.cta-arrow {
  display: inline-block;
  animation: arrowBounce 2s ease-in-out infinite;
}

/* ─── COUNTER ANIMATION ─── */
.counter-card.counted .counter-value {
  transition: color 0.3s;
}

/* ─── PARTICLE CANVAS FADE ─── */
.particle-canvas {
  opacity: 0;
  transition: opacity 1s ease;
}
.particle-canvas.active {
  opacity: 1;
}

/* ─── NAV LINK UNDERLINE ─── */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover::after {
  width: 100%;
}

/* ─── PHASE DIAGRAM HOVER ─── */
#phase-diagram {
  transition: border-color 0.3s;
}
#phase-diagram:hover {
  border-color: var(--border-hover);
}
