/* ── Reveal on scroll ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside the same grid */
.services-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.services-grid .reveal:nth-child(2) { transition-delay: 80ms; }
.services-grid .reveal:nth-child(3) { transition-delay: 160ms; }
.services-grid .reveal:nth-child(4) { transition-delay: 240ms; }

.solutions-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.solutions-grid .reveal:nth-child(2) { transition-delay: 60ms; }
.solutions-grid .reveal:nth-child(3) { transition-delay: 120ms; }
.solutions-grid .reveal:nth-child(4) { transition-delay: 180ms; }
.solutions-grid .reveal:nth-child(5) { transition-delay: 240ms; }
.solutions-grid .reveal:nth-child(6) { transition-delay: 300ms; }

.metrics-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.metrics-grid .reveal:nth-child(2) { transition-delay: 100ms; }
.metrics-grid .reveal:nth-child(3) { transition-delay: 200ms; }
.metrics-grid .reveal:nth-child(4) { transition-delay: 300ms; }

.role-list .reveal:nth-child(1) { transition-delay: 0ms; }
.role-list .reveal:nth-child(2) { transition-delay: 80ms; }
.role-list .reveal:nth-child(3) { transition-delay: 160ms; }
.role-list .reveal:nth-child(4) { transition-delay: 240ms; }

.about-pillars .reveal:nth-child(1) { transition-delay: 0ms; }
.about-pillars .reveal:nth-child(2) { transition-delay: 100ms; }
.about-pillars .reveal:nth-child(3) { transition-delay: 200ms; }

.contact-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.contact-grid .reveal:nth-child(2) { transition-delay: 100ms; }
.contact-grid .reveal:nth-child(3) { transition-delay: 200ms; }

/* ── Hero entry ───────────────────────────────────────────── */
.hero-copy > * {
  opacity: 0;
  transform: translateY(20px);
  animation: heroEntry 800ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 100ms; }
.hero-copy > *:nth-child(2) { animation-delay: 220ms; }
.hero-copy > *:nth-child(3) { animation-delay: 340ms; }
.hero-copy > *:nth-child(4) { animation-delay: 460ms; }
.hero-copy > *:nth-child(5) { animation-delay: 580ms; }

.hero-viz {
  opacity: 0;
  animation: heroVizEntry 1200ms cubic-bezier(0.4, 0, 0.2, 1) 300ms forwards;
}

@keyframes heroEntry {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroVizEntry {
  to { opacity: 1; }
}

/* ── Hero scroll hint ─────────────────────────────────────── */
.hero-scroll-line {
  animation: scrollHint 2.4s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%      { transform: scaleY(1.2); opacity: 1; }
}

/* ── Hero data viz primitives ─────────────────────────────── */
#dataViz .viz-grid {
  stroke: var(--color-line);
  stroke-width: 0.5;
  fill: none;
  opacity: 0.4;
}
#dataViz .viz-link {
  stroke: var(--color-accent);
  stroke-width: 0.6;
  fill: none;
  opacity: 0.25;
}
#dataViz .viz-link.is-active {
  opacity: 0.7;
  stroke-width: 0.9;
}
#dataViz .viz-node {
  fill: var(--color-bg-deep);
  stroke: var(--color-accent);
  stroke-width: 1.4;
  transition: r 320ms ease, fill 320ms ease;
}
#dataViz .viz-node.viz-node-warm {
  stroke: var(--color-accent-warm);
}
#dataViz .viz-pulse {
  fill: var(--color-accent);
  filter: drop-shadow(0 0 4px var(--color-accent));
}
#dataViz .viz-orbit {
  fill: none;
  stroke: var(--color-accent-warm);
  stroke-width: 0.4;
  opacity: 0.35;
  stroke-dasharray: 2 4;
}
#dataViz .viz-ring {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 0.6;
  opacity: 0.18;
  transform-origin: 240px 240px;
  animation: vizRing 16s linear infinite;
}
#dataViz .viz-ring-2 {
  animation-duration: 22s;
  animation-direction: reverse;
}
#dataViz .viz-label {
  fill: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@keyframes vizRing {
  to { transform: rotate(360deg); }
}

@keyframes nodeBreathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.15); opacity: 0.85; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-copy > * { opacity: 1; transform: none; }
  .hero-viz { opacity: 1; }
}
