/* Layout: plant-drawing feel in the Instrotech brand: navy and electric blue from the logo, hero over the brand pipework photo, services as ISA tag bubbles. */
:root {
  --bg: #f2f5f9;
  --surface: #ffffff;
  --ink: #0b1a2e;
  --muted: #4f5f73;
  --line: #d2dbe6;
  --steel: #032040;
  --steel-ink: #eaf2fc;
  --accent: #0a6fe0;
  --accent-ink: #ffffff;
  --accent-text: #0a5fc4;
  --bright: #2e90ff;
  --grid: rgba(3,32,64,.06);
  --display: "Exo 2", "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #061426; --surface: #0b1e36; --ink: #e6eef8; --muted: #9db0c7; --line: #1d3352;
  --steel: #021630; --steel-ink: #e6eef8; --accent: #0b7eff; --accent-ink: #ffffff; --accent-text: #5aa8ff; --bright: #3d98ff; --grid: rgba(230,238,248,.05);
  color-scheme: dark } }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; text-wrap: balance; margin: 0; letter-spacing: .005em; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }


/* header */
header.top { background: var(--steel); color: var(--steel-ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; height: 56px; width: auto; }
nav.main { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: 15px; }
nav.main a { text-decoration: none; opacity: .85; }
nav.main a:hover { opacity: 1; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; padding: 10px 18px; border-radius: 3px; border: 2px solid transparent; cursor: pointer; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }

/* hero */
.hero { background: var(--steel); color: var(--steel-ink); position: relative; overflow: hidden; }
.hero { background: var(--steel) url("/img/hero.jpg") right center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--steel) 0%, color-mix(in srgb, var(--steel) 88%, transparent) 45%, color-mix(in srgb, var(--steel) 35%, transparent) 100%); pointer-events: none; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 32px 32px; pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; padding-block: 64px 72px; align-items: center; }
.hero .eyebrow { color: var(--bright); }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); font-weight: 700; text-transform: uppercase; letter-spacing: -.005em; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--bright); }
.hero p.lead { font-size: 19px; max-width: 34em; opacity: .88; margin: 20px 0 28px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 36px; font-family: var(--mono); font-size: 13px; opacity: .85; }
.hero .facts b { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--bright); letter-spacing: .02em; }

/* loop readout */
.loop { border: 1.5px solid rgba(255,255,255,.22); border-radius: 4px; padding: 22px; background: color-mix(in srgb, var(--steel) 78%, transparent); backdrop-filter: blur(6px); font-family: var(--mono); font-size: 13px; min-width: 0; }
.loop-head { display: flex; justify-content: space-between; gap: 12px; opacity: .7; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.loop svg { width: 100%; height: auto; display: block; margin: 14px 0; }
.loop svg text { font-family: var(--mono); fill: var(--steel-ink); }
.loop table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.loop th, .loop td { text-align: right; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.14); font-weight: 400; }
.loop th:first-child, .loop td:first-child { text-align: left; }
.loop th { opacity: .6; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pass { color: var(--bright); }

/* industries strip */
.industries { border-bottom: 1px solid var(--line); background: var(--surface); }
.industries .wrap { display: flex; flex-wrap: wrap; gap: 10px 34px; padding-block: 18px; align-items: center; font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.industries .eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 400; }

/* sections */
section.block { padding-block: 80px; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; text-transform: uppercase; letter-spacing: -.005em; margin-top: 10px; }
.sec-head p { color: var(--muted); margin: 0; max-width: 36em; }

/* services grid */
.services { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.svc { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 22px 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; background: color-mix(in srgb, var(--surface) 82%, transparent); transition: background .2s; }
.svc:hover { background: var(--surface); }
.tag { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--ink); display: grid; grid-template-rows: 1fr 1fr; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 500; position: relative; flex-shrink: 0; }
.tag::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink); }
.tag span:first-child { align-self: end; padding-bottom: 2px; }
.tag span:last-child { align-self: start; padding-top: 2px; font-size: 11px; color: var(--muted); }
.svc.em .tag { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.svc.em .tag::after { background: var(--accent-ink); }
.svc.em .tag span:last-child { color: var(--accent-ink); }
.svc h3 { font-size: 23px; font-weight: 600; letter-spacing: .01em; }
.svc p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* why / credentials */
.why { background: var(--surface); border-block: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.why-item { padding: 8px 32px 8px 0; display: grid; gap: 8px; align-content: start; }
.why-item + .why-item { border-left: 1px solid var(--line); padding-left: 32px; }
.why-item .code { font-family: var(--mono); font-size: 13px; color: var(--accent-text); font-weight: 500; letter-spacing: .06em; }
.why-item h3 { font-size: 26px; font-weight: 600; }
.why-item p { margin: 0; color: var(--muted); }

/* emergency band */
.emergency { background: var(--accent); color: var(--accent-ink); }
.emergency .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-block: 30px; }
.emergency h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; text-transform: uppercase; letter-spacing: -.005em; }
.emergency p { margin: 4px 0 0; }
.phone { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 44px); letter-spacing: .03em; user-select: all; font-variant-numeric: tabular-nums; }

/* contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.contact-info dl { margin: 28px 0 0; display: grid; gap: 18px; }
.contact-info dt { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-info dd { margin: 2px 0 0; font-size: 19px; font-weight: 500; user-select: all; overflow-wrap: anywhere; }
form.enquiry { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
form.enquiry .full { grid-column: 1 / -1; }
form.enquiry label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
form.enquiry input, form.enquiry textarea, form.enquiry select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); color: var(--ink); width: 100%; min-width: 0; }
form.enquiry textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: 14px; color: var(--muted); align-self: center; }
.form-done { grid-column: 1 / -1; font-family: var(--mono); font-size: 14px; }

footer { background: var(--steel); color: var(--steel-ink); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; opacity: .8; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero-grid, .contact-grid, .sec-head { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; gap: 28px; }
  .why-item, .why-item + .why-item { border-left: 0; padding: 0; }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  form.enquiry { grid-template-columns: 1fr; padding: 20px; }
  section.block { padding-block: 56px; }
  .hero .wrap { padding-block: 44px 52px; }
  .brand img { height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .needle { animation: settle 2.6s ease-out 1 both; transform-box: view-box; transform-origin: 160px 156px; }
  @keyframes settle { 0% { transform: rotate(-135deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-3deg); } 100% { transform: rotate(0); } }
}
/* service tags: top half filled with the brand blue */
.tag { border-color: var(--accent); background: linear-gradient(180deg, var(--accent) 50%, transparent 50%); overflow: hidden; }
.tag::after { background: var(--accent); }
.tag span:first-child { color: var(--accent-ink); }

/* ---- Site additions (multi-page) ---- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }
.muted { color: var(--muted); }
.h2 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; text-transform: uppercase; margin-top: 10px; }
.h3 { font-family: var(--display); font-size: 26px; font-weight: 600; margin-top: 28px; }
nav.main a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 var(--accent); }

/* mobile menu */
.menu-btn { display: none; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; background: transparent; color: inherit; border: 2px solid currentColor; border-radius: 3px; padding: 6px 14px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  nav.main { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-block: 8px; }
  nav.main.open { display: flex; }
  nav.main .link { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); }
  nav.main .btn { margin-top: 12px; justify-content: center; }
}

/* page hero */
.hero-sm .wrap { padding-block: 48px 56px; }
.hero-sm h1 { font-size: clamp(38px, 5.4vw, 64px); }
.crumbs { font-family: var(--mono); font-size: 12.5px; opacity: .7; margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* service cards as links */
a.svc { text-decoration: none; color: inherit; }
.svc .more { margin-top: auto; font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; color: var(--accent-text); }
.svc.em .more { color: var(--accent-text); }

/* service detail */
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
.prose { min-width: 0; display: grid; gap: 4px; }
.prose p { max-width: 65ch; }
.prose.narrow { max-width: 760px; }
.prose a, .contact-info a, .side a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.ticks { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 7px; border-left: 2.5px solid var(--accent-text); border-bottom: 2.5px solid var(--accent-text); transform: rotate(-45deg); }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 22px; }
.side h3 { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

/* emergency link */
a.phone { color: inherit; text-decoration: none; user-select: auto; }

/* form */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-family: var(--mono); font-size: 14px; margin: 0; }
.form-status.ok { color: var(--accent-text); }

/* footer */
footer .foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding-block: 48px 24px; opacity: 1; }
footer h3 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 12px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
.foot-note { opacity: .75; max-width: 30em; }
footer .foot-base { border-top: 1px solid rgba(255,255,255,.12); padding-block: 20px; }
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  footer .foot-grid { grid-template-columns: 1fr; }
}

/* brand photo hero: stronger overlay once text sits over the photo on narrow screens */
@media (max-width: 960px) {
  .hero::after { background: linear-gradient(180deg, color-mix(in srgb, var(--steel) 92%, transparent), color-mix(in srgb, var(--steel) 80%, transparent)); }
}
.emergency .phone { color: var(--accent-ink); }

/* photos */
.photo { margin: 0; display: grid; gap: 10px; min-width: 0; }
.photo img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); display: block; }
.photo figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.side-col { display: grid; gap: 28px; align-content: start; min-width: 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 960px) { .about-grid { grid-template-columns: 1fr; } }
.prose a.btn, .contact-info a.btn { color: var(--accent-ink); text-decoration: none; }
