/* =============================================================================
   Sunset Picknick — scroll animation layer (animated/ variant only)

   Everything here is additive on top of the shared ../css/main.css: base
   states hide/offset elements before they're revealed, animate.js adds
   .spk-reveal + a flavor modifier to elements as it discovers them and
   flips .is-visible when they scroll into view. Nothing here changes the
   layout of the original site — only opacity/transform, so a no-JS visit
   still renders the full page (see the <noscript> fallback below).
   ========================================================================= */

@media (prefers-reduced-motion: no-preference) {

  .spk-reveal {
    opacity: 0;
    transition:
      opacity .8s cubic-bezier(.16, .8, .3, 1),
      transform .8s cubic-bezier(.16, .8, .3, 1);
    transition-delay: var(--spk-reveal-delay, 0ms);
    will-change: opacity, transform;
  }

  /* No !important needed: two classes already out-specificities the
     single-class flavor modifiers below — and leaving it off means the
     idle-float keyframe animation on the keyvisual (further down) can
     still take over transform after the reveal finishes. */
  .spk-reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Rise: the workhorse — drifts up softly, like it's settling into place. */
  .spk-reveal--rise {
    transform: translateY(28px);
  }

  /* Rise + scale: a touch of "lift off the table" for cards/tiles. */
  .spk-reveal--rise-scale {
    transform: translateY(28px) scale(.94);
  }

  /* Drift: slow horizontal glide, used once for the hero keyvisual — evokes
     the sun sliding into position over the horizon. */
  .spk-reveal--drift {
    opacity: 0;
    transform: translateX(-32px);
    transition-duration: 1.1s;
  }

  /* Slide: FAQ rows slide in from the left, slightly faster/snappier. */
  .spk-reveal--slide {
    transform: translateX(-24px);
    transition-duration: .6s;
  }

  /* Glow: countdown/CTA — fades up with a soft blur-out, like catching light. */
  .spk-reveal--glow {
    transform: translateY(16px);
    filter: blur(6px);
    transition-property: opacity, transform, filter;
  }

  .spk-reveal--glow.is-visible {
    filter: blur(0);
  }

  /* Collage piece: each photo/sticker in the inline Impressionen SVG pops
     in on its own. fill-box anchors the scale on the piece's own rendered
     center instead of the SVG viewport's (0,0) — the default for SVG. */
  .spk-reveal--collage-piece {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(.8);
    transition-duration: .65s;
  }

  /* Slow, ambient drift on the hero keyvisual that keeps going after the
     reveal — a very subtle "floating" idle, like haze over the Halde. */
  #start .spk-hero__keyvisual.is-visible {
    animation: spk-idle-float 7s ease-in-out .8s infinite;
  }

  @keyframes spk-idle-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
  }
}

/* No motion preferred (or JS never ran) — show everything, no exceptions. */
@media (prefers-reduced-motion: reduce) {
  .spk-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

.spk-no-js .spk-reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

/* =============================================================================
   Animated ScrollSpy indicator — a single real element that glides between
   nav-links (instead of the static main-site dot, which is a ::after that
   can only ever belong to one element at a time). Sized/colored to match
   the main site's indicator; animate.js positions it via ScrollSpy events.
   ========================================================================= */

.spk-nav-pill .nav-link.active::after {
  content: none;
}

.spk-nav-pill {
  position: relative;
}

.spk-scroll-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--spk-orange);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.6);
  transition:
    left .5s cubic-bezier(.34, 1.56, .64, 1),
    top .5s cubic-bezier(.34, 1.56, .64, 1),
    opacity .3s ease,
    transform .3s ease;
}

.spk-scroll-indicator.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: spk-indicator-pulse 2.4s ease-in-out .5s infinite;
}

@keyframes spk-indicator-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 139, 56, .45); }
  50%      { box-shadow: 0 0 0 10px rgba(254, 139, 56, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .spk-scroll-indicator {
    transition: opacity .2s ease;
  }

  .spk-scroll-indicator.is-active {
    animation: none;
  }

  /* Without the glide, put the static dot back so active state is still visible. */
  .spk-nav-pill .nav-link.active::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--spk-orange);
    transform: translate(-50%, -50%);
    z-index: -1;
  }

  .spk-scroll-indicator {
    display: none;
  }
}
