/* 03 — One ordered list, alternating on desktop, single column on mobile */
.story {
  background:
    radial-gradient(ellipse at 75% 30%, #24403560, transparent 65%),
    var(--forest);
  color: var(--white);
  padding: 58px 0 40px;
}
.story__intro {
  margin-bottom: 43px;
}
.story__intro p {
  padding-top: 6px;
  color: #e0e8e1;
}
.story__timeline {
  list-style: none;
  padding: 8px 0 20px;
  margin: 0 auto;
  max-width: 1100px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 54px;
  row-gap: 0;
}
.story__timeline::before {
  content: "";
  position: absolute;
  width: 1px;
  top: 0;
  bottom: 0;
  left: 50%;
  background: #8aa892;
}
.story__timeline::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 50%;
  bottom: 0;
  border-right: 1px solid #8aa892;
  border-bottom: 1px solid #8aa892;
  transform: translateX(-50%) rotate(45deg);
}
.story-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  min-height: 195px;
}
.story-step:nth-child(odd) {
  grid-column: 1;
}
.story-step:nth-child(even) {
  grid-column: 2;
  margin-top: 0;
}
.story-step:nth-child(1) {
  grid-row: 1 / span 2;
}
.story-step:nth-child(2) {
  grid-row: 2 / span 2;
}
.story-step:nth-child(3) {
  grid-row: 3 / span 2;
}
.story-step:nth-child(4) {
  grid-row: 4 / span 2;
}
.story-step:nth-child(5) {
  grid-row: 5 / span 2;
}
.story-step:nth-child(6) {
  grid-row: 6 / span 2;
}
.story__timeline {
  grid-auto-rows: 115px;
}
.story-step::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  background: #a2c1ac;
  top: 37px;
  right: -33px;
  border-radius: 50%;
}
.story-step:nth-child(even)::after {
  right: auto;
  left: -32px;
}
.story-step > img {
  width: 100%;
  aspect-ratio: 1.39;
  object-fit: cover;
  border-radius: 3px;
  margin-top: 6px;
}
.story-step__number {
  display: block;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 3px;
  color: #e2e8e3;
}
.story-step h3 {
  font-size: 21px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.story-step p {
  font-size: 15px;
  line-height: 1.9;
  margin-top: 10px;
  color: #e0e5e0;
}
.story__ending {
  text-align: center;
  margin-top: 24px;
  font-size: 18px;
  letter-spacing: 0.06em;
}
/* Animate photo and text together; keep the timeline and layout stationary.
 * These rules activate only when the JS observer initializes successfully. */
.story--reveal .story-step > img,
.story--reveal .story-step__text {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 850ms ease-out var(--story-delay, 0ms),
    transform 850ms cubic-bezier(0.22, 1, 0.36, 1) var(--story-delay, 0ms);
}
.story--reveal .story-step.is-revealed > img,
.story--reveal .story-step.is-revealed .story-step__text {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .story--reveal .story-step > img,
  .story--reveal .story-step__text {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
@media print {
  .story--reveal .story-step > img,
  .story--reveal .story-step__text {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
@media (max-width: 1100px) {
  .story-step {
    gap: 16px;
  }
  .story-step h3 {
    font-size: 17px;
  }
  .story-step p {
    font-size: 14px;
  }
  .story__timeline {
    column-gap: 40px;
    grid-auto-rows: 110px;
  }
  .story-step::after {
    right: -26px;
  }
  .story-step:nth-child(even)::after {
    left: -25px;
  }
  .story__intro p {
    max-width: 50%;
    font-size: 14px;
  }
}
@media (max-width: 700px) {
  .story {
    padding-block: 42px 34px;
  }
  .story__intro {
    margin-bottom: 32px;
  }
  .story__intro p {
    max-width: none;
  }
  .story__timeline {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 0 0 28px 24px;
  }
  .story__timeline::before {
    left: 4px;
  }
  .story__timeline::after {
    left: 4px;
  }
  .story-step {
    min-height: 0;
    grid-template-columns: 38% 1fr;
    gap: 17px;
  }
  .story-step::after,
  .story-step:nth-child(even)::after {
    left: -25px;
    right: auto;
    top: 23px;
    width: 10px;
    height: 10px;
  }
  .story-step > img {
    margin-top: 4px;
    aspect-ratio: 1.1;
  }
  .story-step__number {
    font-size: 20px;
  }
  .story-step h3 {
    font-size: 17px;
  }
  .story-step p {
    font-size: 14px;
    line-height: 1.8;
    margin-top: 7px;
  }
  .story-step p br {
    display: none;
  }
  .story__ending {
    font-size: 15px;
    margin-top: 23px;
  }
  .story .heading-rule {
    margin-top: 18px;
  }
}
