/* ==========================================================================
   ANIMATIONS — subtle, fast, and disabled for reduced-motion users
   Reveal classes only take effect once JS adds .js to <html>, so content is
   never hidden if scripts fail.
   ========================================================================== */

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes hero-drift { 0% { transform: scale(1) translate3d(0,0,0); } 100% { transform: scale(1.06) translate3d(-1%, -1%, 0); } }
@keyframes veil-out { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes scroll-line { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(260%); } }

/* ---------- Hero entrance ---------- */
.js .hero__img { animation: hero-zoom 2.4s var(--ease) both, hero-drift 22s 2.4s ease-in-out infinite alternate; }
.js .hero__media::after { content: ""; position: absolute; inset: 0; z-index: 3; background: var(--forest-deep); pointer-events: none; animation: veil-out 1.6s 0.1s var(--ease) forwards; }
.js [data-hero-item] { opacity: 0; animation: rise 1.1s var(--ease) both; }
.js [data-hero-item]:nth-child(1) { animation-delay: 0.35s; }
.js [data-hero-item]:nth-child(2) { animation-delay: 0.5s; }
.js [data-hero-item]:nth-child(3) { animation-delay: 0.7s; }
.js [data-hero-item]:nth-child(4) { animation-delay: 0.85s; }
.js [data-hero-item]:nth-child(5) { animation-delay: 1.05s; }
/* stagger the two hero CTAs individually */
.js .hero__ctas { animation: none; opacity: 1; }
.js .hero__ctas > * { opacity: 0; animation: rise 1s var(--ease) both; }
.js .hero__ctas > :nth-child(1) { animation-delay: 0.9s; }
.js .hero__ctas > :nth-child(2) { animation-delay: 1.02s; }
.js .site-header { animation: fade-in 1s 0.2s var(--ease) both; }

/* Concept B: frame wipes open instead of zooming */
@keyframes frame-open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.js[data-concept="b"] .hero__media { animation: frame-open 1.4s 0.2s var(--ease-in-out) both; }
.js[data-concept="b"] .hero__media::after { display: none; }

/* ---------- Scroll reveals ---------- */
.js [data-reveal] { transition: opacity 1s var(--ease), transform 1s var(--ease), clip-path 1.3s var(--ease-in-out); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal="fade-up"] { opacity: 0; transform: translateY(32px); }
/* Image reveal: a forest-green cover panel wipes upward to uncover the photo.
   Nothing is clipped or hidden, so IntersectionObserver and native lazy-loading
   (which both ignore fully clipped elements) keep working. */
.js [data-reveal="image"] { position: relative; overflow: hidden; }
.js [data-reveal="image"]::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--forest); transform: scaleY(1); transform-origin: top;
  transition: transform 1.2s var(--ease-in-out); transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal="image"] img { transform: scale(1.12); transition: transform 1.6s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal="image"].is-visible::before { transform: scaleY(0); }
.js [data-reveal="image"].is-visible img { transform: scale(1); }
/* keep hover zoom working after reveal */
.js .gallery-item.is-visible:hover img { transform: scale(1.06); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-hero-item], .js .hero__ctas > * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js [data-reveal] img { transform: none !important; }
  .js [data-reveal="image"]::before { display: none !important; }
  .hero__scroll-line::after { display: none; }
}
