/* Site-wide brand and responsive refinements. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}

@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --kgec-navy: #081720;
  --kgec-green: #0b5d45;
  --kgec-slate: #4b5563;
  --kgec-light: #e5e7eb;
}

.container-x {
  max-width: none;
  padding-inline: clamp(1.25rem, 3.5vw, 4.5rem);
}

body, button, input, select, textarea {
  font-family: Inter, system-ui, sans-serif;
}

h1, h2, h3, h4, .h-section, .font-display {
  font-family: Montserrat, Inter, sans-serif;
  font-stretch: normal !important;
  letter-spacing: -.025em;
}

.h-section {
  font-size: clamp(2.3rem, 3.6vw, 3.9rem);
  line-height: 1.08;
  font-weight: 700;
}

a.group.inline-flex, button.group.inline-flex {
  height: 50px;
  padding-inline: 1.5rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .005em;
}

a.group.inline-flex.h-11, button.group.inline-flex.h-11 {
  height: 44px;
}

main img[src^="/img/"] {
  filter: saturate(.94) contrast(1.035);
}

main img[src="/img/about-team.webp"] {
  filter: brightness(1.07) saturate(.94) contrast(1.035);
}

main section.py-24:not(.home-hero) {
  padding-block: 4.5rem;
}

main > section:first-child:not(.home-hero) h1 {
  font-size: clamp(2.8rem, 5vw, 5.25rem);
  font-weight: 700;
  line-height: 1.04;
}

.home-hero {
  min-height: 100svh;
}

.home-hero > div:nth-child(2) {
  background: linear-gradient(90deg, rgba(6, 19, 27, .92) 0%, rgba(6, 19, 27, .65) 36%, rgba(6, 19, 27, .14) 72%, rgba(6, 19, 27, .04) 100%);
}

.home-hero > div:nth-child(3) {
  opacity: .6;
}

.home-hero h1 {
  max-width: 930px;
  font-size: clamp(2.4rem, 8.8vw, 4.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.home-hero > div:nth-child(4) > div {
  max-width: 610px;
}

/* Hero headline in capitals; capitals need less negative tracking than lowercase. */
.home-hero h1 {
  text-transform: uppercase;
  letter-spacing: -.02em;
}

.home-hero .home-hero-sub {
  font-style: italic;
}

@media (min-width: 1024px) {
  .home-hero {
    min-height: clamp(660px, 82svh, 880px);
  }

  .home-hero > div:nth-child(4) {
    padding-top: 7.5rem;
    padding-bottom: 3rem;
  }

  .home-hero h1 {
    font-size: clamp(3.5rem, 4.2vw, 4.75rem);
  }
}

@media (max-width: 639px) {
  .home-hero > div:nth-child(2) {
    background: linear-gradient(90deg, rgba(6, 19, 27, .88), rgba(6, 19, 27, .42)), linear-gradient(0deg, rgba(6, 19, 27, .5), transparent 50%);
  }

  .home-hero > div:nth-child(4) {
    padding-top: 7.5rem;
    padding-bottom: 2.25rem;
  }

  .home-hero h1 {
    font-size: clamp(2.25rem, 8.6vw, 3rem);
  }

  main section.py-24:not(.home-hero) {
    padding-block: 3.75rem;
  }

  .home-hero > div:last-child .container-x > div {
    gap: .5rem;
    padding-block: .9rem;
  }
}

/* ---------- Footer bottom bar: copyright · Fortimark credit · legal links ---------- */
.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .34));
}

.footer-bar__inner {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding-block: 1.75rem 2rem;
  text-align: center;
}

.footer-bar__copy {
  order: 3;
  margin: 0;
  color: rgba(255, 255, 255, .5);
  font-size: .8rem;
  line-height: 1.5;
  text-wrap: balance;
}

.footer-bar__legal {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.5rem;
}

.footer-legal-link {
  position: relative;
  padding-block: .45rem;
  color: rgba(255, 255, 255, .68);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .3s ease;
}

.footer-legal-link::after {
  content: '';
  position: absolute;
  inset: auto 0 .3rem 0;
  height: 1px;
  background: #4fa889;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}

.footer-legal-link:hover, .footer-legal-link:focus-visible { color: #fff; }
.footer-legal-link:hover::after, .footer-legal-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

@media (min-width: 1100px) {
  .footer-bar__inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    padding-block: 1.35rem;
    text-align: left;
  }
  .footer-bar__copy { order: 0; justify-self: start; }
  .footer-bar__legal { order: 0; justify-self: end; gap: 0 1.75rem; }
}

/* Fortimark credit styles: assets/fortimark-credit.css (shared with the legal pages). */
.footer-bar .fm-credit { order: 1; }
@media (min-width: 1100px) {
  .footer-bar .fm-credit { order: 0; justify-self: center; }
}

/* Hero stat icons: animate alongside the 30,000 PSI gauge once the intro is done. */
.hero-ico {
  display: inline-flex;
  flex-shrink: 0;
}

.hero-ico svg { overflow: visible; }

.hero-ico-1.is-live svg :is(path, polyline) {
  stroke-dasharray: 72;
  stroke-dashoffset: 72;
  animation: hero-ico-draw 1.4s cubic-bezier(.65, 0, .35, 1) .2s forwards;
}

.hero-ico-1.is-live svg {
  animation: hero-ico-pulse 3.4s ease-in-out 1.8s infinite;
}

.hero-ico-2.is-live svg {
  transform-origin: 50% 50%;
  animation: hero-ico-spin 7s linear infinite;
}

.hero-ico-3.is-live svg {
  transform-origin: 50% 85%;
  animation: hero-ico-ring 3.6s ease-in-out .8s infinite;
}

@keyframes hero-ico-draw { to { stroke-dashoffset: 0; } }

@keyframes hero-ico-pulse {
  0%, 100% { transform: scale(1); filter: none; }
  50% { transform: scale(1.07); filter: drop-shadow(0 0 7px rgba(79, 168, 137, .65)); }
}

@keyframes hero-ico-spin { to { transform: rotate(360deg); } }

@keyframes hero-ico-ring {
  0%, 58%, 100% { transform: rotate(0); }
  64% { transform: rotate(-11deg); }
  70% { transform: rotate(9deg); }
  76% { transform: rotate(-6deg); }
  82% { transform: rotate(4deg); }
  88% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-ico.is-live svg,
  .hero-ico.is-live svg :is(path, polyline) {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* Keep addresses and emails whole; only break when a single word can't fit. */
.break-all {
  word-break: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 1279px) {
  .cond.break-all.text-2xl {
    font-size: clamp(1.05rem, 1.6vw + .7rem, 1.5rem);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .cond.break-all.text-2xl { font-size: 1.25rem; }
}

/* Desktop dropdowns: roomier items, and much less see-through while open. */
.nav-menu-item {
  padding-block: 1rem;
  font-size: 1rem;
}

.nav-menu-panel { background-color: rgb(8 23 32 / .985); }

.nav-bar-open { background-color: rgb(8 23 32 / .97); }

/* Mobile menu groups: keep the page link and plus toggle independently tappable. */
.mobile-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgb(255 255 255 / .08);
}

.mobile-nav-link {
  display: flex;
  min-height: 3.75rem;
  flex: 1;
  align-items: center;
  text-decoration: none;
}

.mobile-nav-toggle {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px;
  color: #a6c5b6;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  border-color: #78a993;
  background: rgb(120 169 147 / .1);
  color: #fff;
}

.mobile-nav-submenu {
  margin: 0;
  padding: .35rem 0 .75rem 1rem;
  border-bottom: 1px solid rgb(255 255 255 / .08);
  list-style: none;
}

.mobile-nav-sublink {
  display: block;
  padding: .7rem .5rem;
  color: rgb(255 255 255 / .76);
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
}

.mobile-nav-sublink:hover,
.mobile-nav-sublink:focus-visible { color: #a6c5b6; }

/* ---------- Tablet + mobile fixes (Sep 2026 review) ---------- */

/* No sideways page scroll from stray overflow (e.g. decorative SVGs). clip keeps position: sticky working. */
html, body { overflow-x: clip; }

/* Home "Core Services": below desktop, the card grows to fit its text instead of clipping the title. */
@media (max-width: 1279px) {
  .svc-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: auto;
    min-height: 21rem;
  }
  .svc-card > div:last-child { position: relative; }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .svc-card h3 { font-size: 2.25rem; }
}

/* 1024–1279px: show the full desktop menu instead of the hamburger ("Home" hides; the logo links home). */
@media (min-width: 1024px) and (max-width: 1279px) {
  header nav[aria-label="Primary"] { display: flex; gap: 0; }
  header nav[aria-label="Primary"] > div:first-child { display: none; }
  header nav[aria-label="Primary"] a { padding-inline: .6rem; font-size: 14.5px; }
  header button[aria-label="Open menu"],
  header button[aria-label="Close menu"] { display: none; }
  .nav-menu-panel { display: block; }
  .cert-code { font-size: clamp(1.4rem, 2.15vw, 2.25rem); white-space: nowrap; }
  .hero-stats .cond.font-display { font-size: 1.2rem; }
}

/* Hero stat strip on phones: smaller type and icons so "API Certified" fits on one line. */
@media (max-width: 639px) {
  .hero-stats > div { gap: .75rem; }
  .hero-stats .cond.font-display { font-size: 1.05rem; line-height: 1.2; }
  .hero-stats svg { width: 1.9rem; height: 1.9rem; }
}

/* Products tabs on phones: a 2 × 2 grid instead of a strip that hides "Threading". */
@media (max-width: 767px) {
  .prod-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 1.25rem;
  }
  .prod-tabs > button { padding-inline: .75rem; border-radius: .9rem; }
  .prod-tabs .grad-brand { border-radius: .9rem; }
}

/* About: no lone tiles on their own row. */
@media (max-width: 639px) {
  .about-caps > :last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    flex-direction: row;
    padding-block: 1.25rem;
  }
}

@media (max-width: 767px) {
  .about-team > :last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .about-team { grid-template-columns: repeat(6, 1fr); }
  .about-team > * { grid-column: span 2; }
  .about-team > :nth-child(4),
  .about-team > :nth-child(5) { grid-column: span 3; aspect-ratio: 4 / 3; }
}

/* Footer link columns: an accordion on phones, plain headings from 640px up. */
.foot-col__toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  font: inherit;
  text-align: left;
  pointer-events: none;
}

.foot-col__chev { display: none; }

@media (max-width: 639px) {
  footer .grid:has(> .foot-col) { gap: 1.25rem; }
  .foot-col__toggle { padding-block: .35rem; cursor: pointer; pointer-events: auto; }
  .foot-col__chev { display: block; opacity: .7; transition: transform .4s ease; }
  .foot-col.is-open .foot-col__chev { transform: rotate(180deg); }
  .foot-col:not(.is-open) .foot-col__list { display: none; }
}

/* ---------- Industries: restrained stacked cards ---------- */
.ind-card-0,
.ind-card-1,
.ind-card-2,
.ind-card-3 { --acc: #63927f; }

.ind-card {
  border: 1px solid #34434c;
  border-radius: 5px;
  background: #0c1b25;
  box-shadow: 0 18px 42px -34px rgb(0 0 0 / 75%);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.ind-card:hover {
  border-color: #6c8e7f;
  box-shadow: 0 20px 44px -34px rgb(0 0 0 / 85%);
}

.ind-media { border-right: 1px solid #34434c; }
.ind-media img { transition: transform 1.4s cubic-bezier(.16, 1, .3, 1); }
.ind-card:hover .ind-media img { transform: scale(1.05); }

.ind-body { padding: 2rem 1.75rem 2.25rem; }

/* Small brand rule, aligned to the inner edge of the copy. */
.ind-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.75rem;
  width: 38px;
  height: 2px;
  background: var(--acc);
}

.ind-points { margin-top: 1.5rem; }
.ind-card li svg { color: #77a28f; }

/* The original illustrated icons were decorative and competed with the photography.
   Keep the stack's useful index, but let the industry name carry the card. */
.ind-ico {
  display: none;
}

.ind-num {
  color: #a6b2b9;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .13em;
  font-variant-numeric: tabular-nums;
}

/* Sticky stacking only where there's room (≥1024px); normal flow on phones and tablets. */
.ind-slot { margin-bottom: 1.25rem; }

@media (min-width: 1024px) {
  .ind-slot {
    position: sticky;
    height: clamp(430px, 62vh, 540px);
    margin-bottom: 8vh;
  }
  .ind-body { padding: 2.5rem 3rem; }
  .ind-body::before { left: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ind-media img { transition: none; }
}

/* Footer certification marquee: a single calm ticker under its own label. */
.footer-certifications__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(1.75rem, 3.4vw, 2.75rem);
  text-align: center;
}

.footer-certifications__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  margin: 0 0 1.15rem;
  color: #9bb6a8;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.footer-certifications__label::before,
.footer-certifications__label::after {
  content: '';
  display: block;
  width: clamp(1.5rem, 4vw, 3.25rem);
  height: 1px;
  background: rgb(155 182 168 / .45);
}

.footer-certifications__marquee {
  width: 100%;
  max-width: 92rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.footer-certifications__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: cert-ticker 40s linear infinite;
  will-change: transform;
}

.footer-certifications__marquee:hover .footer-certifications__track { animation-play-state: paused; }

.footer-certifications__set {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  padding-right: clamp(1.5rem, 4vw, 4.5rem);
}

.footer-certifications__item {
  display: inline-flex;
  align-items: center;
  color: #f3f5f4;
  font-family: Montserrat, Inter, sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.2;
  white-space: nowrap;
}

.footer-certifications__item::after {
  content: '';
  display: block;
  width: 1px;
  height: 1.3em;
  margin-inline: clamp(1.2rem, 3vw, 2.8rem);
  background: rgb(155 182 168 / .5);
}


@keyframes cert-ticker {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .footer-certifications__track { animation: none; }
  .footer-certifications__marquee { overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .footer-certifications__track { flex-wrap: wrap; justify-content: center; width: auto; gap: .6rem 0; }
  .footer-certifications__item[aria-hidden="true"] { display: none; }
  .footer-certifications__item:nth-of-type(5)::after { display: none; }
}

/* ---------- Touch devices: comfortable tap targets and no iOS zoom on form fields ---------- */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }

  footer ul a { display: inline-block; padding-block: .55rem; }
  footer ul.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
  footer button.flex.items-center.gap-2 { padding-block: .8rem; }
  .foot-col__toggle { padding-block: .6rem; }

  main a.mt-5.inline-flex.items-center.gap-2,
  main a.text-sm.font-semibold.text-brand-500,
  main a.inline-block.text-sm.font-semibold {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  main nav a, main ol a { display: inline-flex; min-height: 44px; align-items: center; }
  main ol a:first-child { padding-inline: .2rem; }

  .fm-credit { padding-block: .8rem; }
  .footer-legal-link { padding-block: .75rem; }
  header nav[aria-label="Primary"] a { min-height: 44px; }
}

/* ---------- Phones ---------- */
@media (max-width: 639px) {
  /* Certifications page: licence cards two-up instead of one long column. */
  .cert-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .cert-grid > * { padding: 1.25rem .75rem; }
  .cert-grid h3 { font-size: 1.05rem; }
  .cert-grid p { font-size: .8rem; }
}

@media (max-width: 479px) {
  /* Inner page titles: two lines instead of three on narrow phones. */
  main > section:first-child:not(.home-hero) h1 { font-size: clamp(2.1rem, 10.4vw, 2.6rem); }
}

/* ---------- Phones: quick-contact bar (assets/mobile-actions.mjs) ---------- */
.kgec-actionbar { display: none; }

@media (max-width: 767px) {
  .kgec-actionbar {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    background: rgb(8 23 32 / .92);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
    backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(140%);
    pointer-events: none;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
  }

  .kgec-actionbar.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .kgec-actionbar a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: 11px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
  }

  .kgec-actionbar a.is-primary { background: #0b5d45; }
  .kgec-actionbar a:active { transform: scale(.97); }
  .kgec-actionbar svg { width: 18px; height: 18px; flex-shrink: 0; }

  /* The bar covers calling, WhatsApp and quotes, so the footer's contact rows and certification strip are hidden on phones. */
  .footer-contact-rows,
  .footer-certifications { display: none; }

  /* Room for the bar at the very bottom of the page. */
  footer { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .kgec-actionbar { transition: none; }
}

/* ---------- Home: Who We Are, stats band, Vision & Mission (tools/client-changes/05-*.mjs) ---------- */
.who-section {
  padding-block: 5rem 4rem;
}

.who-body {
  margin-top: 2.5rem;
}

.who-photo {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
}

.who-copy p + p {
  margin-top: 1.1rem;
}

.who-points {
  margin-top: 2rem;
}

.who-points > li {
  padding-block: .9rem;
  border-top: 1px solid rgba(8, 23, 32, .1);
}

.who-points > li:last-child {
  border-bottom: 1px solid rgba(8, 23, 32, .1);
}

.who-cta {
  margin-top: 2.5rem;
}

/* Stats band: centred cells, same rhythm as the Products page feature strip. */
.who-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2.75rem 1rem;
  text-align: center;
}

.who-stat-num {
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: #081720;
}

.who-stat-suffix {
  color: #147b5c;
}

.who-stat-label {
  max-width: 15rem;
  margin-top: .85rem;
  font-size: .9rem;
  line-height: 1.5;
  color: #4b5563;
}

/* Vision & Mission: light, centred, two equal columns. */
.vm-section {
  padding-block: 6rem;
}

.vm-grid {
  display: grid;
}

.vm-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 0;
  text-align: center;
}

.vm-col + .vm-col {
  border-top: 1px solid rgba(8, 23, 32, .12);
}

.vm-index {
  font-family: Montserrat, Inter, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: #147b5c;
}

.vm-title {
  margin-top: .75rem;
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  color: #081720;
}

.vm-bar {
  width: 3rem;
  height: 3px;
  margin-top: 1.25rem;
  background: #147b5c;
}

.vm-text {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.75;
  color: #4b5563;
}

@media (min-width: 768px) {
  .who-section { padding-block: 7rem 5rem; }
  .who-body { margin-top: 3.5rem; }
  .who-stat { padding-block: 3.5rem; }
  .vm-section { padding-block: 8rem; }
  .vm-grid { grid-template-columns: 1fr 1fr; }
  .vm-col { padding: 0 clamp(1.5rem, 4vw, 4rem); }
  .vm-col + .vm-col { border-top: 0; border-left: 1px solid rgba(8, 23, 32, .12); }
}

@media (min-width: 1024px) {
  .who-body { align-items: center; }
}

/* Logo sizes (header and footer use the vector lockup, logo/lockup-*.svg) */
.kgec-header-logo { height: 70px; transition: height .7s cubic-bezier(.16, 1, .3, 1); }
/* Compact bar is 72px tall: 52px leaves 10px above and below the logo. */
.kgec-header-logo.is-compact { height: 52px; }
.kgec-footer-logo { height: 112px; }
@media (max-width: 640px) {
  .kgec-header-logo { height: 60px; }
  .kgec-header-logo.is-compact { height: 48px; }
  .kgec-footer-logo { height: 96px; }
}

/* ---------- Products: home intro + Products page scroller (tools/client-changes/06-*.mjs) ---------- */
.home-products {
  padding-block: 6rem;
}

.home-products-grid {
  align-items: center;
}

.home-products-copy {
  margin-top: 1.5rem;
}

.home-products-copy p + p {
  margin-top: 1rem;
}

.home-products-cta {
  margin-top: 2.25rem;
}

.home-products-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.home-products-tile {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: #081720;
}

.home-products-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.16, 1, .3, 1);
}

.home-products-tile:hover img { transform: scale(1.05); }

.prod-scroller {
  padding-block: 5rem 3rem;
}

.prod-scroller-nav {
  display: flex;
  gap: .75rem;
}

.prod-scroller-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(8, 23, 32, .2);
  border-radius: 999px;
  color: #081720;
  background: #fff;
  transition: background-color .3s, color .3s, border-color .3s;
}

.prod-scroller-nav button:hover {
  border-color: #0b5d45;
  color: #fff;
  background: #0b5d45;
}

/* Native horizontal scroll: no scroll-lock, works with trackpad, touch, scrollbar and keyboard. */
.prod-scroller-track {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 0 clamp(1.25rem, 3.5vw, 4.5rem) 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: clamp(1.25rem, 3.5vw, 4.5rem);
  scrollbar-width: thin;
  scrollbar-color: #147b5c rgba(8, 23, 32, .1);
}

.prod-scroller-track:focus-visible {
  outline: 2px solid #147b5c;
  outline-offset: 4px;
}

.prod-scroller-track::-webkit-scrollbar { height: 6px; }
.prod-scroller-track::-webkit-scrollbar-track { background: rgba(8, 23, 32, .1); border-radius: 999px; }
.prod-scroller-track::-webkit-scrollbar-thumb { background: #147b5c; border-radius: 999px; }

.prod-scroller-card {
  flex: 0 0 72vw;
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .prod-scroller-card { flex-basis: 42vw; }
}

@media (min-width: 768px) {
  .home-products { padding-block: 8rem; }
  .home-products-images { gap: 1.25rem; }
  .prod-scroller { padding-block: 7rem 4rem; }
}

@media (min-width: 1024px) {
  .prod-scroller-card { flex-basis: 26vw; }
}

/* ---------- About page: About Us copy (tools/client-changes/08-*.mjs) ---------- */
.about-us-text {
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #4b5563;
}

@media (min-width: 768px) {
  .about-us-text { font-size: 1.125rem; }
}

/* ---------- Home: Who We Are (centred, tools/client-changes/11-*.mjs) ---------- */
.who-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.who-lead {
  max-width: 46rem;
  margin-top: 1.5rem;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  color: #081720;
}

.who-bar {
  width: 3rem;
  height: 3px;
  margin-top: 1.75rem;
  background: #147b5c;
}

/* Description: one centred block, each paragraph kept whole. */
.who-columns {
  max-width: 50rem;
  margin: 2.75rem auto 0;
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: center;
  color: #4b5563;
}

.who-columns p + p { margin-top: 1.1rem; }

.who-highlights {
  display: grid;
  max-width: 72rem;
  margin: 3.5rem auto 0;
  border-top: 1px solid rgba(8, 23, 32, .12);
}

.who-highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #081720;
}

.who-highlight + .who-highlight {
  border-top: 1px solid rgba(8, 23, 32, .12);
}

.who-check {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: #0b5d45;
  background: rgba(11, 93, 69, .1);
}

.who-section .who-cta {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .who-columns { font-size: 1.125rem; }

  .who-highlights {
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid rgba(8, 23, 32, .12);
  }

  .who-highlight {
    flex-direction: column;
    justify-content: flex-start;
    gap: .9rem;
    padding: 2rem 1.5rem;
    text-align: center;
  }

  .who-highlight + .who-highlight {
    border-top: 0;
    border-left: 1px solid rgba(8, 23, 32, .12);
  }
}

/* ---------- Certifications: Quality Control (tools/client-changes/16-*.mjs) ---------- */
.qc-section {
  padding-block: 5rem;
}

.qc-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1rem;
  margin-top: 3rem;
}

.qc-step {
  display: flex;
  flex-direction: column;
}

/* The fifth step spans the full row on two-column layouts. */
.qc-step:last-child {
  grid-column: 1 / -1;
}

.qc-photo {
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  background: #081720;
}

.qc-step:last-child .qc-photo {
  aspect-ratio: 16 / 9;
}

.qc-index {
  margin-top: 1.1rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(8, 23, 32, .15);
  font-family: Montserrat, Inter, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: #147b5c;
}

.qc-title {
  margin-top: .4rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: #081720;
}

@media (min-width: 768px) {
  .qc-section { padding-block: 7rem; }
  .qc-steps { gap: 2.5rem 1.25rem; margin-top: 3.5rem; }
  .qc-title { font-size: 1.15rem; }
}

@media (min-width: 1024px) {
  .qc-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .qc-step:last-child { grid-column: auto; }
  .qc-step:last-child .qc-photo { aspect-ratio: 4 / 5; }
}

/* ---------- Certifications: cards (tools/client-changes/17-*.mjs) ---------- */
.cert-section {
  padding-block: 5rem;
}

.cert-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 1.5rem;
  border: 1px solid rgba(8, 23, 32, .1);
  border-radius: 2px;
  background: #fff;
  text-align: center;
  transition: transform .7s cubic-bezier(.16, 1, .3, 1), box-shadow .7s cubic-bezier(.16, 1, .3, 1), border-color .4s;
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: rgba(11, 93, 69, .35);
  box-shadow: 0 30px 60px -30px rgba(5, 32, 47, .4);
}

/* Fifth card spans the row on two-column layouts. */
.cert-card:last-child { grid-column: 1 / -1; }

.cert-thumb {
  display: block;
  width: 100%;
  padding: .75rem;
  border-radius: 2px;
  background: #e5e7eb;
}

.cert-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 900 / 695;
  object-fit: contain;
  box-shadow: 0 10px 24px -14px rgba(8, 23, 32, .45);
  transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}

.cert-card:hover .cert-thumb img { transform: scale(1.03); }
.cert-card:last-child .cert-thumb { max-width: 22rem; }

.cert-code {
  margin-top: 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #081720;
}

.cert-ref {
  margin-top: .3rem;
  font-size: .875rem;
  color: #4b5563;
}

.cert-valid {
  margin-top: .75rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(11, 93, 69, .1);
  font-size: .75rem;
  font-weight: 600;
  color: #0b5d45;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.1rem;
  font-size: .875rem;
  font-weight: 600;
  color: #0b5d45;
}

.cert-head-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

@media (min-width: 768px) {
  .cert-section { padding-block: 7rem; }
  .cert-cards { gap: 1.25rem; margin-top: 3.5rem; }
}

@media (min-width: 1024px) {
  .cert-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cert-card:last-child { grid-column: auto; }
  .cert-card:last-child .cert-thumb { max-width: none; }
}

/* ---------- Capability icons (About > Our Capabilities): always moving, faster on hover or touch ---------- */
.cap-icon { display: block; width: 52px; height: 52px; }
.cap-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cap-icon svg * { transform-box: fill-box; transform-origin: center; }
.cap-card { --ci: 1; -webkit-tap-highlight-color: transparent; }
.cap-card:hover, .cap-card:active { --ci: .45; }
.cap-card:active { transform: translateY(-4px) scale(.98); }
.cap-card:hover .cap-icon, .cap-card:active .cap-icon { transform: scale(1.12); }
.cap-icon { transition: color .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }

/* Engineering: compass rocks while the arc is drawn */
.ci-compass { transform-box: view-box !important; transform-origin: 14px 38px !important; animation: ci-compass calc(3.2s * var(--ci)) ease-in-out infinite; }
.ci-draw { stroke-dasharray: 1 2; animation: ci-draw calc(3.2s * var(--ci)) ease-in-out infinite; }
@keyframes ci-compass { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes ci-draw { 0%, 100% { stroke-dashoffset: 1; } 50% { stroke-dashoffset: 0; } }

/* Machining: meshing gears */
.ci-spin { animation: ci-spin calc(8s * var(--ci)) linear infinite; }
.ci-spin--rev { animation-duration: calc(6s * var(--ci)); animation-direction: reverse; }
@keyframes ci-spin { to { transform: rotate(360deg); } }

/* Manufacturing: smoke rising from the stack */
.ci-puff { opacity: 0; animation: ci-puff calc(2.7s * var(--ci)) ease-out infinite; }
.ci-puff--2 { animation-delay: calc(.9s * var(--ci)); }
.ci-puff--3 { animation-delay: calc(1.8s * var(--ci)); }
.ci-blink { animation: ci-blink calc(2.4s * var(--ci)) steps(1) infinite; }
@keyframes ci-puff { 0% { opacity: 0; transform: translate(0, 2px) scale(.5); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(-7px, -13px) scale(1.5); } }
@keyframes ci-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Fabrication: flickering flame and sparks */
.ci-flame { transform-origin: 50% 100% !important; animation: ci-flame calc(1.5s * var(--ci)) ease-in-out infinite; }
.ci-flame-core { transform-origin: 50% 100% !important; animation: ci-flame calc(.9s * var(--ci)) ease-in-out infinite reverse; }
.ci-spark { opacity: 0; animation: ci-spark calc(1.8s * var(--ci)) ease-out infinite; }
.ci-spark--2 { animation-delay: calc(.6s * var(--ci)); --sx: 5px; --sy: -6px; }
.ci-spark--3 { animation-delay: calc(1.2s * var(--ci)); --sx: 6px; --sy: 1px; }
@keyframes ci-flame { 0%, 100% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.95, 1.07) skewX(-2deg); } 65% { transform: scale(1.04, .95) skewX(2deg); } }
@keyframes ci-spark { 0% { opacity: 0; transform: translate(calc(var(--sx, -5px) * -1), calc(var(--sy, -5px) * -1)) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--sx, -5px), var(--sy, -5px)) scale(1); } }

/* Repair: wrench tightening, with turn marks */
.ci-wrench { transform-box: view-box !important; transform-origin: 24px 24px !important; animation: ci-wrench calc(2.2s * var(--ci)) cubic-bezier(.5, 0, .2, 1) infinite; }
.ci-turn { opacity: 0; animation: ci-turn calc(2.2s * var(--ci)) ease-out infinite; }
.ci-turn--2 { animation-delay: calc(.15s * var(--ci)); }
@keyframes ci-wrench { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(-22deg); } 55% { transform: rotate(10deg); } 70% { transform: rotate(0); } }
@keyframes ci-turn { 0%, 30%, 100% { opacity: 0; } 45% { opacity: .85; } 75% { opacity: 0; } }

/* Testing: gauge needle climbs and holds under pressure */
.ci-needle { transform-box: view-box !important; transform-origin: 24px 30px !important; animation: ci-needle calc(3.6s * var(--ci)) cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes ci-needle { 0%, 100% { transform: rotate(-78deg); } 45% { transform: rotate(62deg); } 52% { transform: rotate(54deg); } 59% { transform: rotate(62deg); } 66% { transform: rotate(56deg); } 78% { transform: rotate(60deg); } }

/* Onsite Services: pin drops in, ripples spread */
.ci-pin { animation: ci-pin calc(2.4s * var(--ci)) cubic-bezier(.3, .7, .3, 1) infinite; }
.ci-ripple { opacity: 0; animation: ci-ripple calc(2.4s * var(--ci)) ease-out infinite; }
.ci-ripple--2 { animation-delay: calc(.5s * var(--ci)); }
@keyframes ci-pin { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(-6px); } 42% { transform: translateY(1px) scale(1.03, .97); } }
@keyframes ci-ripple { 0%, 38% { opacity: 0; transform: scale(.4); } 48% { opacity: .9; } 100% { opacity: 0; transform: scale(2.6); } }

@media (max-width: 640px) { .cap-icon { width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .cap-icon svg * { animation: none !important; } .ci-draw { stroke-dashoffset: 0; } .ci-puff { opacity: .6; } }

/* ---------- Certifications: note moved from the removed Resources page (tools/client-changes/23-*.mjs) ---------- */
.cert-note {
  margin-top: 2.5rem;
  font-size: .95rem;
  color: #4b5563;
  text-align: center;
}
