/* Version B: the engine room */
.hero-b {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 24px clamp(32px, 5vw, 80px);
  padding-top: calc(var(--nav-h) + clamp(56px, 9vh, 104px));
  padding-bottom: clamp(40px, 6vh, 64px);
}

.hero-b h1 {
  max-width: 12ch;
}

.hero-b .lede {
  max-width: 36ch;
}

.hero-b .actions {
  margin-top: 28px;
}

/* The line: a sticky stage while the study travels through eight stations */
.line {
  position: relative;
  height: calc(100svh + 8 * 55svh);
}

.line__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.line__in {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: calc(var(--bar-size) + clamp(16px, 3vh, 32px));
  padding-bottom: 16px;
}

.line__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.line__track::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 0;
  top: 5px;
  height: 1px;
  background: var(--rule-ink);
}

.line__track button {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: 22px 12px 4px 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.line__track button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 4px var(--paper);
  transition:
    background-color 0.2s ease-out,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.line__track button:hover {
  color: var(--ink);
}

.line__track button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
}

.line__track button[aria-pressed="true"]::before {
  background: var(--accent);
  transform: scale(1.35);
}

.line__strip {
  position: relative;
  flex: 0 0 clamp(118px, 19vh, 176px);
  margin-top: 8px;
}

.line__source {
  position: absolute;
  right: 0;
  bottom: 0;
}

.line__count b {
  margin-right: 4px;
  font-size: 1.25rem;
  font-weight: 700;
}

.line__count {
  font-weight: 500;
  color: var(--ink-2);
}

.line__ins {
  white-space: normal;
  width: 17rem;
  text-align: right;
}

.line__ins small {
  font-weight: 700;
  color: var(--label-accent);
}

.line__view {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
  min-height: 0;
  margin-top: clamp(12px, 2vh, 24px);
}

.line__view .shot {
  width: min(100%, calc((100svh - var(--bar-size) - 330px) * 1.8286));
}

.line__copy h2 {
  font-size: clamp(1.5rem, 2.3vw, 2.125rem);
}

.line__copy p {
  max-width: 40ch;
  margin-top: 14px;
  color: var(--ink-2);
}

@media (max-width: 991px) {
  .hero-b {
    grid-template-columns: minmax(0, 1fr);
    padding-top: calc(var(--nav-h) + 40px);
  }

  .line__track button {
    padding-right: 0;
    font-size: 0.8125rem;
  }

  .line__track .lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .line__view {
    grid-template-columns: minmax(0, 1fr);
  }

  .line__view .shot {
    width: 100%;
  }

  .line__copy h2 {
    font-size: 1.375rem;
  }

  .line__copy p {
    margin-top: 8px;
    font-size: 1rem;
  }

  .line__ins {
    width: 13rem;
  }
}

/* The four-part cycle as a loop */
.loop {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.loop h2 {
  max-width: 15ch;
}

.loop .lede {
  margin-top: 16px;
}

.phases {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule-ink);
}

.phases li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 4px 0;
  padding: 16px 0;
  border-top: 1px solid var(--rule-ink);
  outline-offset: -2px;
  cursor: default;
}

.phases .n {
  padding-top: 4px;
}

.phases h3 {
  font-size: 1.1875rem;
  color: var(--ink-2);
  transition: color 0.2s ease-out;
}

.phases p {
  grid-column: 2;
  max-width: 44ch;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

.phases li.on h3 {
  color: var(--ink);
}

.phases li.on .n {
  color: var(--accent);
}

.loop__fig {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1;
  justify-self: end;
}

.loop__fig canvas {
  position: absolute;
  inset: 0;
}

.loop__node {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 6px;
  background: var(--paper);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  transition: color 0.2s ease-out;
}

.loop__node.on {
  color: var(--accent);
}

@media (max-width: 991px) {
  .loop {
    grid-template-columns: minmax(0, 1fr);
  }

  .loop__fig {
    justify-self: center;
    max-width: 440px;
  }
}

/* Service models on one shared year */
.year {
  margin-top: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--rule-ink);
}

.year__row {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  align-items: center;
  gap: 16px clamp(24px, 4vw, 56px);
  padding: 24px 0;
  border-top: 1px solid var(--rule-ink);
}

.year__name {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.year__name h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
}

.year__name p {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.year__fig {
  position: relative;
  height: 104px;
}

.year__row--advisors .year__fig {
  height: 96px;
}

.year__source {
  margin-top: 12px;
}

@media (max-width: 767px) {
  .year__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .year__fig {
    height: 88px;
  }
}
