.hero {
  max-width: 80%;
  padding-top: 50px;
  padding-bottom: 50px;
  box-shadow: rgba(0, 0, 0, 0.553) 0px 5px 15px;
  position: relative;
  overflow: hidden;

  /* REMOVE these so the base doesn't stay permanently visible */
  /* background-image: url("/images/desert.jpg"); */
  /* background-size: cover; */
  /* background: url("/images/desert.jpg") center/cover no-repeat; */
}

/* top layer that fades in/out (now also acts as the base background) */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  opacity: 1;
  animation: heroFade 40s infinite; /* 4 images * 10s = 40s */
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(255, 255, 255);
  /* triangle that creates a perfect TL -> BR diagonal */
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  z-index: 1;
  pointer-events: none;
}


@keyframes heroFade {
  /* Desert */
  0%   { background-image: url("/images/desert.jpg"); opacity: 1; }
  20%  { background-image: url("/images/desert.jpg"); opacity: 1; }
  25%  { background-image: url("/images/desert.jpg"); opacity: 1; }

  /* Waves (swap happens while still invisible) */
  25%  { background-image: url("/images/waves.jpg"); opacity: 1; }
  30%  { background-image: url("/images/waves.jpg"); opacity: 1; }
  45%  { background-image: url("/images/waves.jpg"); opacity: 1; }
  50%  { background-image: url("/images/waves.jpg"); opacity: 1; }

  /* Forest */
  50%  { background-image: url("/images/forest.jpg"); opacity: 1; }
  55%  { background-image: url("/images/forest.jpg"); opacity: 1; }
  70%  { background-image: url("/images/forest.jpg"); opacity: 1; }
  75%  { background-image: url("/images/forest.jpg"); opacity: 1; }

  /* Mountains */
  75%  { background-image: url("/images/mountains.jpg"); opacity: 1; }
  80%  { background-image: url("/images/mountains.jpg"); opacity: 1; }
  95%  { background-image: url("/images/mountains.jpg"); opacity: 1; }

  100% { background-image: url("/images/desert.jpg"); opacity: 1; }

}

.intro-image-wrap {
  max-width: 80%;
  margin: 0 auto;
  overflow: hidden;              /* crops the zoom */
  border: solid 10px #ffffff2f;  /* move border here so it doesn’t scale */
  box-shadow: rgba(0, 0, 0, 0.553) 0px 5px 15px;
  position: relative;
  z-index: 2;
}

.introduction-image {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: center;
}

@media (max-width: 800px) {
  .hero {
    max-width: 100%;
    width: 100%;
  }

  .intro-image-wrap {
    max-width: 90%;
  }

  .introduction-image {
    transform: scale(1.25); /* zooms in without growing the wrap */
  }
}

.introduction-text {
    max-width: 800px;
    margin: 40px auto;
    font-size: 18px;
    line-height: 1.6;
}

.introduction-text > h2 {
    text-align: center;
}

@media (max-width: 880px) {
    .introduction-text {
        max-width: 80%;
        font-size: 16px;
    }
}
