/* ============================================================
   REIGNCORE Group — Animations & visual effects
   ============================================================ */

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes sofia-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.2); }
}

@keyframes sofia-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sofia-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes mesh-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(2%, -1%) scale(1.04); }
}

@keyframes line-grow {
  from { transform: scaleX(0); transform-origin: left center; }
  to   { transform: scaleX(1); transform-origin: left center; }
}

@keyframes typewriter-caret {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

/* ===== Utility classes ===== */
.fade-up { animation: fade-up 0.6s ease both; }
.fade-in { animation: fade-in 0.5s ease both; }

.hero::before { animation: mesh-drift 18s ease-in-out infinite; }

/* Separator line that draws when visible */
hr.line-grow,
.line-grow {
  height: 1px;
  background: var(--color-hairline);
  border: 0;
  transform: scaleX(0);
  transition: transform 0.8s ease;
}
.line-grow.visible { transform: scaleX(1); transform-origin: left center; }

/* Typewriter — caret hidden after animation completes */
.typewriter-target { white-space: pre-wrap; }
.typewriter-caret {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: currentColor;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: typewriter-caret 0.8s steps(1) infinite;
}
.typewriter-caret.done { display: none; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .typewriter-caret { display: none; }
}
