.repeat-timeline {
  position: relative;
  max-width: min(1640px, calc(100vw - 18px));
  margin: clamp(48px, 8vh, 104px) auto 0;
  padding-top: clamp(8px, 1.8vh, 24px);
  overflow-x: clip;
  overflow-y: visible;
  --active-x: 50%;
  --active-y: 7%;
  --phone-slot-width: 210px;
}

.repeat-timeline__head,
.repeat-timeline__bar,
.repeat-timeline__note,
.repeat-timeline__status,
.timeline-card__meta,
.timeline-card__copy,
.timeline-phone__pending {
  display: none;
}

.repeat-timeline__viewport {
  position: relative;
  z-index: 2;
  height: clamp(500px, 47vw, 660px);
  overflow-x: clip;
  overflow-y: visible;
  perspective: 2450px;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.repeat-timeline__viewport::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 3.2vw, 44px);
  width: min(720px, 62vw);
  height: clamp(26px, 3.8vw, 44px);
  background: radial-gradient(ellipse at center, rgba(11,11,11,.12), rgba(11,11,11,.045) 48%, transparent 72%);
  border-radius: 50%;
  transform: translateX(-50%);
  filter: blur(10px);
  pointer-events: none;
  opacity: .72;
}

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

.repeat-timeline__track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.timeline-card {
  position: absolute;
  left: 50%;
  top: clamp(56px, 5.8vw, 86px);
  width: var(--phone-slot-width);
  height: clamp(320px, 36vw, 440px);
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  filter: saturate(.88) contrast(.98) blur(var(--phone-depth-blur, 0));
  transition: opacity .28s var(--ease), filter .28s var(--ease), visibility .28s var(--ease);
  visibility: visible;
}

.timeline-card.is-active {
  filter: saturate(1.08) contrast(1.05) blur(0);
}

.timeline-card__phone {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.timeline-phone {
  position: relative;
  z-index: 1;
  width: clamp(154px, 13vw, 238px);
  width: min(var(--phone-slot-width), 238px);
  aspect-ratio: 9 / 19.5;
  filter:
    drop-shadow(0 26px 34px rgba(11,11,11,.16))
    drop-shadow(0 0 1px rgba(255,255,255,.72));
  transform: translateZ(0);
}

.timeline-card.is-active .timeline-phone {
  filter:
    drop-shadow(0 31px 42px rgba(11,11,11,.19))
    drop-shadow(0 0 1px rgba(255,255,255,.82));
}

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

.timeline-phone::after {
  content: attr(data-drop-label);
  position: absolute;
  left: 50%;
  bottom: 9%;
  z-index: 3;
  min-width: 86px;
  padding: 8px 10px;
  border: 1px solid rgba(11,11,11,.18);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}

.timeline-phone.is-drop-target::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.timeline-phone.has-custom-video::after {
  content: "Video loaded";
}

.device.is-drop-target::after {
  content: "Drop hero video";
  position: absolute;
  left: 50%;
  bottom: 12%;
  z-index: 5;
  min-width: 126px;
  padding: 9px 12px;
  border: 1px solid rgba(11,11,11,.18);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 9px;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.repeat-timeline__orbit {
  position: relative;
  z-index: 1;
  width: min(1290px, 94vw);
  height: clamp(92px, 8.5vw, 126px);
  margin: clamp(-104px, -6vw, -76px) auto 0;
  border: .75px solid rgba(138,132,124,.58);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.repeat-timeline__orbit::before {
  content: none;
}

.repeat-timeline__orbit::after {
  content: "";
  position: absolute;
  left: var(--active-x);
  top: var(--active-y);
  width: 12px;
  height: 12px;
  border: 1px solid rgba(11,11,11,.62);
  background:
    radial-gradient(circle at 36% 30%, rgba(255,255,255,.78) 0 8%, rgba(255,255,255,.18) 9% 18%, transparent 19%),
    radial-gradient(circle at 52% 58%, #141414 0%, #050505 70%, #000 100%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 3px rgba(255,255,255,.7),
    0 9px 18px rgba(11,11,11,.22);
}

.repeat-timeline__dates {
  position: absolute;
  inset: 0;
}

.repeat-timeline__date {
  position: absolute;
  width: 108px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-40);
  font: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .22em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  opacity: .24;
  transform: translate(-50%, -50%);
  transition: color .24s var(--ease), opacity .24s var(--ease), transform .24s var(--ease);
}

.repeat-timeline__date::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
  opacity: .46;
}

.repeat-timeline__date.is-active {
  color: var(--ink);
  opacity: 1;
  transform: translate(-50%, -50%) translateY(-2px);
}

.repeat-timeline__date.is-near {
  opacity: .48;
}

@media (max-width: 980px) {
  .repeat-timeline {
    max-width: calc(100vw - 18px);
  }

  .repeat-timeline__viewport {
    height: 500px;
  }

  .timeline-card {
    top: 34px;
  }

  .timeline-phone {
    width: min(var(--phone-slot-width), 178px);
  }

  .repeat-timeline__orbit {
    width: min(610px, 92vw);
    height: 88px;
    margin-top: -122px;
  }

  .repeat-timeline__date {
    width: 58px;
    font-size: 8px;
    letter-spacing: .12em;
  }
}

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