/* ==========================================================================
   survey.nha-ai.com — CONSERVATIVE motion layer (added 2026-05-29).
   Part of the *.nha-ai.com motion rollout. Surveys are task-focused forms,
   so this is DIALED DOWN vs the bold analytics dashboard:
     - gentle ~16px rise + soft fade (no scale, no overshoot bounce)
     - minimal stagger (~70ms)
     - reveals LANDING CONTENT only (.page children); header chrome is immediate
     - hover nudge on cards / hub-link; active:scale press on cards
   Wired into index.html (the landing) ONLY. The survey-taking stepper pages
   (parent.html / staff.html) and the PIN-gated results pages are deliberately
   left untouched — motion must never get in the way of filling a form.

   SAFETY: opt-in via .motion-on (set by the inline head guard only when
   IntersectionObserver exists and reduce-motion is off), reduced-motion-safe,
   additive (opacity + transform only). A FAILSAFE in the head guard removes
   .motion-on after 2.5s if motion.js never set .motion-ready, so content can
   never be stuck hidden.
   ========================================================================== */

@keyframes mo-reveal-soft {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Pre-reveal hidden state — landing content only. The header / header-curve
   are fixed-position chrome and are never inside .page, so they're untouched. */
.motion-on .page > *:not(.is-revealed) {
  opacity: 0;
}

/* Reveal (backwards fill = hidden during the stagger delay, then steady state
   so hover transitions stay free). Gentle ease, no overshoot. */
.motion-on .page > *.is-revealed {
  animation: mo-reveal-soft 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) var(--reveal-delay, 0ms) backwards;
}

/* Gentle hover lift on the clickable survey/result cards. */
.motion-on .survey-card { transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.motion-on .survey-card:hover { transform: translateY(-3px); }
.motion-on .survey-card:active { transform: translateY(0) scale(0.985); }

/* "About to click" nudge on the hub link + card actions. */
.motion-on .hub-link { transition: background 0.18s ease, color 0.18s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.motion-on .hub-link:hover { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .motion-on .page > * { opacity: 1 !important; }
  .motion-on .survey-card:hover,
  .motion-on .survey-card:active,
  .motion-on .hub-link:hover { transform: none !important; }
}
