/* Homepage background only. Increase duration for a slower drift. */
.hero {
  --hero-carousel-duration: 90s;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--ivory);
}

.hero-carousel-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: hero-carousel-drift var(--hero-carousel-duration) linear infinite;
  will-change: transform;
}

/* Identical, gapless groups make the loop boundary invisible. */
.hero-carousel-group {
  display: flex;
  flex: none;
  height: 100%;
}

.hero-carousel-group img {
  display: block;
  flex: none;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

@keyframes hero-carousel-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* A light touch of ivory preserves the photographs' color and detail. */
.hero .hero-fade {
  background: radial-gradient(ellipse at 50% 42%, rgba(255,248,242,.12), transparent 65%),
    linear-gradient(180deg, transparent 60%, rgba(255,248,242,.12));
  pointer-events: none;
}

@media (max-width: 780px) {
  .hero-carousel-group img {
    width: 75vw;
    object-position: center;
  }
}

/* Keep the existing tagline visible on small phones, too. */
@media (max-width: 400px) {
  .hero .hero-tagline-card { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel-track {
    animation: none;
    transform: none;
    will-change: auto;
  }
}
