/* Fonts, type, the header bar and the section scaffolding every page shares. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../vendor/fonts/inter-latin.ccb673cf2526.woff2") format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../vendor/fonts/montserrat-latin.c12b1b57c020.woff2") format('woff2');
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
[hidden] { display: none !important; } /* the purged Bootstrap no longer carries this rule */

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
}

/* ---------- Type ---------- */

h1, h2, h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
}
h1 { font-weight: 800; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4, h5, h6 {
  margin: 0 0 .75rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }
/* The size of a heading level without its tag, so the outline stays in order (NFR-9, 1.3.1) while the look stays. */
.h3 { font-size: var(--fs-h3); }
.h4, .h5, .h6 { margin: 0 0 .75rem; font-family: var(--font); font-weight: 600; line-height: 1.25; letter-spacing: 0; color: var(--ink); }
.h4 { font-size: 1.25rem; }
.h5 { font-size: 1.125rem; }
.h6 { font-size: 1rem; }

p { margin: 0 0 1rem; max-width: var(--measure); }
a { text-underline-offset: .15em; }
.lead { font-size: 1.25rem; font-weight: 400; line-height: 1.55; color: var(--text-muted); }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--gold-deep); }

input, select, textarea, button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Skip link (NFR-9, 2.4.1): first in the page, off screen until it has focus. */
.skip-link { position: absolute; z-index: 1100; top: 0; left: 0; padding: .75rem 1.25rem; background: var(--ink); color: var(--text-on-ink); font-weight: 600; transform: translateY(-110%); }
.skip-link:focus { transform: none; color: var(--text-on-ink); }

/* ===== header:start ===== */
/* ---------- Header and phone menu (work item 037). Written for a narrow screen first: the base rules are the phone, and one
   `min-width: 992px` block at the end of this region makes the row of links, the hover menus and the contact strip. FR-3.37.5 ---------- */

.site-header { --strip-h: 2.5rem; position: sticky; top: 0; z-index: 1030; background: rgb(var(--ink-rgb) / .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.contact-strip { display: none; height: var(--strip-h); background: var(--ink-deep); color: var(--text-on-ink-muted); font-size: .85rem; }
.contact-strip .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 100%; }
.strip-licence { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 600; color: var(--text-on-ink); white-space: nowrap; }
.strip-licence i { color: var(--gold-bright); }
.contact-strip ul:only-child { margin-left: 0; }
.contact-strip ul { display: flex; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.contact-strip li { display: flex; align-items: center; gap: .5rem; }
.contact-strip i { color: var(--gold-bright); }
.contact-strip a { color: var(--text-on-ink); text-decoration: none; }
.contact-strip a:hover { color: var(--gold-bright); }

.navbar {
  padding: .5rem 0;
  border-bottom: 3px solid var(--gold);
  --bs-navbar-color: var(--text-on-ink);
  --bs-navbar-hover-color: var(--gold-bright);
  --bs-navbar-active-color: var(--gold-bright);
  --bs-navbar-brand-color: var(--text-on-ink);
  --bs-navbar-brand-hover-color: var(--text-on-ink);
}
.navbar > .container { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: .75rem; }
.navbar-brand { display: flex; align-items: center; gap: .7rem; min-width: 0; margin-right: 0; padding: 0; }
.navbar-brand img { display: block; flex: none; width: 40px; height: 44px; }
.brand-name {
  display: block;
  padding-bottom: .2rem;
  border-bottom: 2px solid var(--gold); /* the rule under the wordmark on the letterhead */
  font-family: var(--font-display);
  font-size: clamp(.9rem, .75rem + .7vw, 1.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: normal;
}

/* The Menu button. Without script it is a link to the footer's navigation (FR-3.37.6); menu.js makes it open the panel. */
.menu-button {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid rgb(255 255 255 / .35); border-radius: var(--radius);
  color: var(--text-on-ink); text-decoration: none;
}
.menu-button:hover { color: var(--gold-bright); border-color: var(--gold-bright); }
.menu-button svg, .menu-close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* The row of links is for wide screens only (below). */
.nav-row { display: none; }
.navbar-nav { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.navbar-nav .nav-link { padding: .5rem .75rem; font-family: var(--font-display); font-size: .875rem; font-weight: 600; transition: color var(--transition); }
.navbar-nav .nav-link.active { color: var(--gold-bright); }
.nav-menu { display: none; }
.nav-tools { display: flex; align-items: center; gap: 1rem; }
.nav-phone { color: var(--text-on-ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav-phone:hover { color: var(--gold-bright); }

/* The phone menu: a native modal dialog (decision 0058) at the right edge, the full height of the screen, leaving a strip of the page showing. */
.menu-panel {
  inset-block: 0; inset-inline-start: auto; inset-inline-end: 0;
  width: min(22rem, calc(100% - 3rem)); max-width: none;
  height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: var(--ink); color: var(--text-on-ink);
  box-shadow: -12px 0 40px rgb(0 0 0 / .35);
}
.menu-panel[open] { display: flex; flex-direction: column; }
/* The page behind an open panel does not scroll (the browser already makes it inert) */
html:has(dialog[open]) { overflow: hidden; }
.menu-panel::backdrop { background: rgb(var(--ink-rgb) / .62); }
.menu-top { display: flex; flex: none; align-items: center; justify-content: space-between; min-height: 64px; padding: .5rem .75rem .5rem 1.25rem; border-bottom: 1px solid rgb(255 255 255 / .12); }
.menu-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; }
.menu-close { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid rgb(255 255 255 / .35); border-radius: var(--radius); background: transparent; color: var(--text-on-ink); }
.menu-close:hover { color: var(--gold-bright); border-color: var(--gold-bright); }

.menu-list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: .25rem 0 .75rem; }
.menu-list ul { margin: 0; padding: 0; list-style: none; }
.menu-list > ul > li + li { border-top: 1px solid rgb(255 255 255 / .08); }
.menu-link, .menu-list summary {
  display: flex; align-items: center; gap: .75rem;
  min-height: 52px; padding: .5rem 1.25rem;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600; line-height: 1.25;
  color: var(--text-on-ink); text-decoration: none; cursor: pointer;
}
.menu-link:hover, .menu-list summary:hover { background: rgb(255 255 255 / .06); color: var(--text-on-ink); }
.menu-link.active, .menu-list details[open] > summary { color: var(--gold-bright); }
.menu-list summary { justify-content: space-between; list-style: none; }
.menu-list summary::-webkit-details-marker { display: none; }
.menu-list summary::after { content: ''; flex: none; width: .5rem; height: .5rem; margin-right: .25rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.menu-list details[open] > summary::after { transform: rotate(-135deg); }
.menu-list details ul { padding: .25rem 0 .5rem; background: rgb(255 255 255 / .04); }
.menu-list details .menu-link { min-height: 48px; padding-left: 1.75rem; font-family: var(--font); font-size: .95rem; font-weight: 500; }
.menu-list details .menu-link i { flex: 0 0 1.25rem; text-align: center; color: var(--gold-bright); }
.menu-list .menu-all { color: var(--gold-light); font-weight: 700; }

.menu-foot { flex: none; padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid rgb(255 255 255 / .12); background: var(--ink-deep); }
.menu-foot { display: grid; gap: .6rem; }
.menu-contact { display: flex; gap: .6rem; }
.menu-contact .btn { flex: 1 1 0; }
.menu-foot .btn { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; }
.menu-foot .btn-primary { width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes menu-in { from { transform: translateX(100%); } to { transform: none; } }
  .menu-panel[open] { animation: menu-in .22s ease-out; }
}

@media (min-width: 992px) {
  .site-header { top: calc(var(--strip-h) * -1); }
  .contact-strip { display: block; }
  .navbar { padding: .6rem 0; }
  .navbar-brand { margin-right: 1.5rem; gap: .85rem; }
  .navbar-brand img { width: 48px; height: 53px; }
  .menu-button { display: none; }
  .menu-panel[open] { display: none; }
  .nav-row { display: flex; flex: 1; align-items: center; justify-content: flex-end; }
  .navbar-nav { flex-direction: row; gap: .25rem; }
  .nav-phone { display: none; } /* the strip carries it */
  .navbar-nav .nav-link, .nav-tools .btn { white-space: nowrap; } /* at 992 px the arrow and the button text stay on their line; the brand name wraps instead */
  .nav-tools { margin-left: 1.25rem; }

  /* Services and Industries menus (FR-3.1.10): own CSS, open on hover and on keyboard focus, no script */
  .has-menu { position: relative; }
  .has-menu > .nav-link::after { content: ''; display: inline-block; width: .4em; height: .4em; margin-left: .45em; vertical-align: .2em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
  .nav-menu {
    position: absolute; top: 100%; left: -.5rem; z-index: 10;
    display: block; width: 19rem; padding: .5rem;
    border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 0 0 var(--radius) var(--radius);
    background: var(--paper); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .has-menu:hover > .nav-menu, .has-menu:focus-within > .nav-menu { opacity: 1; visibility: visible; transform: none; }
  .nav-menu ul { margin: 0; padding: 0; list-style: none; }
  .nav-menu a { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: calc(var(--radius) - 4px); font-size: .95rem; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; }
  .nav-menu a:hover, .nav-menu a:focus-visible { background: var(--stone); color: var(--ink); }
  .nav-menu i { flex: 0 0 1.25rem; text-align: center; color: var(--gold-deep); }
  .nav-menu .nav-menu-all { margin-top: .25rem; padding-top: .7rem; border-top: 1px solid var(--line); border-radius: 0; color: var(--gold-deep); }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) { .nav-menu { transition: none; } }
/* ===== header:end ===== */

/* ---------- Sections ---------- */

.band { padding-block: var(--section-y); scroll-margin-top: 64px; }
.band-stone { background: var(--stone); }

/* One heading pattern: the heading and a line under it on the left, an optional link to the whole list on the right */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.section-head h2 { margin: 0; }
.section-head p { margin: .75rem 0 0; color: var(--text-muted); }
.section-head .more { flex: 0 0 auto; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: .15rem; }
.section-head .more:hover { color: var(--gold-deep); }

/* Pictures: one ratio everywhere, so a row of cards lines up */
.thumb { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--stone); color: var(--text-muted); }
.thumb-xl { aspect-ratio: 1; }

/* Long text pages (privacy, blog posts) */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.5rem; font-family: var(--font); font-size: 1.375rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.prose li { margin-bottom: .35rem; }

/* The banner every inner page starts with (FR-3.1.13) */
.page-banner { padding-block: clamp(2.25rem, 5vw, 3.75rem); background: var(--ink) linear-gradient(120deg, var(--ink) 40%, var(--navy-deep)); color: var(--text-on-ink); }
.page-banner h1 { max-width: 24ch; margin: 0; color: #fff; overflow-wrap: anywhere; }
.page-banner p { margin: 1rem 0 0; color: var(--text-on-ink-muted); }
.trail { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .9rem; color: var(--text-on-ink-muted); }
.trail li + li::before { content: '/'; margin-right: .5rem; color: var(--gold-bright); }
.trail a { color: var(--text-on-ink); text-decoration: none; }
.trail a:hover { color: var(--gold-bright); text-decoration: underline; }
.page-banner + .band, .page-banner + .container.band { padding-top: clamp(2.5rem, 5vw, 4rem); }

.page-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.page-head h1 { margin: 0; }
.page-head::before { content: ''; display: block; width: 3rem; height: 4px; margin-bottom: 1rem; background: var(--gold); }
.page-head p { margin: 1rem 0 0; color: var(--text-muted); }

/* ---------- Moving between pages without a reload (js/router.js) ---------- */

main { transition: opacity .18s ease; }
main:focus { outline: none; }
main.is-leaving { opacity: 0; }
.spa-progress { position: fixed; top: 0; left: 0; z-index: 2000; width: 100%; height: 3px; background: var(--gold-bright); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
.spa-progress.on { opacity: 1; transform: scaleX(.7); transition: transform 1.2s cubic-bezier(.1, .6, .2, 1); }
.spa-progress.done { opacity: 0; transform: scaleX(1); transition: transform .2s ease, opacity .3s ease .2s; }
.visually-hidden, .visually-hidden-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { main { transition: none; } .spa-progress { transition: none !important; } }
