/* Eastwind — motion
   Every animation here is disabled under prefers-reduced-motion at the foot of the file. */

@keyframes ew-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ew-drop  { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes ew-slide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes ew-rise  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Hero montage — 4 frames, 36s loop, 9s per frame with a ~1.8s cross-fade */
@keyframes ew-hero-cut {
  0%   { opacity: 1; }
  22%  { opacity: 1; }
  27%  { opacity: 0; }
  95%  { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes ew-hero-drift-a {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to   { transform: scale(1.20) translate3d(-2%, -1.4%, 0); }
}
@keyframes ew-hero-drift-b {
  from { transform: scale(1.20) translate3d(1.8%, -1%, 0); }
  to   { transform: scale(1.08) translate3d(0, 0, 0); }
}

.ew-hero-montage { position: absolute; inset: 0; overflow: hidden; background: var(--ew-forest); }
.ew-hero-frame   { position: absolute; inset: 0; overflow: hidden; opacity: 1;
                   animation: ew-hero-cut 36s linear infinite; }
.ew-hero-frame img { width: 100%; height: 100%; object-fit: cover; }

.ew-hero-frame:nth-child(1)     { animation-delay: 0s; }
.ew-hero-frame:nth-child(2)     { animation-delay: -27s; }
.ew-hero-frame:nth-child(3)     { animation-delay: -18s; }
.ew-hero-frame:nth-child(4)     { animation-delay: -9s; }

.ew-hero-frame:nth-child(odd) img  { animation: ew-hero-drift-a 36s ease-in-out infinite; }
.ew-hero-frame:nth-child(even) img { animation: ew-hero-drift-b 36s ease-in-out infinite; }
.ew-hero-frame:nth-child(2) img { animation-delay: -27s; }
.ew-hero-frame:nth-child(3) img { animation-delay: -18s; }
.ew-hero-frame:nth-child(4) img { animation-delay: -9s; }

/* Hero copy entrance */
.ew-hero-rise      { animation: ew-rise .7s .08s ease both; }
.ew-hero-rise--2   { animation: ew-rise .7s .14s ease both; }
.ew-hero-rise--3   { animation: ew-rise .7s .20s ease both; }

/* ---- Reduced motion: freeze everything ---- */
@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;
  }
  .ew-hero-frame { animation: none !important; }
  .ew-hero-frame:not(:first-child) { opacity: 0 !important; }
  .ew-hero-frame img { animation: none !important; transform: none !important; }
}
