
/* the six hero masters (homehero.py). Prepared to the frame at
   3000x2000, so none of them carries a transform. */
.hp-0{background-image:url(/assets/hero-slide-as9100d__panel.webp);}
.hp-1{background-image:url(/assets/cta-2c22c675bd.webp);}
.hp-2{background-image:url(/assets/hero-slide-aero__IMG-3123.webp);}
.hp-3{background-image:url(/assets/ce/hero-module-array__from-hero-slide-3.webp);}
.hp-4{background-image:url(/assets/ce/hero-fischer-connectors__no-red.webp);}
html body .hero .hp-3{background-position-x:-50px;}
.hp-0,.hp-1,.hp-2,.hp-3,.hp-4{transform:none;}

/* THE UNION JACK SITS WHERE THE TICK SITS. Matt, 6 October: "maybe add the
   little union jack top right like the tick on the AS9100D chips". So it
   takes the tick's own box, 20px in the top right corner, rather than a new
   position for a second kind of mark. The flag is 1000x560, a 25:14 shape,
   so it was 20px wide and 11px tall, rounded 3px.

   IT IS ROUND NOW, AND THE SAME ROUND THE VERTICALS USE. Matt, 16
   October: "same flag for all chips using it - let's go round version."
   Home had a rounded rectangle and the verticals' headers a circle, so
   the two headers carried two different marks for the same claim. The
   objection to squaring it still stands and object-fit answers it: the
   20x20 box crops the 25:14 flag rather than stretching it, which is
   what the circle was doing on the verticals all along. */
.fchip .cflag{position:absolute;top:14px;right:14px;
  width:20px;height:20px;border-radius:50%;object-fit:cover;display:block;}

/* THE CONTENTS DISSOLVE WHILE THE BOX TRAVELS. Only the children fade; the
   chip itself keeps its background, its blur and its .75s ease on left and
   top, so what you see is one object moving and its words changing on the
   way rather than a swap followed by a move. 180ms out and 180ms back,
   inside the 750ms the journey takes. */
.fchip > *{transition:opacity .18s ease;}
.fchip.chip-swap > *{opacity:0;}
body.place-mode .fchip > *{transition:none;opacity:1;}

/* ON A PHONE THE CHIPS JOIN THE PAGE. Michael, 27 October, on a Pixel:
   a stat chip showed through the top left of the bar ("16 / Cor", "40 /
   In b") and another sat half off the right edge over the buttons. The
   three chips are absolute children of the header, placed for a desk;
   the script that steers them stops below 1100px and the 1080px rule
   only pulls them in a little, so on a phone they float over the bar
   and the copy. Below 900px they come into the flow instead: after the
   copy, as one row that wraps, the same as the service pages
   (svchero.py). The services index is built from this page, so it
   takes this too. */
@media (max-width:900px){
  header.hero:not(.svch){flex-flow:row wrap;align-content:flex-start;}
  header.hero:not(.svch) > .wrap{order:1;flex:0 0 100%;}
  header.hero:not(.svch) > .fchip{position:static;order:2;flex:0 1 auto;
    left:auto;right:auto;top:auto;bottom:auto;transform:none;translate:none;
    animation:none;opacity:1;margin:14px 0 0 10px;max-width:none;}
  header.hero:not(.svch) > .fchip.fc1{margin-left:24px;}
  /* and the copy is one column. The services index keeps the twelve
     column grid with its 32px gutters on a phone: twelve tracks of 0px
     plus eleven gutters is 352px, wider than the 296px a 360px screen
     leaves inside the padding, so its sentences ran off the right edge. */
  header.hero:not(.svch) .hero-grid{grid-template-columns:minmax(0,1fr);
    column-gap:0;}
  /* The desktop headline is 120% wide so it can overlap the photograph.
     In the one-column phone layout that only cuts off its last letters. */
  header.hero:not(.svch) h1{width:100%;}
}
/* A THIRTEEN LETTER WORD AT 40px IS 356px: "manufacturing" in home's
   headline, measured at 360px, wider than the screen, so the last letters
   were cut. Below 400px the headline scales with the screen instead, about
   33px at 360; at 412 and up nothing changes. The service pages do not load
   this stylesheet and carry the same rule in svchero.py. */
@media (max-width:400px){
  header.hero h1{font-size:min(40px,9.2vw);}
}


/* ===== THE PINNED GALLERY, ON THE SERVICES PAGES (svcgallery.py) ========
   Copied from services_page.py rather than rewritten, because Matt asked for
   the same gallery and the same gallery means the same numbers. The page
   stops, the photographs travel sideways under it, the page carries on.
   Below 900px, and for anyone who has asked for less motion, it is a plain
   row you swipe. */
.gl{position:relative;padding:0;}
.gl-pin{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;
  justify-content:center;gap:48px;overflow:hidden;}
.gl-top{display:flex;align-items:flex-end;justify-content:space-between;
  gap:32px;width:100%;}
.gl-meter{display:flex;align-items:center;gap:18px;padding-bottom:10px;
  color:rgba(255,255,255,.55);font-size:13px;letter-spacing:.3px;
  font-variant-numeric:tabular-nums;}
.gl-count b{color:#fff;font-weight:600;}
.gl-bar{position:relative;width:180px;height:2px;
  background:rgba(255,255,255,.14);overflow:hidden;border-radius:2px;}
.gl-bar i{position:absolute;inset:0;background:var(--aqua,#00eac8);
  transform-origin:left;transform:scaleX(var(--gp,.125));}
.gl-view{width:100%;}
.gl-track{display:flex;gap:24px;
  padding:0 max(32px, calc((100vw - var(--max,1332px)) / 2 + 32px));
  transform:translate3d(var(--gx,0px),0,0);will-change:transform;
  width:max-content;}
/* BIGGER. Matt, 7 October: "images on the galleries rails can be bigger for
   more impact." They were capped at 480px, so on anything from a laptop
   upwards the photographs were the same size and the window just got emptier
   around them: at 1920 the cap was spending a third of the screen on nothing.

   Three terms, and each one is the limit in a different kind of window:

     40vw            wide and short. Keeps two and a half photographs on
                     screen so the rail still reads as a rail.
     760px           very wide. Past about 1900 the photographs stop growing,
                     because an image that fills the window is a hero rather
                     than one of eight.
     133.33vh-440px  SHORT. This is the one that matters and the one the old
                     58vh guess was standing in for. The pinned area is the
                     window less the heading block and the gap, about 241px,
                     and the figure is the photograph at 4:3 plus 38px of
                     caption. Solve that for width and it is 1.3333 times the
                     window height less 372; 440 leaves 50px of air so a
                     caption never touches the bottom edge.

   At 1692 by 860, which is the window Matt sent, that is 677px rather than
   480. At 1920 by 1080 it is 760. On a 700px tall laptop it is 493, barely
   more than before, which is correct: there is no room there and growing it
   would push the caption off the screen. */
.gl-i{margin:0;flex:0 0 auto;display:flex;flex-direction:column;gap:14px;
  width:min(40vw,760px,calc(133.33vh - 440px));}
.gl-ph{width:100%;aspect-ratio:4/3;border-radius:26px;background-size:cover;
  background-position:center;background-color:rgba(255,255,255,.04);}
.gl-i figcaption{display:flex;gap:14px;font-size:14px;
  color:rgba(255,255,255,.6);}
.gl-i figcaption b{color:var(--aqua,#00eac8);font-weight:600;}
@media (max-width:899px), (prefers-reduced-motion:reduce){
  .gl{height:auto !important;padding:96px 0 40px;}
  .gl-pin{position:static;height:auto;gap:32px;}
  .gl-meter{display:none;}
  .gl-view{overflow-x:auto;overflow-y:hidden;overflow-y:clip;scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;scrollbar-width:none;}
  .gl-view::-webkit-scrollbar{display:none;}
  .gl-track{transform:none !important;padding:0 20px;}
  .gl-i{scroll-snap-align:start;width:78vw;}
}
