/*
  Alterra VR / Birthday / Motion v2
  Scope: block 01 (three advantages) and block 02 (three tariffs).
  Frozen layout, responsive rules, copy, links, prices and images unchanged.
  Relies on the existing page IntersectionObserver (.bp-reveal.is-in)
  and Motion v1 preference class (.bp-motion-v1). No extra JS / observer.
*/
@keyframes bp-v2-card-body-in {
  from { opacity: .12; transform: translate3d(0, 11px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes bp-v2-card-media-in {
  from { opacity: .42; }
  to   { opacity: 1; }
}

/* Cards keep the original .bp-reveal movement; inner parts arrive a beat later. */
html.bp-motion-v1 .bp-intro-grid-v2 > .bp-feature-v2,
html.bp-motion-v1 .bp-format-grid > .bp-format-card {
  --bp-v2-stagger: 0ms;
}
html.bp-motion-v1 .bp-intro-grid-v2 > .bp-feature-v2:nth-child(2),
html.bp-motion-v1 .bp-format-grid > .bp-format-card:nth-child(2) {
  --bp-v2-stagger: 85ms;
}
html.bp-motion-v1 .bp-intro-grid-v2 > .bp-feature-v2:nth-child(3),
html.bp-motion-v1 .bp-format-grid > .bp-format-card:nth-child(3) {
  --bp-v2-stagger: 160ms;
}

html.bp-motion-v1 .bp-feature-v2.bp-reveal.is-in .bp-feature-v2-media,
html.bp-motion-v1 .bp-format-card.bp-reveal.is-in .bp-format-media {
  animation: bp-v2-card-media-in 750ms ease-out both;
  animation-delay: var(--bp-v2-stagger);
}
html.bp-motion-v1 .bp-feature-v2.bp-reveal.is-in .bp-feature-v2-body,
html.bp-motion-v1 .bp-format-card.bp-reveal.is-in .bp-format-body {
  animation: bp-v2-card-body-in 720ms cubic-bezier(.2,.76,.3,1) both;
  animation-delay: calc(75ms + var(--bp-v2-stagger));
}

/* Desktop hover: existing card lift/border are retained; add discreet photo/price glow. */
@media (hover: hover) and (pointer: fine) {
  html.bp-motion-v1 .bp-feature-v2 .bp-feature-v2-media img {
    transition: transform 460ms cubic-bezier(.2,.7,.2,1), filter 360ms ease;
  }
  html.bp-motion-v1 .bp-feature-v2.is-in:hover .bp-feature-v2-media img {
    transform: scale(1.065);
  }
  html.bp-motion-v1 .bp-format-card .bp-price {
    transition: text-shadow 300ms ease;
  }
  html.bp-motion-v1 .bp-format-card.is-in:hover .bp-price {
    text-shadow: 0 0 19px rgba(60,222,244,.25);
  }
}

/* Phones/tablets: shorter motion, no extra hover effects on touch. */
@media (max-width: 1100px) {
  html.bp-motion-v1 .bp-feature-v2.bp-reveal.is-in .bp-feature-v2-media,
  html.bp-motion-v1 .bp-format-card.bp-reveal.is-in .bp-format-media {
    animation-duration: 430ms;
  }
  html.bp-motion-v1 .bp-feature-v2.bp-reveal.is-in .bp-feature-v2-body,
  html.bp-motion-v1 .bp-format-card.bp-reveal.is-in .bp-format-body {
    animation-duration: 480ms;
    animation-delay: calc(35ms + var(--bp-v2-stagger));
  }
}

/* Respect both initial and dynamically toggled reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  html .bp-feature-v2.bp-reveal.is-in .bp-feature-v2-media,
  html .bp-format-card.bp-reveal.is-in .bp-format-media,
  html .bp-feature-v2.bp-reveal.is-in .bp-feature-v2-body,
  html .bp-format-card.bp-reveal.is-in .bp-format-body {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  html .bp-feature-v2 .bp-feature-v2-media img,
  html .bp-format-card .bp-price {
    transition: none !important;
  }
}
