.repeat-timeline {
  max-width: var(--content-max, 1320px);
  margin: clamp(52px, 9vh, 112px) auto 0;
  border-top: 1px solid var(--ink-12);
  padding-top: clamp(30px, 5vh, 58px);
  --rail-progress: 0;
}

.repeat-timeline__head {
  display: grid;
  grid-template-columns: minmax(0, .68fr) minmax(280px, .32fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: end;
  margin-bottom: clamp(12px, 2.4vh, 28px);
}

.repeat-timeline__title {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(34px, 7vw, 108px);
  line-height: .86;
  letter-spacing: -.04em;
  max-width: 10ch;
  margin-top: 12px;
}

.repeat-timeline__note,
.repeat-timeline__status {
  display: none;
}

.repeat-timeline__bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin-bottom: 0;
}

.repeat-timeline__controls {
  display: flex;
  gap: 8px;
}

.repeat-timeline__control {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink-12);
  background: rgba(255,255,255,.72);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  cursor: pointer;
  transition: transform .28s var(--ease), background .28s var(--ease);
}

.repeat-timeline__control:hover { background: var(--pink); }
.repeat-timeline__control:active { transform: translateY(1px); }

.repeat-timeline__viewport {
  position: relative;
  height: clamp(420px, 46vh, 540px);
  overflow: hidden;
  perspective: 2000px;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.repeat-timeline__viewport.is-dragging {
  cursor: grabbing;
}

.repeat-timeline__track {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--cylinder-width, 1800px);
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.timeline-card {
  position: absolute;
  left: calc(50% - (var(--face-width, 300px) / 2));
  top: 0;
  width: var(--face-width, 300px);
  height: 100%;
  display: grid;
  place-items: center;
  transform:
    rotateY(var(--face-angle))
    translateZ(var(--face-radius));
  transform-style: preserve-3d;
  opacity: .36;
  filter: saturate(.75) contrast(.92);
  transition: opacity .32s var(--ease), filter .32s var(--ease);
  pointer-events: none;
}

.timeline-card.is-active {
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.timeline-card__meta,
.timeline-card__copy,
.timeline-phone__pending {
  display: none;
}

.timeline-card__phone {
  position: relative;
  width: 100%;
  min-height: clamp(286px, 34vh, 400px);
  display: grid;
  place-items: center;
}

.timeline-card__phone::before {
  content: "";
  position: absolute;
  inset: 8% 5% 0;
  background: radial-gradient(ellipse at 50% 34%, rgba(250,223,236,.54), transparent 58%);
  opacity: .78;
  pointer-events: none;
}

.timeline-phone {
  position: relative;
  z-index: 1;
  width: clamp(156px, 11vw, 210px);
  aspect-ratio: 9 / 19.5;
  filter: drop-shadow(22px 34px 46px rgba(11,11,11,.18));
  transform: rotate(-1.5deg);
}

.timeline-card:nth-child(even) .timeline-phone {
  transform: rotate(1.5deg);
}

.timeline-card.is-active .timeline-phone {
  transform: rotate(0deg) scale(1.04);
}

.timeline-phone iframe {
  position: absolute;
  inset: -9% -14%;
  width: 128%;
  height: 118%;
  border: 0;
  background: transparent;
}

.repeat-timeline__rail {
  position: relative;
  margin: clamp(10px, 1.6vw, 20px) 0 0;
  padding-top: 16px;
}

.repeat-timeline__line {
  position: relative;
  height: 1px;
  width: 100%;
  background: var(--ink);
  opacity: .78;
}

.repeat-timeline__line::after {
  content: "";
  position: absolute;
  top: -2px;
  left: calc(var(--rail-progress) * 100%);
  width: 5px;
  height: 5px;
  background: var(--ink);
  transform: translateX(-50%) rotate(45deg);
}

.repeat-timeline__dates {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.repeat-timeline__dates span {
  color: var(--ink-40);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color .28s var(--ease), opacity .28s var(--ease);
}

.repeat-timeline__dates span.is-active {
  color: var(--ink);
}

@media (max-width: 980px) {
  .repeat-timeline__head {
    display: block;
  }

  .repeat-timeline__bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .repeat-timeline__viewport {
    height: 420px;
  }

  .timeline-phone {
    width: min(170px, 44vw);
  }

  .repeat-timeline__dates {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-card,
  .timeline-phone,
  .repeat-timeline__control,
  .repeat-timeline__dates span {
    transition: none;
  }
}
