/* ── ShinyText: Animated gradient text sweep ── */

/* Base shiny text effect */
.shiny-text {
  --shiny-base: #d1d5db;
  --shiny-highlight: #ffffff;
  --shiny-speed: 6s;

  background-image: linear-gradient(
    120deg,
    var(--shiny-base) 0%,
    var(--shiny-base) 40%,
    var(--shiny-highlight) 50%,
    var(--shiny-base) 60%,
    var(--shiny-base) 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shiny-sweep var(--shiny-speed) ease-in-out infinite;
}

/* Light theme: dark base with brand orange shine */
body.light-theme .shiny-text {
  --shiny-base: #1a1a2e;
  --shiny-highlight: #ff6b00;
}

/* Brand-accent variant: orange base with golden-white shine */
.shiny-text-brand {
  --shiny-base: #ff6b00;
  --shiny-highlight: #ffe0b2;
  --shiny-speed: 5s;

  background-image: linear-gradient(
    120deg,
    var(--shiny-base) 0%,
    var(--shiny-base) 40%,
    var(--shiny-highlight) 50%,
    var(--shiny-base) 60%,
    var(--shiny-base) 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shiny-sweep var(--shiny-speed) ease-in-out infinite;
}

body.light-theme .shiny-text-brand {
  --shiny-base: #e05e00;
  --shiny-highlight: #fff3e0;
}

/* Hero title variant: bigger, slower, more impactful */
.hero-title.shiny-text {
  --shiny-speed: 8s;
  --shiny-base: #e0e0e0;
  --shiny-highlight: #ffffff;
}

body.light-theme .hero-title.shiny-text {
  --shiny-base: #111827;
  --shiny-highlight: #ff6b00;
}

/* CTA title: slightly warmer tones */
.cta-title.shiny-text {
  --shiny-speed: 7s;
  --shiny-base: #d4d4d8;
  --shiny-highlight: #ff8c38;
}

body.light-theme .cta-title.shiny-text {
  --shiny-base: #18181b;
  --shiny-highlight: #ff6b00;
}

/* Section titles: medium speed */
.sec-title.shiny-text {
  --shiny-speed: 6s;
}

/* Step titles */
.step-title.shiny-text {
  --shiny-speed: 5s;
  --shiny-base: #c4c4cc;
  --shiny-highlight: #ff8c38;
}

body.light-theme .step-title.shiny-text {
  --shiny-base: #1f2937;
  --shiny-highlight: #ff6b00;
}

/* Feature titles */
.feat-title.shiny-text {
  --shiny-speed: 5s;
  --shiny-base: #c4c4cc;
  --shiny-highlight: #ff8c38;
}

body.light-theme .feat-title.shiny-text {
  --shiny-base: #1f2937;
  --shiny-highlight: #ff6b00;
}

/* The sweep keyframes */
@keyframes shiny-sweep {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* Stagger animation delays for grouped titles to avoid all shining at the same time */
.steps-grid .step-card:nth-child(2) .shiny-text { animation-delay: 0.6s; }
.steps-grid .step-card:nth-child(3) .shiny-text { animation-delay: 1.2s; }

.feat-list .feat-item:nth-child(2) .shiny-text { animation-delay: 0.5s; }
.feat-list .feat-item:nth-child(3) .shiny-text { animation-delay: 1.0s; }

/* Pause animation on hover to draw attention */
.shiny-text:hover,
.shiny-text-brand:hover {
  animation-play-state: paused;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .shiny-text,
  .shiny-text-brand {
    animation: none;
    -webkit-text-fill-color: initial;
    background: none;
  }
}
