/*==================================================
  ALPENSTOCK - PREMIUM ON-SCROLL ANIMATIONS
  Load AFTER style.css. Everything is gated behind
  .has-anim (added in <head>), so the page stays fully
  visible with no JS or with reduced-motion enabled.
==================================================*/
:root {
  --rv-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #e11d48);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------- Base reveal ---------- */
.has-anim [data-rv] {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity 0.9s ease var(--rv-d, 0s),
    transform 1.1s var(--rv-ease) var(--rv-d, 0s);
}

.has-anim [data-rv='up'] {
  transform: translate3d(0, 40px, 0);
}
.has-anim [data-rv='down'] {
  transform: translate3d(0, -28px, 0);
}
.has-anim [data-rv='left'] {
  transform: translate3d(-44px, 0, 0);
}
.has-anim [data-rv='right'] {
  transform: translate3d(44px, 0, 0);
}
.has-anim [data-rv='rise'] {
  transform: translate3d(0, 64px, 0) scale(0.96);
}
.has-anim [data-rv='zoom'] {
  transform: translate3d(0, 28px, 0) scale(0.93);
}
.has-anim [data-rv='fade'] {
  transform: translate3d(0, 16px, 0);
}

.has-anim [data-rv].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Headline word-mask reveal ---------- */
.has-anim [data-rv='split'] {
  opacity: 1;
  transform: none;
  transition: none;
  will-change: auto;
}

.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.w__i {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  transition: transform 1s var(--rv-ease) calc(var(--rv-d, 0s) + var(--i, 0) * 0.07s);
  will-change: transform;
}

.is-visible .w__i {
  transform: none;
}

/* ---------- Hero: cinematic video settle ---------- */
.has-anim .hero__video {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  scale: 1.08;
  transition: scale 2.8s var(--rv-ease);
  will-change: scale;
}

.has-anim .hero.is-loaded .hero__video {
  scale: 1;
}

.hero__content {
  /* will-change removed — no JS opacity/transform applied to this element */
}

/* ---------- Bento: image settles in as each cell appears ---------- */
.has-anim .bento__photo img,
.has-anim .bento__horse img {
  scale: 1.2;
  transition: scale 1.8s var(--rv-ease) 0.1s;
}

.has-anim .bento__photo.is-visible img,
.has-anim .bento__horse.is-visible img {
  scale: 1;
}

.stat__num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Mobile: shorter travel, snappier feel ---------- */
@media (max-width: 767.98px) {
  .has-anim [data-rv='up'] {
    transform: translate3d(0, 28px, 0);
  }
  .has-anim [data-rv='left'] {
    transform: translate3d(-24px, 0, 0);
  }
  .has-anim [data-rv='right'] {
    transform: translate3d(24px, 0, 0);
  }
  .has-anim [data-rv='rise'] {
    transform: translate3d(0, 40px, 0) scale(0.97);
  }
  .has-anim [data-rv='zoom'] {
    transform: translate3d(0, 20px, 0) scale(0.96);
  }
  .has-anim [data-rv].is-visible {
    transform: none;
  }
}
