
/* ================= the six, under the bar (subnav.py) ================== */
:root{--snav-h:64px;--snav-top:138px;
  /* the interiors' own clearance token, raised by the height of the row */
  --hero-top:214px;}
.snav{position:fixed;top:var(--snav-top);left:0;right:0;z-index:40;
  display:block;   /* undoes HOLD, the head's display:none: see apply() */
  pointer-events:none;
  /* it fades, it does not travel: --sy is the scroll position, so the row
     is gone before it can reach the bar */
  opacity:calc(1 - var(--sy,0) / 110);
  transition:opacity .18s linear;}
.snav .wrap{display:flex;gap:10px;pointer-events:auto;}
.snav a{flex:1 1 0;text-align:center;text-decoration:none;
  padding:10px 10px 9px;border-radius:12px;
  /* THE ORIGINAL SPEC, RESTORED. Matt, 24 September: "these still don't
     look right, weren't they more white-ish not grey / black-ish. Look
     backwards a few versions please."

     Right, and this is the third state this rule has been in today, so it
     is worth writing down what each one was and why it was wrong.

       1  white 6%, blur 14px          the spec. Glass. Over a hero full of
                                       connectors you see the connectors
                                       through it, which read as the row
                                       being behind the image.
       2  + navy 58%                   stopped the show-through by stopping
                                       it being glass. Muddy.
       3  + navy 14%, saturate .62     kept the glass but the desaturation
                                       drained the colour behind it and the
                                       navy darkened it, so the pill came
                                       out grey rather than white.

     Back to 1, exactly. The show-through on the two busiest slides is the
     cost of glass being glass, and Matt would rather have the material look
     right than have it solved by making it something else. If it does need
     solving later, the lever is more white, not more navy and not less
     colour. */
  background:rgba(255,255,255,.06);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  transition:background .25s ease,transform .25s ease,box-shadow .25s ease;}

/* BRIGHTER ON HOVER. Matt, 6 October: "Can the tabs go brighter generally
   on hover to accentuate the action?"

   The lever is the one this file already names three rules up: more white,
   not more navy and not less colour. So .11 goes to .20, there is a shadow
   under the pill, and the travel goes from 2px to 3.

   AND NO RING. The first version added a one pixel inset ring as well, and
   Matt was straight back: "No outline on 6 tabs." He is right. The row is
   glass, and glass does not have an edge drawn on it; the ring made the
   hovered pill look like a different component from the five beside it.
   The brightness and the shadow do the work on their own.

   IT IS BRIGHTER THAN IT LOOKS ON ITS OWN, because by the time you are
   hovering a tab the nav scrim is lit and the ground behind the row is the
   dark panel rather than the photograph. The two were built in the same
   afternoon and they are meant to be read together. */
.snav a:hover{background:rgba(255,255,255,.20);transform:translateY(-3px);
  box-shadow:0 10px 26px rgba(4,8,30,.42);}
.snav b,.snav i{display:block;font-style:normal;
  font-family:'Gotham','Inter',Arial,sans-serif;font-weight:900;
  font-size:13px;letter-spacing:.5px;text-transform:uppercase;line-height:1.12;
  color:rgba(255,255,255,.72);transition:color .25s ease;}
.snav a:hover b,.snav a:hover i{color:#fff;}

/* THE ICON BESIDE THE TWO WORDS (9 November). The pill keeps its column
   of two: the icon is one flex child and the wrapped words are the
   other, so nothing about the stack changes. text-align:center above
   stops doing the centring once this is a flex box, so the centring is
   restated as justify-content.

   THE ICON TAKES THE TEXT'S OWN COLOUR rather than an opacity of its
   own. The two words go from white 72% to white on hover and the icon
   now does the same thing on the same transition, so the pill lights as
   one object. The specimen faded it separately and the icon and the
   words arrived a beat apart.

   IT GOES BEFORE THE WORDS SHRINK, NOT AFTER. The row is six pills
   sharing the width, and at 1180 the type is already down to 11.5px, so
   the icon is the first thing to go rather than the last. */
.snav a{display:flex;align-items:center;justify-content:center;gap:9px;}
.snav .sn-tx{display:block;}
/* AQUA, on Matt's word of 9 November. It was the text's own white 72%
   so the pill would light as one object; aqua reads better against six
   pills of grey glass and it is the colour every other icon on this
   site is. It still brightens with the words rather than on a timer of
   its own. */
.snav .sn-ico{flex:0 0 auto;width:24px;height:24px;
  color:rgba(0,238,204,.82);transition:color .25s ease;}
.snav .sn-ico svg{display:block;width:100%;height:100%;fill:currentColor;}
.snav a:hover .sn-ico{color:#00eecc;}
@media (max-width:1320px){.snav .sn-ico{width:21px;height:21px;}
  .snav a{gap:7px;}}
@media (max-width:1180px){.snav .sn-ico{display:none;}}
body.snav-gone .snav{pointer-events:none;}
body.snav-gone .snav .wrap{pointer-events:none;}

/* THE SCROLLED BAR, THE SAME EVERYWHERE, WITH AIR ABOVE IT. Matt, 24
   September: "should we add a small gap above the bar, maybe 10 to 20px?"
   Yes: a pill flush to the top edge of the window reads as stuck to it
   rather than floating over the page. 16px, which is the value the
   interiors already use, so this is one number rather than a new one.

   The collapse is stated here too. The rule that hides the phone and email
   row when scrolled lives in a stylesheet the interiors link and the home
   page does not, which is why the two behaved differently: home kept the
   row and the interiors dropped it. Now every page drops it. */
body.scrolled .navwrap{padding-top:16px;}
body.scrolled .navwrap .topbar{height:0;opacity:0;overflow:hidden;
  margin:0;pointer-events:none;}
/* AND IT HAS TO MOVE SMOOTHLY. Matt, 24 September: "the nav shrink and
   slide up animation has gone a bit glitchy." Two of the three things that
   change on scroll had nothing to animate them: the row's height and the
   bar's padding both snapped while the pill itself eased, so the bar
   appeared to jump and then settle. All three now share the bar's own
   duration (--mid, 0.3s) and the site's easing curve. */
html body .navwrap{transition:padding-top .3s cubic-bezier(.22,1,.36,1);}
html body .navwrap .topbar{overflow:hidden;
  transition:height .3s cubic-bezier(.22,1,.36,1),
             opacity .22s ease,
             margin .3s cubic-bezier(.22,1,.36,1);}
html body .navwrap nav{
  transition:height .3s cubic-bezier(.22,1,.36,1),
             background-color .3s ease,
             box-shadow .3s ease,
             padding .3s cubic-bezier(.22,1,.36,1);}
@media (prefers-reduced-motion:reduce){
  html body .navwrap,html body .navwrap .topbar,html body .navwrap nav{
    transition:none;}
}

/* the home page and the services index run their own hero, so they clear
   the row themselves */
body.snav-home .hero{padding-top:calc(var(--snav-top) + var(--snav-h) + 76px);}

@media (max-width:1080px){
  .snav a{padding:9px 6px 8px;}
  .snav b,.snav i{font-size:11.5px;letter-spacing:.3px;}
}
@media (max-width:900px){
  /* on a phone the bar is shorter and the burger holds the navigation, so
     the row becomes a single scrollable line of chips rather than six
     columns squeezed to nothing */
  :root{--snav-top:84px;--snav-h:52px;--hero-top:168px;}
  .snav .wrap{overflow-x:auto;overflow-y:hidden;overflow-y:clip;scrollbar-width:none;
    -webkit-overflow-scrolling:touch;}
  .snav .wrap::-webkit-scrollbar{display:none;}
  .snav a{flex:0 0 auto;min-width:118px;}
  body.snav-home .hero{padding-top:calc(var(--snav-top) + var(--snav-h) + 30px);}
  /* AND IT SAYS IT SCROLLS. Michael, 27 October, on a Pixel at 360px:
     the third chip was cut through "CONTROL PANELS" at the screen edge,
     which reads as broken rather than as more to come. The right edge
     now fades over 56px, so the cut-off chip goes soft instead of being
     sliced, and the snap stops a swipe halfway through a chip. */
  .snav .wrap{scroll-snap-type:x proximity;scroll-padding:0 32px;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent);
    mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent);}
  .snav a{scroll-snap-align:start;}
}
@media (prefers-reduced-motion:reduce){
  .snav{transition:none;}
}
