/**
 * Story and milestone rail.
 *
 * Ported from `.p-story` and `.p-rail` in `_mockups/about.html`. `.section`,
 * `.alt-band`, `.eyebrow` and `.section-title` come from the kit.
 *
 * The grid is bespoke and is NOT `.split`. `.split` is 1fr/1fr with
 * `align-items:center`; this pairing needs an uneven split and both columns
 * starting on the same line, or the rail floats against the middle of the prose.
 */

.story-timeline__grid {
  max-width: var(--container-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
}

.story-timeline__copy h2 { margin-block: var(--s-3); }
.story-timeline__copy p {
  color: var(--ink-soft);
  max-width: 58ch;
}
.story-timeline__copy p + p { margin-block-start: var(--s-3); }

.story-timeline__side {
  display: grid;
  gap: var(--s-5);
}
.story-timeline__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-m);
}
.story-timeline__figure figcaption {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  margin-block-start: var(--s-2);
}

/* The rail is a dashed route line, echoing the logo's arc – not a generic
   timeline spine. The final marker turns gold because it is where the company
   is now, which is the only reason the last item gets a different treatment. */
.story-timeline__rail { display: grid; }
.story-timeline__rail li {
  position: relative;
  padding-inline-start: 2.5rem;
  padding-block-end: var(--s-4);
}
.story-timeline__rail li:last-child { padding-block-end: 0; }

.story-timeline__rail li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.28em;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--blue);
}
.story-timeline__rail li:last-child::before {
  background: var(--gold);
  border-color: var(--gold-deep);
}

.story-timeline__rail li::after {
  content: "";
  position: absolute;
  inset-inline-start: 8px;
  top: calc(0.28em + 18px);
  bottom: 4px;
  width: 2px;
  background-image: linear-gradient(180deg, var(--blue-tint-20) 55%, transparent 45%);
  background-size: 2px 10px;
}
.story-timeline__rail li:last-child::after { display: none; }

.story-timeline__rail b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  color: var(--navy);
  font-size: var(--text-base);
}
.story-timeline__rail span {
  display: block;
  font-size: var(--text-s);
  color: var(--ink-soft);
  margin-block-start: 0.15em;
}

@media (max-width: 1000px) {
  .story-timeline__grid { grid-template-columns: 1fr; }
  /* Below the copy the figure and the rail sit side by side rather than
     stacking, so the section does not become a very long column. */
  .story-timeline__side {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
@media (max-width: 640px) {
  .story-timeline__side { grid-template-columns: 1fr; }
}
