/* About history timeline — BUSY-inspired centered spine, FACT tokens + expanding images */

.about-timeline {
  --tl-media-sm: 88px;
  --tl-media-md: 132px;
  --tl-media-lg: 200px;
  --tl-axis: 96px;
  --tl-gap: 28px;
  padding: 88px 0 110px;
  background: #fafaf8;
  border-top: 1px solid #e5e5e2;
  color: #1a1a1a;
}

.about-timeline .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.about-timeline-header {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.about-timeline-header .about-section-eyebrow {
  margin-bottom: 14px;
}

.about-timeline-header h2 {
  margin: 0 0 14px;
  color: #111;
  font: 600 clamp(32px, 4vw, 48px)/1.08 var(--font-display);
  letter-spacing: -0.02em;
}

.about-timeline-header p {
  margin: 0 auto;
  max-width: 46ch;
  color: #5c5c5c;
  font: 400 16px/1.65 var(--font-sans);
}

.about-timeline-track {
  position: relative;
  width: min(100% - 56px, 1100px);
  margin-inline: auto;
}

.about-timeline-line {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: #d8d5cf;
  pointer-events: none;
}

.about-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.about-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tl-axis) minmax(0, 1fr);
  gap: var(--tl-gap);
  align-items: center;
  transition: opacity 0.5s var(--easing);
}

.about-timeline-axis {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-timeline-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 38px;
  padding: 0 18px;
  background: #fff;
  border: 1.5px solid var(--signal);
  border-radius: 999px;
  color: var(--signal);
  font: 600 13px/1 var(--font-display);
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 8px #fafaf8;
  transition:
    background 0.5s var(--easing),
    color 0.5s var(--easing),
    border-color 0.5s var(--easing),
    transform 0.5s var(--easing);
}

.about-timeline-media {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: var(--tl-media-sm);
}

.about-timeline-card {
  justify-self: start;
  width: 100%;
  max-width: 420px;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid #e8e6e1;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.04);
  opacity: 0.92;
  transition:
    opacity 0.5s var(--easing),
    border-color 0.5s var(--easing),
    box-shadow 0.5s var(--easing);
}

.about-timeline-card h3 {
  margin: 0 0 10px;
  color: #111;
  font: 600 18px/1.25 var(--font-display);
  letter-spacing: -0.02em;
}

.about-timeline-card p {
  margin: 0;
  color: #4d4d4d;
  font: 400 15px/1.6 var(--font-sans);
}

.about-timeline-card small {
  display: block;
  margin-top: 10px;
  color: #8a8a8a;
  font-size: 12px;
  line-height: 1.45;
}

.about-timeline-frame {
  width: var(--tl-media-sm);
  height: var(--tl-media-sm);
  margin: 0;
  overflow: hidden;
  border: 1px solid #e4e4e1;
  border-radius: 12px;
  background: var(--chalk);
  transform-origin: center center;
  transition:
    width 0.65s var(--easing),
    height 0.65s var(--easing),
    border-color 0.5s var(--easing),
    box-shadow 0.5s var(--easing);
}

.about-timeline-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-timeline-frame.about-media--placeholder {
  min-height: 0;
}

.about-timeline-frame.about-media--placeholder span {
  font-size: 11px;
  padding: 6px;
}

/* Even rows: card left, media right */
.about-timeline-item.is-left .about-timeline-media {
  order: 3;
  justify-content: flex-start;
}

.about-timeline-item.is-left .about-timeline-axis {
  order: 2;
}

.about-timeline-item.is-left .about-timeline-card {
  order: 1;
  justify-self: end;
  text-align: left;
}

/* Odd rows: media left, card right */
.about-timeline-item.is-right .about-timeline-media {
  order: 1;
  justify-content: flex-end;
}

.about-timeline-item.is-right .about-timeline-axis {
  order: 2;
}

.about-timeline-item.is-right .about-timeline-card {
  order: 3;
  justify-self: start;
}

/* Active + neighbor */
.about-timeline-item.is-active {
  opacity: 1;
}

.about-timeline-item.is-active .about-timeline-year {
  background: var(--signal);
  color: #fff;
  transform: scale(1.06);
}

.about-timeline-item.is-active .about-timeline-card {
  opacity: 1;
  border-color: rgba(225, 44, 47, 0.28);
  box-shadow: 0 14px 34px rgba(10, 10, 10, 0.08);
}

.about-timeline-item.is-active .about-timeline-frame {
  width: var(--tl-media-lg);
  height: var(--tl-media-lg);
  border-color: rgba(225, 44, 47, 0.35);
  box-shadow: 0 12px 28px rgba(10, 10, 10, 0.08);
}

.about-timeline-item.is-neighbor {
  opacity: 1;
}

.about-timeline-item.is-neighbor .about-timeline-card {
  opacity: 0.96;
}

.about-timeline-item.is-neighbor .about-timeline-frame {
  width: var(--tl-media-md);
  height: var(--tl-media-md);
}

.about-timeline-item:not(.is-active):not(.is-neighbor) {
  opacity: 1;
}

.about-timeline-item:not(.is-active):not(.is-neighbor) .about-timeline-card {
  opacity: 0.88;
}

@media (min-width: 900px) {
  .about-timeline-item.is-active .about-timeline-frame {
    width: min(220px, 20vw);
    height: min(220px, 20vw);
  }

  .about-timeline-item.is-neighbor .about-timeline-frame {
    width: min(140px, 13vw);
    height: min(140px, 13vw);
  }
}

@media (max-width: 899px) {
  .about-timeline {
    --tl-axis: 72px;
    --tl-gap: 16px;
    padding: 64px 0 80px;
  }

  .about-timeline-header {
    margin-bottom: 40px;
    text-align: left;
  }

  .about-timeline-track {
    width: min(100% - 32px, 1100px);
  }

  .about-timeline-line {
    left: 36px;
    transform: none;
  }

  .about-timeline-list {
    gap: 36px;
  }

  .about-timeline-item,
  .about-timeline-item.is-left,
  .about-timeline-item.is-right {
    grid-template-columns: var(--tl-axis) minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .about-timeline-item .about-timeline-axis {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    padding-top: 4px;
    order: 0 !important;
  }

  .about-timeline-item .about-timeline-media {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start !important;
    order: 0 !important;
    margin-bottom: 10px;
  }

  .about-timeline-item .about-timeline-card {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch !important;
    max-width: none;
    order: 0 !important;
  }

  .about-timeline-item.is-neighbor .about-timeline-frame {
    width: var(--tl-media-sm);
    height: var(--tl-media-sm);
  }

  .about-timeline-item.is-active .about-timeline-frame {
    width: min(180px, 52vw);
    height: min(180px, 52vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-timeline-item,
  .about-timeline-year,
  .about-timeline-frame,
  .about-timeline-card {
    transition: none;
  }

  .about-timeline-item.is-active .about-timeline-frame,
  .about-timeline-item.is-neighbor .about-timeline-frame {
    width: var(--tl-media-sm);
    height: var(--tl-media-sm);
  }

  .about-timeline-item.is-active .about-timeline-year {
    transform: none;
  }

  .about-timeline-item.is-active .about-timeline-frame {
    border-color: var(--signal);
    box-shadow: none;
    outline: 2px solid var(--signal);
    outline-offset: 2px;
  }

  .about-timeline-item:not(.is-active) {
    opacity: 0.5;
  }

  .about-timeline-item.is-active {
    opacity: 1;
  }

  .about-timeline-item.is-active .about-timeline-card {
    opacity: 1;
  }
}

.about-timeline--reduced .about-timeline-item.is-active .about-timeline-frame,
.about-timeline--reduced .about-timeline-item.is-neighbor .about-timeline-frame {
  width: var(--tl-media-sm);
  height: var(--tl-media-sm);
}

.about-timeline--reduced .about-timeline-item.is-active .about-timeline-year {
  transform: none;
}
