:root {
  --ink: #0D2E33;        /* petrol */
  --ink-2: #16434A;
  --teal: #147A78;       /* gulf water */
  --flare: #E8551E;      /* gas flare */
  --steel: #F2F5F4;
  --paper: #FFFFFF;
  --text: #243033;       /* graphite */
  --muted: #56666A;
  --line: #D3DCDA;
  --wide: "wdth" 125;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", "Segoe UI", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}

h1, h2, h3 {
  font-variation-settings: var(--wide);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--flare); outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 900px) { :root { --gutter: 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 12px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); font-size: .9rem; }
.topbar .wrap { display: flex; justify-content: flex-end; padding-block: 6px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--flare); }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { display: block; }
.brand-name {
  display: flex; flex-direction: column; line-height: 1;
  font-variation-settings: var(--wide); font-weight: 850; font-size: 1.35rem; letter-spacing: .06em;
}
.brand-name small { font-size: .62rem; font-weight: 500; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }

.nav-toggle {
  display: none; font: inherit; font-weight: 600; cursor: pointer;
  background: none; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px; padding: 6px 14px;
}
#nav { display: flex; gap: 2px; }
#nav a {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 24px 14px; border-bottom: 3px solid transparent;
}
#nav a:hover { color: var(--teal); }
#nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--flare); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  #nav { display: none; flex-direction: column; width: 100%; padding-bottom: 12px; }
  #nav.open { display: flex; }
  #nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  #nav a[aria-current="page"] { border-bottom-color: var(--flare); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 13px 24px; border-radius: 4px; border: 2px solid transparent; line-height: 1.2;
}
.btn-flare { background: var(--flare); color: var(--ink); }
.btn-flare:hover { background: #ff6a33; color: var(--ink); }
.btn-ghost { border-color: #ffffff99; color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: #ffffff14; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--teal); color: #fff; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #dce8e6;
  padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px);
}
.hero h1 { color: #fff; max-width: 20ch; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.hero p { font-size: 1.2rem; max-width: 46ch; margin-bottom: 32px; }
.hero .wrap { position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Seismic section: generated traces, drawn once on load */
.seismic {
  position: absolute; inset: 0 0 0 auto; width: min(62%, 760px); height: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
          mask-image: linear-gradient(to right, transparent, #000 35%);
}
.seismic path {
  fill: none; stroke: #2FA6A1; stroke-width: 1.1; opacity: .55;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: trace 2.4s cubic-bezier(.3,.6,.3,1) forwards;
}
.seismic path.hot { stroke: var(--flare); opacity: .9; stroke-width: 1.4; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .seismic path { animation: none; stroke-dashoffset: 0; } }
@media (max-width: 700px) { .seismic { width: 100%; opacity: .45; } }

/* Inner page heading band */
.page-head { background: var(--ink); color: #dce8e6; padding: clamp(36px, 5vw, 56px) 0 clamp(32px, 4vw, 44px); border-bottom: 6px solid var(--flare); }
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-head + .band { padding-top: 40px; }
.page-head p { font-size: 1.15rem; margin: 0; }

/* ---------- Sections ---------- */
.band { padding: clamp(56px, 8vw, 96px) 0; }
.band-steel { background: var(--steel); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Department rows (home + services) */
.dept-rows { list-style: none; margin: 32px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.dept-rows li {
  display: grid; gap: 8px 32px; align-items: baseline;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.dept-rows h3 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); }
.dept-rows p { margin: 0; color: var(--muted); }
.dept-rows a { font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) { .dept-rows li { grid-template-columns: 1fr; } }

/* Split feature */
.split { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 16px 0 16px 20px; border-left: 3px solid var(--teal); margin-bottom: 12px; background: var(--paper); }
.facts strong { display: block; color: var(--ink); }

.cta-band { background: var(--teal); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e3f3f1; }

/* Services page */
.service { padding: 48px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.service:last-child { border-bottom: 0; }
.service .split { gap: 16px 48px; }
.service ul { margin: 0; padding-left: 1.1em; }
.service li { margin-bottom: 6px; }

.note { background: #FFF1EA; border-left: 4px solid var(--flare); padding: 10px 14px; font-size: .95rem; max-width: 68ch; }

/* ---------- Careers ---------- */
.careers { display: grid; gap: 40px; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .careers { grid-template-columns: 1fr; gap: 24px; } }

.rail { position: sticky; top: 96px; }
@media (max-width: 900px) { .rail { position: static; } }
.rail label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.rail input {
  width: 100%; font: inherit; padding: 12px 14px;
  border: 2px solid var(--ink); border-radius: 4px; background: var(--paper);
}
.dept-filter { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line); }
.dept-filter button {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; text-align: left;
  font: inherit; font-size: .98rem; color: var(--text); background: none; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--line); padding: 11px 10px 11px 12px;
  border-left: 3px solid transparent;
}
.dept-filter button:hover { background: var(--steel); }
.dept-filter button[aria-pressed="true"] { border-left-color: var(--flare); background: var(--steel); color: var(--ink); font-weight: 700; }
.dept-filter .n { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .dept-filter { display: flex; flex-wrap: wrap; gap: 8px; border: 0; }
  .dept-filter { gap: 6px; margin-top: 16px; }
  .dept-filter button { width: auto; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: .88rem; gap: 8px; }
  .dept-filter button[aria-pressed="true"] { border-color: var(--flare); }
}

.result-count { color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.dept-block { margin-bottom: 40px; }
.dept-block > h2 { font-size: 1.4rem; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 0; }
.dept-block h3 { font-size: 1rem; color: var(--teal); margin: 20px 0 0; font-variation-settings: normal; }
.jobs { list-style: none; margin: 0; padding: 0; }
.jobs li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.jobs .title { font-weight: 600; color: var(--ink); }
.jobs .ctx { display: block; font-size: .88rem; color: var(--muted); font-weight: 400; }
.jobs .btn { padding: 8px 16px; font-size: .92rem; flex-shrink: 0; }
.empty { background: var(--steel); padding: 24px; border-left: 4px solid var(--flare); }
.empty p { margin: 0; }

/* ---------- Contact ---------- */
.contact-list { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0 0 48px; }
.contact-list div { padding: 18px 0; border-top: 2px solid var(--ink); }
.contact-list dt { font-weight: 700; color: var(--ink); }
.contact-list dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.tbc { color: var(--muted); font-style: italic; }
.map { width: 100%; height: 380px; border: 0; display: block; }
form label { display: block; font-weight: 700; color: var(--ink); margin: 16px 0 6px; }
form input, form textarea {
  width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid #9AAAA8; border-radius: 4px;
}
form input:focus, form textarea:focus { border-color: var(--ink); }
form .btn { margin-top: 20px; }
.form-hint { font-size: .9rem; color: var(--muted); margin-top: 10px; }

/* ---------- Photography ---------- */
img { max-width: 100%; }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Inner page heading over a photo */
.page-head.has-img {
  background:
    linear-gradient(90deg, rgba(13,46,51,.96) 0%, rgba(13,46,51,.88) 45%, rgba(13,46,51,.45) 100%),
    var(--img) center / cover no-repeat;
  padding-block: clamp(56px, 9vw, 112px);
}

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head .lead { margin: 0; }

/* Industries: photo grid, first tile larger */
.industries { display: grid; gap: 6px; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; }
.industries figure { position: relative; margin: 0; overflow: hidden; background: var(--ink); }
.industries figure:first-child { grid-row: span 2; }
.industries figcaption {
  position: absolute; inset: auto 0 0 0; padding: 48px 20px 18px; color: #fff;
  background: linear-gradient(transparent, rgba(13,46,51,.92));
  font-weight: 700; font-size: 1.1rem; font-variation-settings: var(--wide);
}
.industries figcaption span { display: block; font-weight: 400; font-size: .92rem; color: #d3e2df; font-variation-settings: normal; margin-top: 2px; }
@media (max-width: 820px) {
  .industries { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
}
@media (max-width: 520px) {
  .industries { grid-template-columns: 1fr; }
  .industries figure:first-child { grid-row: auto; }
}

/* Project lifecycle: a real sequence, drawn as a pipeline */
.lifecycle { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); counter-reset: step; }
.lifecycle li { position: relative; padding: 36px 16px 0 0; border-top: 4px solid var(--teal); counter-increment: step; }
.lifecycle li::before {
  content: counter(step); position: absolute; top: -18px; left: 0;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--flare); color: var(--ink); font-weight: 800; font-size: .95rem;
}
.lifecycle h3 { font-size: 1.05rem; margin-bottom: 6px; color: #fff; }
.lifecycle p { font-size: .95rem; margin: 0; color: #c4d6d3; }
@media (max-width: 900px) {
  .lifecycle { grid-template-columns: 1fr; gap: 0; border-left: 4px solid var(--teal); margin-left: 14px; }
  .lifecycle li { border-top: 0; padding: 0 0 28px 32px; }
  .lifecycle li::before { left: -18px; top: 0; }
}
.band-ink { background: var(--ink); color: #c4d6d3; }
.band-ink h2 { color: #fff; }
.band-ink .lead { color: #c4d6d3; }

/* Photo beside text */
.media-split { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr 1fr; align-items: center; }
.media-split > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.media-split.flip > img { order: 2; }
@media (max-width: 820px) {
  .media-split { grid-template-columns: 1fr; }
  .media-split.flip > img { order: 0; }
}
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { padding: 10px 0 10px 32px; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border: solid var(--teal); border-width: 0 0 3px 3px; transform: rotate(-45deg); }

/* Full-bleed photo band */
.photo-band { position: relative; min-height: 440px; display: flex; align-items: center; color: #fff; overflow: hidden; }
.photo-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,46,51,.92) 0%, rgba(13,46,51,.7) 45%, rgba(13,46,51,.1) 100%); z-index: 1; }
.photo-band .wrap { position: relative; z-index: 2; width: 100%; }
.photo-band h2 { color: #fff; max-width: 18ch; }
.photo-band p { color: #dbe8e6; max-width: 46ch; }
.photo-band address { font-style: normal; color: #fff; font-weight: 600; margin-bottom: 24px; }

/* Careers extras */
.steps { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; border: 1px solid var(--line); }
.steps li { padding: 20px 22px; counter-increment: s; border-right: 1px solid var(--line); }
.steps li:last-child { border-right: 0; }
.steps li::before { content: "Step " counter(s); display: block; color: var(--flare); font-weight: 800; font-size: .9rem; margin-bottom: 4px; }
.steps strong { color: var(--ink); display: block; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; margin-bottom: 28px; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; font-size: .92rem; line-height: 1.45; }
  .steps li::before { display: inline; margin-right: 6px; }
  .steps strong { display: inline; }
  .steps strong::after { content: ". "; }
  .steps li:last-child { border-bottom: 0; }
}

.values { display: grid; gap: 32px; grid-template-columns: repeat(4, 1fr); margin-top: 32px; }
.values > div { border-top: 3px solid var(--flare); padding-top: 18px; }
.values h3 { color: #fff; }
.values p { margin: 0; }
@media (max-width: 900px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

.actions { margin-top: 24px; }
.ticks + .note { margin-top: 20px; }

/* Services: photo per service */
.service .media-split > img { aspect-ratio: 3 / 2; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #b9cbc8; padding: 64px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr 0.8fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
footer h2 { color: #fff; font-size: 1rem; font-variation-settings: normal; margin-bottom: 12px; }
footer p, footer address { margin: 0 0 6px; font-style: normal; overflow-wrap: anywhere; }
footer a { color: #fff; }
footer a:hover { color: var(--flare); }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 6px; }
.footer-name { color: #fff; font-weight: 800; font-variation-settings: var(--wide); margin-top: 14px; }
.copyright { border-top: 1px solid #ffffff22; margin-top: 48px; padding-top: 18px; font-size: .85rem; }

/* ---------- Application form ---------- */
.apply-form { max-width: 640px; }
.apply-form .opt { font-weight: 400; color: var(--muted); }
form input[type="file"] { padding: 9px; background: #fff; cursor: pointer; }
