/* KWCS timeline — vertical history rail grouped into eras. */

.kwcs-timeline {
  background: var(--warm-white);
  overflow: hidden;
}

/* ─── TRACK ─── */

.tl-track {
  position: relative;
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 0 0 8px;
}

/* The spine runs the full height of the track behind the era bands. */
.tl-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: var(--gold-pale);
  border-radius: 2px;
  overflow: hidden;
}

/* Drawn in by timeline.js as the section scrolls past. Without the script the
   fill simply sits at full height. */
.tl-spine-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--gold) 0%, var(--navy) 100%);
  border-radius: 2px;
}

/* ─── ERA HEADINGS ─── */

.tl-era {
  position: relative;
  z-index: 1;
}

.tl-era-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin: 0 auto 44px;
  padding: 18px 34px;
  width: fit-content;
  max-width: 100%;
  background: var(--navy);
  border-radius: 20px;
  box-shadow: 0 6px 0 rgba(20, 55, 107, 0.18);
}

.tl-era:not(:first-child) .tl-era-head {
  margin-top: 64px;
}

.tl-era-label {
  font-size: 30px;
  line-height: 1.05;
  color: white;
}

.tl-era-years {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* ─── MILESTONES ─── */

.tl-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 4px 1fr;
  align-items: start;
  column-gap: 40px;
  margin-bottom: 36px;
}

.tl-item:last-child {
  margin-bottom: 0;
}

/* Alternate sides around the spine. */
.tl-item:nth-child(odd) .tl-card {
  grid-column: 1;
  text-align: right;
}

.tl-item:nth-child(even) .tl-card {
  grid-column: 3;
}

.tl-dot {
  grid-column: 2;
  grid-row: 1;
  width: 18px;
  height: 18px;
  margin-top: 26px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--gold);
  border: 4px solid var(--warm-white);
  box-shadow: 0 0 0 3px var(--gold-pale);
}

.tl-item--blue .tl-dot {
  background: var(--navy);
  box-shadow: 0 0 0 3px #c9d7ee;
}

.tl-card {
  grid-row: 1;
  background: white;
  border: 2px solid var(--gold-pale);
  border-radius: 22px;
  padding: 26px 30px;
  box-shadow: 0 2px 0 rgba(30, 75, 143, 0.08);
}

.tl-item--blue .tl-card {
  border-color: #c9d7ee;
}

.tl-year {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-deep);
  background: var(--gold);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.tl-item--blue .tl-year {
  background: var(--navy-tint);
  color: var(--navy-deep);
}

.tl-title {
  font-size: 24px;
  line-height: 1.05;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.tl-desc {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0;
}

/* ─── SCROLL REVEAL ───────────────────────────────────────────────────────
   Only applies once timeline.js has tagged the section, so the milestones are
   never hidden from a visitor whose JavaScript failed to run. */

.kwcs-timeline.is-animated .tl-era-head,
.kwcs-timeline.is-animated .tl-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.kwcs-timeline.is-animated .tl-era-head.is-visible,
.kwcs-timeline.is-animated .tl-item.is-visible {
  opacity: 1;
  transform: none;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 900px) {
  .tl-spine {
    left: 9px;
    transform: none;
  }

  .tl-era-head {
    margin-left: 0;
    align-items: flex-start;
    text-align: left;
  }

  .tl-item {
    grid-template-columns: 4px 1fr;
    column-gap: 26px;
  }

  .tl-item:nth-child(odd) .tl-card,
  .tl-item:nth-child(even) .tl-card {
    grid-column: 2;
    text-align: left;
  }

  .tl-dot {
    grid-column: 1;
  }

  .tl-card {
    padding: 22px 24px;
  }

  .tl-title {
    font-size: 21px;
  }
}

@media (max-width: 768px) {
  .tl-track {
    margin-top: 40px;
  }

  .tl-era-label {
    font-size: 25px;
  }
}

/* Motion is decoration here — show everything at once instead. */
@media (prefers-reduced-motion: reduce) {
  .kwcs-timeline.is-animated .tl-era-head,
  .kwcs-timeline.is-animated .tl-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
