/**
 * Easter Egg - Site Credit Animation
 *
 * Self-contained styles for the footer credit easter egg.
 * Can be disabled by removing the enqueue in functions.php.
 *
 * @package refinery-hair
 */

/* Site Credit Heart Button */
.site-credit__heart {
  background: none;
  border: none;
  padding: 0 0.15em;
  margin: 0;
  cursor: pointer;
  color: var(--color-white);
  vertical-align: middle;
  line-height: 1;
  transition: transform 0.2s ease;
}

.site-credit__heart:hover {
  transform: scale(1.2);
}

.site-credit__heart:active {
  transform: scale(0.9);
}

.site-credit__heart svg {
  display: inline-block;
  vertical-align: middle;
}

/* Hair Strands Easter Egg Container */
.hair-strands-easter-egg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
  contain: strict;
  isolation: isolate;
}

/* Individual Hair Strand */
.hair-strands-easter-egg .strand {
  position: absolute;
  top: -150px;
  width: 2px;
  height: 150px;
  background: linear-gradient(to bottom, transparent, #4a3728, #3d2d1f, transparent);
  border-radius: 50%;
  opacity: 0;
  filter: blur(0.5px);
  animation: easterEggStrand 5s ease-in-out forwards;
}

@keyframes easterEggStrand {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(50vh) translateX(var(--sway, 20px)) rotate(var(--rotate, 10deg));
    opacity: 0.6;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(100vh) translateX(calc(var(--sway, 20px) * -1)) rotate(calc(var(--rotate, 10deg) * -1));
    opacity: 0;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .site-credit__heart:hover,
  .site-credit__heart:active {
    transform: none;
  }

  .hair-strands-easter-egg .strand {
    animation: none;
    display: none;
  }
}
