.home-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(38rem, 60vw, 45rem);
  background: #ffffff;
  color: #3f3f3f;
  font-family: "Nunito", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Sticky puzzle logo — fixed over entire page, behind hero text */
.home-hero__puzzle {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  transform-origin: center center;
  width: min(80vw, 550px);
  pointer-events: none;
  z-index: 1;
  animation: home-hero-puzzle-scale 6s ease-in-out 200ms 1 both;
  will-change: transform;
}

.home-hero__puzzle-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  animation: home-hero-puzzle-fade 6s ease-in-out 200ms 1 both;
}

/* Wrapper scales up and back */
@keyframes home-hero-puzzle-scale {
  0%        { transform: translate(-50%, -50%) scale(0.6); }
  25%, 75%  { transform: translate(-50%, -50%) scale(1); }
  100%      { transform: translate(-50%, -50%) scale(0.6); }
}

/* Logo: very faint at rest, fully opaque during hold, fades back */
@keyframes home-hero-puzzle-fade {
  0%        { opacity: 0.12; }
  25%, 75%  { opacity: 1; }
  100%      { opacity: 0.12; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__puzzle     { animation: none; transform: translate(-50%, -50%) scale(0.6); }
  .home-hero__puzzle-img { animation: none; opacity: 0.12; }
}

/* End-state class is set after the JS-driven transition completes, just so
   the puzzle stays put if any layout recalc fires later. The actual easing
   is performed inline by home-hero.js to avoid cascade races between the
   running keyframe animation and a class-based transition. */
.home-hero__puzzle.is-past-hero {
  animation: none !important;
  transform: translate(-50%, -50%) scale(0.6) !important;
}
.home-hero__puzzle.is-past-hero .home-hero__puzzle-img {
  animation: none !important;
  opacity: 0.12 !important;
}

.home-hero__inner {
  position: relative;
  z-index: 2;
  width: min(900px, var(--container-wide));
  margin: 0 auto;
  padding: 4rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.home-hero__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c7682;
  font-weight: 700;
  margin-bottom: -0.5rem;
}

.home-hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 700;
  color: #4a4a4a;
  margin: 0;
}

.home-hero__highlight {
  color: #b7d188;
}

.home-hero__subtitle {
  max-width: 44rem;
  color: #5c6470;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.6;
  font-weight: 500;
  margin-top: 0.5rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

.home-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.1;
  white-space: nowrap;
  color: #0f0f0f;
}

.home-hero__button--primary {
  background: #ffb6c1;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
}

.home-hero__button--primary:hover {
  background: #ffa3b0;
  transform: translateY(-2px);
}

.home-hero__button--secondary {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid #d1d5dc;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.home-hero__button--secondary:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  .home-hero {
    min-height: 32rem;
  }
  .home-hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .home-hero__button {
    width: 100%;
  }
}
