/*
 * The use-case journeys in the industry pages' window — public/js/journey.js.
 *
 * Concept screens, not an app: the invitation, then Select, Connect and Share
 * in the Build with MiTrust window's style (public/css/industry.css holds the
 * stepper, the data card, the badges and the round button they share), then
 * the ending. Sized in the window's --u, one 413th of its width.
 */
@keyframes mtj-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes mtj-row { from { opacity: 0; transform: translateY(5px); } }
@keyframes mtj-fill { from { transform: scaleX(0); } }
@keyframes mtj-pop { from { opacity: 0; transform: scale(.6); } }

.mtj { position: absolute; inset: 0; }
.mtj-screen {
  --navy: #09215F;
  position: absolute; inset: 0;
  text-align: center;
  animation: mtj-in .45s var(--ease) both;
}
.mtj button { font-family: inherit; padding: 0; cursor: pointer; }
.mtj .mt-uc-share, .mtj-again { border: 0; }

/* The invitation reuses the still screen's art, line and button. */
.mtj .mt-uc-cta { transition: transform .2s var(--ease), box-shadow .2s; }
.mtj .mt-uc-cta.is-hint { transform: translateX(-50%) scale(.96); }

/* The stepper: done and current in black, what is still to come in grey. */
.mtj .mt-uc-steps li.is-on, .mtj .mt-uc-steps li.is-done { color: #000; }
.mtj .mt-uc-steps li.is-done + li::before { background: var(--navy); }

.mtj-kicker {
  margin: calc(30 * var(--u)) 0 0;
  color: #858585; font-size: calc(12 * var(--u)); font-weight: 500; letter-spacing: -.01em;
}
.mtj .mt-uc-data li { animation: mtj-row .4s var(--ease) both; animation-delay: calc(.12s + var(--i, 0) * .12s); }
/* Select: the heading sits over the card, as on Build with MiTrust. */
.mtj-title { width: calc(303 * var(--u)); margin-left: auto; margin-right: auto; text-align: left; }
.mtj-asked { margin-top: calc(10 * var(--u)) !important; }
.mtj .mtj-ph {
  width: calc(var(--len) * 7.6 * var(--u)); height: calc(9 * var(--u));
  margin-top: calc(7 * var(--u)) !important;
  border-radius: 99px; background: #EDEDF0;
}
/* Select: a ticked box rather than a bare check — the user picks. */
.mtj-box {
  display: grid; place-items: center; flex-shrink: 0;
  width: calc(15 * var(--u)); height: calc(15 * var(--u)); margin-top: calc(3 * var(--u));
  border-radius: calc(4 * var(--u));
  background: var(--navy); color: #fff;
}
.mtj .mtj-box svg { width: 72%; height: 72%; margin: 0; color: #fff; }

/* Select: the data providers, one picked (Martin, 3 November) — a glyph in a
   ring, the name over what it holds, a chevron. */
.mtj-pick li { align-items: center; gap: calc(11 * var(--u)); margin: 0 calc(-12 * var(--u)); padding-left: calc(12 * var(--u)); padding-right: calc(12 * var(--u)); }
.mtj-pick li:first-child { border-radius: calc(9 * var(--u)) calc(9 * var(--u)) 0 0; }
.mtj-pick li:last-child { border-radius: 0 0 calc(9 * var(--u)) calc(9 * var(--u)); }
.mtj-pick li.is-on { background: #F3F5FA; }
.mtj-pick-i {
  display: grid; place-items: center; flex-shrink: 0;
  width: calc(34 * var(--u)); height: calc(34 * var(--u));
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #E8E8EA;
  color: var(--navy);
}
.mtj-pick li.is-on .mtj-pick-i { background: var(--navy); box-shadow: none; color: #fff; }
.mt-uc-data .mtj-pick-i svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); margin: 0; color: currentColor; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mtj-pick li > span:nth-child(2) { flex: 1; min-width: 0; }
.mt-uc-data .mtj-pick-go { width: calc(14 * var(--u)); height: calc(14 * var(--u)); margin: 0; color: #A4A4A7; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mtj-pick li.is-on .mtj-pick-go { color: var(--navy); }

/* The round button: a real button now, with the auto-play's press. */
.mtj .mt-uc-share { transition: transform .2s var(--ease); }
.mtj .mt-uc-share i { transition: transform .35s var(--ease); }
.mtj .mt-uc-share.is-hint i { transform: translateX(calc(8 * var(--u))); }
.mtj .mt-uc-share:hover i { transform: translateX(calc(4 * var(--u))); }

/* Connect: the one source, connecting, then connected. */
.mtj-source {
  display: flex; flex-direction: column; align-items: center;
  width: calc(303 * var(--u));
  margin: calc(40 * var(--u)) auto 0; padding: calc(30 * var(--u)) calc(20 * var(--u)) calc(24 * var(--u));
  border: 1px solid #E8E8EA; border-radius: calc(10 * var(--u));
}
.mtj-icons { display: flex; justify-content: center; }
.mtj-icons img, .mtj-icons.is-glyph {
  display: grid; place-items: center;
  width: calc(52 * var(--u)); height: calc(52 * var(--u));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #E8E8EA, 0 calc(6 * var(--u)) calc(16 * var(--u)) rgba(9, 33, 95, .08);
  object-fit: contain; padding: calc(9 * var(--u));
}
.mtj-icons img + img { margin-left: calc(-14 * var(--u)); }
.mtj-icons.is-glyph { color: var(--navy); }
.mtj-icons.is-glyph svg { width: calc(26 * var(--u)); height: calc(26 * var(--u)); }
.mtj-source b {
  margin-top: calc(16 * var(--u));
  font-size: calc(15.8 * var(--u)); font-weight: 500; line-height: calc(20 * var(--u)); color: #2B2C30;
}
.mtj-source small {
  margin-top: calc(3 * var(--u));
  font: 400 calc(12 * var(--u)) / 1.4 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #858585;
}
.mtj-bar {
  position: relative; display: block; overflow: hidden;
  width: calc(180 * var(--u)); height: calc(3 * var(--u)); margin-top: calc(24 * var(--u));
  border-radius: 99px; background: #EDEDF0;
}
.mtj-bar i { position: absolute; inset: 0; background: var(--navy); transform-origin: left; animation: mtj-fill 1.5s var(--ease) both; }
.mtj-status {
  position: relative; height: calc(18 * var(--u)); margin: calc(12 * var(--u)) 0 0;
  font-size: calc(12.5 * var(--u)); font-weight: 500;
}
.mtj-status > span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; transition: opacity .25s; }
.mtj-wait { color: #858585; }
.mtj-ok { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); color: var(--navy); opacity: 0; }
.mtj-ok svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.is-connected .mtj-wait { opacity: 0; }
.is-connected .mtj-ok { opacity: 1; }
.mtj-note {
  display: flex; justify-content: center; align-items: center; gap: calc(5 * var(--u));
  margin: calc(22 * var(--u)) 0 0;
  color: rgba(57, 59, 70, .6); font-size: calc(10.5 * var(--u)); font-weight: 500;
}
.mtj-note svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }

/* The ending */
.mtj-seal {
  display: grid; place-items: center;
  width: calc(64 * var(--u)); height: calc(64 * var(--u)); margin: calc(96 * var(--u)) auto 0;
  border-radius: 50%; background: var(--navy); color: #fff;
  animation: mtj-pop .5s .1s var(--ease) both;
}
.mtj-seal svg { width: calc(30 * var(--u)); height: calc(30 * var(--u)); }
.mtj-seal + .mtj-kicker { margin-top: calc(22 * var(--u)); }
.mtj-done {
  width: calc(280 * var(--u)); margin: calc(8 * var(--u)) auto 0;
  font-size: calc(18.2 * var(--u)); font-weight: 500; line-height: calc(23.4 * var(--u)); letter-spacing: -.023em;
}
.mtj-again {
  position: absolute; left: 0; right: 0; bottom: calc(78 * var(--u));
  margin: 0 auto; padding: 0; background: none;
  color: #A4A4A7; font-size: calc(12 * var(--u)); font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
}
.mtj-again:hover { color: var(--navy); }
.mtj-built { position: absolute; left: 0; right: 0; bottom: calc(14 * var(--u)); margin: 0 auto; width: calc(118 * var(--u)); height: auto; }

@media (prefers-reduced-motion: reduce) {
  .mtj-screen, .mtj .mt-uc-data li, .mtj-bar i, .mtj-seal { animation: none; }
}
