/* v5 use case pages, /use-cases/<slug>/ (Rounds 10 and 11, user, 9 Nov; 15 Nov): "How it works" as one drawing in
   three states, one for each step, then the clients in practice. Loaded by ucpage5.mjs on top of v5.css and
   v5-pages.css; behaviour in v5-uc.js. */

/* ── how it works: the three steps on the left, the drawing on the right, no rules between them. The steps stand close
   together, one short list read at once, centred beside the drawing (user, 15 Nov: "keep the titles close to each
   other like they were before"). On wide screens the two are held in view while the page runs on (.uc-run), about a
   screen of scroll for each step; elsewhere each step carries its own part of the drawing under it. ── */
.uc-pin { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px 64px; align-items: center; }
.uc-ss { display: grid; gap: 52px; margin: 0; padding: 0; list-style: none; }
.uc-s { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: baseline; transition: opacity .6s var(--ease); }
.uc-s-n { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--ink3); transition: color .4s; }
.uc-s-h { font: 500 var(--h5-sm)/1.1 var(--head); letter-spacing: -.03em; }
.uc-s-p { margin-top: 14px; max-width: 29em; font-size: 16px; line-height: 1.6; color: var(--ink2); text-wrap: pretty; }
/* under 02, x-arc core's three steps as three short lines, each led by its word in mono lower case, the words the
   drawing's three rows carry (round 4, user, 15 Nov: "the things we show in the use-cases within x-arc core should
   match the flow of the story") */
.uc-s-ls { display: grid; gap: 8px; max-width: 29em; margin: 14px 0 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.6; color: var(--ink2); text-wrap: pretty; }
/* the step's word: the drawing's row head run into the line (its 6px mint square, then the word in mono), at the
   text's size and weight (user, 17 Nov) */
.uc-s-w { margin-right: 6px; font: 400 1em/1 var(--mono); letter-spacing: 0; color: var(--ink); white-space: nowrap; }
/* the square hangs in the gutter (as a list's marker does), centred on the x-height (.53em in both faces), so the
   words keep the heading's left edge and a wrapped line never runs under it */
.uc-s-w::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 9px 0 -15px; vertical-align: calc(.265em - 3px); background: var(--ma); }
.uc-pt { display: none; grid-column: 1 / -1; min-width: 0; margin: 36px 0 0; }
.uc-cf { min-width: 0; margin: 0; }
.uc-cf .ux { max-height: calc(100svh - 61px - 72px); }

/* held: the run is the scroll the three states take, about a screen each (v5-uc.js reads where the page is in it and
   sets the state, data-s, 0 to 3). Until the script has set one the drawing waits empty; steps not yet reached are
   quiet, and the number of the one the drawing shows is mint. */
@media (min-width: 901px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  .js .uc-run:not(.flat) { height: calc(100svh - 61px + 180svh); }
  .js .uc-run:not(.flat) .uc-pin { position: sticky; top: 61px; height: calc(100svh - 61px); padding-block: 36px; }
  .js .uc-run:not(.flat) .uc-cf { --t: 0; }
  .js .uc-run[data-s] .uc-s:not(.on) { opacity: .26; }
  .js .uc-s.cur .uc-s-n { color: var(--m); }
}
/* not held: the steps one under the other, each with its part of the drawing; so too in a window where the steps
   would not stand beside the drawing between the header and the fold, or the drawing's lettering would fall under
   9px (v5-uc.js measures it and sets flat) */
/* There the drawing stays one drawing (user, 18 Nov, on a phone: "having non-connected components like that doesn't
   look the cleanest"). The three steps' words come first, as they stand in a column of their own on a wide screen;
   then the three parts of the drawing, one under the other with nothing between them, so the line that leaves one is
   the line that enters the next (ucfigs5.mjs runs each to its picture's edge). A step gives up its own box for this
   (display: contents), so its number, its words and its part are all placed by the list: the parts are sent after
   every step's words (order), in their own order. Until then each part stood under its own step's words, and its
   lines ended in the air above the next step's text. */
@media (max-width: 900px), (max-height: 699px) {
  .uc-pin { grid-template-columns: minmax(0, 1fr); }
  .uc-cf { display: none; }
  .uc-ss { grid-template-columns: 44px minmax(0, 1fr); gap: 0; align-items: baseline; }
  .uc-s { display: contents; }
  .uc-s-n, .uc-s-b { margin-bottom: 48px; }
  .uc-pt { display: block; order: 1; justify-self: center; width: 100%; max-width: 440px; margin: 0; }
  .uc-pt.p1 { margin-top: 8px; }
}
.uc-run.flat .uc-pin { grid-template-columns: minmax(0, 1fr); }
.uc-run.flat .uc-cf { display: none; }
.uc-run.flat .uc-ss { grid-template-columns: 44px minmax(0, 1fr); gap: 0; align-items: baseline; }
.uc-run.flat .uc-s { display: contents; }
.uc-run.flat :is(.uc-s-n, .uc-s-b) { margin-bottom: 48px; }
.uc-run.flat .uc-pt { display: block; order: 1; justify-self: center; width: 100%; max-width: 440px; margin: 0; }
.uc-run.flat .uc-pt.p1 { margin-top: 8px; }

/* ── the drawing's timeline. --t runs from 0 to 3, a unit a state, and never follows the scroll: on wide screens the
   step that lights runs its unit in a short timed build (v5-uc.js); on phones each step's part runs its own unit when
   it comes into view. Every element of the drawing carries its stretch of the timeline (--a, its start, and --i, one
   over its length) and is drawn or shown by how far t has come through it (--k, 0 to 1). Without the script the
   drawing stands whole, as --t starts at 3. ── */
@property --t { syntax: '<number>'; inherits: true; initial-value: 3; }
.ux :is(.u-o, .u-l, .u-lm) { --k: clamp(0, (var(--t) - var(--a, 0)) * var(--i, 1), 1); }
.ux .u-o { opacity: var(--k); }
.ux :is(.u-l, .u-lm) { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--k)); }
.ux .u-gw { transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(var(--k)); }   /* a bar that grows as it appears */
/* phones: a part waits at the start of its unit, then builds in well under a second, easing out as v5-uc.js does */
.js .uc-pt.p1 { --t: 0; }
.js .uc-pt.p2 { --t: 1; }
.js .uc-pt.p3 { --t: 2; }
.js .uc-pt.in { transition: --t var(--bd, .7s) cubic-bezier(.33, .66, .5, 1) .1s; }
.js .uc-pt.p1.in { --t: 1; --bd: .6s; }
.js .uc-pt.p2.in { --t: 2; --bd: .95s; }
.js .uc-pt.p3.in { --t: 3; --bd: .7s; }

/* ── the drawing: every class carries the u- prefix, so no rule written for another part of the site reaches it.
   The article figures' conventions (figures/releases-airlock/01.html): hairline boxes in --ln3, grey arrows at 1.5,
   mono captions; icons at 24 and 1.5 for the inputs and outputs only; x-arc core's boundary in mint dots, and mint only
   for x-arc core, its work and the decisive point of each mechanism. ── */
.ux { display: block; width: 100%; height: auto; overflow: visible; }
.ux .u-l { fill: none; stroke: var(--ink3); stroke-width: 1.5; stroke-linecap: butt; stroke-linejoin: round; }
.ux .u-l.u-f { stroke: var(--ln3); stroke-width: 1.25; }
.ux .u-l.u-n { stroke: var(--ink2); stroke-width: 1.5; }
.ux .u-l.u-m { stroke: var(--ma); }
.ux .u-l.u-gt { stroke-width: 2.5; }
.ux .u-l.u-r { stroke: var(--ln3); }
.ux .u-lm { fill: none; stroke: #fff; stroke-width: 10; }   /* the sweep that draws x-arc core's boundary, in its mask */
.ux .u-ah { fill: var(--ink3); }
.ux .u-ah.u-m { fill: var(--ma); }
.ux .u-i { fill: none; stroke: var(--ink2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* a tile's own frame and the lock's, not the rects inside an icon */
.ux :is(.u-tl, .u-lk) > rect { fill: var(--bg); stroke: var(--ln3); stroke-width: 1.5; }
.ux .u-lk .u-i { stroke-width: 2.6; }
.ux .u-lb { font: 400 13px var(--sans); letter-spacing: -.01em; fill: var(--ink2); }
.ux .u-cp { font: 400 11px var(--mono); letter-spacing: .5px; fill: var(--ink3); }
.ux .u-cp.u-m { fill: var(--m); }
.ux .u-bx { fill: none; stroke: var(--ln3); stroke-width: 1.25; }
.ux .u-bx.u-nw { fill: rgba(var(--ma-rgb), .16); stroke: var(--ma); }
.ux .u-bar { fill: rgba(var(--fg-rgb), .04); stroke: var(--ln3); stroke-width: 1.25; }
.ux .u-bar.u-on { fill: rgba(var(--fg-rgb), .16); stroke: var(--ink2); }
.ux .u-sg { fill: rgba(var(--fg-rgb), .14); stroke: var(--ink3); stroke-width: 1; }
.ux .u-hl { fill: rgba(var(--fg-rgb), .08); }
.ux .u-nw2 { fill: rgba(var(--ma-rgb), .3); }
.ux .u-kn { fill: rgba(var(--fg-rgb), .06); stroke: var(--ln3); stroke-width: 1.25; }
.ux .u-bx.u-dsh { stroke-dasharray: 3 2.5; }   /* what the model decides (a proposed change), as the platform story dashes it */
.ux .u-tx { fill: none; stroke: var(--ink2); stroke-width: 2.5; stroke-linecap: round; }
.ux .u-nd { fill: var(--ink3); }
.ux .u-nd.u-m, .ux .u-nd.u-ct, .ux .u-nd.u-cc { fill: var(--ma); }
/* x-arc core: the boundary, its mark and name, and its work on its edge */
.ux .u-cb { fill: none; stroke: var(--ma); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0 7; }
.ux .u-bk { fill: var(--bg); }
.ux .u-mk { fill: var(--ma); }
.ux .u-ln { font: 500 12.5px var(--mono); letter-spacing: .8px; fill: var(--m); }
.ux .u-wk { font: 400 11.5px var(--mono); letter-spacing: .6px; fill: var(--m); }
.ux .u-cw { fill: var(--ma); }
.ux .u-gt { fill: none; stroke: var(--ma); stroke-width: 3; }
/* x-arc core's three steps: the hairline that parts two rows; maintain's gates as the platform story draws them (the
   iteration and the versions in rounded boxes, the gate solid, its check mint, the newest version outlined in mint);
   a rule, and the person it names */
.ux .u-l.u-dv { stroke: var(--ln2); stroke-width: 1; }
.ux .u-zh { font: 500 11.5px var(--mono); letter-spacing: .6px; fill: var(--ink2); }   /* a row's word, as the story labels its panels */
.ux :is(.u-it, .u-ch) { fill: rgba(var(--fg-rgb), .04); stroke: var(--ln3); stroke-width: 1.25; }
.ux .u-ch.u-new { stroke: var(--ma); stroke-width: 1.5; }
.ux .u-pr { fill: none; stroke: var(--ln3); stroke-width: 1.25; }
.ux .u-l.u-ga { stroke: var(--ink2); stroke-width: 1.5; }
.ux .u-ck { fill: none; stroke: var(--ma); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ux .u-cp.u-cv { fill: var(--ink2); }
.ux .u-pg { fill: none; stroke: var(--ink2); stroke-width: 1.2; }

/* ── in practice: a card per client (user, 15 Nov: "these should be cards, the way they were before was good, it's
   just that the logos and card container were taking a lot of space"), drawn as the release and deployment cards are:
   a hairline box with 10px corners on the page, no fill, as tall as its words need. The logo is small and in the
   page's ink, a signature over the words rather than a banner; then what the system does for that business, how the
   use case works there and, where the client has a deployment page, the way to it, the whole card opening it. Two sit
   side by side; one keeps a card's width rather than running across the frame. On hover the surface rises as the
   release cards' does and the arrow moves. ── */
.uc-ks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.uc-k { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 28px 28px 30px; border: 1px solid var(--ln); border-radius: 10px; transition: border-color .25s, background .25s; }
/* the reveal on entry keeps its own timing, and the hover its own */
.js .uc-k.up { transition: opacity .9s var(--ease), transform .9s var(--ease), border-color .25s, background .25s; transition-delay: var(--dl, 0ms), var(--dl, 0ms), 0s, 0s; }
.uc-k.go:hover { border-color: var(--ln3); background: var(--bg1); }
/* the logo on a line of its own, as tall on every card, so two titles side by side start level; each mark at the
   optical size the hero's logo strip gives it */
.uc-k-lg { display: flex; align-items: center; height: 34px; }
.uc-k-lg img { width: auto; max-width: 100%; filter: var(--logo); opacity: .82; }
.uc-k-lg .lg-titan-network { height: 20px; }
.uc-k-lg .lg-w-harris-consulting { height: 25px; }
.uc-k-lg .lg-luxfolio { height: 13px; }
.uc-k-lg .lg-aspire-people { height: 27px; }
.uc-k-lg .lg-verified-electronics { height: 34px; }
.uc-k-h { margin-top: 28px; max-width: 22em; font: 500 var(--h5-sm)/1.15 var(--head); letter-spacing: -.03em; text-wrap: balance; }
/* the line takes the card's spare height, so the way to the deployment sits at the foot of both cards */
.uc-k-p { flex-grow: 1; margin-top: 12px; max-width: 34em; font-size: 16px; line-height: 1.6; color: var(--ink2); text-wrap: pretty; }
.uc-k-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding-bottom: 3px; border-bottom: 1px solid var(--ln3); font: 500 14px/1 var(--sans); color: var(--ink); white-space: nowrap; transition: border-color .2s; }
.uc-k-go::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }   /* the whole card opens the deployment */
.uc-k-go .ic { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.uc-k.go:hover .uc-k-go { border-color: var(--ink); }
.uc-k.go:hover .uc-k-go .ic { transform: translateX(3px); }
.uc-k-go:focus-visible { outline: 0; }
.uc-k:has(.uc-k-go:focus-visible) { outline: 2px solid var(--m); outline-offset: 2px; }

/* ── smaller screens ── */
@media (max-width: 900px) {
  .uc-ks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .uc-ss, .uc-run.flat .uc-ss { grid-template-columns: 36px minmax(0, 1fr); }
  .uc-s-n, .uc-s-b, .uc-run.flat :is(.uc-s-n, .uc-s-b) { margin-bottom: 40px; }
  .uc-ks { gap: 12px; }
  .uc-k { padding: 22px 20px 24px; }
  .uc-k-h { margin-top: 22px; }
  .uc-k-p { font-size: 15px; }
  .uc-k-go { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .uc-cf, .uc-pt { --t: 3 !important; transition: none !important; }
  .uc-s, .uc-s-n, .uc-k, .js .uc-k.up, .uc-k-go, .uc-k-go .ic { transition: none !important; }
}
