.hero-pin {
  position: relative;
  height: 240vh;
}

.hero-pin .hero {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #1a1f1c;
}

/* Darken via overlay instead of CSS filter (filter on full-bleed is janky on iOS) */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(12, 16, 14, 0.34);
  pointer-events: none;
}

.hero-bg-fern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  z-index: 1;
  /* GPU-friendly; no filter/transform on the swapping image */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .hero-pin {
    height: 100vh;
    height: 100dvh;
  }
  .hero-content {
    transform: none !important;
    opacity: 1 !important;
  }
}
