/* ==========================================================================
   AIRAA SRL — animations
   Keyframes, scroll-reveal states and reduced-motion handling.
   ========================================================================== */

/* Hidden unless the browser can actually place them along their path —
   otherwise every pulse stacks at the SVG origin as a stray corner dot. */
.hv-pulse { display: none; }

@supports (offset-path: path("M0,0 L1,1")) {
  .hv-pulse {
    display: block;
    fill: var(--brand-500);
    offset-rotate: 0deg;
    offset-distance: 0%;
  }
}

/* --------------------------------------------------------------------------
   22. Reveal animations
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal="left"] { transform: translateX(-24px); }
[data-reveal="right"] { transform: translateX(24px); }
[data-reveal="scale"] { transform: scale(0.965); }

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Floating ambience.
   The hero cards are centred on their coordinates with translate(-50%,-50%),
   so these keyframes must carry that offset — an animation that sets bare
   transform would replace the centring and push the cards off the visual. */
@keyframes float-a {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 14px)); }
}

@keyframes float-b {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% + 12px)); }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(22px, -18px, 0) scale(1.04); }
  66% { transform: translate3d(-16px, 14px, 0) scale(0.97); }
}

@keyframes dash {
  to { stroke-dashoffset: -240; }
}

@keyframes travel {
  0% { offset-distance: 0%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .orb { animation: drift 26s var(--ease-soft) infinite; }
  .orb--b { animation-duration: 32s; animation-direction: reverse; }
  .orb--c { animation-duration: 38s; }

  .float-a { animation: float-a 7s var(--ease-soft) infinite; }
  .float-b { animation: float-b 8.5s var(--ease-soft) infinite; }

  .hv-line { animation: dash 9s linear infinite; }
  .hv-pulse { animation: travel 5.5s var(--ease-soft) infinite; }
  .hv-ring { animation: spin 40s linear infinite; border-style: dashed; }
  .map-link { animation: dash 14s linear infinite; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
  .hv-pulse { display: none; }
  .timeline__progress { width: 88% !important; }
}
