.gallery.history-timeline {
  display: block;
  padding: 76px 4vw 64px;
  background: var(--cream);
}

.history-timeline .gallery-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
  gap: 6vw;
  align-items: end;
  padding: 0;
  margin-bottom: 34px;
}

.history-timeline .gallery-intro h2 {
  font: 400 clamp(48px, 5.2vw, 76px)/.92 "Instrument Serif", serif;
  letter-spacing: -.04em;
}

.history-intro-copy {
  max-width: 500px;
  padding-bottom: 8px;
  color: #5e5b56;
  font-size: 16px;
  line-height: 1.55;
}

.history-mobile-copy {
  display: none;
}

.history-scroll-hint {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.timeline-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 31vw);
  gap: 22px;
  overflow-x: auto;
  margin: 0;
  padding: 27px 4px 30px;
  list-style: none;
  scroll-padding-inline: 4px;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--violet) rgba(16, 29, 59, .12);
  scrollbar-width: thin;
}

.timeline-entry {
  position: relative;
  padding-top: 30px;
  scroll-snap-align: start;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  right: -22px;
  height: 1px;
  background: rgba(16, 29, 59, .28);
}

.timeline-entry::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border: 3px solid var(--cream);
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 1px var(--violet);
}

.timeline-date {
  position: absolute;
  top: -25px;
  left: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.timeline-card {
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(16, 29, 59, .1);
  box-shadow: 0 16px 40px rgba(16, 29, 59, .08);
}

.timeline-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--ink);
}

.timeline-entry-artifact .timeline-card img {
  object-fit: contain;
  padding: 18px;
}

.timeline-entry-landscape .timeline-card img {
  aspect-ratio: 16 / 9;
}

.timeline-card > div {
  padding: 24px 24px 28px;
}

.timeline-card .timeline-kicker {
  margin: 0 0 8px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.timeline-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font: 400 31px/1 "Instrument Serif", serif;
}

.timeline-card > div > p:last-child {
  margin: 0;
  color: #68645f;
  font-size: 14px;
  line-height: 1.6;
}

.timeline-controls {
  display: none;
}

.history-timeline.is-enhanced .timeline-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  overflow: hidden;
  padding: 0;
  scroll-snap-type: none;
}

.history-timeline.is-enhanced .timeline-entry {
  grid-area: 1 / 1;
  display: grid;
  padding-top: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(22px);
  transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s;
}

.history-timeline.is-enhanced .timeline-entry.is-active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.history-timeline.is-enhanced .timeline-entry::before {
  display: none;
}

.history-timeline.is-enhanced .timeline-entry::after {
  display: none;
}

.history-timeline.is-enhanced .timeline-date {
  z-index: 4;
  top: 14px;
  left: 14px;
  padding: 7px 11px;
  border-radius: 99px;
  background: var(--acid);
  box-shadow: 0 5px 18px rgba(16, 29, 59, .18);
  font-size: 10px;
}

.history-timeline.is-enhanced .timeline-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, .7fr);
  height: 360px;
  min-height: 0;
}

.history-timeline.is-enhanced .timeline-card img,
.history-timeline.is-enhanced .timeline-entry-landscape .timeline-card img {
  height: 360px;
  min-height: 0;
  aspect-ratio: auto;
}

.history-timeline.is-enhanced .timeline-card > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 3vw, 42px);
  background: #fff;
}

.history-timeline.is-enhanced .timeline-card h3 {
  font-size: clamp(34px, 3.4vw, 48px);
}

.history-timeline.is-enhanced .timeline-card > div > p:last-child {
  margin-top: 8px;
  font-size: 14px;
}

.history-timeline.is-enhanced .timeline-controls {
  display: grid;
  grid-template-columns: 46px auto 1fr auto 46px;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
}

.timeline-arrow,
.timeline-pause,
.timeline-dot {
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.timeline-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(16, 29, 59, .28);
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.timeline-arrow:hover,
.timeline-arrow:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.timeline-status {
  min-width: 42px;
  margin: 0;
  color: #68645f;
  font: 18px "Instrument Serif", serif;
}

.timeline-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 99px;
  background: rgba(16, 29, 59, .25);
  transition: width .25s ease, background .25s ease;
}

.timeline-dot.is-active {
  width: 34px;
  background: var(--violet);
}

.timeline-pause {
  min-width: 74px;
  padding: 9px 14px;
  border: 1px solid rgba(16, 29, 59, .28);
  border-radius: 99px;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline-pause:hover,
.timeline-pause:focus-visible {
  border-color: var(--violet);
  color: var(--violet);
}

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

@media (max-width: 860px) {
  .gallery.history-timeline {
    padding: 34px 6vw 28px;
  }

  .history-timeline .gallery-intro {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
  }

  .history-timeline .gallery-intro h2 {
    font-size: 46px;
  }

  .history-intro-copy {
    padding: 0;
    font-size: 15px;
  }

  .history-desktop-copy {
    display: none;
  }

  .history-mobile-copy {
    display: block;
    margin: 0;
  }

  .history-scroll-hint {
    margin-top: 10px;
    padding-top: 8px;
  }

  .timeline-track {
    grid-auto-columns: minmax(280px, 86vw);
    gap: 16px;
  }

  .timeline-entry::before {
    right: -16px;
  }

  .history-timeline.is-enhanced .timeline-entry {
    padding-top: 0;
  }

  .history-timeline.is-enhanced .timeline-card {
    display: block;
    height: auto;
    min-height: 0;
  }

  .history-timeline.is-enhanced .timeline-card img,
  .history-timeline.is-enhanced .timeline-entry-landscape .timeline-card img {
    height: 200px;
    min-height: 0;
  }

  .history-timeline.is-enhanced .timeline-card > div {
    display: block;
    min-height: 175px;
    padding: 18px 20px 21px;
  }

  .history-timeline.is-enhanced .timeline-card h3 {
    font-size: 31px;
  }

  .history-timeline.is-enhanced .timeline-controls {
    grid-template-columns: 44px auto 1fr 44px;
    gap: 10px;
  }

  .timeline-dots {
    gap: 6px;
  }

  .timeline-dot {
    width: 7px;
    height: 7px;
  }

  .timeline-dot.is-active {
    width: 22px;
  }

  .timeline-pause {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-timeline.is-enhanced .timeline-entry {
    transition: none;
  }
}
