.hero-horse {
  position: relative;
  width: clamp(170px, 30vw, 290px);
  aspect-ratio: 617 / 857;
  margin-bottom: clamp(0.75rem, 3.5vh, 1.75rem);
  animation: float 6s ease-in-out infinite;
  touch-action: none;
  cursor: pointer;
}

.hero-horse__glow {
  position: absolute;
  inset: -18% -32%;
  background: radial-gradient(
    closest-side,
    rgba(255, 210, 21, 0.34),
    rgba(255, 210, 21, 0.09) 55%,
    transparent 74%
  );
  filter: blur(16px);
  animation: glow 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-horse__body {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-horse__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.hero-horse__shadow {
  position: absolute;
  left: 50%;
  bottom: -7%;
  width: 64%;
  height: 7%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent 72%);
  border-radius: 50%;
  animation: shadow 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-horse__svg path {
  fill: var(--gold);
  transition: fill 0.45s ease;
}
.hero-horse__svg .b { --pony: #ed1c24; }
.hero-horse__svg .c { --pony: #f7931e; }
.hero-horse__svg .d { --pony: #9e005d; }
.hero-horse__svg .e { --pony: #c1272d; }
.hero-horse__svg .f { --pony: #ffd215; }

.hero:hover .hero-horse__svg path,
.hero.is-awake .hero-horse__svg path {
  fill: var(--pony, var(--gold));
}
.hero:hover .hero-horse__svg,
.hero.is-gallop .hero-horse__svg {
  animation: gallop 0.9s ease;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes glow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes shadow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.55; }
  50% { transform: translateX(-50%) scale(0.8); opacity: 0.32; }
}
@keyframes gallop {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(-16px) rotate(-2.5deg); }
  40% { transform: translateY(0) rotate(0deg); }
  60% { transform: translateY(-9px) rotate(1.8deg); }
  80% { transform: translateY(0) rotate(0deg); }
}

@media (hover: none) {
  .hero-horse__svg path {
    fill: var(--pony, var(--gold));
  }
}

@media (max-width: 540px) {
  .hero-bg__img {
    object-position: 50% 42%;
  }
  .hero-horse {
    width: clamp(168px, 46vw, 230px);
    margin-bottom: 0.85rem;
  }
  .stage {
    justify-content: center;
    padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem
      calc(3.6rem + env(safe-area-inset-bottom));
  }
  .eyebrow {
    letter-spacing: 0.32em;
    margin-bottom: 0.45rem;
  }
  .wordmark {
    font-size: clamp(2.8rem, 15vw, 4.2rem);
  }
  .tagline {
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    margin-top: 0.55rem;
  }
}

@media (max-height: 700px) {
  .hero-horse {
    width: clamp(128px, 28vw, 180px);
    margin-bottom: 0.45rem;
  }
  .stage {
    padding-top: max(1.1rem, env(safe-area-inset-top));
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  }
}
