
/* the two buttons (akit.py, locked 24 September) */
/* THE HEIGHT IS THE BUTTON'S, NOT ITS CONTENTS'. 1 October, while checking
   every button on the site: line-height:normal let whatever was inside the
   pill decide how tall it was. The same .btn measured 42px with a plain
   label, 45px with an arrow after it, 45px again on two pages that set
   their own leading, and 49px on the contact page. Four heights for one
   button, and nobody chose any of them.

   line-height:1 with a pixel off the top padding keeps the 42px the site
   already had, and the two rules under it stop an arrow span or an icon
   from stretching the pill again. */
html body .btn,html body .btn.nav-cta{display:inline-flex;align-items:center;
  justify-content:center;gap:10px;
  min-height:42px;height:auto;padding:0 28px;border-radius:999px;
  font-size:14px;font-weight:600;letter-spacing:.4px;line-height:1;
  box-sizing:border-box;text-decoration:none;
  background:linear-gradient(100deg,#00eecc 0%,#19e6c4 55%,#5cf2dd 100%);
  color:#1e2855;transition:.25s;}
html body .btn:hover{transform:translateY(-1px);
  box-shadow:0 12px 32px rgba(0,238,204,.4);}
html body .btn-line{background:rgba(255,255,255,.11);color:#fff;
  box-shadow:none;}
html body .btn-line:hover{background:rgba(255,255,255,.18);
  box-shadow:none;}
html body .btn > *{line-height:1;font-size:inherit;}
html body .btn svg{width:16px;height:16px;flex:0 0 auto;}
/* the bar's own button is one setting too. It read 13px at 700 on 67 pages
   and 14px at 600 on the home page and the services index, for one
   component that is copied onto all 70. The 67 win: a slightly tighter
   label in the bar than on the page is a hierarchy worth keeping, and it
   is the setting almost the whole site already had. */
html body .btn.nav-cta,html body .navwrap .btn.nav-cta,
html body .navwrap a.btn.nav-cta{font-size:13px;font-weight:700;
  line-height:13px;}
/* ON A PHONE THE BAR'S BUTTON IS ONE LINE. Michael, 27 October, on a
   Pixel: "Start Your Project" broke onto two lines at 412px and three at
   360px. The 28px each side the pill carries on a desk left it 74px of
   label at 360. Tighter sides, a smaller gap in the bar and no wrap keep
   it to one line at 360 with the logo and the burger untouched. */
@media (max-width:480px){
  html body .navwrap nav{gap:12px;}
  html body .navwrap .btn.nav-cta,
  html body .navwrap a.btn.nav-cta{padding:0 14px;white-space:nowrap;
    font-size:12px;letter-spacing:.2px;}
}

/* THE BREADCRUMB IS A LINK, NOT A SENTENCE. Measured at 390px on 1 October:
   its links are 10 to 22px tall, and WCAG 2.2 asks for 24 unless a link is
   inline in a block of text, which a breadcrumb is not. The padding is paid
   back as negative margin, so the hit area grows to 24px and not one pixel
   on the page moves. */
html body .crumb a{display:inline-block;padding:7px 0;margin:-7px 0;}

/* ================= THE RADIUS AND SHADOW TOKENS, ENFORCED =============
   2 October, sweeping the whole site for drift. The design system names
   four radii and three shadows:

       --r-s  12px   inputs, small tiles
       --r-m  20px   cards, panels, tables
       --r-l  32px   full width bands, CTA
       --pill 999px  buttons, chips, tags
       --e1          the resting card
       --e2          lifted, on hover
       --e3          overlay, dropdown, floating nav

   Measured against that, with every reveal settled first, the site was
   using ten radii. Five of them were doing the job --r-m already owns:

       14px   the form inputs, and two panels on the walk page
       18px   the four benefit cards under the process block
       22px   three related-article cards
       24px   a band, a photo frame, and ONE knowledge card
       26px   the video rail frames and the gallery frames, 31 pages

   The last two are the argument on their own. .hubc is a knowledge card
   and it was drawing 20px on 32 pages and 24px on one. Nobody decided
   that; it is a component that got written twice.

   Shadows were the same story: a resting card shadow of 4px/24px at 21 per
   cent on 33 pages, next to --e1's 6px/30px at 38 per cent on 16. Two
   values for one state.

   WHAT IS DELIBERATELY NOT TOUCHED. 36px, which is the scroll-over sheet
   and the curve Matt signed off on 23 September; 50px, which is the mesh
   blobs and is a shape rather than a corner; the band glows, which are
   lighting rather than elevation and are each doing a different job; and
   26px with its own two-layer shadow on .bx and .sh2-shot, which is the
   Bento. The Bento is one signed-off component with one radius used
   consistently across every part of itself, which is the opposite of drift:
   pulling it to 20px would break a thing that agrees with itself in order
   to make it agree with something else.

   EACH CLASS IS WRITTEN TWICE so the rule carries three classes' worth of
   weight. Four of these are set by selectors like `.hubg .hubc` and
   `.vr .rl-ph`, which outrank a single class, and a rule that loses the
   cascade on the one page that needed it is not a rule. */
html body :is(.relc.relc,.osh-e.osh-e,.esg-card.esg-card,
  .lt-band.lt-band,.hshot.hshot,.hubc.hubc.hubc,.rl-ph.rl-ph,
  .gl-ph.gl-ph,
  .apr-card.apr-card,.wk-panel.wk-panel,.wk-shot.wk-shot,.svc.svc,
  .stats.stats,.railcard.railcard,.railfig.railfig,.scopecol.scopecol,
  .om-card.om-card,.br-band.br-band){border-radius:20px;}
html body :is(input,textarea,select,.fin.fin){border-radius:12px;}
/* the literal rather than var(--e1), because --e1 still means two things:
   the light token on the home page and the services index, which were
   always dark and never went through dark.py, and the dark one everywhere
   else. On a dark ground the light value is invisible, so a token here
   would have quietly removed the shadow from two pages instead of
   standardising it. */
html body :is(.hubc.hubc.hubc,.xpo.xpo,.apr-card.apr-card,.hshot.hshot,
  .wk-panel.wk-panel,.form.form,.rl-ph.rl-ph,.gl-ph.gl-ph,.svc.svc,
  .card.card,.mcard.mcard,.vcard.vcard,.specwrap.specwrap,
  .nextcard.nextcard,.person.person,
  .proc.proc){box-shadow:0 6px 30px rgba(0,0,0,.38);}
/* TWO THE FIRST PASS MISSED, found by walking every card on every page
   rather than the list of names the first pass was written from.

   .proc on the home page carried 0 6px 26px rgba(20,24,64,.08): a shadow
   mixed for a WHITE ground, left behind when home went dark. Eight per cent
   of navy on a navy page is not a soft shadow, it is no shadow, so six cards
   sat flat next to cards that lift. Same mistake as --e1 and found the same
   way: a light value surviving on a page that stopped being light.

   .relc on the ten service pages had the inset ring and nothing else, so the
   related-reading cards were the only cards on the site with no elevation.
   The ring stays, because it is drawn as a one pixel inset rather than a
   border and it gives the card its edge on a near black ground. The resting
   shadow goes under it. */
html body .relc.relc{
  box-shadow:0 6px 30px rgba(0,0,0,.38),inset 0 0 0 1px rgba(255,255,255,.07);}
/* a pill that is 42px tall whatever is in it. The height comes from the
   button, the label is centred in it, and a label long enough to wrap is
   still allowed to grow because the 42 is a minimum rather than a size. */
/* and the one page that drew the outline button two points lighter */
html body .btn-line{background:rgba(255,255,255,.11) !important;}
html body .btn-line:hover{background:rgba(255,255,255,.18) !important;}

/* ================== the knowledge hub (hub.py) ====================== */
.tier-top{display:flex;align-items:flex-end;justify-content:space-between;
  gap:40px;margin-bottom:34px;}
.tier-top .sec-head{flex:1 1 auto;min-width:0;max-width:none;}
.tier-top h2{max-width:20ch;}
/* THE SECOND COLOUR IS GONE. This rule deliberately put the fade back on
   the hub's own tier headings, because at the time the site-wide rule
   covered h2 and the hub wanted its two-tone heading. Matt, 25 September,
   looking at the whole site: "make sure all main titles are all white, not
   half white and half faded. This should appear nowhere in the titles
   anywhere." So the carve-out goes with the rest of them. */
html body .xpo-hd h2{text-transform:uppercase;}
.tier-side{display:flex;align-items:center;gap:18px;flex:none;}
html body a.tier-cta{display:inline-flex;align-items:center;gap:10px;
  white-space:nowrap;text-decoration:none;}

/* THE FOUR-WIDE GRID. Four that fit, not four that nearly fit: the columns
   are the width left after the three gaps, so the last card ends on the
   grid line the heading starts on. */
.hubg{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;
  align-items:stretch;}

/* home's card, settled */
html body .hubg .hubc,html body .hub-track .hubc{
  display:flex;flex-direction:column;padding:0;overflow:hidden;
  border-radius:var(--r,20px);text-decoration:none;
  background:linear-gradient(165deg,#151b47,#111640);
  box-shadow:0 4px 24px rgba(0,0,0,.21);
  transition:transform .28s ease,box-shadow .28s ease;}
html body .hubg .hubc:hover{transform:translateY(-4px);
  box-shadow:0 26px 56px rgba(0,0,0,.34);}
html body .hubg .hubc-ph{display:block;height:168px;background-size:cover;
  background-position:center;background-color:#151b47;}
html body .hubg .hubc-bd{display:flex;flex-direction:column;flex:1;
  align-items:flex-start;padding:24px 24px 26px;}
/* SENTENCE CASE, LIKE HOME. The interiors uppercase every h1 to h4 as a
   global rule, and a card title in caps is a headline rather than a link:
   three lines of shouting where home has two lines of a sentence. This is
   the card home ships, so it reads the way home's does. */
html body .hubg .hubc h3{font-size:19px;font-weight:700;line-height:1.24;
  letter-spacing:-.4px;color:#fff;margin:16px 0 0;min-height:2.5em;
  text-transform:none;}
html body .hubg .hubc p{font-size:13.5px;line-height:1.6;margin:12px 0 0;
  color:rgba(255,255,255,.62);flex:1;}
html body .hubg .hubc .go{display:inline-flex;align-items:center;gap:8px;
  margin-top:20px;font-size:13px;font-weight:700;color:var(--aqua,#00eecc);}
html body .hubg .hubc .go::after{content:"\2192";width:26px;height:26px;
  border-radius:50%;display:inline-flex;align-items:center;
  justify-content:center;font-size:13px;color:#fff;
  background:rgba(255,255,255,.12);transition:.25s;}
html body .hubg .hubc:hover .go::after{color:#0b0f2e;
  background:linear-gradient(110deg,#00eecc,#2fd9e0);}

/* THE RAIL'S CARDS, on a page whose stylesheet shouts at every h3. Same
   two corrections as the grid: sentence case, and the arrow sits on the
   bottom of the card so a two line title and a three line title still line
   their arrows up. */
html body .rl-card h3{text-transform:none;}
html body .rl-card p{flex:1 1 auto;}
html body .rl-card .rl-arw{margin-top:auto;margin-bottom:0;flex:none;}
html body .rl-card p{margin-bottom:28px;}

/* THE EXPO BAND */
.xpo{display:grid;grid-template-columns:1.05fr 1fr;gap:0;overflow:hidden;
  border-radius:var(--r,20px);background:linear-gradient(165deg,#151b47,#111640);
  box-shadow:0 4px 24px rgba(0,0,0,.21);}
.xpo-hd{padding:46px 44px 40px;}
.xpo-hd h2{margin:20px 0 0;font-size:clamp(26px,2.5vw,36px);font-weight:900;
  text-transform:uppercase;letter-spacing:-.02em;line-height:1.05;color:#fff;}
.xpo-hd h2 em{font-style:normal;color:var(--aqua,#00eecc);}
.xpo-hd p{margin:18px 0 26px;font-size:15px;line-height:1.62;
  color:rgba(255,255,255,.66);max-width:44ch;}
.xpo-list{grid-column:1/2;padding:0 44px 46px;}
.xpo-row{display:grid;grid-template-columns:1.5fr 1fr;gap:4px 18px;
  padding:16px 0 15px;position:relative;}
.xpo-row::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;
  background:rgba(255,255,255,.12);}
.xpo-n{font-size:16px;font-weight:700;color:#fff;letter-spacing:-.2px;}
.xpo-d{font-size:13px;color:var(--aqua,#00eecc);text-align:right;
  font-weight:600;letter-spacing:.2px;}
.xpo-v{font-size:13px;color:rgba(255,255,255,.58);}
.xpo-s{font-size:13px;color:rgba(255,255,255,.58);text-align:right;}
.xpo-ph{grid-column:2/3;grid-row:1/3;min-height:340px;background-size:cover;
  background-position:center;}

/* FOUR THAT FIT ON THE HOME RAIL TOO. Matt, 23 September: "should these on
   home page be 4 equal columns that fit or is it deliberate they're off
   page?" Not deliberate, a near miss: the card was 25% of the rail and the
   rail also has three 16px gaps in it, so the fourth card came up 48px short
   and got cut through a word. It reads as a bug rather than as a peek. The
   column is now what is left after the gaps, so four sit on the grid and the
   arrows are the thing that says there are more.

   AND THREE, NOT FOUR. Matt, 8 October, on the home page running order:
   "go with 3 columns not 4." The same move the Knowledge Hub itself made
   the day before, for the same reason: at a quarter of the rail the card
   is about 310px on a laptop and the photograph on it is a thumbnail,
   which makes a row of guides read as a list of file names. At a third it
   is about 430px and the picture is a picture. The arrows still say there
   are more, and there are more left to find now, which is what a rail is
   for. */
html body #hub .hub-track .hubc{flex:0 0 calc((100% - 2 * 16px) / 3);}

/* AND THE PHOTOGRAPH BECOMES A PHOTOGRAPH. Matt, 8 October: "images can be
   taller so more standard landscape image shape. It's OK for the block to
   be taller so just add height, no compression elsewhere needed."

   168px on a 433px card is 2.58:1, which is a letterbox, not a landscape
   frame, and it was cropping the top and bottom off every shot: the fork
   lift picture lost the racking above it and the floor below. 3:2 is the
   shape the camera took them in, so the crop is the one the photographer
   framed. aspect-ratio rather than a pixel height, because the card width
   changes with the window and a fixed height would go back to being a
   letterbox at a laptop and a square on a phone.

   Height is ADDED. Nothing above or below it is tightened to pay for it,
   which is what Matt asked for: the rail simply gets taller. */
html body #hub .hub-track .hubc-ph{height:auto;aspect-ratio:3 / 2;}
@media (max-width:1180px){
  .hubg{grid-template-columns:repeat(2,1fr);}
  html body #hub .hub-track .hubc{flex:0 0 calc((100% - 16px) / 2);}
}

/* THE RAIL IS SWIPED ON A PHONE, NOT ARROWED. Matt, 30 November: "Home
   hub rail on phone - 16 cards hidden behind two arrows. Make it
   swipe?"

   WHY IT WAS NOT ALREADY. The rail moves by transform: the arrows and
   the auto advance both set translateX on .hub-track, and the whole
   set is written out twice so it can come round silently. A finger
   drag does nothing to a transform, so on a phone fifteen of the
   sixteen cards were reachable only by hitting a 44px arrow, fifteen
   times.

   THE TWO CANNOT BOTH DRIVE IT, which is the thing to get right. A
   rail that is scrolled by the finger and moved by a transform fights
   itself: the transform drags the content out from under the scroll
   position and the card under the thumb jumps. So below 820px the
   transform is turned off outright, with !important because the JS
   writes it inline, and the rail becomes a plain overflow-x scroller.
   The arrows go with it: they would move a thing that no longer
   listens.

   SNAP, AND THE SCROLLBAR HIDDEN. Each card snaps to the left edge so
   a flick lands on a card rather than between two, and the bar itself
   is hidden because iOS shows none and Android's sits across the
   bottom of the photographs.

   820px, not 700, because that is where this rail is already down to
   two cards across and the arrows start to be most of what you see. */
@media (max-width:820px){
  html body #hub .hub-rail{overflow-x:auto;overflow-y:hidden;
    -webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;
    scrollbar-width:none;scroll-padding-left:0;}
  html body #hub .hub-rail::-webkit-scrollbar{display:none;}
  html body #hub .hub-track{transform:none !important;width:max-content;
    transition:none !important;}
  /* THE CARD IS NARROWER THAN THE RAIL ON PURPOSE, so the next one
     peeks and the rail looks like it continues. Measured first: at
     iPhone 13 width the rail's own box is 326px inside the wrap's
     padding, and the card was coming out 360 because the two column
     rule above still had hold of the flex basis. Doubled class and
     !important, which is this project's rule whenever extract_css
     could reorder the two. 78vw of a 390px screen is 304, which
     leaves 22px of the next card showing. */
  html body #hub .hub-track .hubc.hubc{scroll-snap-align:start;
    flex:0 0 78vw !important;max-width:none !important;}
  html body #hub .hub-a{display:none !important;}
}
@media (max-width:900px){
  .tier-top{flex-direction:column;align-items:flex-start;gap:22px;}
  .tier-side{width:100%;justify-content:space-between;
    flex-wrap:wrap;row-gap:16px;}
  html body a.tier-cta{max-width:100%;white-space:normal;}
  .hubg{grid-template-columns:1fr;}
  .xpo{grid-template-columns:1fr;}
  .xpo-hd{padding:34px 26px 26px;}
  .xpo-list{grid-column:1/-1;padding:0 26px 30px;}
  .xpo-ph{grid-column:1/-1;grid-row:auto;min-height:220px;}
}


/* ========== the pages we had spent less time on (thinpage.py) ========== */
/* THE ICON TIER SLIDES UP OVER THE TIER ABOVE IT, WHICH IS THE POINT, AND
   ON these pages the tier above ends in a row of captions. The panel came up
   over them and cut the captions in half. The gallery that sits directly
   under an icon tier is given the room the panel takes. */
.gal-pad{padding-bottom:120px;}
@media (max-width:900px){
  .gal-pad{padding-bottom:70px;}
}
