/* ==========================================================================
   shell.css — the chrome every public page wears.

   The brand header and footer used to exist only inside site.css, which layers
   six generations of overrides, so the text pages had nothing to borrow and
   were rebuilt from scratch: no mark, no nav, no footer, their own greys.
   The values below are the *effective computed* values of index.html at a
   1280px viewport, so the chrome reads the same on every page.

   Home sits its header on top of a dark hero, so its nav text is pale. These
   pages sit on the light ground, so they use the light-background variant that
   site.css already applies at its own small breakpoints (#3a5261).

   Loaded by: every public text page. site.css styles the home pages' own
   chrome and is not loaded here — the shared palette, gutter, measure and type
   scale come from tokens.css, which both sides load.
   ========================================================================== */

html {
  -webkit-text-size-adjust: 100%;
}

/* site.css carries this reset; the text pages do not load site.css, so without
   it `width:100%` plus gutter padding overflows the viewport. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

body > header {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin: 14px max(10px, calc(var(--shell-gutter) - 18px)) 0;
  padding: 8px 12px 8px 18px;
  border-radius: 34px;
  background: var(--bar-bg);
  box-shadow: 0 0 0 1px var(--bar-edge), var(--bar-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(120px, 11.5vw, 158px);
  height: auto;
  flex: none;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 1.375rem;
}

.section-nav {
  display: flex;
  gap: 2px;
  font-size: .93rem;
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: -.012em;
  color: var(--bar-ink);
}

.section-nav a {
  padding: .5em .85em;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  background: rgba(18, 33, 48, .07);
}

.language {
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(18, 33, 48, .07);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .03em;
  line-height: 1;
  color: var(--bar-ink);
  white-space: nowrap;
}

.language > span:not(.active) { display: none; }
.language a, .language .active { padding: .5em .68em; border-radius: 999px; }
.language a { color: #4a5e6d; text-decoration: none; }
.language .active { color: var(--bar-active); background: #fff; box-shadow: 0 1px 3px rgba(6, 22, 36, .18); }
.language a:hover,
.language a:focus-visible { color: var(--bar-active); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

body > footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.875rem;
  margin-top: auto;
  padding: 2rem var(--shell-gutter);
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-rule);
  color: var(--footer-ink);
  font-size: .78rem;
  line-height: 1.7;
}

/* The schema.org address span carries no visible text, but as a block-level
   flex item it still took a slot in the space-between row and pushed the brand
   block to the middle of the footer instead of onto the left rail. */
body > footer > [itemprop="address"] { display: contents; }

body.shell-stacked > footer {
  flex-direction: column;
  align-items: flex-start;
}

/* Home writes the tagline as an inline span after a <br>, so it simply
   inherits the footer's size and colour. These are block elements instead, for
   the same rendering: size, weight, colour and leading all inherit. */
.foot-lead .place { color: var(--footer-bright); }

.shell-tagline {
  max-width: 22rem;
  margin: 0;
}

body > footer .legal {
  max-width: 26rem;
  font-size: .72rem;
  line-height: 1.6;
}

body > footer .legal strong {
  color: var(--footer-bright);
  font-weight: 520;
  letter-spacing: .055em;
}

body > footer .legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}

body > footer .legal a:hover,
body > footer .legal a:focus-visible { color: var(--footer-bright); }

/* --------------------------------------------------------------------------
   Shared page frame
   Every text page is a flex column so the footer sits at the bottom of the
   viewport on short pages instead of floating mid-screen.
   -------------------------------------------------------------------------- */

body.shell-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* A full-bleed main with the same gutter as the header, so the text starts on
   the rail the brand sits on. Prose is held to --measure, the way home holds
   its right-hand column. `align-self` rather than `margin:auto`: an auto
   cross-axis margin would switch the item out of stretch and collapse it to
   its longest line. */
body.shell-page > main {
  flex: 1 0 auto;
  width: 100%;
  padding: 3rem var(--shell-gutter) 4.5rem;
}

/* Back to the services list, on the pages that need one. Sits where home puts
   its eyebrow, so the two read as the same opening move. Qualified with
   `.shell-page` so it outranks the content pages' own link colour, which would
   otherwise paint it the accent blue. */
.shell-page .shell-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
}

.shell-page .shell-back:hover,
.shell-page .shell-back:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; }

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  body > header {
    margin-inline: 10px;
    padding: 8px 8px 8px 14px;
    border-radius: 26px;
  }

  .head-right {
    flex-wrap: wrap;
    gap: .25rem;
    width: 100%;
    justify-content: space-between;
  }

  .section-nav { gap: 0; font-size: .84rem; white-space: nowrap; }
  .section-nav a { padding: .5em .55em; }

  body > footer {
    padding-block: 1.75rem;
    gap: 1.5rem;
  }
}