/* ==========================================================================
   Motion: "Candlelit Glint Sweep" - gentle rise-in plus a gold glint across plaques
   ========================================================================== */

.reveal { opacity: 1; }

/* Only hide reveal targets once JS has confirmed it can show them again */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Glint: a diagonal light sweep that passes once when a plaque enters view */
.hero-plaque,
.download-frame,
.relief-card { overflow: hidden; }

.hero-plaque::before,
.download-frame::before,
.relief-card::before,
.store-btn--play::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 190, 0.22), transparent);
  transform: translateX(-120%) rotate(12deg);
  pointer-events: none;
}

.reveal.is-in::before { animation: glint-sweep 1.6s ease-out 0.3s 1 both; }
.store-btn--play:hover::after,
.store-btn--play:focus-visible::after { animation: glint-sweep 0.9s ease-out 1 both; }

/* Candy gems in the hero row pulse in sequence, like a match about to clear */
.gem-row .gem { animation: gem-pulse 3.6s ease-in-out infinite; }
.gem-row .gem:nth-child(2) { animation-delay: 0.2s; }
.gem-row .gem:nth-child(3) { animation-delay: 0.4s; }

@keyframes glint-sweep {
  from { transform: translateX(-120%) rotate(12deg); }
  to { transform: translateX(520%) rotate(12deg); }
}

@keyframes gem-pulse {
  0%, 70%, 100% { transform: scale(1); box-shadow: 0 0 0 2px var(--gold), 0 3px 6px rgba(0, 0, 0, 0.5); }
  80% { transform: scale(1.15); box-shadow: 0 0 0 2px var(--gold-bright), 0 0 16px rgba(232, 106, 138, 0.8); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
