.timeline-wrap::before {
  position: sticky;
  top: 20px;           /* or whatever offset from the top you like */
  left: 50%;
  transform: translateX(-50%);
}
/* base state: off-screen by 60px, still 100% opaque */
.timeline-item {
  opacity: 1;  
  transform: translateY(60px);
  transition: transform .8s ease-out;
}

/* when it comes into view: slide to its natural spot */
.timeline-item.in-view {
  transform: translateY(0);
}


/* ===== CORE TIMELINE LAYOUT ===== */
.timeline-wrap {

  padding: 80px 0;
  position: relative;
}
.timeline-wrap::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 4px;
  background: #000;
  transform: translateX(-50%);
}

/* ---- ITEMS ---- */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 60px 80px;
  box-sizing: border-box;
}
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-item::before {
  /* node circle */
  content: "";
  position: absolute;
  top: 80px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #000;
  border: 5px solid #fff;
  z-index: 2;
}
.timeline-item:nth-child(odd)::before  { right: -12px; }
.timeline-item:nth-child(even)::before { left: -12px; }

.timeline-item::after {
  /* pointer bar facing images */
  content: "";
  position: absolute;
  top: 91px;
  width: 36px; height: 4px;
  background: #000;
}
.timeline-item:nth-child(odd)::after  { right: 0; }
.timeline-item:nth-child(even)::after { left: 0; }

.timeline-inner {
  display: flex;
  gap: 24px;
  align-items: center;
}
.timeline-item:nth-child(odd) .timeline-inner {
  flex-direction: row-reverse;
}
.timeline-copy {
  max-width: 260px;
  line-height: 1.5;
}

/* ===== IMAGE FRAMES ===== */
.timeline-imgs {
  position: relative;
  width: 260px;
  height: 200px;
  flex-shrink: 0;
}
/* single-image stops */
.timeline-item.single .timeline-imgs {
  width: 140px;
  height: 200px;
}

.timeline-imgs .shot {
  position: absolute;
  top: 0; left: 0;
  width: 140px; height: 180px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 2; /* front by default */
  transition: transform .3s;
}
.timeline-imgs .shot img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* second image: offset & behind */
.timeline-imgs .shot.second {
  left: 120px; top: 10px;
  z-index: 1;
}

/* third (circular) image on last stop */
.timeline-imgs .shot.third {
  left: 90px; top: 120px;
  width: 100px; height: 100px;

  z-index: 3;
  transform: rotate(0);
}

/* subtle rotations for style */
.timeline-item:nth-child(odd)  .shot { transform: rotate(-6deg); }
.timeline-item:nth-child(odd)  .shot.second { transform: rotate(4deg); }
.timeline-item:nth-child(even) .shot { transform: rotate(6deg); }
.timeline-item:nth-child(even) .shot.second { transform: rotate(-4deg); }




@media (max-width: 61.24em) {
  /* 1. Reposition the central line */
  .timeline-wrap::before {
    left: 20px !important;
  }

  /* 2. Make every stop full-width, left-aligned and add vertical breathing room */
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100% !important;
    left: 0 !important;
    padding: 24px 16px 24px 60px !important;  /* room for the line */
    margin-bottom: 64px !important;           /* space between stops */
    text-align: left !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* 3. Force all node circles onto the line, level with content */
  .timeline-item::before {
    left: 8px !important;
    right: auto !important;
    top: 24px !important;  /* aligns with padding-top */
  }
  .timeline-item::after {
    display: none !important;
  }

  /* 4. Stack text above images consistently */
  .timeline-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;             /* small gap so images sit closer to nodes */
    align-items: flex-start !important;
  }
  .timeline-copy {
    order: -1 !important;            /* force text above */
    max-width: 100% !important;
  }

  /* 5. Smaller portrait-ratio frames flush left */
  .timeline-imgs {
    width: 100px !important;
    height: 140px !important;
  }
  .timeline-item.single .timeline-imgs {
    width: 80px !important;
    height: 120px !important;
  }

  /* 6. Primary & secondary shots, more clearly staggered */
  .timeline-imgs .shot,
  .timeline-imgs .shot.second {
    width: 100px !important;
    height: 140px !important;
    left: 0 !important;
    top: 0 !important;
    transform: rotate(0) !important;
  }
  .timeline-imgs .shot.second {
    left: 60px !important;  /* stagger enough to reveal both */
    top: 24px !important;
  }

  /* 7. Tertiary (logo) shot on the last stop */
  .timeline-imgs .shot.third {
    width: 60px !important;
    height: 60px !important;
    left: 72px !important;
    top: 122px !important;
  }
}