/*
 * The Solutions page: the live export side of RIVERO. Needs tokens.css and
 * site.css first. Three pieces carry the page — the departures board in the
 * hero, the container scene in #flow and the tracking bar along the page —
 * and all three are drawn in their last pose: board settled, container
 * sealed, every step checked. solutions.js only ever moves them away from
 * that pose and back, so reduced motion and no JS read the finished page.
 *
 * Two classes gate the motion. `rv-sx-pin` (set in <head> when motion is
 * allowed) pins the scene's stage; `rv-sx` (set by solutions.js) is what
 * every "not there yet" rule hangs off. Only transform and opacity move.
 */

/*
 * Type, with the site's two families only. Jost sets every heading, a touch
 * tighter than the site default; Plex Sans is the reading text at 1.6 and
 * never wider than 65ch; labels and the tracker are Plex Sans Medium in
 * capitals at 0.14em (the page's --font-mono, see tokens.css), with tabular
 * figures, while the hero (eyebrow, captions, the board) stays in
 * Plex Mono. Four sizes do all of
 * it: the hero headline, a section headline (--display-md, which the way
 * out and the figure share), a card headline (--sx-h3) and the lead
 * (--text-lg); the rest is body and the 12px mono label.
 */
[data-page='solutions'] {
  --tracking-display: -0.02em;
  --leading-body: 1.6;
  --sx-measure: 65ch;
  --sx-h3: 22px;
}
[data-page='solutions'] .eyebrow {
  font-variant-numeric: tabular-nums;
}
[data-page='solutions'] .accent-dot {
  color: var(--accent);
}
.sx-eyebrow {
  color: var(--accent-text);
}
.sx-h2 {
  font-size: var(--display-md);
  font-weight: 700;
}
.sx-lead {
  max-width: var(--sx-measure);
  margin: 0;
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------- hero */

/*
 * A dark stage like Technologies': near-black in both themes, the footage
 * barely there under it, and green only where it means something. The top
 * padding clears the floating header (site-header.mjs sets its size on
 * :root) with room to spare; the bottom padding keeps the facts clear of
 * the Mr. RIVERO launcher in the bottom-left corner (mr-rivero.css).
 */
.sx-hero {
  /* The hero keeps IBM Plex Mono (eyebrow, the figures' captions and the
     board); the rest of the page sets its labels in Plex Sans
     (tokens.css). */
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --launcher-clear: calc(
    max(var(--gutter), env(safe-area-inset-bottom, 0px)) + 60px +
      clamp(20px, 3vh, 36px)
  );
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(
      var(--hdr-top, 14px) + var(--hdr-row-h, 62px) + clamp(56px, 9vh, 104px)
    )
    0 var(--launcher-clear);
}
.sx-hero-media,
.sx-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.sx-hero-media {
  overflow: clip;
}
.sx-hero-video {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0.4;
  filter: grayscale(1);
}
.sx-hero-scrim {
  inset: 0;
  background:
    linear-gradient(
      90deg,
      var(--tone-dark) 0%,
      color-mix(in srgb, var(--tone-dark) 72%, transparent) 55%,
      color-mix(in srgb, var(--tone-dark) 80%, transparent) 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--tone-dark) 40%, transparent) 0%,
      transparent 40%,
      var(--tone-dark) 100%
    );
}
.sx-hero-grid {
  display: grid;
  /* Two equal columns where there is room; the board's own width is the
     right one's floor, so it never shrinks, and it sits centred in it. */
  grid-template-columns: minmax(0, 1fr) minmax(max-content, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: end;
  width: 100%;
}
/* Side by side (1024px and up) the board sits at the middle of the left
   column, headline through address, not on its bottom edge; narrower, it
   is stacked under the copy (see the responsive block). */
.sx-hero-board {
  display: flex;
  justify-content: center;
}
@media (min-width: 1024px) {
  .sx-hero-board {
    align-self: center;
    /* The headline's own top margin sits inside the copy's box, so the
       copy reads that much lower than the box's middle; the same margin
       on the board puts it on the middle of what is seen. */
    margin-top: var(--space-5);
  }
}
.sx-hero-eyebrow {
  color: var(--accent-text);
}
.sx-hero-title {
  margin-top: var(--space-5);
  font-size: clamp(44px, 5.4vw, 84px);
  font-weight: 700;
  line-height: 0.98;
}
.sx-hero .accent-dot {
  color: var(--rv-green);
}
/* One clip per word, so the line rises out of itself (as .ch-w). */
/* The clip needs room for Jost's descenders and overhangs at this leading;
   the negative margins hand that room back so the lines do not move. */
.sx-w {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
  padding: 0 0.05em 0.18em;
  margin: 0 -0.05em -0.12em;
}
.sx-wi {
  display: inline-block;
}
.sx-hero-lead {
  max-width: min(600px, var(--sx-measure));
  margin: 28px 0 0;
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--ink-muted);
}
.sx-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-8);
  align-items: flex-end;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: var(--hairline) solid var(--rule);
  max-width: 600px;
}
.sx-hero-value {
  font-size: var(--display-md);
  font-weight: 600;
  line-height: 1;
}
/* Laptop heights (1280×800, 1366×768, 1536×864): the whole hero has to sit
   above the fold, or the launcher lands on the address. */
@media (min-width: 1024px) and (max-height: 880px) {
  .sx-hero {
    padding-top: calc(
      var(--hdr-top, 14px) + var(--hdr-row-h, 62px) + clamp(24px, 4vh, 40px)
    );
  }
  .sx-hero-title {
    margin-top: var(--space-4);
  }
  .sx-hero-board {
    margin-top: var(--space-4);
  }
  .sx-hero-lead {
    margin-top: 20px;
  }
  .sx-hero-facts {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
  }
  .sx-hero-value {
    font-size: var(--display-sm);
  }
}
.sx-hero-label {
  margin-top: var(--space-2);
  font: 500 12px / 1.6 var(--font-mono);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

/*
 * Arrival, as Commerce's hero arrives (commerce.css .ch-*): the footage is
 * wiped open from the top and settles from --media-from, the words rise out of
 * their clips, then the lead, the facts and the board fade up in turn.
 * Timed on load, CSS only, so there is nothing to wait for.
 */
@keyframes sx-open {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes sx-zoom {
  from {
    transform: scale(var(--media-from));
  }
  to {
    transform: none;
  }
}
@keyframes sx-word {
  from {
    transform: translateY(105%);
  }
  to {
    transform: none;
  }
}
@keyframes sx-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .sx-hero-media {
    animation: sx-open 1.1s var(--ease-emph) both;
  }
  .sx-hero-video {
    animation: sx-zoom 1.6s var(--ease-emph) both;
  }
  .sx-wi {
    animation: sx-word 1s var(--ease-emph) both;
    animation-delay: calc(120ms + var(--i) * 55ms);
  }
  .sx-in {
    animation: sx-rise 800ms var(--ease-emph) both;
  }
  .sx-hero-lead {
    animation-delay: 360ms;
  }
  .sx-hero-facts {
    animation-delay: 480ms;
  }
  .sx-hero-board {
    animation-delay: 560ms;
  }
}

/* -------------------------------------------------------------- board */

/*
 * The departures board. --c is one cell; a field is --w cells wide.
 * Without the script a field is its own text in a monospaced face
 * spaced onto the cell grid painted behind it, so it already reads as a
 * board; with it, solutions.js lays flap cells over the text and the text
 * steps out of sight (it stays in the DOM, untouched). Each cell is two
 * halves on a one-pixel hinge, and the flaps turn on it. Tiles nearly
 * touch; a tile with nothing on it is barely darker than the board, so
 * only the words read. On the live board (data-board="ports") a row is a
 * load: its tag in the board's small grey type, the destination and its
 * code, and its status as flaps behind an LED, all green once it has
 * Shipped (.is-shipped). On the steps board the status is an LED readout
 * instead, one right-aligned column as wide as the longest status (--sw),
 * grey except on the row that landed last. The board is the same
 * near-black in both themes: it is hardware, not a surface.
 */
.sx-board {
  --c: clamp(15px, 1.42vw, 24px);
  --gap: 2px;
  --split: 1px;
  --tile-h: calc(var(--c) * 1.44);
  --drop: calc(var(--c) * 0.07);
  --flap-top: #1b1d1f;
  --flap-top-b: #17191b;
  --flap-bot: #151719;
  --flap-bot-b: #111315;
  --flap-blank: #0c0d0e;
  --flap-ink: #f6f8f7;
  --led-off: #8d969e;
  position: relative;
  width: max-content;
  max-width: 100%;
  padding: 20px 20px 22px;
  background: #08090a;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: var(--card-radius);
  box-shadow:
    0 40px 80px -40px rgb(0 0 0 / 80%),
    inset 0 1px 0 rgb(255 255 255 / 5%);
  color: var(--flap-ink);
  font-variant-numeric: tabular-nums;
}
.sx-board-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}
.sx-board-mark {
  width: 30px;
  /* The green is its own, not inherited from data-color, so the mark
     renders the same in both locales. */
  --c: var(--rv-green);
  flex: none;
}
.sx-board-rows {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sx-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(255 255 255 / 5%);
}
.sx-row.sx-queued {
  display: none;
}
.sx-row:nth-child(5) {
  padding-bottom: 0;
  border-bottom: 0;
}
/* A full blank cell between port and country, so a 12-letter port never
   reads as one word with its code. */
.sx-flaps {
  display: flex;
  gap: calc(var(--c) + var(--gap) * 2);
}
/* One line, always: the column is as wide as the longest status. */
.sx-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: calc(var(--sw) * (1ch + 0.06em) + 17px);
  font: 500 12px / 1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--led-off);
}
.sx-led {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a5157;
}
/* The row that changed last, and only that one, is lit. */
.sx-row.is-latest .sx-status {
  color: var(--rv-green);
  text-shadow: 0 0 10px rgb(4 183 4 / 45%);
}
.sx-row.is-latest .sx-led {
  background: var(--rv-green);
  box-shadow:
    0 0 0 3px rgb(4 183 4 / 14%),
    0 0 10px rgb(4 183 4 / 70%);
}
/* Each row's readout comes on once its flaps have landed. */
.rv-sx .sx-status {
  transition:
    opacity 420ms var(--ease-out),
    color 600ms var(--ease-out),
    text-shadow 600ms var(--ease-out);
}
.rv-sx .sx-led {
  transition:
    background-color 600ms var(--ease-out),
    box-shadow 600ms var(--ease-out);
}
.rv-sx .sx-row:not(.is-lit) .sx-status {
  opacity: 0;
}
/* The live board. Its tiles step down a little from the steps board's, so
   the extra columns (tag, status) leave the board about as wide as before. */
.sx-board[data-board='ports'] {
  --c: clamp(13px, 1.15vw, 20px);
  padding: 22px 20px;
  /* The accent: a faint green wash from the top edge and a hairline of it
     across the top, fading out at both ends. */
  background:
    radial-gradient(90% 50% at 50% 0%, rgb(4 183 4 / 10%), transparent 70%),
    #08090a;
}
.sx-board[data-board='ports']::before {
  content: '';
  position: absolute;
  inset: 0 28px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rv-green), transparent);
  opacity: 0.8;
  pointer-events: none;
}
/* Even rhythm: the space under the header rule is the row gap (12px). */
.sx-board[data-board='ports'] .sx-board-head {
  margin-bottom: 12px;
}
.sx-board[data-board='ports'] .sx-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 18px;
}
.sx-tag {
  font: 500 11px / 1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--led-off);
}
/* A destination and, under it, where the load came from (Marcus's copy
   review, EN 7F): the flaps over a small mono tag. */
.sx-place {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.sx-src {
  font: 500 10px / 1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--led-off);
}
.sx-state {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Shipped is the one green on the board: its LED and its tiles. */
.sx-row.is-shipped .sx-led {
  background: var(--rv-green);
  box-shadow:
    0 0 0 3px rgb(4 183 4 / 14%),
    0 0 10px rgb(4 183 4 / 70%);
}
.sx-row.is-shipped .sx-st {
  color: var(--rv-green);
}
.sx-row.is-shipped .sx-st :is(.sx-text, .sx-half > b) {
  text-shadow: 0 0 10px rgb(4 183 4 / 45%);
}
/* The live board's status colours: the LED and the status glyphs take the
   load's stage (--st, from the row's data-stage, which solutions.js keeps
   current): Received blue, Put away teal, Audited violet, Loading amber,
   Shipped Solutions green. Same on the phone board. */
.sx-board[data-board='ports'] .sx-row {
  --st: var(--rv-green);
}
.sx-board[data-board='ports'] .sx-row[data-stage='0'] {
  --st: #4da6ff;
}
.sx-board[data-board='ports'] .sx-row[data-stage='1'] {
  --st: #2dd4bf;
}
.sx-board[data-board='ports'] .sx-row[data-stage='2'] {
  --st: #b794f6;
}
.sx-board[data-board='ports'] .sx-row[data-stage='3'] {
  --st: #ffb02e;
}
.sx-board[data-board='ports'] .sx-row[data-stage='4'] {
  --st: var(--rv-green);
}
.sx-board[data-board='ports'] .sx-row .sx-st {
  color: var(--st);
  transition: color 600ms var(--ease-out);
}
.sx-board[data-board='ports'] .sx-row .sx-st :is(.sx-text, .sx-half > b) {
  text-shadow: 0 0 10px color-mix(in srgb, var(--st) 50%, transparent);
}
.sx-board[data-board='ports'] .sx-row .sx-state .sx-led {
  background: var(--st);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--st) 18%, transparent),
    0 0 10px color-mix(in srgb, var(--st) 70%, transparent);
}
/* The tag and the LED come on once the row's flaps have landed. */
.rv-sx :is(.sx-tag, .sx-src) {
  transition: opacity 420ms var(--ease-out);
}
.rv-sx .sx-state .sx-led {
  transition:
    opacity 420ms var(--ease-out),
    background-color 600ms var(--ease-out),
    box-shadow 600ms var(--ease-out);
}
.rv-sx .sx-row:not(.is-lit) :is(.sx-tag, .sx-src, .sx-state .sx-led) {
  opacity: 0;
}
.sx-field {
  position: relative;
  display: inline-block;
  flex: none;
  width: calc(var(--w) * (var(--c) + var(--gap)) - var(--gap));
  height: var(--tile-h);
  overflow: hidden;
  border-radius: 3px;
  /* Lit tiles under the text, blank ones after it. */
  background:
    repeating-linear-gradient(
        90deg,
        var(--flap-top) 0 var(--c),
        transparent var(--c) calc(var(--c) + var(--gap))
      )
      0 0 / calc(var(--n, var(--w)) * (var(--c) + var(--gap))) 100% no-repeat,
    repeating-linear-gradient(
      90deg,
      var(--flap-blank) 0 var(--c),
      transparent var(--c) calc(var(--c) + var(--gap))
    );
  /* Plex Mono advances 0.6em, so at 0.86c a glyph is 0.516c wide. */
  font: 700 calc(var(--c) * 0.86) / var(--tile-h) var(--font-mono);
  text-transform: uppercase;
  white-space: pre;
}
/* Glyphs sit a hair low, so the hinge runs above the bar of an E or an
   H instead of through it. */
.sx-text {
  display: block;
  padding-left: calc(var(--c) * 0.242);
  letter-spacing: calc(var(--c) * 0.484 + var(--gap));
  transform: translateY(var(--drop));
}
/* The split across every cell, as on the real thing. */
.sx-field::after {
  content: '';
  position: absolute;
  inset: calc(50% - var(--split) / 2) 0 auto;
  height: var(--split);
  background: #050606;
  z-index: 3;
}
.sx-field.is-flaps {
  background: none;
}
.sx-field.is-flaps::after,
.sx-field.is-flaps .sx-text {
  opacity: 0;
}
.sx-cells {
  position: absolute;
  inset: 0;
  display: flex;
  gap: var(--gap);
}
.sx-cell {
  position: relative;
  flex: none;
  width: var(--c);
  height: 100%;
  perspective: calc(var(--c) * 4);
}
.sx-half {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(50% - var(--split) / 2);
  overflow: hidden;
  backface-visibility: hidden;
}
.sx-half > b {
  display: block;
  height: calc(200% + var(--split));
  font-weight: 700;
  text-align: center;
  transform: translateY(var(--drop));
}
.sx-top {
  top: 0;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(var(--flap-top), var(--flap-top-b));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
  transform-origin: 50% calc(100% + var(--split) / 2);
}
.sx-bot {
  bottom: 0;
  border-radius: 1px 1px 3px 3px;
  background: linear-gradient(var(--flap-bot), var(--flap-bot-b));
  transform-origin: 50% calc(var(--split) / -2);
}
.sx-bot > b {
  transform: translateY(calc(-50% - var(--split) / 2 + var(--drop)));
}
/* A tile with nothing on it, all but gone. */
.sx-cell.is-blank .sx-half {
  background: var(--flap-blank);
  box-shadow: none;
}
.sx-flap {
  z-index: 2;
}
.sx-flap.sx-bot {
  transform: rotateX(90deg);
}
/* The light a flap loses as it turns away, and gets back as it lands. */
.sx-shade {
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------- flow */

/*
 * The hero's dark stage turns into this section's paper in a band of its
 * own, above the copy, so no text ever sits on the mid-tones. The ramp is a
 * smoothstep in Oklab: it leaves the near-black and arrives at the page
 * colour with no slope at either end, which is what keeps both ends from
 * reading as a line, and the steps are close enough that 8-bit color does
 * not band.
 */
.sx-flow {
  --sx-fade: clamp(240px, 38vh, 440px);
  padding: calc(var(--section-pad) + var(--sx-fade)) 0 var(--section-pad);
  overflow: clip;
}
.sx-flow::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: var(--sx-fade);
  pointer-events: none;
  background: linear-gradient(var(--tone-dark), var(--tone-alt));
  background: linear-gradient(
    to bottom in oklab,
    var(--tone-dark) 0%,
    color-mix(in oklab, var(--tone-alt) 1.6%, var(--tone-dark)) 7%,
    color-mix(in oklab, var(--tone-alt) 6%, var(--tone-dark)) 14%,
    color-mix(in oklab, var(--tone-alt) 15.6%, var(--tone-dark)) 25%,
    color-mix(in oklab, var(--tone-alt) 31.6%, var(--tone-dark)) 37.5%,
    color-mix(in oklab, var(--tone-alt) 50%, var(--tone-dark)) 50%,
    color-mix(in oklab, var(--tone-alt) 68.4%, var(--tone-dark)) 62.5%,
    color-mix(in oklab, var(--tone-alt) 84.4%, var(--tone-dark)) 75%,
    color-mix(in oklab, var(--tone-alt) 94%, var(--tone-dark)) 86%,
    color-mix(in oklab, var(--tone-alt) 98.4%, var(--tone-dark)) 93%,
    var(--tone-alt) 100%
  );
}
.sx-flow-grid {
  display: grid;
  grid-template-areas: 'head' 'art' 'steps';
  gap: clamp(28px, 4vw, 48px);
}
.sx-flow-head {
  grid-area: head;
}
.sx-flow-title {
  max-width: 900px;
  margin-top: var(--space-4);
  font-size: var(--display-md);
  font-weight: 700;
}
.sx-art-box {
  grid-area: art;
}
.sx-art {
  width: 100%;
  height: auto;
  max-height: 62vh;
  overflow: visible;
}
.sx-steps {
  grid-area: steps;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 28px 24px;
  margin: 0;
  padding: 28px 0 0;
  border-top: var(--hairline) solid var(--rule);
  list-style: none;
}
.sx-step {
  --a: 0;
  --on: 0;
}
.sx-step:last-child {
  --a: 1;
  --on: 1;
}
.sx-step-num {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--rv-green-text);
  color: #ffffff;
  font: 600 22px/1 var(--font-display);
}
.sx-check {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--rv-green);
  box-shadow: 0 0 0 2px var(--tone-bg, var(--tone-light));
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    transform var(--dur-pop) var(--ease-spring),
    opacity var(--dur-base) var(--ease-out);
}
.sx-step-title {
  margin: 14px 0 0;
  font: 700 var(--text-lg) / 1.3 var(--font-body);
}
.sx-step-body {
  max-width: var(--sx-measure);
  margin: 8px 0 0;
  color: var(--ink-muted);
  line-height: var(--leading-body);
}
/* The floor-work vignettes only belong to the pinned stage. */
.sx-step-vig {
  display: none;
}

/* Steps that have not played yet: ring only, no check. */
.rv-sx .sx-step:not(.is-done) .sx-step-num {
  background: transparent;
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1.5px var(--accent-text);
}
.rv-sx .sx-step:not(.is-done) .sx-check {
  opacity: 0;
  transform: scale(0.2);
}
.rv-sx .sx-step-num {
  transition:
    background-color var(--dur-base),
    color var(--dur-base),
    box-shadow var(--dur-base);
}

/*
 * Pinned: one screen, the steps on the left and the scene on the right. The
 * list stops being rows: every title keeps its line, and the bodies stack
 * in one place under them and cross-fade with --a (set per step).
 */
.rv-sx-pin .sx-flow {
  padding: var(--sx-fade) 0 0;
}
/* About three screens: two of pinned scroll, one for the stage itself. */
.rv-sx-pin .sx-flow-track {
  height: 300vh;
}
.rv-sx-pin .sx-flow-stage {
  position: sticky;
  top: 0;
  display: grid;
  align-items: center;
  height: 100vh;
  height: 100svh;
  padding-top: 64px;
  overflow: clip;
}
.rv-sx-pin .sx-flow-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas: 'head art' 'steps art';
  align-items: center;
  column-gap: clamp(24px, 4vw, 72px);
  row-gap: clamp(20px, 3vh, 36px);
  width: 100%;
}
.rv-sx-pin .sx-flow-title {
  font-size: var(--display-sm);
}
.rv-sx-pin .sx-art {
  max-height: 74vh;
}
.rv-sx-pin .sx-steps {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
  padding: 0;
  border: 0;
}
.rv-sx-pin .sx-step {
  display: contents;
}
.rv-sx-pin .sx-step-num {
  grid-column: 1;
  grid-row: calc(var(--s) + 1);
  width: 34px;
  height: 34px;
  font-size: 16px;
}
.rv-sx-pin .sx-check {
  width: 16px;
  height: 16px;
  padding: 2px;
}
.rv-sx-pin .sx-step-title {
  grid-column: 2;
  grid-row: calc(var(--s) + 1);
  margin: 0;
  /* 0.6 floor: the title still steps back, at about 5:1 in both themes (0.42
     was 2.8:1). */
  opacity: calc(0.6 + var(--on) * 0.4);
  transition: opacity var(--dur-base) var(--ease-out);
}
.rv-sx-pin .sx-step-body {
  grid-column: 1 / -1;
  grid-row: 7;
  align-self: start;
  max-width: 40ch;
  min-height: 4.8em;
  margin: 12px 0 0;
  font-size: var(--text-lg);
  opacity: var(--a);
  transform: translate3d(0, calc((1 - var(--a)) * 14px), 0);
  transition:
    opacity 380ms var(--ease-out),
    transform 480ms var(--ease-out);
}
/* Under the text, in one place for all three, cross-fading the same way. */
.rv-sx-pin .sx-step-vig {
  display: block;
  grid-column: 1 / -1;
  grid-row: 8;
  height: clamp(84px, 15vh, 140px);
  opacity: var(--a);
  transform: translate3d(0, calc((1 - var(--a)) * 10px), 0);
  transition:
    opacity 380ms var(--ease-out),
    transform 480ms var(--ease-out);
  pointer-events: none;
}
.rv-sx-pin .sx-step-vig .sx-vig {
  width: auto;
  height: 100%;
}

/* -------------------------------------------------------------- scene */

/* Line art in the page's own inks; green only for what the operation adds:
   the load, the scan, the stamp and the seal. The pallets are Home's own
   (journey.css .iso .pal), in the Solutions green. */
.sx-art {
  --sx-ink-base: #070707;
  --sx-line: rgb(11 13 18 / 62%);
  --sx-faint: rgb(11 13 18 / 17%);
  --sx-grid: rgb(11 13 18 / 9%);
  --sx-wall: #ffffff;
  --sx-wall-t: #eef0f2;
  --sx-wall-r: #e4e7ea;
  --sx-hold: #1b1f24;
  --sx-door: #f8f9fa;
  --sx-steel: #d8dce1;
  --sx-cab: #f1f3f5;
  --sx-glass: #c7d1da;
  --sx-dock: #e7e9ec;
  --sx-deck: #fafafa;
  --sx-ink: var(--rv-green-text);
}
[data-theme='dark'] .sx-art {
  --sx-ink-base: #ffffff;
  --sx-line: rgb(255 255 255 / 56%);
  --sx-faint: rgb(255 255 255 / 14%);
  --sx-grid: rgb(255 255 255 / 7%);
  --sx-wall: #1a1f1c;
  --sx-wall-t: #212723;
  --sx-wall-r: #161a18;
  --sx-hold: #040505;
  --sx-door: #1e2421;
  --sx-steel: #2b322e;
  --sx-cab: #232a26;
  --sx-glass: #34433b;
  --sx-dock: #171b19;
  --sx-deck: #0d0d0d;
  --sx-ink: var(--rv-green);
}
.sx-art :is(polygon, line, polyline) {
  stroke: var(--sx-line);
  stroke-width: 1.1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.sx-wall {
  fill: var(--sx-wall);
}
.sx-wall.sx-t {
  fill: var(--sx-wall-t);
}
.sx-wall.sx-r {
  fill: var(--sx-wall-r);
}
.sx-hold {
  fill: var(--sx-hold);
}
.sx-door {
  fill: var(--sx-door);
}
.sx-steel {
  fill: var(--sx-steel);
}
.sx-cab {
  fill: var(--sx-cab);
}
.sx-cab.t {
  fill: var(--sx-wall-t);
}
.sx-glass {
  fill: var(--sx-glass);
}
.sx-dock {
  fill: var(--sx-dock);
}
.sx-art .iso-pallet {
  --pallet: var(--rv-green);
}
.sx-art .iso-pallet .solid {
  fill: var(--sx-deck);
}
.sx-art .pal {
  stroke: color-mix(in srgb, var(--pallet) 68%, var(--sx-ink-base));
  stroke-width: 0.9;
}
.sx-art .pal.t {
  fill: color-mix(in srgb, var(--pallet) 78%, #ffffff);
}
.sx-art .pal.r {
  fill: var(--pallet);
}
.sx-art .pal.l {
  fill: color-mix(in srgb, var(--pallet) 70%, #000000);
}
.sx-art .strap {
  stroke: color-mix(in srgb, var(--pallet) 50%, var(--sx-ink-base));
  stroke-width: 1;
}
.sx-tyre {
  fill: #2a2e32;
}
.sx-hub {
  fill: #9aa2aa;
}
.sx-art .sx-rib,
.sx-art .sx-roller {
  stroke: var(--sx-faint);
  stroke-width: 1;
}
.sx-art .sx-floor {
  stroke: var(--sx-grid);
  stroke-width: 1;
}
.sx-art .sx-bar-lock,
.sx-art .sx-handle {
  stroke: var(--sx-line);
  stroke-width: 1.6;
}
.sx-art .sx-edge {
  stroke: var(--sx-ink);
  stroke-width: 1.6;
}
.sx-art .sx-beam {
  fill: color-mix(in srgb, var(--rv-green) 18%, transparent);
  stroke: none;
}
.sx-art .sx-beam-line {
  stroke: var(--rv-green);
  stroke-width: 2.2;
}
.sx-stamp-frame,
.sx-stamp-inner {
  stroke: var(--sx-ink);
}
/* Filled, so the door's ribs never run through the word. */
.sx-stamp-frame {
  fill: color-mix(in srgb, var(--rv-green) 12%, var(--sx-door));
  stroke-width: 2.6;
}
.sx-stamp-inner {
  fill: none;
  stroke-width: 1;
}
.sx-stamp text {
  fill: var(--sx-ink);
  font: 500 12.5px/1 var(--font-mono);
}
.sx-stamp-shadow rect {
  fill: var(--sx-ink);
}
.sx-stamp-ink,
.sx-stamp-shadow {
  transform-box: fill-box;
  transform-origin: center;
}
.sx-stamp-ink {
  transform: rotate(-4deg);
}
.sx-stamp-shadow {
  opacity: 0.16;
  transform: translate(1.2px, 2.4px) rotate(-4deg);
}
.sx-seal {
  transform-origin: var(--sx) var(--sy);
}
.sx-seal circle {
  fill: var(--rv-green);
}
.sx-seal path {
  stroke: var(--rv-green);
  stroke-width: 1.6;
}
/* The scan only exists while it plays. */
.sx-scan {
  opacity: 0;
}

/*
 * Doors. Each leaf swings about its own vertical hinge. In this projection
 * a vertical edge stays vertical, so a leaf at angle θ is the linear map
 * that keeps the hinge line and sends the shut leaf's direction to the
 * open one's: matrix(a, b, 0, 1) about the hinge. θ = 0 is shut, 90° is
 * square to the door face. The far leaf crosses a = 0 at 45°, which is
 * where it is seen edge on.
 */
.sx-leaf {
  --th: calc((1 - var(--pd, 1)) * 90deg);
  transform-origin: var(--hx) var(--hy);
}
.sx-leaf-a {
  transform: matrix(
    calc(cos(var(--th)) - sin(var(--th))),
    calc(0.57735 * (1 - sin(var(--th)) - cos(var(--th)))),
    0,
    1,
    0,
    0
  );
}
.sx-leaf-b {
  transform: matrix(
    calc(cos(var(--th)) + sin(var(--th))),
    calc(0.57735 * (1 + sin(var(--th)) - cos(var(--th)))),
    0,
    1,
    0,
    0
  );
}
/* The far leaf is drawn twice: behind the pallets while they roll in past
   it, in front of them once it starts to close and they are all inside. */
.sx-leaf-back {
  opacity: clamp(0, 1 - var(--pd, 1) * 60, 1);
}
.sx-leaf-front {
  opacity: clamp(0, var(--pd, 1) * 60, 1);
}
.sx-rig {
  transform: translate(
    calc(var(--pl, 0) * var(--leave-x)),
    calc(var(--pl, 0) * var(--leave-y))
  );
  /* Gone by a little past mid-departure: further out it drives over the
     flow title. */
  opacity: clamp(0, 1.57 - var(--pg, 0) * 2.86, 1);
}
/* The yard and the dock go ahead of the truck: no empty dock at the end.
   --pg is the departure itself, linear, where --pl is its eased distance. */
.sx-ground,
.sx-dock-g {
  opacity: clamp(0, 1 - var(--pg, 0) * 1.6, 1);
}

/*
 * The scrubbed parts: paused animations whose negative delay is the scroll,
 * so one scroll position is one pose. The defaults (--pa / --ps / --pi = 1)
 * are the last frame, which is also what the page shows before the script.
 */
@keyframes sx-arrive {
  from {
    opacity: 0;
    transform: translate(var(--arrive-x), var(--arrive-y));
  }
  35% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sx-roll {
  from {
    transform: translate(var(--roll-x), var(--roll-y));
  }
  to {
    transform: none;
  }
}
@keyframes sx-scan {
  from {
    opacity: 0;
    transform: none;
  }
  12%,
  86% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(var(--scan-x), var(--scan-y));
  }
}
.rv-sx-pin .sx-pal,
.rv-sx-pin .sx-pal-roll,
.rv-sx-pin .sx-scan {
  animation-duration: 1s;
  animation-fill-mode: both;
  animation-play-state: paused;
}
.rv-sx-pin .sx-pal {
  animation-name: sx-arrive;
  animation-timing-function: var(--ease-emph);
  animation-delay: calc((var(--i) * 0.1 - var(--pa, 1) * 1.5) * 1s);
}
.rv-sx-pin .sx-pal-roll {
  animation-name: sx-roll;
  animation-timing-function: var(--ease-in-out);
  animation-delay: calc((var(--i) * 0.1 - var(--pi, 1) * 1.5) * 1s);
}
.rv-sx-pin .sx-scan {
  animation-name: sx-scan;
  animation-timing-function: linear;
  animation-delay: calc(var(--ps, 1) * -1s);
}

/*
 * The stamp lands once, when the doors are shut: a soft press on the
 * site's spring (it overshoots below full size and settles), with a shadow
 * that tightens under it. It is a timed animation on a class, not a scrub,
 * so it always lands the same way however fast the scroll is.
 */
@keyframes sx-press {
  from {
    opacity: 0;
    transform: scale(1.8) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(-4deg);
  }
}
@keyframes sx-settle {
  from {
    opacity: 0;
    transform: translate(4px, 9px) scale(1.5) rotate(-10deg);
  }
  55% {
    opacity: 0.4;
  }
  to {
    opacity: 0.16;
    transform: translate(1.2px, 2.4px) rotate(-4deg);
  }
}
.rv-sx .sx-flow-stage:not(.is-sealed) :is(.sx-stamp-ink, .sx-stamp-shadow) {
  opacity: 0;
}
.rv-sx .sx-flow-stage:not(.is-sealed) .sx-seal {
  opacity: 0;
  transform: scale(0.2);
}
.rv-sx .sx-flow-stage.is-sealed .sx-stamp-ink {
  animation: sx-press 640ms var(--ease-spring) both;
}
.rv-sx .sx-flow-stage.is-sealed .sx-stamp-shadow {
  animation: sx-settle 760ms var(--ease-out) both;
}
.rv-sx .sx-seal {
  transition:
    transform var(--dur-pop) var(--ease-spring) 180ms,
    opacity var(--dur-base) 180ms;
}

/* ---------------------------------------------------------- vignettes */

/*
 * The small floor scenes (vignettes.mjs), in Home's iso inks (journey.css
 * .iso) on the Solutions palette. Each is drawn in its last pose and only
 * loops under rv-sx, and only while solutions.js has it `is-live` (on
 * screen and, for a step, that step being read): everything else sits
 * paused through --run. Only transform and opacity move.
 */
.sx-vig {
  --iso-ink: #0b0d12;
  --iso-fill: #ffffff;
  --iso-wall: #eef0f2;
  --iso-steel: #d8dce1;
  --iso-hold: #1b1f24;
  --iso-line: rgb(11 13 18 / 62%);
  --iso-faint: rgb(11 13 18 / 30%);
  --iso-dim: rgb(11 13 18 / 13%);
  --pallet: var(--rv-green);
  --c: var(--rv-green);
  --run: paused;
  display: block;
  overflow: visible;
}
[data-theme='dark'] .sx-vig {
  --iso-ink: #ffffff;
  --iso-fill: #151a17;
  --iso-wall: #1b211d;
  --iso-steel: #2b322e;
  --iso-hold: #040505;
  --iso-line: rgb(255 255 255 / 58%);
  --iso-faint: rgb(255 255 255 / 28%);
  --iso-dim: rgb(255 255 255 / 12%);
}
.sx-vig.is-live {
  --run: running;
}
.sx-vig :is(polygon, polyline, line, path, rect, circle) {
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.sx-vig :is(.solid, .wall, .glass, .ghost) {
  stroke: var(--iso-line);
  stroke-width: 1;
}
.sx-vig .solid {
  fill: var(--iso-fill);
}
.sx-vig .wall {
  fill: var(--iso-wall);
}
.sx-vig .glass {
  fill: var(--iso-fill);
  fill-opacity: 0.5;
}
.sx-vig .ghost {
  fill: var(--iso-wall);
  stroke: var(--iso-faint);
}
.sx-vig .ln {
  fill: none;
  stroke: var(--iso-line);
  stroke-width: 1.1;
}
.sx-vig .ln.dim {
  stroke: var(--iso-dim);
}
.sx-vig .ln.faint {
  stroke: var(--iso-faint);
}
.sx-vig .accent {
  stroke: var(--c);
}
.sx-vig .pal {
  stroke: color-mix(in srgb, var(--pallet) 68%, var(--iso-ink));
  stroke-width: 0.9;
}
.sx-vig .pal.t {
  fill: color-mix(in srgb, var(--pallet) 78%, #ffffff);
}
.sx-vig .pal.r {
  fill: var(--pallet);
}
.sx-vig .pal.l {
  fill: color-mix(in srgb, var(--pallet) 70%, #000000);
}
.sx-vig .strap {
  fill: none;
  stroke: color-mix(in srgb, var(--pallet) 50%, var(--iso-ink));
  stroke-width: 1;
}
.sx-ok circle {
  fill: var(--rv-green);
}
.sx-ok path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
}

/* Re-received: the label stays white and its bars black in both themes. */
.sx-label {
  fill: #ffffff;
  stroke: var(--iso-line);
  stroke-width: 0.8;
}
.sx-vig .sx-code {
  stroke: #0b0d12;
  stroke-width: 1;
}
.sx-fan {
  fill: color-mix(in srgb, var(--rv-green) 16%, transparent);
}
.sx-vig .sx-laser {
  stroke: var(--rv-green);
  stroke-width: 2;
}
.sx-vig .sx-laser-glow {
  stroke: color-mix(in srgb, var(--rv-green) 30%, transparent);
  stroke-width: 7;
}
.sx-laser-g {
  transform: translate(calc(var(--sx) * 0.5), calc(var(--sy) * 0.5));
}
.sx-dev :is(rect, path) {
  fill: var(--iso-fill);
  stroke: var(--iso-line);
  stroke-width: 1;
}
.sx-dev .sx-dev-win {
  fill: var(--rv-green);
  stroke: none;
}

/* Built for export: the film is a white veil over the load. */
.sx-film {
  fill: rgb(255 255 255 / 36%);
  stroke: rgb(255 255 255 / 78%);
  stroke-width: 0.8;
}
.sx-film-l {
  fill: rgb(255 255 255 / 24%);
}
.sx-vig .sx-roll {
  fill: var(--iso-fill);
  stroke: var(--iso-line);
  stroke-width: 1;
}
.sx-vig .sx-web {
  stroke: var(--iso-faint);
  stroke-width: 1;
}
.sx-carriage {
  transform: translateY(var(--climb));
}

/* We own the building: the shutter's resting pose is rolled up. */
.sx-apron {
  fill: none;
  stroke: var(--iso-dim);
  stroke-width: 1;
}
.sx-hold {
  fill: var(--iso-hold);
  stroke: var(--iso-line);
  stroke-width: 1;
}
.sx-panel {
  fill: var(--iso-steel);
  stroke: var(--iso-line);
  stroke-width: 1;
}
.sx-vig .sx-slat {
  stroke: var(--iso-faint);
  stroke-width: 1;
}
.sx-shutter {
  transform: translateY(var(--open));
}

/* We account for every unit: the tag reads 048 at rest. */
.sx-leader {
  fill: none;
  stroke: var(--iso-faint);
  stroke-width: 1;
}
.sx-tag {
  fill: var(--tone-bg, #ffffff);
  stroke: var(--rv-green);
  stroke-width: 1.2;
}
.sx-odo text {
  fill: currentColor;
  font: 500 13px / 1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.sx-odo-t {
  transform: translateY(-64px);
}
.sx-odo-o {
  transform: translateY(-128px);
}
/* We ship it out of your market: the truck leaves the frame, not the page. */
.sx-vig-truck {
  overflow: hidden;
}

@keyframes sx-v-laser {
  0%,
  8% {
    opacity: 0;
    transform: none;
  }
  12% {
    opacity: 1;
    transform: none;
  }
  34% {
    transform: translate(var(--sx), var(--sy));
  }
  56% {
    opacity: 1;
    transform: none;
  }
  60%,
  100% {
    opacity: 0;
    transform: none;
  }
}
@keyframes sx-v-fan {
  0%,
  8% {
    opacity: 0;
  }
  12%,
  56% {
    opacity: 1;
  }
  60%,
  100% {
    opacity: 0;
  }
}
@keyframes sx-v-ok {
  0%,
  58% {
    opacity: 0;
    transform: scale(0.3);
    animation-timing-function: var(--ease-spring);
  }
  68%,
  90% {
    opacity: 1;
    transform: none;
  }
  97%,
  100% {
    opacity: 0;
    transform: none;
  }
}
@keyframes sx-v-drive {
  0% {
    opacity: 0;
    transform: translate(calc(var(--ux) * 11), calc(var(--uy) * 11));
  }
  8% {
    opacity: 1;
    transform: translate(calc(var(--ux) * 11), calc(var(--uy) * 11));
  }
  30%,
  46% {
    transform: translate(calc(var(--ux) * 3), calc(var(--uy) * 3));
  }
  62%,
  70% {
    transform: none;
  }
  86% {
    opacity: 1;
    transform: translate(calc(var(--ux) * 6), calc(var(--uy) * 6));
  }
  94%,
  100% {
    opacity: 0;
    transform: translate(calc(var(--ux) * 6), calc(var(--uy) * 6));
  }
}
@keyframes sx-v-lift {
  0%,
  30% {
    transform: translateY(50px);
  }
  46%,
  62% {
    transform: none;
  }
  70%,
  86% {
    transform: translateY(5px);
  }
  94%,
  100% {
    transform: translateY(50px);
  }
}
@keyframes sx-v-carry {
  0% {
    opacity: 0;
    transform: translate(calc(var(--ux) * 11), calc(var(--uy) * 11));
  }
  8% {
    opacity: 1;
    transform: translate(calc(var(--ux) * 11), calc(var(--uy) * 11));
  }
  30%,
  46% {
    transform: translate(calc(var(--ux) * 3), calc(var(--uy) * 3));
  }
  62%,
  92% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: none;
  }
}
@keyframes sx-v-raise {
  0%,
  30% {
    transform: translateY(50px);
  }
  46%,
  100% {
    transform: none;
  }
}
/* One turn of film after another, bottom up; then the lot goes at once. */
@keyframes sx-v-turn-0 {
  0%,
  6% {
    opacity: 0;
    transform: translateY(3px);
  }
  14%,
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes sx-v-turn-1 {
  0%,
  22% {
    opacity: 0;
    transform: translateY(3px);
  }
  30%,
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes sx-v-turn-2 {
  0%,
  38% {
    opacity: 0;
    transform: translateY(3px);
  }
  46%,
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes sx-v-turn-3 {
  0%,
  54% {
    opacity: 0;
    transform: translateY(3px);
  }
  62%,
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes sx-v-unwrap {
  0%,
  86% {
    opacity: 1;
  }
  94%,
  100% {
    opacity: 0;
  }
}
@keyframes sx-v-climb {
  0%,
  6% {
    transform: none;
  }
  62%,
  86% {
    transform: translateY(var(--climb));
  }
  100% {
    transform: none;
  }
}
@keyframes sx-v-door {
  0%,
  14% {
    transform: none;
  }
  42%,
  74% {
    transform: translateY(var(--open));
  }
  96%,
  100% {
    transform: none;
  }
}
/* Four cartons a pallet, twelve units a carton: the count follows each. */
@keyframes sx-v-carton-0 {
  0% {
    opacity: 0;
    transform: translateY(-24px);
    animation-timing-function: var(--ease-spring);
  }
  8%,
  88% {
    opacity: 1;
    transform: none;
  }
  96%,
  100% {
    opacity: 0;
    transform: none;
  }
}
@keyframes sx-v-carton-1 {
  0%,
  20% {
    opacity: 0;
    transform: translateY(-24px);
    animation-timing-function: var(--ease-spring);
  }
  28%,
  88% {
    opacity: 1;
    transform: none;
  }
  96%,
  100% {
    opacity: 0;
    transform: none;
  }
}
@keyframes sx-v-carton-2 {
  0%,
  40% {
    opacity: 0;
    transform: translateY(-24px);
    animation-timing-function: var(--ease-spring);
  }
  48%,
  88% {
    opacity: 1;
    transform: none;
  }
  96%,
  100% {
    opacity: 0;
    transform: none;
  }
}
@keyframes sx-v-carton-3 {
  0%,
  60% {
    opacity: 0;
    transform: translateY(-24px);
    animation-timing-function: var(--ease-spring);
  }
  68%,
  88% {
    opacity: 1;
    transform: none;
  }
  96%,
  100% {
    opacity: 0;
    transform: none;
  }
}
@keyframes sx-v-tens {
  0%,
  8% {
    transform: none;
  }
  11%,
  28% {
    transform: translateY(-16px);
  }
  31%,
  48% {
    transform: translateY(-32px);
  }
  51%,
  68% {
    transform: translateY(-48px);
  }
  71%,
  90% {
    transform: translateY(-64px);
  }
  94%,
  100% {
    transform: none;
  }
}
@keyframes sx-v-ones {
  0%,
  8% {
    transform: none;
  }
  11%,
  28% {
    transform: translateY(-32px);
  }
  31%,
  48% {
    transform: translateY(-64px);
  }
  51%,
  68% {
    transform: translateY(-96px);
  }
  71%,
  90% {
    transform: translateY(-128px);
  }
  94%,
  100% {
    transform: none;
  }
}
@keyframes sx-v-truck {
  0% {
    opacity: 0;
    transform: translate(calc(var(--ux) * 6), calc(var(--uy) * 6));
  }
  14% {
    opacity: 1;
    transform: none;
  }
  46% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.55, 0, 0.9, 0.6);
  }
  70% {
    opacity: 1;
  }
  84%,
  100% {
    opacity: 0;
    transform: translate(calc(var(--ux) * 18), calc(var(--uy) * 18));
  }
}
.rv-sx
  .sx-vig
  :is(
    .sx-laser-g,
    .sx-fan,
    .sx-ok,
    .sx-fl,
    .fl-lift,
    .sx-px,
    .sx-pz,
    .sx-turn,
    .sx-turns,
    .sx-carriage,
    .sx-shutter,
    .sx-carton,
    .sx-odo-t,
    .sx-odo-o,
    .sx-go
  ) {
  animation-duration: var(--loop);
  animation-iteration-count: infinite;
  animation-timing-function: var(--ease-in-out);
  animation-fill-mode: both;
  animation-play-state: var(--run);
}
.rv-sx .sx-vig-scan {
  --loop: 4.4s;
}
.rv-sx .sx-vig-scan .sx-laser-g {
  animation-name: sx-v-laser;
}
.rv-sx .sx-vig-scan .sx-fan {
  animation-name: sx-v-fan;
}
.rv-sx .sx-vig-scan .sx-ok {
  animation-name: sx-v-ok;
}
.rv-sx .sx-vig-store {
  --loop: 7s;
}
.rv-sx .sx-vig-store .sx-fl {
  animation-name: sx-v-drive;
}
.rv-sx .sx-vig-store .fl-lift {
  animation-name: sx-v-lift;
}
.rv-sx .sx-vig-store .sx-px {
  animation-name: sx-v-carry;
}
.rv-sx .sx-vig-store .sx-pz {
  animation-name: sx-v-raise;
}
.rv-sx .sx-vig-wrap {
  --loop: 6.4s;
}
.rv-sx .sx-vig-wrap .sx-turn:nth-child(1) {
  animation-name: sx-v-turn-0;
}
.rv-sx .sx-vig-wrap .sx-turn:nth-child(2) {
  animation-name: sx-v-turn-1;
}
.rv-sx .sx-vig-wrap .sx-turn:nth-child(3) {
  animation-name: sx-v-turn-2;
}
.rv-sx .sx-vig-wrap .sx-turn:nth-child(4) {
  animation-name: sx-v-turn-3;
}
.rv-sx .sx-vig-wrap .sx-turns {
  animation-name: sx-v-unwrap;
}
.rv-sx .sx-vig-wrap .sx-carriage {
  animation-name: sx-v-climb;
}
.rv-sx .sx-vig-door {
  --loop: 7s;
}
.rv-sx .sx-vig-door .sx-shutter {
  animation-name: sx-v-door;
}
.rv-sx .sx-vig-count {
  --loop: 6s;
}
.rv-sx .sx-vig-count .sx-carton:nth-child(1) {
  animation-name: sx-v-carton-0;
}
.rv-sx .sx-vig-count .sx-carton:nth-child(2) {
  animation-name: sx-v-carton-1;
}
.rv-sx .sx-vig-count .sx-carton:nth-child(3) {
  animation-name: sx-v-carton-2;
}
.rv-sx .sx-vig-count .sx-carton:nth-child(4) {
  animation-name: sx-v-carton-3;
}
.rv-sx .sx-vig-count .sx-odo-t {
  animation-name: sx-v-tens;
}
.rv-sx .sx-vig-count .sx-odo-o {
  animation-name: sx-v-ones;
}
.rv-sx .sx-vig-truck {
  --loop: 8s;
}
.rv-sx .sx-vig-truck .sx-go {
  animation-name: sx-v-truck;
}

/* ------------------------------------------------------------- export */

.sx-export,
.sx-trust,
.sx-team {
  padding: calc(var(--section-pad) * 0.72) 0;
}
.sx-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px 64px;
  align-items: end;
}
.sx-split .sx-h2 {
  margin-top: var(--space-4);
}
.sx-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-7) clamp(32px, 4vw, 56px);
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
}
/* A document on a hairline, no box. */
.sx-doc {
  padding-top: 24px;
  border-top: var(--hairline) solid var(--rule);
}
.sx-doc-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--accent-text);
}
.sx-doc-icon {
  flex: none;
}
.sx-barcode {
  width: 112px;
  height: 28px;
  color: var(--ink);
  opacity: 0.7;
}
.sx-bar {
  fill: currentColor;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
/* Drawn in once, line by line, left to right: one clean pass, no bounce. */
.rv-sx .sx-bar {
  transition: transform 360ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 140ms + var(--b) * 16ms);
}
.rv-sx [data-barcode]:not(.is-drawn) .sx-bar {
  transform: scaleY(0);
}
.sx-doc-title {
  margin-top: 18px;
  font-size: var(--sx-h3);
  font-weight: 700;
}
.sx-doc-body {
  max-width: var(--sx-measure);
  margin: 10px 0 0;
  color: var(--ink-muted);
}

/* -------------------------------------------------------------- trust */

.sx-trust-h {
  max-width: 900px;
  margin-top: var(--space-4);
}
.sx-trust-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-7);
  margin: var(--space-7) 0 0;
  padding: 0;
  list-style: none;
}
/* Each reason stands on its vignette, the hairline under the drawing. */
.sx-trust-art {
  height: clamp(110px, 11vw, 150px);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: var(--hairline) solid var(--rule);
}
.sx-trust-art .sx-vig {
  width: auto;
  height: 100%;
}
.sx-trust-title {
  font-size: var(--sx-h3);
  font-weight: 700;
}
.sx-trust-body {
  max-width: var(--sx-measure);
  margin: 10px 0 0;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------- team */

.sx-team-title,
.sx-team-lead {
  text-align: center;
}
.sx-team-lead {
  max-width: min(620px, var(--sx-measure));
  margin: 18px auto 0;
  font-size: var(--text-lg);
  color: var(--ink-muted);
}
.sx-people {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.sx-people .person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* Commerce's reps (commerce.css .cm-photo): the round frame is what the
   wipe opens, so the ring and the photo come up from the bottom together,
   and the photo settles from 1.15 inside it (site.css .rv-ph). */
.sx-people .person-figure {
  display: block;
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--tone-alt);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent),
    0 14px 30px -22px rgb(11 13 18 / 55%);
}
.sx-people .person-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.sx-people .person-name {
  margin: 22px 0 var(--space-1);
  font: 600 var(--sx-h3) / 1.15 var(--font-display);
  letter-spacing: var(--tracking-display);
}
.sx-people .person-role {
  margin: 0;
  color: var(--accent-text);
}

/* ------------------------------------------------------------ contact */

/*
 * The way out is Home's soft blurred light, in pale greens: the section
 * keeps the page colour and the wash is painted inside it (site.css,
 * `.wash`: the tints are #04B704 mixed into white in light, into near-black
 * green in dark), with dark ink in light and white in dark. The strong
 * green is only on the primary button.
 */
.sx-contact {
  padding-block: var(--section-pad);
}
.sx-contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px;
  align-items: end;
}
.sx-contact-title {
  font-size: var(--display-md);
  font-weight: 700;
  line-height: 1;
}
.sx-contact-lead {
  max-width: min(560px, var(--sx-measure));
  margin: 20px 0 0;
  font-size: var(--text-lg);
  color: var(--wash-ink-soft);
}
.sx-contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sx-contact .btn {
  padding: 17px 26px;
}
/* The one strong color in the band: white on #037A03 is 5.5:1. */
.sx-btn-solid {
  background: var(--rv-green-text);
  color: #ffffff;
}
.sx-btn-line {
  border-color: var(--wash-ink-soft);
  color: var(--wash-ink);
}
.sx-contact .accent-dot {
  color: var(--wash-dot);
}

/* ------------------------------------------------------------ tracker */

/*
 * The shipment tracking bar. A pill at the foot of the screen on a desktop,
 * a hairline with dots across the top on a phone. Its four nodes (Orchy's
 * outbound statuses) sit evenly along the rail; --tp (0–1) fills it, and a step is checked with `is-done`.
 * Without rv-sx it is the last pose: filled, every step checked.
 */
.sx-trk {
  --trk-pad: 46px;
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: min(620px, calc(100vw - 2 * var(--gutter) - 180px));
  padding: 10px var(--trk-pad) 11px;
  translate: -50% 0;
  border: var(--hairline) solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 14px 34px -18px rgb(7 7 7 / 45%);
  color: var(--ink);
  pointer-events: none;
}
.sx-trk::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, var(--tone-light) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
.sx-trk-rail {
  position: absolute;
  left: var(--trk-pad);
  right: var(--trk-pad);
  top: 19px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--rule);
}
.sx-trk-fill {
  position: absolute;
  inset: 0;
  background: var(--rv-green);
  transform-origin: left center;
  transform: scaleX(var(--tp, 1));
}
.sx-trk-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sx-trk-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 0;
}
.sx-trk-node {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--rv-green);
  box-shadow: 0 0 0 1.5px var(--rv-green);
}
.sx-trk-node .sx-check {
  position: static;
  width: 100%;
  height: 100%;
  padding: 3px;
  background: none;
  box-shadow: none;
}
.sx-trk-label {
  font: 500 10px/1 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-muted);
}
.rv-sx .sx-trk-node {
  transition:
    background-color var(--dur-base),
    box-shadow var(--dur-base),
    transform var(--dur-pop) var(--ease-spring);
}
.rv-sx .sx-trk-step:not(.is-done) .sx-trk-node {
  background: var(--tone-light);
  box-shadow: 0 0 0 1.5px var(--rule);
}
.rv-sx .sx-trk-step:not(.is-done) .sx-check {
  opacity: 0;
  transform: scale(0.2);
}
.rv-sx .sx-trk-step.is-done .sx-trk-node {
  animation: sx-trk-pop var(--dur-pop) var(--ease-spring);
}
@keyframes sx-trk-pop {
  from {
    transform: scale(0.6);
  }
}
.rv-sx .sx-trk-step.is-current .sx-trk-label {
  color: var(--ink);
}
.rv-sx .sx-trk-label {
  transition: color var(--dur-base);
}
/*
 * The bar is only there between the hero and the way out: solutions.js adds
 * `rv-sx-trk` once it can tell, and `is-on` while the reader is past the
 * hero and short of #contact, so it never sits over the hero, the contact
 * band or the footer.
 */
.rv-sx-trk .sx-trk:not(.is-on) {
  opacity: 0;
  transform: translateY(14px);
}
.rv-sx .sx-trk {
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-pop) var(--ease-spring);
}

/* --------------------------------------------------------- responsive */

/* The hero stacks below 1024px; from there up it is two columns. */
@media (max-width: 1023px) {
  .sx-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sx-board {
    --c: clamp(14px, calc((100vw - 2 * var(--gutter) - 345px) / 15), 24px);
  }
  /* --cells cells (board.mjs: destination, code and the status column, as
     wide as the longest status, plus one; 23 in English, 25 in Spanish),
     each with its gap, and what is not cells: the padding, the tag and the
     LED. */
  .sx-board[data-board='ports'] {
    --c: clamp(
      12px,
      calc((100vw - 2 * var(--gutter) - 151px) / var(--cells, 23) - var(--gap)),
      22px
    );
  }
}

@media (max-width: 1100px) {
  .sx-people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .rv-sx-pin .sx-flow-track {
    height: 240vh;
  }
  .rv-sx-pin .sx-flow-stage {
    padding-top: 72px;
    align-items: start;
  }
  .rv-sx-pin .sx-flow-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'head' 'art' 'steps';
    row-gap: 14px;
  }
  .rv-sx-pin .sx-flow-title {
    font-size: clamp(24px, 6.4vw, 32px);
  }
  .rv-sx-pin .sx-art {
    max-height: 38vh;
  }
  /* One step at a time: titles and numbers stack and cross-fade too. */
  .rv-sx-pin .sx-step-num,
  .rv-sx-pin .sx-step-title {
    grid-row: 1;
    opacity: var(--a);
    transition: opacity var(--dur-base) var(--ease-out);
  }
  .rv-sx-pin .sx-step-body {
    grid-row: 2;
    margin-top: 4px;
    font-size: var(--text-md);
  }
  /* Lighter on a phone: the stage keeps the scene and the words. */
  .rv-sx-pin .sx-step-vig {
    display: none;
  }
}

@media (max-width: 640px) {
  /* Three rows, and the steps board's status down to its LED: no room for
     the words. */
  .sx-board {
    --c: clamp(12px, calc((100vw - 2 * var(--gutter) - 84px) / 15 - 2px), 24px);
    padding: 16px;
  }
  .sx-row {
    column-gap: 12px;
  }
  .sx-row:nth-child(n + 4) {
    display: none;
  }
  .sx-row:nth-child(3) {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .sx-status {
    min-width: 0;
  }
  .sx-status-text {
    display: none;
  }
  /* The phone board (live board only; the steps board keeps the rules
     above). Centred and full width: the stats above it stack and centre,
     and each load is a stacked row — order, destination and code, source,
     then its status in a pill tinted with the load's colour (--st, the
     status colours above the responsive block). The headline and its
     paragraph centre with them, so the whole hero is on one axis. */
  .sx-hero-copy {
    text-align: center;
  }
  .sx-hero-lead {
    margin-inline: auto;
  }
  .sx-hero-facts {
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    max-width: none;
    text-align: center;
  }
  .sx-board[data-board='ports'] {
    --pad: 18px;
    /* 15 cells (destination, the blank one, code) plus the gaps between. */
    --c: clamp(
      12px,
      calc((100vw - 2 * var(--gutter) - 2 * var(--pad) - 2px - 28px) / 15),
      24px
    );
    --cs: calc(var(--c) * 0.8);
    width: 100%;
    max-width: 440px;
    padding: 24px var(--pad) 20px;
    border-color: rgb(255 255 255 / 9%);
  }
  .sx-board[data-board='ports'] .sx-board-head {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 4px;
  }
  .sx-board[data-board='ports'] .sx-board-mark {
    width: 32px;
  }
  .sx-board[data-board='ports'] .sx-board-rows {
    gap: 0;
  }
  .sx-board[data-board='ports'] .sx-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid rgb(255 255 255 / 7%);
    text-align: center;
  }
  .sx-board[data-board='ports'] .sx-row:nth-child(3) {
    padding-bottom: 4px;
    border-bottom: 0;
  }
  .sx-board[data-board='ports'] .sx-row:nth-child(n + 4),
  .sx-board[data-board='ports'] .sx-row.sx-queued {
    display: none;
  }
  .sx-board[data-board='ports'] .sx-place {
    justify-items: center;
    gap: 10px;
  }
  .sx-board[data-board='ports'] .sx-flaps {
    justify-content: center;
  }
  /* Only the cells that carry the word: --vis (solutions.js keeps it to the
     word's length as it flips; --n is the same at build, so the board is
     trimmed without JS too). The rest of the run is clipped, which leaves
     the field as wide as its word and the row free to centre it. */
  .sx-board[data-board='ports'] .sx-field {
    width: calc(
      var(--vis, var(--n, var(--w))) * (var(--c) + var(--gap)) - var(--gap)
    );
  }
  .sx-board[data-board='ports'] :is(.sx-src, .sx-tag) {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #9aa3ab;
  }
  .sx-board[data-board='ports'] .sx-src {
    white-space: normal;
  }
  /* The status flaps step down to 80% of the destination's. --tile-h and
     --drop are derived from --c on the board, so they are redone here. */
  .sx-board[data-board='ports'] .sx-state {
    --c: var(--cs);
    --tile-h: calc(var(--cs) * 1.44);
    --drop: calc(var(--cs) * 0.07);
    justify-content: center;
    gap: 10px;
    padding: 8px 16px 8px 14px;
    border: 1px solid color-mix(in srgb, var(--st) 40%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--st) 12%, #0a0b0c);
    transition:
      background-color 600ms var(--ease-out),
      border-color 600ms var(--ease-out);
  }
  .sx-board[data-board='ports'] .sx-row .sx-state .sx-led {
    width: 8px;
    height: 8px;
  }
  .sx-pal-extra {
    display: none;
  }
  /* A lighter drawing on a phone, since it repaints with the scroll: no
     masked yard grid, no blurred stamp shadow, no dock rollers. */
  .sx-ground,
  .sx-stamp-shadow,
  .sx-art .sx-roller {
    display: none;
  }
  .rv-sx-pin
    .sx-flow-track.is-active
    :is(.sx-step-num, .sx-step-title, .sx-step-body) {
    will-change: opacity, transform;
  }
  .rv-sx-pin .sx-pal {
    animation-delay: calc((var(--im) * 0.25 - var(--pa, 1) * 1.5) * 1s);
  }
  .rv-sx-pin .sx-pal-roll {
    animation-delay: calc((var(--im) * 0.25 - var(--pi, 1) * 1.5) * 1s);
  }
  .sx-people {
    gap: 32px 16px;
  }
  .sx-people .person-name {
    font-size: 19px;
  }

  /* The tracker becomes a hairline across the top of the screen. */
  .sx-trk {
    --trk-pad: 10px;
    top: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 8px;
    padding: 0 var(--trk-pad);
    translate: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .sx-trk::before {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .rv-sx-trk .sx-trk:not(.is-on) {
    transform: translateY(-8px);
  }
  .sx-trk-rail {
    top: 3px;
  }
  .sx-trk-steps {
    height: 100%;
    align-items: center;
  }
  .sx-trk-node {
    width: 8px;
    height: 8px;
  }
  .sx-trk-node .sx-check,
  .sx-trk-label {
    display: none;
  }
}
