/* Version A: the four-part cycle told on one crowd under a sticky stage */
.cycle {
  display: grid;
}

.cycle > * {
  grid-area: 1 / 1;
  min-width: 0;
}

.cycle__stage {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100svh;
  overflow: hidden;
}

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

.cycle__steps {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 100%;
  max-width: var(--frame);
  pointer-events: none;
}

.cstep {
  display: flex;
  align-items: flex-start;
  min-height: 130svh;
  padding: 0 var(--gutter);
}

.cstep--long {
  min-height: 190svh;
}

.cstep--last {
  min-height: 200svh;
}

.cstep--hero {
  align-items: center;
  min-height: 100svh;
  padding-top: var(--nav-h);
}

.cstep__body {
  position: sticky;
  top: calc(50svh - 7rem);
  width: var(--col);
  pointer-events: auto;
}

.cstep--hero .cstep__body {
  position: static;
}

/* One caption at a time: a step's copy fades as its step hands over to the next */
.cstep:not(.cstep--hero) .cstep__body {
  transition:
    opacity 0.35s ease-out,
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cstep .cstep__body.off {
  opacity: 0;
  transform: translateY(-16px);
}

.cstep--hero h1 {
  max-width: 15ch;
}

.cstep--hero .lede {
  margin-top: 24px;
  max-width: 30ch;
}

.cstep--hero .actions {
  margin-top: 32px;
}

.cstep h2 {
  max-width: 16ch;
  margin-top: 10px;
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
}

.cstep p:not(.lede) {
  max-width: 34ch;
  margin-top: 16px;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.45;
  color: var(--ink-2);
}

.cycle__count {
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
}

.cycle__count b {
  margin-right: 4px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.cycle__count span:not(:empty) {
  margin-right: 10px;
  font-weight: 600;
  color: var(--label-accent);
}

.cycle__theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
}

.cycle__theme::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.cycle__legend,
.cycle__legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cycle__legend {
  gap: 18px;
  padding-left: 0;
  font-weight: 500;
  color: var(--ink-2);
}

.cycle__legend i {
  width: 12px;
  height: 12px;
  border: 1.2px solid var(--ink-3);
  border-radius: 50%;
}

.cycle__legend span {
  transition: opacity 0.3s ease-out;
}

.cycle__legend i.two {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.2px var(--ink-3);
}

.cycle__source {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.cycle__source.on {
  opacity: 1;
}

/* Service models: a dot figure over each, advisors spanning both */
.models__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--rule-ink);
}

.model {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 32px clamp(24px, 4vw, 56px) 36px 0;
}

.model + .model:not(.model--wide) {
  padding-left: clamp(24px, 4vw, 56px);
  border-left: 1px solid var(--rule);
}

.model__fig {
  position: relative;
  height: clamp(140px, 14vw, 200px);
  margin-bottom: 14px;
}

.model h3 {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
}

.model p {
  color: var(--ink-2);
  justify-self: start;
}

.model--wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
  border-top: 1px solid var(--rule-ink);
  border-bottom: 1px solid var(--rule-ink);
}

@media (max-width: 991px) {
  .cstep {
    min-height: 120svh;
    padding: 0;
  }

  .cstep--long {
    min-height: 170svh;
  }

  .cstep--hero {
    align-items: flex-end;
    min-height: 100svh;
  }

  .cstep__body {
    position: sticky;
    top: calc(100svh - var(--h, 0px));
    width: 100%;
    padding: 18px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: var(--paper);
  }

  .cstep__body::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 28px;
    background: linear-gradient(to top, var(--paper), transparent);
    pointer-events: none;
  }

  .cstep--hero .cstep__body {
    position: relative;
    top: auto;
  }

  .cstep--hero .lede {
    margin-top: 14px;
  }

  .cstep--hero .actions {
    margin-top: 20px;
  }

  .cstep h2 {
    font-size: 1.5rem;
  }

  .cstep p:not(.lede) {
    margin-top: 8px;
    font-size: 1rem;
  }

  .cycle__count b {
    font-size: 1.375rem;
  }

  .anno {
    font-size: 0.8125rem;
  }

  .anno[data-a^="doc"] {
    max-width: 8.5em;
    white-space: normal;
    text-align: center;
  }
}

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

  .model,
  .model + .model:not(.model--wide) {
    padding: 28px 0;
    border-left: 0;
  }

  .model + .model {
    border-top: 1px solid var(--rule);
  }
}
