/* ── KEYFRAMES ── */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

@keyframes panelFloat {
  0%, 100% { transform: rotateY(-22deg) rotateX(8deg) translateY(0px); }
  50%       { transform: rotateY(-16deg) rotateX(4deg) translateY(-10px); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 14px var(--accent-glow); }
  50%       { box-shadow: 0 0 32px var(--accent-glow), 0 0 60px rgba(242, 201, 76, 0.14); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cellPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grid children */
.services-grid  .reveal:nth-child(1) { transition-delay:   0ms; }
.services-grid  .reveal:nth-child(2) { transition-delay:  70ms; }
.services-grid  .reveal:nth-child(3) { transition-delay: 140ms; }
.services-grid  .reveal:nth-child(4) { transition-delay: 210ms; }
.services-grid  .reveal:nth-child(5) { transition-delay: 280ms; }
.services-grid  .reveal:nth-child(6) { transition-delay: 350ms; }

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

/* ── NAV SCROLL STATE ── */
.nav.is-scrolled {
  background: rgba(4, 12, 26, 0.96);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
}

/* ── TOPIC CARD ── */
.topic-card {
  will-change: transform, box-shadow;
}

/* ── PANEL CELL SHIMMER ── */
.panel-3d__cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 38%,
    rgba(242, 201, 76, 0.11) 50%,
    transparent 62%
  );
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

/* ── CTA BUTTON GLOW ── */
.section--cta .btn--primary {
  animation: glowPulse 3.2s ease-in-out infinite;
}

/* ── PANEL CELLS PULSE ── */
.panel-3d__cell:nth-child(odd) {
  animation: cellPulse 3s ease-in-out infinite;
}

.panel-3d__cell:nth-child(even) {
  animation: cellPulse 3s ease-in-out infinite 1.5s;
}

/* ── NAV TOGGLE OPEN STATE ── */
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .scroll-hint {
    opacity: 1;
  }
}
