/* Decorative motion layer. Everything is disabled for reduced-motion users. */

.hero-stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-star {
  position: absolute;
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: #fff6d8;
  box-shadow: 0 0 6px 1px rgba(255, 240, 200, .8);
  opacity: .2;
  animation: star-twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes star-twinkle {
  0%, 100% { opacity: .15; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes btn-shimmer {
  to { transform: translateX(260%) skewX(-20deg); }
}

.moon { animation: float-soft 6s ease-in-out infinite; }

.hero-tag, .hero h1, .hero-desc, .hero-text .btn {
  animation: fade-up .8s cubic-bezier(.2, .7, .2, 1) both;
}
.hero h1 { animation-delay: .12s; }
.hero-desc { animation-delay: .24s; }
.hero-text .btn { animation-delay: .36s; }

.btn-pink { position: relative; overflow: hidden; }
.btn-pink::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.btn-pink:hover::after { animation: btn-shimmer .9s ease; }

.cosmic-card, .image-card, .icon-box {
  transition: transform .35s ease, box-shadow .35s ease;
}
.cosmic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(78, 35, 93, .22);
}
.image-card:hover { transform: translateY(-5px) scale(1.01); }
.icon-box:hover { transform: translateY(-4px); }
.card-visual { transition: transform .5s ease; }
.cosmic-card:hover .card-visual { transform: scale(1.1) rotate(-4deg); }

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Keep hover lifts working once an element has finished revealing. */
.js-reveal .cosmic-card.reveal.is-visible:hover { transform: translateY(-6px); }

/* Ambient background for every page: drifting glows and a meteor every 8 seconds. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.ambient-glow {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .22;
  will-change: transform;
}
.ambient-glow.g1 {
  top: -14vmax;
  left: -10vmax;
  background: radial-gradient(circle, #8b4fb8, transparent 65%);
  animation: glow-drift-a 28s ease-in-out infinite alternate;
}
.ambient-glow.g2 {
  right: -14vmax;
  bottom: -16vmax;
  background: radial-gradient(circle, #e5c985, transparent 65%);
  opacity: .12;
  animation: glow-drift-b 34s ease-in-out infinite alternate;
}

/* Nine meteors share a 24s cycle, evenly staggered for frequent slow streaks. */
.meteor {
  position: absolute;
  top: var(--top, 5%);
  left: var(--left, 5%);
  width: 150px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 244, 214, .9));
  filter: drop-shadow(0 0 6px rgba(255, 240, 200, .9));
  opacity: 0;
  transform-origin: right center;
  animation: meteor-fall 24s linear var(--delay, 0s) infinite;
}
.meteor::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fffbe8;
  box-shadow: 0 0 10px 3px rgba(255, 244, 214, .85);
}

@keyframes glow-drift-a {
  to { transform: translate(18vw, 22vh) scale(1.2); }
}
@keyframes glow-drift-b {
  to { transform: translate(-20vw, -18vh) scale(1.15); }
}
@keyframes meteor-fall {
  0% { opacity: 0; transform: rotate(35deg) translateX(0); }
  0.8% { opacity: 1; }
  15% { opacity: 0; transform: rotate(35deg) translateX(110vmax); }
  100% { opacity: 0; transform: rotate(35deg) translateX(110vmax); }
}

/* Slowly moving light across the home hero. */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  z-index: 1;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 225, 242, .22), transparent 22%),
    radial-gradient(circle at 70% 60%, rgba(139, 79, 184, .3), transparent 26%);
  animation: hero-light 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes hero-light {
  to { transform: translate(8%, 6%) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-glow, .hero::before { animation: none !important; }
  .meteor {
    animation-duration: 24s !important;
    animation-iteration-count: infinite !important;
  }

  .hero-star, .moon, .hero-tag, .hero h1, .hero-desc, .hero-text .btn { animation: none !important; }
  .hero-star { opacity: .6; }
  .btn-pink:hover::after { animation: none; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .cosmic-card, .image-card, .icon-box, .card-visual { transition: none; }
  .cosmic-card:hover, .image-card:hover, .icon-box:hover, .cosmic-card:hover .card-visual { transform: none; }
}
