/* ==========================================================================
   Easy Light Healthcare — motion
   Elements with [data-reveal] start hidden only when JavaScript is running
   (html.js), so content is always visible without JS. All motion is removed
   for visitors who prefer reduced motion.
   ========================================================================== */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
/* Horizontal slide-ins only on wide screens, so small screens never overflow sideways */
@media (min-width: 1024px) {
  html.js [data-reveal="left"] { transform: translateX(-36px); }
  html.js [data-reveal="right"] { transform: translateX(36px); }
}
html.js [data-reveal="zoom"] { transform: scale(0.94); }
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

[data-reveal-delay="1"] { --reveal-delay: 0.08s; }
[data-reveal-delay="2"] { --reveal-delay: 0.16s; }
[data-reveal-delay="3"] { --reveal-delay: 0.24s; }
[data-reveal-delay="4"] { --reveal-delay: 0.32s; }
[data-reveal-delay="5"] { --reveal-delay: 0.40s; }

/* Hero entrance */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(60, 168, 12, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(60, 168, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(60, 168, 12, 0); }
}
@keyframes success-pop {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.hero-copy > * { animation: rise-in 0.9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-copy > :nth-child(5) { animation-delay: 0.32s; }
.hero-media { animation: rise-in 1s 0.2s var(--ease) both; }
.float-card-a { animation: float-y 6s ease-in-out infinite; }
.float-card-b { animation: float-y 7s 1.2s ease-in-out infinite; }
.eyebrow::before { animation: pulse-ring 2.4s ease-out infinite; }
.btn-submit .spinner { animation: spin 0.8s linear infinite; }
.form-success .success-icon { animation: success-pop 0.6s var(--ease) both; }
.form-alert.is-error { animation: shake 0.45s ease-in-out; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .btn-submit .spinner { animation: spin 1.2s linear infinite !important; animation-duration: 1.2s !important; animation-iteration-count: infinite !important; }
}
