/* THE DIAGRAMS drawn in the page itself: the old seven-stage pipeline, who hires whom, and the two bars of projects a month. */

/* the old way, seven stages with a person carrying files between them */
.pipe {
  width: 758px;
  max-width: 100%;
  display: flex;
  align-items: center;
}
.pipe .st {
  width: 98px;
  height: 140px;
  flex: none;
  padding: 14px 10px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pipe i {
  display: block;
  font:
    500 11px/10px 'Geist Mono',
    monospace;
  font-style: normal;
  color: var(--placeholder);
}
.pipe b {
  display: block;
  margin-top: 10px;
  font: 500 14px/18px Inter;
  color: var(--primary);
}
.pipe span {
  display: block;
  margin-top: 6px;
  font: 400 12px/16px Inter;
  color: var(--tertiary);
}
.pipe svg {
  width: 12px;
  height: 8px;
  flex: none;
}
.pipe-cap {
  width: 758px;
  max-width: 100%;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  font: 400 13px/16px Inter;
  color: var(--tertiary);
}
.pipe-cap em {
  font-style: normal;
  color: var(--primary);
}
@media (prefers-reduced-motion: reduce) {
  .vol-bar i,
  .vol-v {
    transition: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow .fn,
  .flow .fe {
    transition: none;
  }
  .flow .fe b {
    display: none;
  }
}
/* 02: who hires whom, as a flow that runs */
.flow-wrap {
  padding: 64px 40px;
  border-radius: 12px;
  background-color: #f6f6f4;
  background-image: radial-gradient(#deded9 1px, transparent 1.2px);
  background-size: 16px 16px;
}
.flow {
  display: flex;
  align-items: center;
}
.fn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px 13px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.fi {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--well);
  display: grid;
  place-items: center;
}
.fi svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--secondary);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fn b {
  display: block;
  font: 500 15px/20px Inter;
  color: var(--primary);
  white-space: nowrap;
}
.fn i {
  display: block;
  margin-top: 3px;
  font:
    500 10px/13px 'Geist Mono',
    monospace;
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--tertiary);
  white-space: nowrap;
}
.fe {
  flex: 1;
  position: relative;
  height: 1px;
  margin: 0 8px;
  background: #cdcdc8;
  transform-origin: 0 50%;
}
.fe::before,
.fe::after {
  content: '';
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cdcdc8;
}
.fe::before {
  left: -2px;
}
.fe::after {
  right: -2px;
}
.fe span {
  position: absolute;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  font:
    500 10px/13px 'Geist Mono',
    monospace;
  letter-spacing: 0.08em;
  color: var(--tertiary);
}
.fe b {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
}
.flow.in.seen .fe b {
  animation: run 2.8s cubic-bezier(0.45, 0, 0.3, 1) infinite;
} /* only while it is on screen: an animation that moves "left" makes the browser lay the page out again on every frame */
.flow.in.seen .fe + .fn + .fe b {
  animation-delay: 1.4s;
}
@keyframes run {
  0% {
    left: 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  50% {
    left: calc(100% - 7px);
    opacity: 1;
  }
  60%,
  100% {
    left: calc(100% - 7px);
    opacity: 0;
  }
}
.flow .fn,
.flow .fe {
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.flow:not(.in) .fn {
  opacity: 0;
  transform: translateY(8px);
}
.flow:not(.in) .fe {
  transform: scaleX(0);
}
.flow.in > :nth-child(2) {
  transition-delay: 0.15s;
}
.flow.in > :nth-child(3) {
  transition-delay: 0.3s;
}
.flow.in > :nth-child(4) {
  transition-delay: 0.45s;
}
.flow.in > :nth-child(5) {
  transition-delay: 0.6s;
}
/* impact: the month's projects as two bars on the canvas (grow once in view), then the numbers row and the team's own words */
.vol {
  display: grid;
  row-gap: 22px;
  padding: 44px 40px;
}
.vol-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 104px;
  align-items: center;
  column-gap: 16px;
}
.vol-k {
  font:
    500 13px/18px 'Geist Mono',
    monospace;
  color: var(--tertiary);
}
.vol-bar {
  position: relative;
  height: 18px;
}
.vol-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w);
  border-radius: 0 4px 4px 0;
  background: #c9c9c3;
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.vol-row.now .vol-bar i {
  background: var(--primary);
  transition-delay: 0.2s;
}
.vol-row.now .vol-bar i.rg {
  left: calc(var(--l) + 2px);
  width: calc(var(--w) - 2px);
  background: rgba(58, 59, 54, 0.32);
  transition-delay: 1s;
  transition-duration: 0.5s;
} /* 120 to 130: the range, a step lighter, 2px apart */
.vol.in .vol-bar i {
  transform: none;
}
.vol-v {
  white-space: nowrap;
  font: 600 18px/24px Inter;
  color: var(--primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.4s ease 0.9s;
}
.vol-row:not(.now) .vol-v {
  color: var(--secondary);
  transition-delay: 0.7s;
}
.vol.in .vol-v {
  opacity: 1;
}
@media (max-width: 820px) {
  .vol {
    padding: 28px 20px;
    row-gap: 18px;
  }
  .vol-row {
    grid-template-columns: 64px minmax(0, 1fr) 84px;
    column-gap: 10px;
  }
  .vol-k {
    font-size: 11px;
  }
  .vol-v {
    font-size: 14px;
  }
}
@media (max-width: 820px) {
  .flow-wrap {
    padding: 32px 20px;
  }
  .flow {
    flex-direction: column;
    align-items: stretch;
  }
  .fn {
    justify-content: flex-start;
  }
  .fe {
    flex: none;
    width: 1px;
    height: 40px;
    margin: 6px auto;
    transform-origin: 50% 0;
  }
  .fe::before,
  .fe::after {
    left: -2px;
  }
  .fe::before {
    top: -2px;
  }
  .fe::after {
    top: auto;
    bottom: -2px;
    right: auto;
  }
  .fe span {
    left: 12px;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }
  .fe b {
    display: none;
  }
  .flow:not(.in) .fe {
    transform: scaleY(0);
  }
}
@media (max-width: 820px) {
  .pipe {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pipe svg {
    display: none;
  }
  .pipe .st {
    width: calc(50% - 4px);
    height: auto;
  }
}
