/* ICON Pipeline E&C — site styles
   Brand colours come from the logo. Change them here and every page follows. */
:root {
  --yellow: #F3BC39;
  --yellow-dark: #D9A21F;
  --ink: #14181C;
  --ink-2: #22282E;
  --grey: #7C8688;
  --grey-light: #EEF0F1;
  --line: #DADFE1;
  --white: #FFFFFF;
  --text: #2B3136;
  --muted: #5F686B;

  --font: "Poppins", "Segoe UI", "Malgun Gothic", Arial, sans-serif;
  --max: 1200px;
  --header-h: 76px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 2.7vw, 2.35rem); }
h2 { font-size: clamp(1.3rem, 1.9vw, 1.65rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--grey { background: var(--grey-light); }
.section--dark { background: var(--ink); color: #C9CFD1; }
.section--dark h2, .section--dark h3 { color: var(--white); }

/* Small yellow label above headings */
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 28px; height: 3px;
  background: var(--yellow); vertical-align: middle; margin-right: 12px;
}
.lead { font-size: 1.05rem; color: var(--muted); max-width: 760px; }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 30px;
  font-weight: 600; font-size: .95rem; text-decoration: none; letter-spacing: .02em;
  border-radius: var(--radius); border: 2px solid var(--yellow);
  background: var(--yellow); color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--yellow); padding-bottom: 2px; }
.link-arrow::after { content: " \2192"; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background .25s, box-shadow .25s;
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.site-header .logo img { height: 36px; width: auto; transition: height .25s; }
/* Home page: larger logo over the banner, back to normal once the header turns solid */

.site-header .logo .logo-dark { display: none; }
/* Over the hero the header is transparent with a white logo; after scrolling (or on inner pages) it turns white. */
.site-header.is-solid { background: var(--white); box-shadow: 0 2px 18px rgba(20,24,28,.08); }
/* Over photos: a dark band behind the logo and menu that fades out below the header */
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -70px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,14,17,.82) 0%, rgba(12,14,17,.55) 55%, rgba(12,14,17,0) 100%);
  transition: opacity .25s;
}
.site-header.is-solid::before { opacity: 0; }
.site-header:not(.is-solid) .logo img { filter: drop-shadow(0 2px 10px rgba(0,0,0,.55)); }
.site-header:not(.is-solid) .nav > ul > li > a { text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.site-header.is-solid .logo .logo-light { display: none; }
.site-header.is-solid .logo .logo-dark { display: block; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav > ul { list-style: none; display: flex; margin: 0; padding: 0; gap: 4px; }
.nav li { position: relative; }
.nav a, .nav button.nav-toggle-sub {
  display: block; padding: 10px 16px;
  font: 600 .88rem var(--font); color: var(--white); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.site-header.is-solid .nav a, .site-header.is-solid .nav button.nav-toggle-sub { color: var(--ink); }
.nav > ul > li > a.is-active, .nav > ul > li > a:hover { color: var(--yellow) !important; }
.has-sub > a::after { content: ""; display: inline-block; margin-left: 8px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.nav .sub {
  list-style: none; margin: 0; padding: 10px 0;
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--white); border-top: 3px solid var(--yellow);
  box-shadow: 0 12px 30px rgba(20,24,28,.14);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav .has-sub:hover > .sub, .nav .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { color: var(--ink) !important; font-weight: 500; padding: 9px 22px; }
.nav .sub a:hover { background: var(--grey-light); color: var(--ink) !important; box-shadow: inset 3px 0 0 var(--yellow); }
.nav .nav-cta { margin-left: 10px; padding: 10px 22px; background: var(--yellow); color: var(--ink) !important; border-radius: var(--radius); }
.nav .nav-cta:hover { background: var(--yellow-dark); }

.menu-btn { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 2px; background: var(--white); margin: 6px 0; transition: transform .2s, opacity .2s; }
.site-header.is-solid .menu-btn span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: var(--white);
  background: var(--ink);
  overflow: hidden; isolation: isolate;
}
.hero .container { position: relative; z-index: 1; padding-top: var(--header-h); display: flex; justify-content: flex-end; }
.hero .scroll-hint { z-index: 1; }

/* Hero slideshow: each photo shows ~7 s with a slow zoom/pan, then crossfades to the next.
   5 slides x 7 s = 35 s loop. To add or remove slides, change --n and the animation length to n x 7 s. */
.hero-slides { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-slides .slide {
  position: absolute; inset: -3%;
  background: center / cover no-repeat;
  opacity: 0; will-change: transform, opacity;
  animation: hero-kb 35s linear infinite;
}
@keyframes hero-kb {
  0%   { opacity: 0; transform: scale(1.02) translate(var(--x0, 0), var(--y0, 0)); }
  4%   { opacity: 1; }
  20%  { opacity: 1; }
  24%  { opacity: 0; transform: scale(1.14) translate(var(--x1, 0), var(--y1, 0)); }
  100% { opacity: 0; transform: scale(1.14) translate(var(--x1, 0), var(--y1, 0)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slides .slide { animation: none; }
  .hero-slides .slide:first-child { opacity: 1; }
}
/* Headline: a soft, edgeless shadow behind the text plus text shadows keep it readable over busy photos */
.hero-content { max-width: 540px; position: relative; isolation: isolate; }
.hero-content::before {
  content: ""; position: absolute; inset: -140px -180px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse closest-side, rgba(10,12,15,.8) 0%, rgba(10,12,15,.66) 40%, rgba(10,12,15,.32) 70%, rgba(10,12,15,0) 100%);
}
.hero-content h1 { text-shadow: 0 2px 4px rgba(0,0,0,.45), 0 6px 28px rgba(0,0,0,.6); }
.hero-content p, .hero-content .eyebrow { text-shadow: 0 1px 3px rgba(0,0,0,.6), 0 2px 16px rgba(0,0,0,.55); }
.hero-content .btn { box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { font-size: .98rem; max-width: 500px; color: #E3E7E8; }
.hero .eyebrow { font-size: .72rem; }
.hero .btn { padding: 11px 24px; font-size: .88rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero .scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px;
}
.hero .scroll-hint::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--yellow); border-radius: 2px; animation: scroll 1.8s infinite;
}
@keyframes scroll { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* Inner-page banner */
.page-hero {
  padding: calc(var(--header-h) + 64px) 0 56px;
  color: var(--white);
  background: var(--ink);
  position: relative; isolation: isolate;
}
/* Banner photo: <div class="bg" style="background-image:url('assets/img/photos/NAME.jpg')"></div> */
.page-hero .bg { position: absolute; inset: 0; z-index: -2; background: center / cover no-repeat; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(20,24,28,.86) 0%, rgba(20,24,28,.55) 55%, rgba(20,24,28,.3) 100%);
}
.page-hero h1 { color: var(--white); margin-bottom: .3em; }
.page-hero h1.statement { max-width: 820px; }
.page-hero p { color: #C9CFD1; max-width: 680px; font-size: 1rem; margin: 0; }
.breadcrumb { font-size: .85rem; color: var(--yellow); margin-bottom: 14px; }
.breadcrumb a { color: #C9CFD1; text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }

/* ---------- Layout helpers ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--media-sm { grid-template-columns: 1.3fr 1fr; }
.split--reverse > :first-child { order: 2; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .eyebrow::after {
  content: ""; display: inline-block; width: 28px; height: 3px;
  background: var(--yellow); vertical-align: middle; margin-left: 12px;
}

/* Photo placeholder — replace each .ph with <img src="..."> when photos arrive */
.ph {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #3A444B, var(--ink));
  display: flex; align-items: flex-end;
  color: rgba(255,255,255,.75); font-size: .8rem; font-weight: 500; letter-spacing: .04em;
  overflow: hidden;
}
.ph::before { content: "PHOTO"; position: absolute; top: 14px; left: 16px; font-size: .7rem; letter-spacing: .2em; color: var(--yellow); }
.ph span { padding: 14px 16px; }
.ph--wide { aspect-ratio: 16 / 9; }
.ph--tall { aspect-ratio: 3 / 4; }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink-2); }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--tall { aspect-ratio: 3 / 4; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: .9rem; color: var(--muted); padding-top: 10px; }
.card .photo { display: block; }

/* Service cards */
.card { background: var(--white); text-decoration: none; display: flex; flex-direction: column; border-bottom: 3px solid transparent; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(20,24,28,.12); border-bottom-color: var(--yellow); }
.card .body { padding: 28px 28px 32px; flex: 1; display: flex; flex-direction: column; }
.card .body p { color: var(--muted); flex: 1; }
.card .link-arrow { align-self: flex-start; }
.card .num { font-size: .8rem; font-weight: 700; color: var(--yellow); letter-spacing: .12em; margin-bottom: 8px; }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 10px 28px; border-left: 1px solid rgba(255,255,255,.12); }
.stat:first-child { border-left: 0; }
.stat .value { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--yellow); line-height: 1.1; }
.stat .label { font-size: .9rem; color: #AEB6B8; margin-top: 6px; }

/* Value / feature list */
.feature { padding: 34px 30px; background: var(--white); border-top: 3px solid var(--yellow); }
.feature .icon { width: 44px; height: 44px; margin-bottom: 18px; color: var(--ink); }
.feature p { color: var(--muted); margin: 0; }

.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 14px;
  border: 3px solid var(--yellow); border-radius: 50%;
}

/* Vision & mission blocks */
.vm { padding: 44px 40px; background: var(--ink); color: #C9CFD1; position: relative; }
.vm h3 { color: var(--white); font-size: 1.6rem; }
.vm .tag { color: var(--yellow); font-weight: 700; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; display: block; margin-bottom: 10px; }
.vm p { margin: 0; font-size: 1.1rem; }

/* Policy blocks (QHSE) */
.policy { display: grid; grid-template-columns: 280px 1fr; gap: 56px; padding: 64px 0; border-top: 1px solid var(--line); }
.policy:first-child { border-top: 0; padding-top: 0; }
.policy h2 { font-size: 1.8rem; }

/* CTA band */
.cta-band { background: var(--yellow); padding: 64px 0; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.cta-band .btn { background: var(--ink); color: var(--white); border-color: var(--ink); }
.cta-band .btn:hover { background: var(--ink-2); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; }
.contact-item { margin-bottom: 28px; }
.contact-item h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.contact-item p { margin: 0; font-size: 1.05rem; color: var(--ink); }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
form label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
form input, form textarea {
  width: 100%; padding: 13px 14px; margin-bottom: 18px;
  font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
form input:focus, form textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(243,188,57,.25); }
form textarea { min-height: 160px; resize: vertical; }
form button { cursor: pointer; font-family: var(--font); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #AEB6B8; padding: 72px 0 0; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.site-footer .logo img { height: 52px; width: auto; margin-bottom: 20px; }
.site-footer h4 { color: var(--white); font-size: .95rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .stat:nth-child(3) { border-left: 0; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 840px) {
  :root { --header-h: 70px; }
  .site-header .logo img { height: 30px; }
  .hero-slides::after { content: ""; position: absolute; inset: 0; background: rgba(20,24,28,.2); }
  .hero .container { justify-content: flex-start; }
  .hero-content::before { inset: -80px -60px; }
  body.menu-open .site-header::before { opacity: 0; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch;
    background: var(--white); padding: 12px 24px 40px; overflow-y: auto;
    transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav > ul { flex-direction: column; gap: 0; }
  .nav a { color: var(--ink) !important; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; display: none; min-width: 0; }
  .nav .has-sub.is-open > .sub { display: block; }
  .nav .sub a { border-bottom: 0; padding: 10px 4px; }
  .nav .nav-cta { margin: 20px 0 0; text-align: center; }
  body.menu-open .site-header { background: var(--white); }
  body.menu-open .site-header .logo .logo-light { display: none; }
  body.menu-open .site-header .logo .logo-dark { display: block; }
  body.menu-open .menu-btn span { background: var(--ink); }
  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .section { padding: 72px 0; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .split--reverse > :first-child { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .policy { grid-template-columns: 1fr; gap: 12px; padding: 48px 0; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .grid-4, .stats, .site-footer .cols, form .row { grid-template-columns: 1fr; }
  .stat { border-left: 0; padding: 0; }
  .vm { padding: 32px 26px; }
}

/* Photo credits (required for Creative Commons photos) */
.credit { display: block; font-size: .6rem; color: #9AA2A5; margin-top: 3px; line-height: 1.3; letter-spacing: .01em; }
.credit a { color: inherit; }
.page-hero .credit { position: absolute; right: 12px; bottom: 6px; color: rgba(255,255,255,.55); margin: 0; }

/* Crossing diagram */
.diagram { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 24px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: .9rem; color: var(--muted); margin-top: 12px; }

/* Method comparison table */
.compare { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); }
.compare th, .compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--ink); color: var(--white); font-weight: 600; }
.compare thead th:first-child { border-left: 4px solid var(--yellow); }
.compare tbody th { color: var(--ink); width: 22%; }
.table-wrap { overflow-x: auto; }

/* Associated works category blocks */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.work { background: var(--white); border-top: 3px solid var(--yellow); padding: 30px 30px 26px; }
.work .num { font-size: .8rem; font-weight: 700; color: var(--yellow); letter-spacing: .12em; }
.work h3 { margin: 6px 0 12px; }
.work .check-list { margin: 0; font-size: .95rem; }
.work .check-list b { color: var(--ink); }
@media (max-width: 840px) { .works { grid-template-columns: 1fr; } }

/* Line break used only on wider screens */
@media (max-width: 600px) { .br-desktop { display: none; } }


/* Photos inside an Associated Works block */
.work-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.work-photos figure { margin: 0; }
.work-photos figcaption { font-size: .85rem; color: var(--muted); padding-top: 8px; }

.work-wide { margin: 18px 0 0; }
.work-wide img { width: 100%; display: block; }
.work-wide figcaption { font-size: .85rem; color: var(--muted); padding-top: 8px; }


/* Feature cards inside a dark section */
.section--dark .feature { background: var(--ink-2); }
.section--dark .feature h3 { color: var(--white); }
.section--dark .feature p { color: #AEB6B8; }


/* Photo column that matches the height of the text beside it */
.split--stretch { align-items: stretch; }
.match-text { position: relative; min-height: 280px; }
.match-text .photo { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
@media (max-width: 840px) { .match-text { position: static; } .match-text .photo { position: static; aspect-ratio: 4 / 3; } }


/* Firing line diagram */
.section--diagram { padding-top: 56px; padding-bottom: 24px; }
.container--wide { max-width: 1440px; }
.firing-line { margin: 0; }
.firing-line a { display: block; overflow-x: auto; }
.firing-line img { width: 100%; min-width: 860px; height: auto; display: block; }
.firing-line figcaption { font-size: .82rem; color: var(--muted); padding-top: 8px; }

.firing-line + .firing-line { margin-top: 44px; }
.diagram-note { font-size: .82rem; color: var(--muted); margin-top: 10px; }


/* One small credits line at the bottom of pages that use licensed photos */
.photo-credits { padding: 18px 0; background: var(--grey-light); }
.photo-credits p { margin: 0; font-size: .72rem; color: var(--muted); line-height: 1.5; }
.photo-credits a { color: inherit; }


.courtesy { display: block; font-size: .6rem; color: #9AA2A5; margin-top: 3px; line-height: 1.3; letter-spacing: .01em; }


/* Associated Works: short block runs full width as a band, list in columns */
.work--band { grid-column: 1 / -1; }
.works .work.work--band { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; align-items: center; }
.work--band .check-list { columns: 1; }
.work--band .check-list li { break-inside: avoid; }
@media (max-width: 840px) { .works .work.work--band { grid-template-columns: 1fr; row-gap: 18px; } }


/* Associated Works: photos sit at the bottom of each block; a --fill photo stretches so both line up */
.works .work { display: flex; flex-direction: column; }
.works .work .work-wide { margin-top: auto; padding-top: 18px; }
.works .work .work-wide--fill { flex: 1; display: flex; flex-direction: column; }
.works .work .work-wide--fill img { flex: 1; min-height: 0; height: 100%; object-fit: cover; }


/* QHSE: Job Hazard Analysis cards */
.jha-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.jha { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--yellow); display: flex; flex-direction: column; }
.jha-head { background: var(--ink); padding: 16px 22px; display: flex; align-items: center; gap: 12px; }
.jha-head .num { color: var(--yellow); font-weight: 700; font-size: .8rem; letter-spacing: .1em; }
.jha-head h3 { color: var(--white); margin: 0; font-size: 1rem; }
.jha-body { padding: 18px 22px 20px; }
.jha-body h4 { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); margin: 0 0 6px; }
.jha-body p { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.jha-body .check-list { margin: 0; font-size: .92rem; }
.jha-body .check-list li { margin-bottom: 6px; }
@media (max-width: 1024px) { .jha-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 840px) { .jha-grid { grid-template-columns: 1fr; } }


/* Home: In the field photo titles */
.gallery .field-caption { font-size: .9rem; font-weight: 600; margin: 8px 0 0; color: var(--ink-2); }


.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }


/* Caption on a photo that stretches to match the text height */
.match-text { padding-bottom: 30px; }
.match-text .photo { bottom: auto; height: calc(100% - 30px); }
.match-text .photo-label { position: absolute; left: 0; bottom: 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 840px) { .match-text { padding-bottom: 0; } .match-text .photo-label { position: static; padding-top: 8px; } }


/* Construction spread card illustrations */
.feature .spread-img { width: 100%; height: auto; display: block; margin: -6px 0 14px; }


/* One caption under each half of a paired photo */
.split-caption { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1%; }


/* Small photo pair inside the full-width Testing band */
.band-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 0; }
.band-photos figure { margin: 0; }
.band-photos figcaption { font-size: .85rem; color: var(--muted); padding-top: 6px; }
@media (max-width: 600px) { .band-photos { grid-template-columns: 1fr 1fr; } }


.contact-item p a { color: inherit; text-decoration: none; }
.map-link { display: inline-block; margin-top: 6px; font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--yellow); }


.addr-label { display: block; font-weight: 600; color: var(--ink); }


/* Tall overview photos: whole photo kept, shown a little smaller */
.overview-tall .photo--tall { max-width: 330px; margin-left: auto; }
.overview-tall figcaption { max-width: 330px; margin-left: auto; }
@media (max-width: 840px) { .overview-tall .photo--tall, .overview-tall figcaption { max-width: none; } }


/* Associated Works overview photo: wider, same height (440px) */
.overview-tall .photo--widen { max-width: 520px; height: 440px; aspect-ratio: auto; object-fit: cover; object-position: center 55%; }
.overview-tall .photo--widen + figcaption { max-width: 520px; }
@media (max-width: 840px) { .overview-tall .photo--widen { height: auto; aspect-ratio: 4 / 3; max-width: none; } }


/* QHSE commitment photo: same width, taller */
.photo--taller { aspect-ratio: 6 / 5; object-position: 0% 55%; }


/* HDD page: method photos as tall as the text beside them */
.photo--tall-fit { aspect-ratio: 548 / 458; }

.photo--tall-fit2 { aspect-ratio: 548 / 530; }


.photo--ov-fit { aspect-ratio: 548 / 628; }

.overview-tall .photo--aw-short { height: 380px; }
.overview-tall:has(.photo--aw-short) { align-items: start; }
.overview-tall:has(.photo--aw-short) > .reveal:first-child { padding-top: 34px; }


.match-text--tall { min-height: 490px; }
@media (max-width: 840px) { .match-text--tall { min-height: 0; } }


/* QHSE Life-Saving Rules: two rows of five */
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.grid-5 .feature { padding: 26px 22px; }
@media (max-width: 1024px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 840px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-5 { grid-template-columns: 1fr; } }


/* Equipment Fleet page */
.fleet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.fleet-card { background: var(--white); display: flex; flex-direction: column; border-bottom: 3px solid transparent; transition: border-color .25s, box-shadow .25s; }
.fleet-card:hover { border-bottom-color: var(--yellow); box-shadow: 0 14px 32px rgba(20,24,28,.10); }
.fleet-card img, .fleet-card .fleet-ph { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fleet-card .fleet-ph { display: flex; align-items: center; justify-content: center; color: #9AA2A5; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  background: repeating-linear-gradient(135deg, var(--grey-light) 0 12px, #E4E7E8 12px 24px); }
.fleet-card .body { padding: 16px 18px 20px; }
.fleet-card h3 { font-size: 1rem; margin: 0 0 4px; }
.fleet-card .models { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.fleet-card p { font-size: .88rem; color: var(--muted); margin: 0; }
@media (max-width: 1100px) { .fleet-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 840px) { .fleet-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 520px) { .fleet-grid { grid-template-columns: 1fr; } }