/* ============================================================
   HSEI.IO — animations.css
   Global @keyframes (SPECIFICATION v1.2 · Sections 3.3, 8)
   All motion respects prefers-reduced-motion.
   ============================================================ */

/* Section / element entrance */
@keyframes fi {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Pulse line draws left to right via stroke-dashoffset */
@keyframes signal-draw {
  from { stroke-dashoffset: 360; }
  to   { stroke-dashoffset: 0; }
}

/* Idle breathing of the pulse line */
@keyframes signal-breathe {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1.0; }
}

/* Trailing cursor dot blink */
@keyframes cursor-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Logo axis line glow */
@keyframes axis-glow {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* Logo chalice arms pulse */
@keyframes chalice-pulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* LIVE indicator blink */
@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

/* Ambient mesh blob drift */
@keyframes mesh-drift-teal {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(14vw, 10vh) scale(1.06); }
  100% { transform: translate(6vw, 18vh) scale(0.96); }
}

@keyframes mesh-drift-gold {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-12vw, -9vh) scale(1.08); }
  100% { transform: translate(-5vw, -16vh) scale(0.94); }
}

@keyframes mesh-drift-lift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-8vw, 6vh) scale(1.04); }
  100% { transform: translate(10vw, 4vh) scale(0.98); }
}

@keyframes mesh-drift-depth {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8vw, -7vh) scale(1.05); }
  100% { transform: translate(-6vw, -4vh) scale(0.97); }
}

/* HSEI hero — moving shine over metallic text */
@keyframes hs-title-shine {
  0%,
  68%,
  100% {
    background-position: -130% 0, 0 0;
  }
  42% {
    background-position: 130% 0, 0 0;
  }
}

/* ============================================================
   Motion-enabled defaults
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .axis-line   { animation: axis-glow 3s ease-in-out infinite; }
  .chalice-path { animation: chalice-pulse 3.5s ease-in-out infinite; }

  .anim-fi { animation: fi 0.8s ease both; }

  /* Hero entrance staging */
  .hero-statement { animation: fi 0.8s ease 0.2s both; opacity: 0; }
  .hero-ctas      { animation: fi 0.8s ease 0.3s both; opacity: 0; }

  /* LIVE dot */
  .live-dot { animation: blink 1.2s step-end infinite; }

  /* Hero HSEI title shine */
  .hero-brand,
  .hero-brand.type-h1 {
    animation: hs-title-shine 3s ease-in-out infinite;
  }

  /* Ambient background blobs */
  .bg-mesh__blob--teal  { animation: mesh-drift-teal  14s ease-in-out infinite alternate; }
  .bg-mesh__blob--gold  { animation: mesh-drift-gold  17s ease-in-out infinite alternate; }
  .bg-mesh__blob--lift  { animation: mesh-drift-lift  19s ease-in-out infinite alternate; }
  .bg-mesh__blob--depth { animation: mesh-drift-depth 21s ease-in-out infinite alternate; }
}

/* i18n fade transition (SPECIFICATION Section 9.2) */
.i18n { transition: opacity 0.2s ease; }
.fading .i18n { opacity: 0; }

/* scroll-reveal: hidden until IntersectionObserver adds .revealed */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Reduced motion: disable all decorative animation
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-brand,
  .hero-brand.type-h1 {
    background-position: -130% 0, 0 0;
  }
}
