
/* ===== Matt's page reshuffle, 15 October (reshuffle.py) ===== */

/* 10. THE SECTOR GRID'S CHEVRONS, ON THE RIGHT, TRAVELLING LEFT.
   Matt: "the chevrons are in the wrong place they can be on the right,
   sliding left like home page."

   The run is left aligned and travels RIGHT, from --cx:-120px to 40px,
   driven by svcpage's own scroll handler. Rather than add a second
   handler that would fight it, the band is right aligned and the sign of
   the handler's own number is flipped: -120 to 40 becomes 120 to -40, so
   the run starts outside the right edge and arrives travelling left.
   One rule, no second script, and if the handler's numbers ever change
   this follows them. */
/* AND IT IS justify-content, NOT text-align. The first version set
   text-align:right on the band, which measured as applied and moved
   nothing: .svc-chev is display:flex and fills the 1332px wrap, so its
   chevrons are packed by justify-content and text-align has no say. */
html body .chev-band-svc{text-align:right !important;}
/* AND IT COMES TO REST ON THE EDGE, NOT NEAR IT. Matt, 15 October: "this
   chevron is still off the edge instead of anchored to the edge, can also
   be a longer slide to look smoother."

   Both are the same number. svcpage's handler eases --cx from -120 to 40
   and the first version of this rule simply negated it, so the run
   finished at -40: forty pixels short of the grid, which is what Matt is
   looking at, and 160px of travel to get there.

   Mapping it instead of negating it fixes both at once and still rides
   the handler's own easing, so there is no second script to drift out of
   step. (40px - cx) is 160 at the start and 0 at the end, which is
   already the right shape: it rests exactly on the grid's right edge. The
   1.75 multiplier is the longer slide, 280px against 160. The run starts
   outside the window and arrives on the edge. */
html body .chev-band-svc .svc-chev{justify-content:flex-end;
  transform:translate3d(calc((40px - var(--cx,-120px)) * 1.75),0,0);}
/* and nothing of it is allowed to widen the page on the way in.
   ACROSS ONLY. The band is 24px tall and carries a 180px glow hung at
   top:-90px, so it is drawn to straddle the join: half of it belongs to
   the band above, half to the tier below, and that straddle is the only
   soft thing at that edge. Clipping both ways to stop the chevrons
   widening the page cut the top half of it off, which left the glow
   painting below the join and nothing above it, and that is the step
   Matt could see. overflow-x clips the slide, overflow-y stays visible
   so the glow keeps both halves. */
html body .chev-band-svc{overflow-x:clip;overflow-y:visible;}
/* AND A SCROLL OVER'S PAINTED EDGE IS ITS BOX EDGE. Matt, 16 October:
   "just need the chevron anchored to the top of the scroll up tier."

   Measured, the run already IS anchored to the tier: chevron box top and
   section box top are the same pixel at every scroll position, at both
   of Matt's window widths. What is not anchored is the GROUND. .wy-bg
   drifts up out of its own box as you scroll, so at the moment of his
   screenshot the mesh was painting from 230px above the section, and the
   run was sitting 230px inside a panel that looked like it started well
   above it.

   So the panel is clipped to its own box. That is the same rule Matt
   gave for the edge itself, "the scroll overs are always hard edged":
   a hard edge means the paint stops where the box stops, and once it
   does, the run is on the edge because the edge is where the run is.
   The drift still runs, it just moves the composition around inside the
   box now instead of hanging out of the top of it.

   clip, not hidden: hidden on a section turns everything sticky inside
   it into something that is not, and this page has the scroll-overs.

   All four tiers, not just the one with a run on it. Three of them have
   nothing up there to give the softness away, which is exactly how this
   went unnoticed on home for months. */
html body #industries,html body #proof,
html body #sectors,html body #hub{overflow:clip;}

/* THE MESH KEEPS ITS OWN HARD TOP, and I should never have touched it.

   I gave every tier on this page 180px of faded headroom to soften the
   mesh's top edge, having decided that edge was the line Matt could see.
   It was not. Matt: "The scroll overs are always hard edged - what's
   this fade / graded edge??"

   A scroll over's top edge is hard BY DESIGN. The panel rides up over
   the tier beneath it and the edge is the whole mechanism. Fading it
   does not fix a join, it removes the effect. Reverted in full: the
   headroom, the mask, the background offsets, all of it.

   The thing Matt was actually pointing at is in polish.py, and was also
   mine: a 180px full width glow behind the chevron run. */

/* AND THE TIER UNDERNEATH KEEPS ITS OWN GROUND. Matt, 15 October:
   "Can you see the line is till there? ... The bg are a bit linear ...
   some things are just off."

   All three were one thing, and the thing was mine. I had put
   overflow:clip on this section to stop the mesh drifting up away from
   the chevrons. Home does not clip it, and the drift is the whole
   point: .wy-bg is 776px of radial mesh that translates up to 137px out
   of its own box, and on home that overspill lands in the band above
   and is the ONLY thing softening the join. Penning it inside the box
   gave the mesh a hard top edge AND concentrated every blob inside one
   band, which is the heavy flat wash Matt was calling linear.

   I then spent two rounds painting veils over the edge the clip had
   made. Both came off. A/B'd side by side at 1840: with the clip gone
   there is no join to soften, because the ground is continuous.

   The chevrons are fine without it. They were only ever stranded
   because the clip gave the tier a visible edge for them to be stranded
   FROM. With nothing drawing that edge there is nothing to measure them
   against, which is exactly how home gets away with the same drift. */

/* 9. IN OUR OWN WORDS. NO GROUND AT ALL, AND THAT WAS MY MISREADING.
   Matt's note on the artboard was "let's do the 'can do people'
   background from home page here", and I read "background" as the navy
   gradient card the page closes on, so this block painted a 165deg
   gradient, a radial aqua glow and a 32px radius behind the two columns.

   It is the other thing on home with CAN DO PEOPLE in it: the outline
   type behind the words band, which ghosttype.py draws. Matt, 15 October,
   with a screenshot of the panel: "This section to be same as home page
   and become a 'standard' block for re-use - does not have a bg box -
   just the 'can do people' text."

   So the panel goes and nothing replaces it. Home's words band sits
   straight on the page ground with the outline type behind it, and that
   is now what this one does: same markup, same sheet, same script, which
   is what makes it a block rather than a one-off. ghosttype.OWNW_PAGES is
   the list, and adding a vertical to it is the whole job. */

/* 7b. AND THE TEST HEADING GETS THE ROOM ITS SECOND LINE NEEDS.
   .sec-head is capped at 760px by the base sheet, which is right: it
   is the measure a standfirst reads at. This .sec-head has no
   standfirst in it, because Matt had the two lines under this heading
   removed on 15 October ("Remove these 2 lines"), so the cap is holding
   a width for a paragraph that is not there.

   Measured at 1840 with the heading's own face, size and tracking:
   "documented for traceability" sets 787px wide against the 760 cap, so
   it wrapped and the heading went from two lines to three at every
   width from 1440 up. "documented for shipping", which it replaces, was
   666 and fitted. 820 gives it 33px of headroom, and the :has() keeps
   the widening to this one heading rather than every .sec-head on the
   site, most of which do still have a paragraph under them. */
html body .sec-head:has(> h2.t-wide){max-width:820px;}

/* 12. THE RELATED CARDS' OWN SHEET went with them to
   relatedtiles.py on 17 October, because the block did. What is left in
   this module is only what is particular to the harness page. */

/* 4. THE CERTIFICATIONS BAR: TWO EVEN ROWS OF FOUR.
   Seven pills and a flag laid out by flex with space-between gave a long
   first row and a widow, because seven divides into nothing. The flag
   becoming a pill makes eight, and eight is two rows of four exactly.
   Bigger to suit the width, as asked: 16/22 padding against 11/18, and
   the label up from 12 to 14. */
/* AND THE JOIN ABOVE IT IS SEAMLESS. Matt, 15 October: "make this tier
   join seamless."

   The site already does this and the bar was falling through the gap. An
   .alt band is a lighter navy, and where one ends the section BELOW it
   carries a 150px gradient from that navy down to nothing, so the colour
   bleeds across the join instead of stopping on a line. The rule is
   written `section.alt + section`, and the certifications bar is a DIV,
   so it matched nothing and the bar painted flat #0b0f2e hard against the
   lighter band above it. Same gradient, asked for by class rather than by
   tag. */
/* THE BLEND IS ONE FIELD ACROSS THE JOIN, NOT TWO THAT MEET ON IT.
   Matt, twice: "make this tier join seamless", then "gradient not
   seamless check again please."

   The second time he was right and the pixels say why. Sampled down five
   columns through the join: the colour matched exactly on both sides of
   it, 111740 above and 10163f below, so there was no step. What there was
   is a kink. The band above is FLAT for its whole height and the blend
   started at the top edge of the band below, so the rate of change jumped
   from nothing to everything on one row. An eye reads that as a line just
   as readily as it reads a step, and no amount of mesh inside the lower
   band can fix it, because the problem is the boundary itself.

   So the blend stops being a property of either band. It is one layer,
   on the lower band, pulled 220px UP into the upper one, where it paints
   the upper band's own colour over the upper band's own colour and is
   therefore invisible. It fades out 250px below the join. Nothing changes
   at the join, because nothing about the layer knows the join is there.

   The mesh inside it is three radials at 12, 46 and 84 per cent with
   different radii and centres, so the fade reaches a different distance
   at every x and has no straight edge anywhere in it. The linear
   underneath holds the top 34 per cent solid: that part is inside the
   upper band and does nothing except guarantee the layer can never be
   seen to start.

   z-index 1 on the band puts the layer above the previous section's
   background, and the wrap goes above the layer. */
html body .sh2-sheet > section.alt + .certs{position:relative;z-index:1;}
html body .sh2-sheet > section.alt + .certs > .wrap{position:relative;
  z-index:1;}
/* AND IT REACHES 72px UP, NOT 220. The first version went 220px into
   the band above, which is further than that band's 96px of bottom
   padding, so the layer painted over the last two rows of the capability
   table and very nearly erased them. Caught by measuring the deepest
   painted thing inside that band against the top of this layer. The gap
   is not the 96px of padding it looks like: it is 87px at 1440 and 70 at
   3552, because the table's own panel grows at the wide end. 48px, so
   there are 22px of headroom at the tightest width measured.

   The ramp is eased rather than linear. A straight fade from solid to
   nothing has a constant slope, so the point where it begins is itself a
   line; these stops leave it almost flat for the first eighth and only
   then let go, which is the same reason the layer starts inside the band
   above rather than on the join. */
html body .sh2-sheet > section.alt + .certs::before{content:"";
  position:absolute;left:0;right:0;top:-48px;height:410px;z-index:0;
  pointer-events:none;
  background:
    radial-gradient(700px 300px at 12% 18%,
      rgba(17,23,64,.70),rgba(17,23,64,0) 72%),
    radial-gradient(520px 250px at 46% 32%,
      rgba(17,23,64,.55),rgba(17,23,64,0) 74%),
    radial-gradient(880px 360px at 84% 12%,
      rgba(17,23,64,.66),rgba(17,23,64,0) 70%),
    linear-gradient(180deg,
      rgba(17,23,64,1) 0%,
      rgba(17,23,64,.985) 10%,
      rgba(17,23,64,.90) 24%,
      rgba(17,23,64,.72) 42%,
      rgba(17,23,64,.45) 60%,
      rgba(17,23,64,.18) 80%,
      rgba(17,23,64,0) 100%);}

/* Everything else about this block, the eyebrow, the title, the link,
   the four column grid and the eight pills, is approvals.py's now and is
   the same on all 74 pages that carry it. What is above is only the join
   into THIS page's capability table. */


/* ============== the standards link to their own pages (stdlink.py) === */
html body a.stdl{color:inherit;text-decoration:none;
  background-image:linear-gradient(currentColor,currentColor);
  background-size:100% 1px;background-position:0 1.12em;
  background-repeat:no-repeat;opacity:1;
  transition:color .18s ease;}
html body a.stdl:hover,html body a.stdl:focus-visible{color:#28e0c8;}
