.hero-background {
  --hero-photo-duration:1.5s;
  --hero-photo-amplitude:2.4%;
  --hero-photo-scale:1;
  position:relative;
  isolation:isolate;
}

.hero-background > .hero {
  position:relative;
  z-index:1;
}

.hero-background .hero-art {
  margin-bottom:54px;
}

.hero-photo {
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
  isolation:isolate;
  background:var(--sand);
  pointer-events:none;
}

.hero-photo__image {
  display:block;
  width:100%;
  max-width:none;
  position:absolute;
  top:-3%;
  height:106%;
  object-fit:cover;
  object-position:50% 44%;
  transform:translateY(calc(-1 * var(--hero-photo-amplitude))) scale(var(--hero-photo-scale));
  transform-origin:center;
}

[data-hero-photo-state="settled"] .hero-photo__image {
  transform:translateY(0) scale(var(--hero-photo-scale));
}

/* Preserve the photograph's original light; keep the copy readable locally. */
.hero-background .hero-copy {
  padding:28px;
  background:rgb(238 231 220 / 94%);
  border-radius:2px;
  color:#25382f;
}
.hero-background .hero-description,
.hero-background .reassurance { color:#384a40; }
.hero-background .hero-art { color:#f4ecdc; }
.hero-background .art-caption { color:#f4ecdc; text-shadow:0 1px 3px #000; }
.hero-background .art-sun { background:none; }

@keyframes hero-photo-enter {
  from {
    transform:translateY(calc(-1 * var(--hero-photo-amplitude))) scale(var(--hero-photo-scale));
  }
  to {
    transform:translateY(0) scale(var(--hero-photo-scale));
  }
}

@media (prefers-reduced-motion:no-preference) {
  [data-hero-photo-state="entering"] .hero-photo__image {
    animation:hero-photo-enter var(--hero-photo-duration) cubic-bezier(.22,.61,.36,1) 1 both;
  }
}

@media (max-width:600px) {
  .hero-background .hero-copy { padding:22px; }
  .hero-photo__image { object-position:50% 44%; }
}

@media (prefers-reduced-motion:reduce) {
  .hero-photo__image {
    animation:none;
    transform:translateY(0) scale(var(--hero-photo-scale));
  }
}
