/* ===== wb-system: "Starting from a system you have". Three steps, climbed in order, each with its own landing.
   The head draws them as solid steps rising on a lit floor, each landing named ("Tests first.", "Features next.",
   "Then the rebuild.") and linked to its block. The steps are the section's structure: a rail runs down the left of the
   blocks and each block stands at its step, marked by three small steps with its own lit. The drawing leads on the left,
   and "You get back" lands on a tread rather than a tray. Hovering or focusing a step's name lights its landing. ===== */
.wb-system { padding-block: var(--space-2xl) var(--section-gap); }
.wb-system__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-3xl); align-items: center; }
.wb-system__intro { display: grid; gap: var(--space-lg); padding-top: var(--space-2xl); }
.wb-system__intro h2 { max-width: 12ch; }
.wb-system__lede { max-width: 30ch; }

/* the steps */
.wb-steps { position: relative; margin: 0; width: 100%; max-width: 760px; justify-self: end; }
.wb-steps__names { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.wb-steps__name { position: absolute; right: var(--r); top: var(--y); transform: translateY(-100%); text-align: right; }
.wb-steps__link { pointer-events: auto; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--text-lead); line-height: 1.2; color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-rule-2); text-decoration-thickness: 1px; text-underline-offset: 0.22em; white-space: nowrap; transition: text-decoration-color var(--dur-short) var(--ease-out); }
.wb-steps__link:hover { text-decoration-color: var(--color-ink); }
.wb-steps__link:active { color: var(--color-ink-2); }
.wb-steps__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }
.wb-steps .wb-steps__pool { opacity: 0.7; transition: opacity var(--dur-short) var(--ease-out); }
.wb-steps:has([data-step="tests"]:is(:hover, :focus-visible)) [data-step="tests"] .wb-steps__pool,
.wb-steps:has([data-step="features"]:is(:hover, :focus-visible)) [data-step="features"] .wb-steps__pool,
.wb-steps:has([data-step="legacy"]:is(:hover, :focus-visible)) [data-step="legacy"] .wb-steps__pool { opacity: 1; }

/* the rail: the blocks hang off it, each at its step */
.wb-system__blocks { --wb-rail: 96px; position: relative; margin-top: var(--space-xl); padding-left: var(--wb-rail); }
.wb-system__blocks::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, var(--color-rule-2), var(--color-rule-2) 85%, transparent); }
.wb-system__blocks > .wb-block { padding-block: var(--wb-pad); }
.wb-system__blocks > .wb-block + .wb-block::after { content: ""; position: absolute; top: 0; left: calc(-1 * var(--wb-rail) + 21px); right: 0; height: 1px; background: linear-gradient(to right, var(--color-rule-2), var(--color-rule) 30%, transparent); }
.wb-system__blocks > .wb-block:last-child { padding-bottom: 0; }
.wb-block--rung .wb-block__rung { left: calc(-1 * var(--wb-rail)); top: calc(var(--wb-pad) + 0.2em); padding: 0; background: var(--color-paper); color: var(--color-ink); }

/* desktop: the drawing leads on the left */
@media (min-width: 64.01rem) {
  .wb-block--rung { --wb-cols: minmax(0, 11fr) minmax(0, 13fr); grid-template-areas: "side main" "ask ask"; }
  .wb-block--rung .wb-block__ask { --wb-cols: minmax(0, 13fr) minmax(0, 11fr); }
}
/* you get back, on a tread: no tray, larger, ink on a solid edge */
.wb-block--rung .wb-block__back { padding: var(--space-md) 0 0; background: none; box-shadow: none; border-top: 2px solid var(--color-ink-2); }
.wb-block--rung .wb-block__things { font-size: var(--text-title); line-height: 1.35; }

@media (max-width: 64rem) {
  .wb-system__head { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xl); }
  .wb-system__intro { padding-top: 0; }
  .wb-steps { justify-self: start; }
  .wb-system__blocks { --wb-rail: 72px; }
  .wb-system__blocks > .wb-block { --wb-pad: var(--space-2xl); }
}
@media (max-width: 40rem) {
  .wb-steps__link { font-size: var(--text-md); }
  .wb-system__blocks { --wb-rail: 44px; }
  .wb-system__blocks::before { left: 13px; }
  .wb-system__blocks > .wb-block + .wb-block::after { left: calc(-1 * var(--wb-rail) + 13px); }
  .wb-block--rung .wb-art.wb-block__rung { width: 28px; height: 30px; }
  .wb-block--rung .wb-block__things { font-size: var(--text-lg); }
}
