/* =========================================================
   5 Elements — styles
   Colours, gradients and type sizes are taken from the
   source deck (slides 1, 2 and the final slide).
   Layout: black hero and CTA bookend a white service band;
   the five brand gradients are the only colour on the page.
   ========================================================= */

/* Carlito is the open-licence, metric-compatible substitute for Calibri (the deck's theme font). */
@font-face {
  font-family: "Carlito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../media/fonts/carlito-bold-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* Brand gradient pairs (one per service line) */
  --drilling-dark: #2d4c84;
  --drilling-light: #4a77c7;
  --intervention-red: #fb1847;
  --intervention-amber: #f3aa00;
  --fishing-light: #afafaf;
  --fishing-dark: #2b2b2b;
  --production-teal: #07846f;
  --production-lime: #7cff6c;
  --engineering-violet: #7f82eb;
  --engineering-cyan: #38e2e2;

  /* Request a quote / Send request buttons (blue bar on the deck's style sheet) */
  --quote-light: #4891cc;
  --quote-dark: #2b577a;

  /* The five brand gradients as hard-edged segments, in service-line order
     (accent lines; the footer stripe image uses the same order) */
  --five-stripe: var(--drilling-dark) 0, var(--drilling-light) 20%, var(--fishing-dark) 20%, var(--fishing-light) 40%, var(--intervention-red) 40%, var(--intervention-amber) 60%, var(--production-teal) 60%, var(--production-lime) 80%, var(--engineering-violet) 80%, var(--engineering-cyan) 100%;

  /* Heading text colours from slide 2 */
  --text-drilling: #2f5597;
  --text-intervention: #bd5a1d;
  --text-fishing: #0d0d0d;
  --text-milling: #767171;
  --text-monitoring: #00b050;
  --text-production: #92d050;
  --text-engineering: #00b0f0;
  --text-solutions: #7f81c3;

  /* Neutrals, biased slightly toward the drilling blue */
  --black: #000000;
  --white: #ffffff;
  --ink: #111318;
  --ink-soft: #3d424d;
  --mist: #b8bdc8;
  --hairline-dark: rgba(255, 255, 255, 0.14);
  --hairline-light: rgba(17, 19, 24, 0.1);
  --paper: #f4f5f8;

  --font-body: Verdana, Geneva, "DejaVu Sans", sans-serif;
  --font-display: "Carlito", Calibri, "Segoe UI", Arial, sans-serif;

  --container: 1280px;
  --header-h: clamp(4rem, 6vw, 5rem);
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --section-space: clamp(4rem, 9vw, 7rem);
  --radius: 0.8rem;
  --heading-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Icons, inlined copies of assets/media/icons/*.svg (CSS masks cannot load local files over file://) */
  --icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
  --icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E");
  --icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");

  /* PowerPoint gradient angle of 12° maps to CSS 102° */
  --grad-angle: 102deg;
}

/* ---------- Service-line tones (shared by hero bands and service tiles) ----------
   --strip-* stops: on the slide the overlapping bands show only the middle
   slice (about 34.5%-65.5%) of each gradient, so the hero strips stretch
   their ramp to match. */
.tone-drilling {
  --tone-a: var(--drilling-dark);
  --tone-a-stop: 34%;
  --tone-b: var(--drilling-light);
  --tone-b-stop: 80%;
  --tone-text: var(--text-drilling);
  --strip-a-stop: -1.6%;
  --strip-b-stop: 146.8%;
}

.tone-intervention {
  --tone-a: var(--intervention-red);
  --tone-a-stop: 30%;
  --tone-b: var(--intervention-amber);
  --tone-b-stop: 56%;
  --tone-text: var(--text-intervention);
  --strip-a-stop: -14.5%;
  --strip-b-stop: 69.4%;
}

.tone-fishing {
  --tone-a: var(--fishing-light);
  --tone-a-stop: 28%;
  --tone-b: var(--fishing-dark);
  --tone-b-stop: 74%;
  --tone-text: var(--text-milling);
  --strip-a-stop: -21.0%;
  --strip-b-stop: 127.4%;
}

.tone-production {
  --tone-a: var(--production-teal);
  --tone-a-stop: 28%;
  --tone-b: var(--production-lime);
  --tone-b-stop: 74%;
  --tone-text: var(--text-monitoring);
  --strip-a-stop: -21.0%;
  --strip-b-stop: 127.4%;
}

.tone-engineering {
  --tone-a: var(--engineering-violet);
  --tone-a-stop: 28%;
  --tone-b: var(--engineering-cyan);
  --tone-b-stop: 74%;
  --tone-text: var(--text-engineering);
  --strip-a-stop: -21.0%;
  --strip-b-stop: 127.4%;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--intervention-amber);
  color: var(--black);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1,
h2 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--intervention-amber);
  outline-offset: 3px;
}

[tabindex="-1"]:focus {
  outline: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--black);
  border-radius: 0.25rem;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Brand (logo mark + wordmark) ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--white);
  text-decoration: none;
  text-shadow: var(--heading-shadow);
}

.brand__mark {
  width: auto;
  height: 1.55em;
  transition: transform 0.4s var(--ease-out);
}

.brand:hover .brand__mark {
  transform: skewX(-6deg) translateX(-2px);
}

.brand--footer {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  gap: 0.35em;
}

.brand--footer .brand__mark {
  height: 1.4em;
}

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.97);
  border-bottom-color: var(--hairline-dark);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand--header {
  font-size: clamp(1.3rem, 2.1vw, 1.85rem);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1.2vw, 1rem);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.6rem 0.9rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--mist);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease;
}

/* Gradient underline marks hover and the section in view */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.3rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--quote-light), var(--quote-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-link:hover,
.nav-link.is-current,
.nav-link[aria-expanded="true"] {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.is-current::after {
  transform: scaleX(1);
}

.nav-caret {
  width: 0.45em;
  height: 0.45em;
  margin-top: -0.2em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

.nav-link[aria-expanded="true"] .nav-caret {
  margin-top: 0.2em;
  transform: rotate(-135deg);
}

/* Tools dropdown */
.nav-item--tools {
  position: relative;
}

.tools-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 21rem;
  max-width: calc(100vw - 2rem);
  padding: 0.5rem;
  border: 1px solid var(--hairline-dark);
  border-radius: 0.9rem;
  background: #0b0c10;
  box-shadow: 0 1.5rem 3rem -1rem rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.4rem);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}

/* Invisible bridge so the pointer can travel from the button into the menu */
.tools-menu::before {
  content: "";
  position: absolute;
  inset: -0.7rem 0 100% 0;
}

.nav-item--tools.is-open .tools-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s;
}

.tools-menu__link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--mist);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.tools-menu__link:hover,
.tools-menu__link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.tools-menu__swatch {
  flex: none;
  width: 1.6rem;
  height: 1rem;
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%);
  background: linear-gradient(var(--grad-angle), var(--tone-a) var(--tone-a-stop), var(--tone-b) var(--tone-b-stop));
  transition: transform 0.3s var(--ease-out);
}

.tools-menu__link:hover .tools-menu__swatch {
  transform: translateX(0.15rem);
}

/* Hamburger (shown on small screens only) */
.nav-toggle {
  display: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--white);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), background-color 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  transform: translateY(-0.45rem);
}

.nav-toggle__bars::after {
  transform: translateY(0.45rem);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: rotate(-45deg);
}

/* Offset in-page jumps so targets clear the sticky header */
[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* ---------- Hero (slide 1) ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--black);
  padding-top: clamp(1rem, 2.5vw, 2rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

/* Soft light spill from the bands onto the black canvas */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38% 46% at 74% 34%, rgba(74, 119, 199, 0.2), transparent 70%),
    radial-gradient(30% 36% at 86% 52%, rgba(56, 226, 226, 0.1), transparent 70%),
    radial-gradient(26% 32% at 66% 56%, rgba(243, 170, 0, 0.08), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero__copy {
  min-width: 0;
  padding-top: clamp(2rem, 6vw, 5.5rem);
}

.hero__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 3.15rem);
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-shadow: var(--heading-shadow);
}

.hero__lead {
  max-width: 34rem;
  margin-top: clamp(2rem, 5vw, 4.5rem);
  padding-left: 1rem;
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--five-stripe)) 1;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.55;
  color: var(--mist);
}

/* Service-line bands: five slanted gradient columns with stacked lettering */
.bands {
  --band-skew: -9.3deg;
  container-type: inline-size;
  justify-self: end;
  display: flex;
  width: min(100%, 31rem);
  aspect-ratio: 333 / 343;
  max-width: 100%;
  padding-inline: 8.4%;
  filter: drop-shadow(0 1.5rem 2.5rem rgba(0, 0, 0, 0.55));
}

.band {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Left to right across the strip; the skew slants the colour boundaries with the band, as on the slide */
  background: linear-gradient(90deg, var(--tone-a) var(--strip-a-stop), var(--tone-b) var(--strip-b-stop));
  transform: skewX(var(--band-skew));
  transition: transform 0.45s var(--ease-out), filter 0.45s var(--ease-out);
}

/* Thin highlight on each band's leading edge gives the stack some depth */
.band::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.band:hover {
  filter: brightness(1.12) saturate(1.08);
  transform: skewX(var(--band-skew)) translateY(-0.6rem);
}

.band__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.9cqw;
  line-height: 1;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.band--small .band__label {
  font-size: 4.2cqw;
}

.band__label>span {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.12em;
}

/* Temporary notice shown in place of the key figures */
.hero__notice {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--hairline-dark);
  font-weight: 700;
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
  line-height: 1.4;
  text-align: center;
  color: var(--white);
}

/* Keep the notice on one line wherever the width allows */
@media (min-width: 901px) {
  .hero__notice {
    white-space: nowrap;
  }
}

/* Key figures */
.stats[hidden] {
  display: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--hairline-dark);
  font-weight: 700;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0.75rem 0;
}

.stat+.stat {
  border-left: 1px solid var(--hairline-dark);
}

.stat__value {
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: clamp(0.85rem, 1vw, 0.98rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--mist);
}

/* ---------- Services (slide 2) ---------- */
.services {
  background: var(--paper);
  color: var(--ink);
  padding-block: var(--section-space);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 1.6vw, 1.5rem);
}

/* Each service is one card; the whole card follows its "Read more" link */
.service {
  --card-pad: clamp(1.1rem, 1.5vw, 1.5rem);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding-bottom: var(--card-pad);
  overflow: hidden;
  border: 1px solid var(--hairline-light);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 0.75rem 1.75rem -1.25rem rgba(17, 19, 24, 0.18);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
}

/* Soft light that follows the pointer (position set by script.js) */
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(18rem circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--tone-b) 16%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service:hover {
  transform: translateY(-0.4rem);
  border-color: color-mix(in srgb, var(--tone-a) 35%, transparent);
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 1.5rem 2.5rem -1.5rem color-mix(in srgb, var(--tone-a) 60%, transparent);
}

.service:hover::before {
  opacity: 1;
}

.service:target {
  border-color: color-mix(in srgb, var(--tone-a) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone-a) 30%, transparent), 0 1.5rem 2.5rem -1.5rem color-mix(in srgb, var(--tone-a) 60%, transparent);
}

.service:has(.service__link:focus-visible) {
  outline: 3px solid var(--tone-a);
  outline-offset: 3px;
}

.service__title,
.service__text,
.service__link {
  margin-inline: var(--card-pad);
}

/* Card header: the deck's rotated "manual input" shape, flat top and bottom edge rising to the right */
.service__swatch {
  width: 100%;
  height: clamp(5.5rem, 8vw, 7.25rem);
  margin-bottom: 0.25rem;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
  background: linear-gradient(calc(var(--grad-angle) + 180deg), var(--tone-a) var(--tone-a-stop), var(--tone-b) var(--tone-b-stop));
  background-size: 150% 100%;
  background-position: 0 0;
  transition: background-position 0.8s var(--ease-out);
}

.service:hover .service__swatch {
  background-position: 100% 0;
}

.service__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-shadow: var(--heading-shadow);
}

.service__title--drilling {
  color: var(--text-drilling);
}

.service__title--intervention {
  color: var(--text-intervention);
}

.service__title--fishing {
  color: var(--text-fishing);
}

.service__title--milling {
  color: var(--text-milling);
}

.service__title--monitoring {
  color: var(--text-monitoring);
}

.service__title--production {
  color: var(--text-production);
}

.service__title--engineering {
  color: var(--text-engineering);
}

.service__title--solutions {
  color: var(--text-solutions);
}

.service__text {
  margin-bottom: 0.75rem;
  font-size: clamp(0.88rem, 1vw, 0.95rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.service__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--hairline-light);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

/* Stretch the link's hit area over the whole card */
.service__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.service__link::after {
  content: "→";
  content: "→" / "";
  transition: transform 0.35s var(--ease-out);
}

.service__link:focus-visible {
  outline: none;
}

.service:hover .service__link,
.service__link:focus-visible {
  border-color: transparent;
  background: linear-gradient(var(--grad-angle), var(--tone-a), var(--tone-b)) border-box;
  color: var(--white);
  text-shadow: var(--heading-shadow);
}

.service:hover .service__link::after,
.service__link:focus-visible::after {
  transform: translateX(0.25rem);
}

/* ---------- Contact CTA (last slide) ---------- */
.contact {
  background: var(--black);
  padding-top: var(--section-space);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 29.5rem);
  align-items: start;
  gap: 2.5rem clamp(2rem, 4vw, 4rem);
}

.contact__copy {
  min-width: 0;
}

.contact__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.1vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-shadow: var(--heading-shadow);
}

.contact__lead {
  margin-top: 0.85rem;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  color: var(--mist);
}

.contact__actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.3rem;
}

.btn-quote {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1em;
  padding: 0.55em 1em;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--quote-light), var(--quote-dark));
  box-shadow: 0 0.5rem 1.5rem rgba(72, 145, 204, 0.2);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.75vw, 1.6rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  text-shadow: var(--heading-shadow);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

/* Light sheen that sweeps across on hover */
.btn-quote::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease-out);
}

.btn-quote:hover {
  box-shadow: 0 0.9rem 2.2rem rgba(72, 145, 204, 0.38);
  transform: translateY(-2px);
}

.btn-quote:hover::after {
  transform: translateX(110%);
}

.btn-quote:active {
  transform: translateY(0);
}

.contact__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
}

.contact__details a {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding-block: 0.3rem;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.contact__details a::before {
  content: "";
  flex: none;
  width: 1.05em;
  height: 1.05em;
  background: linear-gradient(90deg, var(--quote-light), var(--quote-dark));
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.contact__phone {
  --icon: var(--icon-phone);
}

.contact__email {
  --icon: var(--icon-mail);
}

.contact__details a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ---------- Footer (last slide) ---------- */
.site-footer {
  background: var(--black);
}

.footer__inner {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--hairline-dark);
}

.site-footer .brand {
  margin-left: clamp(0rem, 2.5vw, 2rem);
}

.addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 2rem clamp(3rem, 14vw, 12rem);
  margin-top: clamp(2rem, 4.5vw, 3.25rem);
  margin-left: clamp(0rem, 1.5vw, 1rem);
  padding-bottom: clamp(3rem, 8vw, 6.5rem);
}

.address {
  font-style: normal;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.55;
}

.address__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85em;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.address__map {
  display: block;
  width: fit-content;
  margin-top: 0.6rem;
  font-size: 0.85em;
  font-weight: 700;
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--quote-light);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.address__map::after {
  content: " ↗";
  content: " ↗" / "";
}

.address__map:hover {
  text-decoration-color: var(--white);
}

.footer-stripe {
  display: block;
  width: 100%;
  /* Height follows the width so narrow screens show all five colours; wide screens trim only top and bottom */
  height: auto;
  max-height: 50px;
  object-fit: cover;
}

/* =========================================================
   Tool pages (deck slides 3-9)
   ========================================================= */

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--black);
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}

/* Glow tinted with the page's service colours */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(34% 55% at 80% 45%, color-mix(in srgb, var(--tone-a) 26%, transparent), transparent 70%),
    radial-gradient(26% 40% at 90% 70%, color-mix(in srgb, var(--tone-b) 14%, transparent), transparent 70%);
  pointer-events: none;
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.page-hero__copy {
  min-width: 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--mist);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.6rem;
  color: rgba(255, 255, 255, 0.3);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.breadcrumb [aria-current] {
  color: var(--white);
}

.page-hero__title {
  margin-top: clamp(1rem, 2.5vw, 1.75rem);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.6vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-shadow: var(--heading-shadow);
}

.page-hero__lead {
  max-width: 36rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding-left: 1rem;
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--five-stripe)) 1;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: var(--mist);
}

/* "On this page" jump links */
.tool-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: clamp(1.5rem, 3.5vw, 2.5rem);
}

.tool-index a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--hairline-dark);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.tool-index a:hover,
.tool-index a:focus-visible {
  border-color: color-mix(in srgb, var(--tone-b) 70%, transparent);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

/* The five-band graphic doubles as a switcher between tool pages */
.bands--nav {
  width: min(100%, 22rem);
}

.bands--nav .band {
  filter: grayscale(0.85) brightness(0.45);
}

.bands--nav .band:hover,
.bands--nav .band:focus-visible {
  filter: none;
}

.bands--nav .band[aria-current="page"] {
  filter: none;
  transform: skewX(var(--band-skew)) translateY(-0.6rem);
}

.bands--nav .band:focus-visible {
  outline-offset: -3px;
}

/* ---------- Tool cards ---------- */
.tools-section {
  background: var(--paper);
  color: var(--ink);
  padding-block: var(--section-space);
}

.tool-list {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  overflow: hidden;
  border: 1px solid var(--hairline-light);
  border-radius: 1.1rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 0.75rem 1.75rem -1.25rem rgba(17, 19, 24, 0.18);
}

/* Thin service-colour rule along the top edge */
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(var(--grad-angle), var(--tone-a) var(--tone-a-stop), var(--tone-b) var(--tone-b-stop));
}

.tool-card--text {
  grid-template-columns: minmax(0, 1fr);
}

.tool-card--text .tool-card__body p,
.tool-card--text .tool-points dd {
  max-width: none;
}

.tool-card__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  border-right: 1px solid var(--hairline-light);
  /* Pure white so the photos' own white backgrounds disappear into the panel */
  background: var(--white);
}

.tool-card__figure--row {
  flex-direction: row;
  flex-wrap: wrap;
}

/* Alternate image side down the page */
.tool-card:nth-child(even) .tool-card__figure {
  order: 2;
  border-right: 0;
  border-left: 1px solid var(--hairline-light);
}

.tool-figure__zoom {
  position: relative;
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  cursor: zoom-in;
}

.tool-figure__zoom img {
  width: auto;
  max-width: 100%;
  max-height: clamp(8rem, 17vw, 14rem);
  margin-inline: auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}

.tool-card__figure--row .tool-figure__zoom img {
  max-height: clamp(6.5rem, 11vw, 9.5rem);
}

/* Enlarge hint */
.tool-figure__zoom::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(17, 19, 24, 0.75);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--white);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
}

.tool-figure__zoom:hover img {
  transform: scale(1.04);
}

.tool-figure__zoom:hover::after,
.tool-figure__zoom:focus-visible::after {
  opacity: 1;
  transform: none;
}

.tool-card__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
}

.tool-card__title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.2;
  color: var(--ink);
}

.tool-card__title::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 0.9rem;
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%);
  background: linear-gradient(var(--grad-angle), var(--tone-a) var(--tone-a-stop), var(--tone-b) var(--tone-b-stop));
}

/* Five slanted strips in the brand colours, as on the deck's style sheet */
.tool-card__title--brand::before {
  width: 2.1rem;
  height: 1.1rem;
  clip-path: none;
  background: linear-gradient(90deg, var(--five-stripe));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 15%, transparent 15% 20%);
  mask: repeating-linear-gradient(90deg, #000 0 15%, transparent 15% 20%);
  transform: skewX(-18deg);
}

.tool-card__body p {
  max-width: 72ch;
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

.tool-card__body strong {
  color: var(--ink);
}

/* Named variants (jar types, barrels / heads) */
.tool-points {
  display: grid;
  gap: 1rem;
  margin: 0.25rem 0 0;
}

.tool-points > div {
  padding-left: 1rem;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--tone-a), var(--tone-b)) 1;
}

.tool-points dt {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.tool-points dd {
  max-width: 72ch;
  margin: 0.3rem 0 0;
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Item lists as chips */
.spec-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.spec-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--hairline-light);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--ink);
}

.spec-list li::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(var(--grad-angle), var(--tone-a), var(--tone-b));
}

.tool-subhead {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
}

/* Engineering capabilities */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}

.feature-grid li {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.25rem 1.25rem;
  border: 1px solid var(--hairline-light);
  border-radius: 0.8rem;
  background: var(--paper);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.feature-grid li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(var(--grad-angle), var(--tone-a), var(--tone-b));
}

.feature-grid strong {
  display: block;
  margin-bottom: 0.4rem;
}

/* ---------- Other tools ---------- */
.related {
  background: var(--white);
  color: var(--ink);
  padding-block: var(--section-space);
}

.related__title {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  letter-spacing: 0.01em;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 1.6vw, 1.5rem);
}

/* ---------- Contact page ---------- */
.page-hero--contact .contact__actions {
  width: 100%;
  max-width: 29.5rem;
  justify-self: end;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.form-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  overflow: hidden;
  border: 1px solid var(--hairline-light);
  border-radius: 1.1rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 0.75rem 1.75rem -1.25rem rgba(17, 19, 24, 0.18);
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(var(--grad-angle), var(--tone-a) var(--tone-a-stop), var(--tone-b) var(--tone-b-stop));
}

#quote-form::before {
  background: linear-gradient(90deg, var(--quote-light), var(--quote-dark));
}

.form-card__intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.field__req {
  color: var(--intervention-red);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(17, 19, 24, 0.18);
  border-radius: 0.6rem;
  background: var(--white);
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  color-scheme: light;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(17, 19, 24, 0.35);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--tone-a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone-a) 22%, transparent);
}

.field [aria-invalid="true"] {
  border-color: var(--intervention-red);
}

.select {
  position: relative;
}

.select select {
  appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
}

.select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.35rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  pointer-events: none;
}

.form-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-top: 0.25rem;
}

.btn-quote--compact {
  min-height: 0;
  padding: 0.85rem 1.75rem;
  border: 0;
  font-family: inherit;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  cursor: pointer;
}

.form-card__status {
  flex: 1 1 16rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.form-card__status.is-error {
  color: #b3122f;
}

/* Form result toast (top layer via popover, fixed fallback otherwise) */
.toast {
  position: fixed;
  inset: auto 1rem 1rem auto;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  width: min(26rem, calc(100vw - 2rem));
  margin: 0;
  padding: 1rem 1rem 1rem 1.25rem;
  overflow: visible;
  border: 0;
  border-left: 4px solid #0a8a4a;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 1.25rem 2.5rem -0.75rem rgba(0, 0, 0, 0.45);
}

.toast.is-visible {
  display: flex;
}

.toast.is-error {
  border-left-color: #b3122f;
}

.toast__text {
  flex: 1;
  margin: 0;
}

.toast__close {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 30rem) {
  .toast {
    inset: auto 1rem 1rem 1rem;
    width: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .toast.is-visible {
    animation: toast-in 0.35s var(--ease-out);
  }

  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(1rem);
    }
  }
}

/* Contact detail cards */
.info-list {
  display: grid;
  gap: 1rem;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--hairline-light);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 0.75rem 1.75rem -1.25rem rgba(17, 19, 24, 0.18);
}

.info-card > div {
  min-width: 0;
}

.info-card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--quote-light) 12%, var(--white));
}

.info-card__icon::before {
  content: "";
  width: 1.3rem;
  height: 1.3rem;
  background: linear-gradient(90deg, var(--quote-light), var(--quote-dark));
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.info-card--phone {
  --icon: var(--icon-phone);
}

.info-card--mail {
  --icon: var(--icon-mail);
}

.info-card--pin {
  --icon: var(--icon-pin);
}

.info-card__label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.info-card__value {
  margin-top: 0.3rem;
  font-style: normal;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.info-card__value a {
  text-decoration: none;
}

.info-card__value a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.info-card__link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--quote-light);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.info-card__link::after {
  content: " ↗";
  content: " ↗" / "";
}

/* ---------- Enquiry button and dialog (tool pages) ---------- */
.tool-card__actions {
  display: flex;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Same pill as the home cards' "Read more", filled with the service colours on hover */
.enquire-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--hairline-light);
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.enquire-btn::after {
  content: "→";
  content: "→" / "";
  transition: transform 0.35s var(--ease-out);
}

.enquire-btn:hover,
.enquire-btn:focus-visible {
  border-color: transparent;
  background: linear-gradient(var(--grad-angle), var(--tone-a), var(--tone-b)) border-box;
  color: var(--white);
  text-shadow: var(--heading-shadow);
  box-shadow: 0 0.6rem 1.4rem -0.6rem color-mix(in srgb, var(--tone-a) 70%, transparent);
}

.enquire-btn:hover::after,
.enquire-btn:focus-visible::after {
  transform: translateX(0.25rem);
}

.enquiry {
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 1.1rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2rem 4rem -1rem rgba(0, 0, 0, 0.6);
}

.enquiry::backdrop {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.enquiry__form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* Service-colour rule along the top, as on the tool cards */
.enquiry__form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(var(--grad-angle), var(--tone-a) var(--tone-a-stop), var(--tone-b) var(--tone-b-stop));
}

.enquiry__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-right: 2.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.enquiry__eyebrow::before {
  content: "";
  flex: none;
  width: 1.2rem;
  height: 0.7rem;
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%);
  background: linear-gradient(var(--grad-angle), var(--tone-a) var(--tone-a-stop), var(--tone-b) var(--tone-b-stop));
}

.enquiry__title {
  margin-top: -0.4rem;
  padding-right: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.2;
}

.dialog-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--hairline-light);
}

/* Form helpers shared by the enquiry and quote forms */
.field__opt {
  font-weight: 400;
  color: var(--ink-soft);
}

.field__error {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #b3122f;
}

.field__error:empty {
  display: none;
}

/* reCAPTCHA notice; Google allows hiding the floating badge when this text is shown */
.form-legal {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.form-legal a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.grecaptcha-badge {
  visibility: hidden;
}

/* Bot trap: kept out of sight and out of the tab order */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-quote--compact:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ---------- Image lightbox ---------- */
.lightbox {
  width: min(64rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: clamp(1rem, 3vw, 2rem);
  border: 0;
  border-radius: 1rem;
  background: var(--white);
  color: var(--ink);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox__img {
  width: 100%;
  max-height: 72dvh;
  object-fit: contain;
}

.lightbox__caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  text-align: center;
  color: var(--ink-soft);
}

.lightbox__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.lightbox__close:hover {
  background: var(--hairline-light);
}

/* ---------- Entrance animation ----------
   Content is visible by default. script.js marks only the blocks that start
   below the fold as pending, and reveals them as they scroll into view. */
@media (prefers-reduced-motion: no-preference) {
  .reveal.is-pending {
    opacity: 0;
    transform: translateY(1.5rem);
  }

  /* Timing applies only while a block fades in, so it never slows later hover effects */
  .reveal.is-revealing {
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  }

  .services__grid>.is-revealing:nth-child(2) {
    transition-delay: 0.07s;
  }

  .services__grid>.is-revealing:nth-child(3) {
    transition-delay: 0.14s;
  }

  .services__grid>.is-revealing:nth-child(4) {
    transition-delay: 0.21s;
  }

  .services__grid>.is-revealing:nth-child(5) {
    transition-delay: 0.28s;
  }
}

@media (prefers-reduced-motion: reduce) {

  .site-nav,
  .tools-menu,
  .nav-caret,
  .nav-link::after,
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {

  /* 3 + 2 cards, with the second row centred */
  .services__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .services__grid > .service {
    grid-column: span 2;
  }

  .services__grid > .service:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 1.5rem;
  }

  /* 3 + 2 layout, with the second row centred */
  .stat {
    grid-column: span 2;
  }

  .stat:nth-child(4) {
    grid-column: 2 / span 2;
    border-left: 0;
  }

  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact__actions {
    max-width: 30rem;
  }

  .page-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bands--nav {
    justify-self: start;
    width: min(100%, 15rem);
  }

  .page-hero--contact .contact__actions {
    justify-self: start;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Small screens: menu collapses behind the hamburger (only when script.js is running) */
@media (max-width: 820px) {
  .js-nav .nav-toggle {
    display: grid;
  }

  .js-nav .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 0.5rem max(var(--gutter), env(safe-area-inset-right, 0px)) 1.5rem max(var(--gutter), env(safe-area-inset-left, 0px));
    border-bottom: 1px solid var(--hairline-dark);
    background: var(--black);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
  }

  .js-nav.is-menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s;
  }

  .js-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .js-nav .nav-list>li+li {
    border-top: 1px solid var(--hairline-dark);
  }

  .js-nav .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 1.05rem;
  }

  .js-nav .nav-link::after {
    left: 0;
    right: auto;
    width: 2rem;
    bottom: 0.55rem;
  }

  /* Tools opens as an inline accordion */
  .js-nav .tools-menu {
    position: static;
    width: auto;
    max-width: none;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    transform: none;
    display: none;
  }

  .js-nav .tools-menu::before {
    content: none;
  }

  .js-nav .nav-item--tools.is-open .tools-menu {
    display: block;
    padding-bottom: 0.75rem;
  }

  .js-nav .tools-menu__link {
    padding-inline: 0.5rem;
  }
}

@media (max-width: 767px) {
  .hero::before {
    background:
      radial-gradient(60% 30% at 50% 62%, rgba(74, 119, 199, 0.2), transparent 70%),
      radial-gradient(40% 20% at 70% 70%, rgba(56, 226, 226, 0.1), transparent 70%);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__copy {
    padding-top: 1.5rem;
  }

  .hero__lead {
    margin-top: 1.5rem;
  }

  .bands {
    justify-self: center;
    width: min(100%, 24rem);
  }

  /* 2 + 2 + 1 cards, with the last one centred */
  .services__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .services__grid > .service:nth-child(4) {
    grid-column: span 2;
  }

  .services__grid > .service:last-child {
    grid-column: 2 / span 2;
  }

  /* Compact tool-page hero: the menu already offers the jump links and tool switching */
  .page-hero {
    padding-block: 1.25rem 2rem;
  }

  .page-hero__title {
    margin-top: 0.75rem;
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .page-hero__lead {
    margin-top: 1rem;
    font-size: 0.95rem;
  }

  .tool-index,
  .bands.bands--nav {
    display: none;
  }

  /* Title and description first, image below */
  .tool-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-card__figure,
  .tool-card:nth-child(even) .tool-card__figure {
    order: 2;
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--hairline-light);
  }
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat,
  .stat:nth-child(4) {
    grid-column: auto;
    border-left: 0;
  }

  .stat:nth-child(even) {
    border-left: 1px solid var(--hairline-dark);
  }

  .stat:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--hairline-dark);
  }

  .services__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .services__grid > .service,
  .services__grid > .service:nth-child(4),
  .services__grid > .service:last-child {
    grid-column: auto;
  }

  .addresses {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact__details {
    flex-direction: column;
  }

  .related__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn-quote--compact {
    width: 100%;
  }
}