/**
 * Studio Lite — animations.css
 * Entrance animations, F1-style speed lines, shimmer, pulse.
 * All animations respect prefers-reduced-motion.
 */

/* ─── Entrance: Fade Up ─────────────────────────── */
@keyframes sl-entrance-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Entrance: Fade In ─────────────────────────── */
@keyframes sl-entrance-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Clip wipe left→right ──────────────────────── */
@keyframes sl-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

/* ─── Slide in from left ────────────────────────── */
@keyframes sl-slide-right {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Scale in ──────────────────────────────────── */
@keyframes sl-scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ─── Orange border draw ────────────────────────── */
@keyframes sl-border-draw {
  from { width: 0; }
  to   { width: 60px; }
}

/* ─── Shimmer (loading skeleton) ───────────────── */
@keyframes sl-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

/* ─── Speed lines (decorative) ─────────────────── */
.sl-speed-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.06;
}

.sl-speed-lines::before,
.sl-speed-lines::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -200px;
  right: -200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--sl-accent), transparent);
  transform-origin: left center;
  animation: sl-speed-line 3s linear infinite;
}

.sl-speed-lines::after {
  top: 40%;
  animation-delay: -1.5s;
  animation-duration: 2.4s;
}

@keyframes sl-speed-line {
  0%   { transform: translateX(-120%) rotate(-3deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(120%) rotate(-3deg); opacity: 0; }
}

/* ─── Accent divider animated draw ─────────────── */
.sl-divider.sl-divider--animated {
  width: 0;
  animation: sl-border-draw 0.7s cubic-bezier(0.4,0,0.2,1) forwards;
  animation-play-state: paused;
}

.is-visible .sl-divider--animated {
  animation-play-state: running;
}

/* ─── Glowing border on cards ───────────────────── */
.sl-card--glow {
  position: relative;
}

.sl-card--glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--sl-accent), transparent, var(--sl-accent));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.sl-card--glow:hover::before { opacity: 1; }

/* ─── Hero title word reveal ────────────────────── */
.sl-hero h1 .word {
  display: inline-block;
  overflow: hidden;
}

.sl-hero h1 .word span {
  display: inline-block;
  transform: translateY(110%);
  animation: sl-word-reveal 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
  animation-play-state: paused;
}

.sl-reveal.is-visible h1 .word span {
  animation-play-state: running;
}

@keyframes sl-word-reveal {
  to { transform: translateY(0); }
}

/* ─── Staggered word delays ─────────────────────── */
.sl-hero h1 .word:nth-child(1) span { animation-delay: 0s; }
.sl-hero h1 .word:nth-child(2) span { animation-delay: 0.08s; }
.sl-hero h1 .word:nth-child(3) span { animation-delay: 0.16s; }
.sl-hero h1 .word:nth-child(4) span { animation-delay: 0.24s; }
.sl-hero h1 .word:nth-child(5) span { animation-delay: 0.32s; }

/* ─── Pulse CTA button ──────────────────────────── */
.sl-btn--pulse {
  animation: sl-pulse-glow 2.5s ease-in-out infinite;
}

/* ─── Ticker tape (optional promo bar) ──────────── */
.sl-ticker {
  overflow: hidden;
  white-space: nowrap;
  background: var(--sl-accent);
  padding: 0.5rem 0;
}

.sl-ticker__inner {
  display: inline-flex;
  gap: 4rem;
  animation: sl-ticker-scroll 30s linear infinite;
}

.sl-ticker span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sl-white);
}

@keyframes sl-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Reduced motion overrides ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sl-reveal {
    opacity: 1;
    transform: none;
  }

  .sl-speed-lines { display: none; }
  .sl-ticker__inner { animation: none; }
}
