/* THE WALKTHROUGH: one Sorbit window stays pinned while the steps scroll past it, and the film at full size. The window itself is scenes/walkthrough.html. */

/* ───────── the walkthrough: one Sorbit window stays pinned while the steps scroll beside it ───────── */
.tour {
  --gut: 48px;
  --ann: #7c5ce6;
  position: relative;
  max-width: 1760px;
  margin: 112px auto 0;
  padding: 0 var(--gut);
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  column-gap: 48px;
}
.tour button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.t-txt {
  padding-bottom: 42vh;
  --spot: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08) calc(var(--y, 50vh) - 460px),
    rgba(0, 0, 0, 0.25) calc(var(--y, 50vh) - 300px),
    #000 calc(var(--y, 50vh) - 150px),
    #000 calc(var(--y, 50vh) + 170px),
    rgba(0, 0, 0, 0.25) calc(var(--y, 50vh) + 320px),
    rgba(0, 0, 0, 0.08) calc(var(--y, 50vh) + 480px)
  );
  -webkit-mask-image: var(--spot);
  mask-image: var(--spot);
}
.t-ch {
  padding-top: 4px;
}
.t-ch + .t-ch {
  margin-top: 22vh;
}
.t-ch h3 {
  margin: 14px 0 0;
  font: 500 26px/32px Inter;
  letter-spacing: -0.01em;
  color: var(--primary);
}
/* whose view a step shows, with the colour of that person's cursor and window */
.t-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 3px 10px 3px 8px;
  border-radius: 6px;
  background: var(--well);
  font:
    500 12px/18px 'Geist Mono',
    monospace;
  color: var(--secondary);
}
.t-tag i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, #22c55e);
}
.t-st > .t-tag {
  margin: 0 0 14px;
}
[data-who='pm'] {
  --c: #22c55e;
}
[data-who='cl'] {
  --c: #3b82f6;
}
[data-who='wr'] {
  --c: #ec4899;
}
[data-who='va'] {
  --c: #f97316;
}
[data-who='sb'] {
  --c: #14b8a6;
}
/* a step: the text, then room to scroll before the next one takes over */
.t-st {
  min-height: 46vh;
  padding-top: 32px;
}
.t-st:last-child {
  min-height: 0;
}
.t-bd {
  position: relative;
  padding-left: 18px;
  border-left: 2px solid var(--line);
  font: 400 16px/26px Inter;
  color: var(--secondary);
  transition: border-color 0.3s;
}
.t-bd b {
  display: block;
  font-weight: 600;
  color: var(--primary);
}
.t-st.on .t-bd {
  border-color: #dcdcd8;
}
/* the step that's playing: its rule fills in ink as the window plays it. Neutral on purpose: the screen beside it already carries the colour */
.t-bd::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  transform-origin: 50% 0;
  transform: scaleY(var(--f, 0));
  opacity: 0;
  transition: opacity 0.3s;
}
.t-st.on .t-bd::before {
  opacity: 1;
}
/* once a step has played through, its rule runs on toward the next step, chevrons along it: scroll on */
.t-txt {
  margin-left: -16px;
  padding-left: 16px;
} /* room inside the spotlight's mask for chevrons that sit across the rule */
.t-cue {
  position: absolute;
  left: -2px;
  top: calc(100% + 16px);
  width: 2px;
  height: 40px;
  color: var(--tertiary);
  pointer-events: none;
  visibility: hidden;
}
.t-st.cue .t-cue {
  visibility: visible;
}
/* three chevrons under the rule, no thread: each one drifts down, darkest in the middle of its fall, the top one first, so the eye is pulled down */
.t-cue svg {
  position: absolute;
  left: -7px;
  top: var(--at);
  width: 16px;
  height: 10px;
  overflow: visible;
  opacity: 0;
}
.t-st.cue .t-cue svg {
  animation: t-chev 1.8s cubic-bezier(0.45, 0, 0.55, 1) var(--d) infinite;
}
@keyframes t-chev {
  0% {
    opacity: 0;
    transform: translateY(-7px);
  }
  50% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(7px);
  }
}
/* the window: as big as the screen allows, the whole of Sorbit always in view */
.t-pin {
  position: sticky;
  top: var(--pt, 40px);
  align-self: start;
}
.t-win {
  position: relative;
  width: var(--ww, 100%);
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(58, 59, 54, 0.08),
    0 24px 60px -36px rgba(40, 30, 80, 0.45);
  transition:
    opacity 0.38s ease-out,
    transform 0.46s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* a different person: their window slides in like the next card, the last one slides away */
.t-win.out {
  opacity: 0;
  transform: translateX(-18px) scale(0.985);
  transition:
    opacity 0.17s ease-in,
    transform 0.18s ease-in;
}
.t-win.pre {
  opacity: 0;
  transform: translateX(30px) scale(0.985);
  transition: none;
}
.t-win iframe {
  display: block;
  width: 100%;
  height: var(--wh, 600px);
  border: 0;
}
/* under the window: play, one dash per step grouped by stage, and the whole film */
.t-foot {
  display: none !important;
}
/* the step's progress, along the window's own bottom edge */
.t-line {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: calc(var(--lf, 0) * 100%);
  background: rgba(15, 23, 42, 0.72);
  pointer-events: none;
}
/* on hover only: play bottom left, View full bottom right, both see-through */
.t-ctl {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.t-win:hover .t-ctl,
.t-win:focus-within .t-ctl,
.t-win.paused .t-ctl {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tour .t-pb,
.tour .t-full {
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition:
    background 0.15s,
    transform 0.15s;
}
.tour .t-pb:hover,
.tour .t-full:hover {
  background: rgba(15, 23, 42, 0.68);
}
.tour .t-pb:active,
.tour .t-full:active {
  transform: scale(0.95);
}
.tour .t-pb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.t-pb svg {
  width: 13px;
  height: 13px;
}
.tour .t-full {
  height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 12px/16px Inter;
}
.t-full svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* touch: no hover, so a tap pauses and the controls come up with the pause */
.t-tl {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-self: stretch;
}
.t-grp {
  flex: var(--n) 1 0px;
  min-width: max-content;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.t-segs {
  display: flex;
  gap: 3px;
}
.tour .t-seg {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 12px;
  display: flex;
  align-items: center;
  touch-action: none;
}
.t-seg > i {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e3e1ea;
  overflow: hidden;
  transition: background 0.2s;
}
.t-seg:hover > i {
  background: #d6d2e2;
}
.t-seg.done > i {
  background: #b9aee0;
}
.t-seg > i b {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--f, 0%);
  border-radius: 2px;
  background: var(--ann);
  display: none;
}
.t-seg.now > i b {
  display: block;
}
.t-seg .k {
  position: absolute;
  top: 50%;
  left: var(--f, 0%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--ann);
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
}
.t-seg.now .k {
  opacity: 1;
  transform: none;
  cursor: grab;
}
.t-tl.drag .t-seg.now .k {
  transform: scale(1.2);
}
.t-seg:focus-visible {
  outline: 2px solid var(--ann);
  outline-offset: 2px;
  border-radius: 3px;
}
.t-grp > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--placeholder);
  transition: color 0.2s;
}
.t-grp.done > span {
  color: var(--tertiary);
}
.t-grp.on > span {
  color: var(--primary);
}
.t-now {
  display: none;
  color: var(--primary);
}
.t-watch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--primary);
  white-space: nowrap;
}
.t-watch svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}
.t-watch:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* the whole film, or the screen at full size, over everything */
.t-film {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.t-film.on {
  opacity: 1;
  pointer-events: auto;
}
.t-film iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 960px) {
  .tour {
    --gut: 16px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 72px;
  }
  .t-pin {
    order: -1;
    top: 0;
    z-index: 3;
    margin: 0 calc(var(--gut) * -1);
    padding: 12px var(--gut) 16px;
    background: var(--paper);
  }
  .t-pin::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 20px;
    background: linear-gradient(var(--paper), rgba(251, 251, 251, 0));
    pointer-events: none;
  } /* text slides under the window softly */
  .t-ctl {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .tour .t-pb {
    width: 26px;
    height: 26px;
  }
  .t-pb svg {
    width: 10px;
    height: 10px;
  }
  .tour .t-full {
    width: 26px;
    height: 26px;
    padding: 0;
    justify-content: center;
  }
  .t-full span {
    display: none;
  }
  .t-full svg {
    width: 11px;
    height: 11px;
  }
  .t-foot {
    margin-top: 8px;
    height: 28px;
    gap: 12px;
  }
  .t-grp {
    min-width: 0;
  }
  .t-grp > span {
    display: none;
  }
  .t-tl {
    gap: 6px;
  }
  .t-now {
    display: block;
  }
  .t-watch {
    display: none;
  }
  .t-st {
    min-height: 36vh;
    padding-top: 24px;
  }
  .t-ch + .t-ch {
    margin-top: 14vh;
  }
  .t-txt {
    padding-top: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .t-bd,
  .t-bd b,
  .t-bd::before,
  .t-film,
  .t-win,
  .t-seg > i,
  .t-seg .k,
  .t-ch > *,
  .t-st > .t-tag {
    transition: none;
  }
  .t-st.cue .t-cue svg {
    animation: none;
    opacity: var(--o);
  }
}
