/*
 * Motion inspired by https://viktor.com/
 * Smooth fade-up reveals, subtle hover lifts, restrained timing
 */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--transition-reveal),
    transform var(--transition-reveal);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.modal.is-opening .modal__panel {
  animation: modal-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal.is-closing .modal__panel {
  animation: modal-out 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.modal.is-opening .modal__backdrop {
  animation: fade-in 0.3s ease forwards;
}

.modal.is-closing .modal__backdrop {
  animation: fade-out 0.25s ease forwards;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modal-out {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@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;
  }

  .tech-orbit {
    animation: none;
  }

  .hero__stat-dot {
    animation: none;
  }
}
