/* ==========================================================================
   NoobChart Motion System
   Calm, compositor-only choreography aligned with Emil Kowalski & Apple HIG
   ========================================================================== */

:root {
  --ease-shibui: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-precision: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-micro: 150ms;
  --dur-panel: 220ms;
  --dur-reveal: 380ms;
}

/* Hero Staggered Entrance (non-uniform timing, compositor transform + opacity only) */
@keyframes nc-hero-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes nc-frame-enter {
  from {
    opacity: 0;
    transform: scale(0.975) translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

.nc-hero-stagger {
  animation: nc-hero-rise 360ms var(--ease-shibui) both;
}

.nc-hero-stagger-1 { animation-delay: 0ms; animation-duration: 320ms; }
.nc-hero-stagger-2 { animation-delay: 45ms; animation-duration: 360ms; }
.nc-hero-stagger-3 { animation-delay: 80ms; animation-duration: 350ms; }
.nc-hero-stagger-4 { animation-delay: 105ms; animation-duration: 330ms; }
.nc-hero-stagger-5 { animation-delay: 120ms; animation-duration: 310ms; }

.nc-samurai-enter {
  animation: nc-frame-enter 420ms var(--ease-shibui) 60ms both;
}

/* Scroll Reveal Sections (Progressive enhancement, off-screen cost-free) */
[data-reveal] {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-reveal) var(--ease-shibui),
    transform var(--dur-reveal) var(--ease-shibui);
}

html.nc-anim-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

html.nc-anim-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Smooth Tab & Modal Animations (scale from 0.96, never scale(0)) */
@keyframes nc-panel-enter {
  from {
    opacity: 0;
    transform: scale(0.96) translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

.nc-panel-animate {
  animation: nc-panel-enter var(--dur-panel) var(--ease-precision) both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .nc-hero-stagger,
  .nc-samurai-enter,
  .nc-panel-animate,
  [data-reveal] {
    animation-name: nc-fade-only !important;
    transition-property: opacity !important;
    transform: none !important;
  }
  @keyframes nc-fade-only {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
