
/* ===== what it is also called (searchfit.py) ===== */
/* The naming paragraph sits under the lede in the same block, a step down
   in size and colour so it reads as a note rather than as a second
   introduction. No rule above it: on this project a line is a gap over a
   ground, and here the size change does the separating. */
html body .sh2-words .lede-also{margin:22px 0 0;max-width:72ch;
  font-size:16.5px;line-height:1.66;color:rgba(255,255,255,.58);}
@media (max-width:720px){
  html body .sh2-words .lede-also{font-size:15.5px;}
}


/* ===== the naming block has something to look at (wordsart.py) ===== */
/* Two columns from 1100px: the words narrower than they were, the art
   beside them. Below that the art drops under the text and the two sub
   images go, because three overlapping pictures in a phone's width is a
   pile rather than a composition. */
/* ON THE SITE'S OWN TWELVE COLUMNS, which is option A of four and Matt's
   pick on 13 October. The first version set the two blocks as 1fr and
   .86fr with a clamped gap, which came out 671px and 577px: 6.17 and 5.34
   columns against a grid of 85.3px columns with a 28px gap. Nineteen
   pixels past six, so the text ended in the gutter rather than on a line.
   Matt could see it without being able to name it: "not sure where it
   ends on the grid."

   Six columns of text, column seven empty as the gutter, five of art.
   Spans rather than fractions, so it is the page's own grid doing the
   work and the numbers come out whole: measured after, 652px and 539px,
   exactly 6.00 and 5.00. */
@media (min-width:1100px){
  html body .sh2-words > .wrap{
    display:grid;
    grid-template-columns:repeat(12,minmax(0,1fr));
    column-gap:var(--col-gap,28px);
    align-items:start;}
  html body .sh2-words .wa-text{min-width:0;grid-column:span 6;}
  html body .sh2-words .wa-art{grid-column:8 / span 5;}
  html body .sh2-words .wa-text .lede,
  html body .sh2-words .wa-text .lede-also{max-width:none;}
  html body .sh2-words .wa-art{
    position:relative;min-width:0;
    aspect-ratio:1.04;
    margin-top:6px;}
}
/* AND THE SECTION GETS AIR. Matt, 13 October: "the section needs more
   breathing space above and below." Not a judgement call: it was 4px top
   and 26px bottom, which is effectively zero, and it is why the block ran
   straight out of the stat bar above it. */
html body .sh2-words{padding:clamp(64px,6vh,96px) 0 clamp(76px,7.4vh,116px);}
html body .sh2-words .wa-art figure{margin:0;}
/* the frames. No border anywhere on this project: the lift comes from a
   shadow and the ground showing through the radius. */
html body .sh2-words .wa-art img{
  display:block;width:100%;height:100%;object-fit:cover;
  border-radius:20px;background:#0b0f2e;}
/* THE WORDS HOLD WHILE THE PICTURES GO PAST. Matt, 16 October: "the
   text has to be sticky to allow the images more space. We can make the
   main image bigger too. Then the images can start a bit higher - the
   text sticks - images carry on until all moves up."

   All four of those are one change, because they depend on each other.
   Sticky does nothing unless the column beside it is taller, and the
   column is only taller if the pictures have somewhere to go, so the
   art box gets the height first and everything else follows from it.

   Measured before: text 635 tall, art 795. A hundred and sixty pixels
   of difference is a hundred and sixty pixels of pinning, which nobody
   would notice. The art is now 1124, so the words hold for 433px and it
   reads as a deliberate hold rather than a rounding error.

   THE PICTURES START ABOVE THE FIRST LINE, by 56px, which is the "start
   a bit higher". It is a negative margin on the art rather than padding
   on the text, so the text keeps its own position on the grid and only
   the pictures move.

   top:108px is the fixed nav's 80 plus the grid's own 28 gutter. The
   secondary nav sits at 138 when it is showing, so the held text passes
   under it rather than colliding with it.

   AND THE MAIN PICTURE FILLS THE COLUMN. It was 84 per cent wide and
   inset 8 per cent from the left, which on a column this size left it
   535 across inside a 652 box. Full width now, 652 by 674 against 535
   by 604, a third more picture. The two small frames drop below it
   rather than overlapping it, which they have room for now. */
/* AND THE FIGURE CARRIES THE RADIUS TOO, not only the picture inside
   it. The shadow is cast from the figure's box, so an unrounded figure
   throws a sharp cornered shadow behind a rounded picture. It only
   shows where one frame overlaps another, which is why it survived
   this long. Matt spotted it on the sister block on 5 November and it
   was here first. */
html body .sh2-words .wa-main{
  position:absolute;left:8%;top:4%;width:84%;height:74%;
  border-radius:20px;
  box-shadow:0 38px 70px rgba(0,0,0,.46);
  will-change:transform;}
html body .sh2-words .wa-s1{
  position:absolute;left:0;top:46%;width:44%;height:34%;
  border-radius:16px;
  box-shadow:0 26px 48px rgba(0,0,0,.5);
  will-change:transform;}
html body .sh2-words .wa-s2{
  position:absolute;right:0;bottom:0;width:38%;height:30%;
  border-radius:16px;
  box-shadow:0 26px 48px rgba(0,0,0,.5);
  will-change:transform;}
html body .sh2-words .wa-s1 img,
html body .sh2-words .wa-s2 img{border-radius:16px;}
/* the travel. --p runs -1 to 1 as the block crosses the window. */
/* and the travel grows with the column it crosses. The three numbers
   were drawn for a 795px art box; at 1304 the same travel is a third of
   what it reads as, so each is scaled by the same 1.64 and rounded.
   The ratios between them are untouched, because the ratios are what
   make the three move as one group rather than three pictures. */
html body .sh2-words .wa-main{transform:translate3d(0,calc(var(--p,0) * -56px),0);}
html body .sh2-words .wa-s1  {transform:translate3d(0,calc(var(--p,0) *  95px),0);}
html body .sh2-words .wa-s2  {transform:translate3d(0,calc(var(--p,0) * -138px),0);}

@media (max-width:1099px){
  /* AND NONE OF IT BELOW 1100, where the two columns stack. A sticky
     element in a single column has nothing to be sticky beside and just
     parks itself over whatever comes next. */
  html body .sh2-words .wa-text{position:static;top:auto;}
  html body .sh2-words .wa-art{position:relative;margin:34px 0 0;}
  html body .sh2-words .wa-main{position:static;width:100%;height:auto;}
  html body .sh2-words .wa-main img{height:auto;aspect-ratio:1.5;}
  html body .sh2-words .wa-s1,
  html body .sh2-words .wa-s2{display:none;}
}
@media (prefers-reduced-motion:reduce){
  html body .sh2-words .wa-main,
  html body .sh2-words .wa-s1,
  html body .sh2-words .wa-s2{transform:none !important;}
}


/* ====== the naming block mirrored (wordsart.py) ======================= */
/* Matt, 2 November, on About: "switch image block to left and text to
   right to make it a bit different." The grid is untouched, it is the
   same twelve columns with the same spans; only which side each block
   starts on changes, so the text still ends on a line and the art still
   measures five columns. Below 1100px the base sheet stacks them and
   the pictures come second there as they do everywhere, because a
   picture above the first sentence on a phone is a picture nobody
   asked for. */
@media (min-width:1100px){
  /* THE ROW IS EXPLICIT OR THE ART FALLS TO THE NEXT ONE. The words
     come first in the markup and sit in columns 7 to 12; the art
     follows and is placed in 1 to 5. Grid's auto placement will not
     walk backwards, so with only the column named the art took row 2
     and landed 413px below the text instead of beside it. Matt, 2
     November: "This looks off vertically." Naming row 1 on both is the
     whole fix; the DOM order stays as it is so a phone still gets the
     words first. */
  html body .sh2-words .wa-art{grid-column:1 / span 5;grid-row:1;}
  html body .sh2-words .wa-text{grid-column:7 / span 6;grid-row:1;}
}
