
/* ===== the industries cards, floated (indfloat.py) ===== */

/* THE ROWS BREATHE. Matt: "more space between the rows." The grid set
   one gap for both axes, which was right when each card was a panel with
   its own edge and is not right now: with no edge, the only thing
   separating a card's last chip from the next card's photograph was the
   same 32px that separates two cards side by side, and the grid stopped
   reading as rows. Double it down the page and leave the columns alone. */
html body .mg-float{
  row-gap:84px !important;
}

/* THE PANEL COMES OFF THE FOURTEEN. .accent is excluded throughout: the
   stat tile is the one bento left on this grid and it keeps its panel. */
html body .mg-float .mcard:not(.accent){
  background:none !important;
  background-image:none !important;
  box-shadow:none !important;
  border-radius:0 !important;
  overflow:visible !important;
  padding:0 !important;
}

/* THE PHOTOGRAPH IS THE BENTO. The only rounded thing on the card, and
   the shadow under it is what makes it read as floating over the navy
   rather than cut into it. */
html body .mg-float .mcard:not(.accent) .mim{
  height:232px;
  border-radius:20px;
  overflow:hidden;
  background-size:cover;
  background-position:center;
  box-shadow:0 18px 40px -18px rgba(0,0,0,.62);
  transition:transform .34s cubic-bezier(.2,.7,.3,1),
             box-shadow .34s cubic-bezier(.2,.7,.3,1);
}
html body .mg-float .mcard:not(.accent):hover .mim{
  transform:translateY(-6px);
  box-shadow:0 26px 52px -20px rgba(0,0,0,.72);
}

/* THE WORDS SIT ON THE PAGE. No side padding, so the text lines up with
   the left edge of the photograph above it rather than being inset from
   a box that is no longer there. */
html body .mg-float .mcard:not(.accent) .mbd{
  background:none !important;
  padding:20px 2px 0 !important;
}

/* The card itself no longer lifts, because the photograph does. Two
   things moving at once reads as a wobble rather than a lift. */
html body .mg-float .mcard:not(.accent):hover{
  transform:none !important;
  box-shadow:none !important;
}

/* COLOUR, which the panel used to supply. */
html body .mg-float .mcard:not(.accent) .mnum{
  color:#00eecc !important;
}
html body .mg-float .mcard:not(.accent) h2,
html body .mg-float .mcard:not(.accent) h3{
  color:#ffffff !important;
}
html body .mg-float .mcard:not(.accent) p{
  color:rgba(255,255,255,.66) !important;
}
html body .mg-float .mcard:not(.accent) .mtags span{
  background:rgba(255,255,255,.08) !important;
  color:rgba(255,255,255,.78) !important;
}

/* THE CHIPS HOLD THE BOTTOM OF THE CARD. The Explore link carried
   margin-top:auto, so it sank to the bottom of its cell and the links
   lined up straight across a row whatever length the paragraph above
   them ran to. Taking it away took that alignment with it and left the
   chip rows ending up to 26px apart inside the same row, which is a
   line of text and reads as a wobble now there is no panel edge to hide
   it. The chips inherit the job. */
html body .mg-float .mcard:not(.accent) .mtags{
  margin-top:auto !important;
  margin-bottom:0 !important;
}

/* THE CALL TO ACTION, COPIED OFF THE HOME PAGE'S SIX.

   On home, .svc holds the arrow at opacity 0 translated down and left,
   and the chevrons at opacity 0 translated 30px right, and brings both
   in on hover. Same timings, same easing, same idea, scoped here. */
/* THE ARROW SITS ON THE RIGHT EDGE OF THE PHOTOGRAPH, not beside the
   word. Matt: "The arrow could be a lot bigger and align it to the right
   of the image." The photograph is the full width of the cell, so the
   right edge of the row is the right edge of the picture above it, and
   space-between puts it there whatever the heading runs to. */
html body .mg-float .mcard:not(.accent) .mhl{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:var(--s1) 0 var(--s2);
}
html body .mg-float .mcard:not(.accent) .mhl h2{
  margin:0 !important;
}
html body .mg-float .mcard:not(.accent) .mhl .arw{
  flex:0 0 auto;
  width:38px;height:38px;
  margin:0 2px 0 0;
  color:#00eecc;
  opacity:0;
  transform:translate(-10px,10px);
  transition:opacity .34s ease .04s,
             transform .34s cubic-bezier(.22,1,.36,1) .04s;
}
html body .mg-float .mcard:not(.accent) .mhl .arw svg{
  display:block;width:100%;height:100%;
}
html body .mg-float .mcard:not(.accent):hover .mhl .arw,
html body .mg-float .mcard:not(.accent):focus-within .mhl .arw{
  opacity:1;
  transform:translate(0,0);
}

/* THE CHEVRONS, ANCHORED TO THE BASE OF THE PHOTOGRAPH, which is the
   standing rule for chevrons on this project: always on an edge of a
   tier or a block, never floating in the middle of one. The photograph
   is the block here, so they sit on its bottom edge and travel up with
   it by the same six pixels when it lifts. */
html body .mg-float .mcard:not(.accent){
  position:relative;
}
html body .mg-float .mcard:not(.accent) .mg-chev{
  position:absolute;
  left:22px;top:208px;z-index:3;
  opacity:0;
  transform:translateX(26px);
  transition:opacity .32s ease,
             transform .46s cubic-bezier(.22,1,.36,1);
  pointer-events:none;
}
/* NO HEIGHT IS SET HERE AND THAT IS DELIBERATE. This rule used to say
   --h:18px, copied off .svc .chev-base on the home page, and it did
   nothing at all: a chevron is 24px everywhere on this site, locked with
   !important in the nav stylesheet since 22 September, on Matt's own
   instruction to "standardise the size of the chevrons in ALL instances
   site wide, height constant but we can use different widths on larger
   areas". The home page's own 18px loses to it too, so home already
   draws 24px and copying home means taking the 24. What is set here is
   the width of the run, which is the number of chevrons in it, and that
   is the half the lock leaves open on purpose. */
html body .mg-float .mcard:not(.accent) .mg-chev .chev:nth-child(n+8){
  display:none;
}
html body .mg-float .mcard:not(.accent):hover .mg-chev,
html body .mg-float .mcard:not(.accent):focus-within .mg-chev{
  opacity:1;
  transform:translateY(-6px);
}

/* A FINGER CANNOT HOVER. On home the arrow is the only thing saying the
   tile is a link and on a phone it never appears, which is a fault worth
   not copying. The arrow rests visible where there is no hover. The
   chevrons do not, because fourteen sets of them always on is noise. */
@media (hover:none){
  html body .mg-float .mcard:not(.accent) .mhl .arw{
    opacity:1;
    transform:translate(0,0);
  }
}

/* THE PHONE. The photograph gets shorter because the column is narrower,
   and the gap between a card's words and the next card's photograph has
   to stay bigger than the gap inside a card or the grid stops reading as
   rows. */
@media (max-width:700px){
  /* A grid item's automatic minimum is its longest unbreakable content.
     Communications forces a 333px card into a 256px column without this. */
  html body .mg-float > .mcard{min-width:0;}
  html body .mg-float .mhl > :is(h2,h3){min-width:0;}
  html body .mg-float .mcard:not(.accent) .mim{
    height:200px;
    border-radius:16px;
  }
  html body .mg-float .mcard:not(.accent) .mbd{
    padding:16px 2px 0 !important;
  }
  html body .mg-float{
    row-gap:60px !important;
  }
  html body .mg-float .mcard:not(.accent) .mg-chev{
    left:18px;top:176px;
  }
  html body .mg-float .mcard:not(.accent) .mhl .arw{
    width:32px;height:32px;
  }
}
