/* ==========================================================================
   Kennek Electricals — design system
   Direction: B "Corporate Trust", built around the logo indigo (#3E4095).
   Palette rules: indigo = actions and links; navy = dark sections;
   copper = illustrations only; amber = "to verify" tags (remove before launch).
   ========================================================================== */

/* ---------- Fonts (self-hosted: faster, and no third-party requests under PDPA) ---------- */
@font-face {
  font-family: "Lexend";
  src: url("../fonts/lexend-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* colour — all text pairs checked to WCAG AA */
  --c-ink: #141833;          /* body text on paper 16.2:1 */
  --c-muted: #4B5168;        /* secondary text on paper 7.3:1 */
  --c-paper: #F6F7FA;
  --c-surface: #FFFFFF;
  --c-line: #DCE0E8;
  --c-line-strong: #B9BFCD;
  --c-brand: #3E4095;        /* logo indigo; white text 8.9:1 */
  --c-brand-dark: #2F3178;   /* hover; white text 11.5:1 */
  --c-brand-tint: #ECEDF8;
  --c-navy: #121633;         /* dark sections; white text 17.7:1 */
  --c-navy-2: #1C2150;
  --c-on-navy: #FFFFFF;
  --c-on-navy-muted: #C3C7DA; /* on navy 10.5:1 */
  --c-on-navy-accent: #C9CCF5;
  --c-copper: #B8692E;
  --c-copper-light: #D9894B;
  --c-steel: #E4E7EC;
  --c-verify: #8F6A1E;       /* on white 4.9:1 */
  --c-verify-bg: #FFF6DB;
  --c-error: #B42318;

  /* type */
  --font-head: "Lexend", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h4: 1.125rem;
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --fs-h2: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);
  --fs-h1: clamp(2.125rem, 1.6rem + 2.6vw, 3.625rem);
  --lh-tight: 1.12;
  --lh-head: 1.22;
  --lh-body: 1.6;

  /* space */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem;
  --s-section: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --gutter: 16px;
  --container: 1200px;

  /* shape and motion */
  --r-sm: 4px;
  --r-md: 8px;
  --shadow-header: 0 1px 0 var(--c-line);
  --t-fast: 150ms ease-out;
  --header-h: 72px;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --header-h: 80px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: var(--lh-head);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--s-4); }
a { color: var(--c-brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-brand-dark); }
:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--c-on-navy-accent); }
ul, ol { margin: 0; padding: 0; }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--c-brand); color: #fff; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); color: #fff; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s-section); }
.section--white { background: var(--c-surface); }
.section--navy { background: var(--c-navy); color: var(--c-on-navy); }
.section-head { max-width: 46rem; margin-bottom: var(--s-7); }
.section-head p { margin-top: var(--s-4); color: var(--c-muted); font-size: var(--fs-lead); }
.section--navy .section-head p { color: var(--c-on-navy-muted); }
.section-head--split { max-width: none; display: grid; gap: var(--s-4); align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1fr auto; } }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0.75rem 1.375rem;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem; line-height: 1.2;
  border-radius: var(--r-sm); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-dark); color: #fff; }
.btn--outline { border-color: var(--c-line-strong); color: var(--c-ink); background: transparent; }
.btn--outline:hover { border-color: var(--c-brand); color: var(--c-brand); }
.btn--light { background: #fff; color: var(--c-brand-dark); }
.btn--light:hover { background: var(--c-brand-tint); color: var(--c-brand-dark); }
.btn--ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.text-link { font-family: var(--font-head); font-weight: 500; font-size: var(--fs-sm); color: var(--c-brand); text-decoration: underline; }
.section--navy .text-link { color: var(--c-on-navy-accent); }

/* ---------- Verification tag (pre-launch only) ---------- */
.verify-tag {
  display: inline-block; vertical-align: middle;
  margin-left: var(--s-2); padding: 0.05rem 0.4rem;
  font: 600 var(--fs-xs)/1.5 var(--font-body);
  color: var(--c-verify); background: var(--c-verify-bg);
  border: 1px solid #E8D39A; border-radius: 3px; letter-spacing: 0;
  max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
.placeholder {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, #EEF0F4 0 12px, #E6E9EF 12px 24px);
  border: 1.5px dashed var(--c-line-strong); border-radius: var(--r-md);
  color: var(--c-muted); font-size: var(--fs-sm); padding: var(--s-5);
}

/* ---------- Preview bar (remove before launch) ---------- */
.preview-bar { background: var(--c-verify-bg); border-bottom: 1px solid #E8D39A; font-size: var(--fs-sm); color: #5C4412; }
.preview-bar .container { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; padding-block: var(--s-2); }
.preview-bar a { color: #5C4412; font-weight: 600; }
.preview-bar [aria-current="page"] { text-decoration: none; background: #fff; border: 1px solid #E8D39A; padding: 0 var(--s-2); border-radius: 3px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-surface); box-shadow: var(--shadow-header); }
.site-header .container { display: flex; align-items: center; gap: var(--s-5); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--c-ink); margin-right: auto; }
.brand img { width: auto; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.125rem; letter-spacing: 0.04em; }
.brand-sub { font-size: var(--fs-xs); color: var(--c-muted); }
.site-nav ul { list-style: none; display: flex; gap: var(--s-1); }
.site-nav a {
  display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
  color: var(--c-ink); text-decoration: none; font-family: var(--font-head); font-weight: 450; font-size: 0.975rem;
}
.site-nav a:hover { color: var(--c-brand); background: var(--c-brand-tint); }
.site-nav a[aria-current="page"] { color: var(--c-brand); }
.header-cta { display: none; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; min-width: 44px; padding: 0 var(--s-3);
  background: none; border: 1.5px solid var(--c-line-strong); border-radius: var(--r-sm);
  font: 500 0.95rem var(--font-head); color: var(--c-ink); cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* mobile menu: hidden until toggled; without JS the nav simply shows below the logo */
@media (max-width: 1023px) {
  .js .site-nav { display: none; }
  .js .site-nav.is-open {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--c-surface); border-top: 1px solid var(--c-line); box-shadow: 0 12px 24px rgba(18,22,51,.12);
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
  }
  .site-nav ul { flex-direction: column; padding: var(--s-3) var(--gutter) var(--s-5); }
  .site-nav a { padding: var(--s-3) var(--s-2); font-size: 1.0625rem; border-bottom: 1px solid var(--c-line); border-radius: 0; }
  .site-nav .nav-quote { margin-top: var(--s-4); }
  .site-nav .nav-quote a { border: 0; text-align: center; color: #fff; background: var(--c-brand); border-radius: var(--r-sm); }
  html:not(.js) .site-header .container { flex-wrap: wrap; }
  html:not(.js) .site-nav { width: 100%; }
  html:not(.js) .menu-toggle { display: none; }
}
@media (min-width: 1024px) {
  .menu-toggle, .site-nav .nav-quote { display: none; }
  .header-cta { display: inline-flex; }
}

/* ---------- Hero A: full-width photo ---------- */
.hero-photo { position: relative; isolation: isolate; color: #fff; background: var(--c-navy); overflow: hidden; }
.hero-photo picture, .hero-photo picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; z-index: -2; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(18,22,51,.94) 0%, rgba(18,22,51,.86) 38%, rgba(18,22,51,.45) 72%, rgba(18,22,51,.25) 100%);
}
@media (max-width: 767px) { .hero-photo::after { background: linear-gradient(180deg, rgba(18,22,51,.72) 0%, rgba(18,22,51,.9) 55%, rgba(18,22,51,.96) 100%); } }
.hero-photo .container { min-height: min(86svh, 760px); display: flex; flex-direction: column; justify-content: center; padding-block: var(--s-8); }
.hero-copy { max-width: 40rem; }
.hero-photo h1 { max-width: 17ch; }
.hero-lede { margin-top: var(--s-5); font-size: var(--fs-lead); color: var(--c-on-navy-muted); max-width: 34rem; }
.hero-copy .btn-row { margin-top: var(--s-6); }
.hero-tagline { margin-top: var(--s-6); font-family: var(--font-head); font-weight: 400; font-size: var(--fs-sm); color: var(--c-on-navy-accent); }

/* ---------- Hero B: exploded switchboard ---------- */
.hero-explode { background: var(--c-surface); position: relative; }
.hx-sticky { padding-block: var(--s-7); }
.hx-grid { display: grid; gap: var(--s-6); align-items: center; }
.hx-copy h1 { color: var(--c-navy); max-width: 16ch; }
.hx-copy .hero-lede { color: var(--c-muted); }
.hx-copy .hero-tagline { color: var(--c-brand); }
.hx-figure { margin: 0; }
.hx-svg { width: 100%; height: auto; max-height: 78svh; margin-inline: auto; overflow: hidden; }
.hx-caption { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--c-muted); }
.hx-legend { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2) var(--s-5); margin-top: var(--s-4); font-size: var(--fs-sm); line-height: 1.35; }
.hx-legend li { display: flex; gap: var(--s-2); align-items: baseline; opacity: var(--legend-o, 1); transition: opacity 200ms ease-out; }
.hx-legend b {
  flex: none; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--c-brand); color: #fff; font: 600 var(--fs-xs)/1 var(--font-head);
}
/* exploding parts: --p goes 0 (assembled) → 1 (exploded). Default 1 = static exploded view (no JS / reduced motion). */
.hero-explode { --p: 1; }
/* each part has its own start (--s) and duration (--w) so parts come apart one after another */
/* Two-phase move: (a) slide straight out of the cabinet to --fx/--fy, then (b) travel to the final --dx/--dy */
.hx-part {
  --lp: clamp(0, calc((var(--p) - var(--s, 0)) / var(--w, 1)), 1);
  --a: clamp(0, calc(var(--lp) / 0.35), 1);
  --b: clamp(0, calc((var(--lp) - 0.35) / 0.65), 1);
  transform: translate(calc((var(--a) * var(--fx, 0) + var(--b) * (var(--dx, 0) - var(--fx, 0))) * 1px),
                       calc((var(--a) * var(--fy, 0) + var(--b) * (var(--dy, 0) - var(--fy, 0))) * 1px));
}
/* assembled board starts centred and enlarged, then settles to fit the exploded view */
.hx-zoom { transform-box: view-box; transform-origin: var(--ox) var(--oy);
  transform: translate(calc((1 - var(--p)) * var(--tx) * 1px), calc((1 - var(--p)) * var(--ty) * 1px)) scale(calc(var(--z0) - (var(--z0) - 1) * var(--p))); }
.hx-marker { opacity: clamp(0, calc((var(--p) - 0.86) * 8), 1); }
.hx-scroll-hint { display: none; }
@media (min-width: 1024px) {
  .hx-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-areas: "copy fig" "key fig"; column-gap: var(--s-7); row-gap: var(--s-5); align-items: start; }
  .hx-copy { grid-area: copy; align-self: end; }
  .hx-figure { grid-area: fig; align-self: center; }
  .hx-key { grid-area: key; }
  .hx-key .hx-legend { grid-template-columns: 1fr 1fr; gap: var(--s-1) var(--s-4); font-size: var(--fs-xs); margin-top: 0; padding-top: var(--s-4); border-top: 1px solid var(--c-line); }
  .hx-key .hx-legend b { width: 1.25rem; height: 1.25rem; font-size: 0.6875rem; }
  .hx-copy .hero-tagline { margin-top: var(--s-4); }
  .hx-copy h1 { font-size: clamp(2.125rem, 1.2rem + 1.9vw, 3rem); max-width: 19ch; }
  .hx-svg { max-height: calc(100svh - var(--header-h) - 48px); }
  .hx-copy .hero-lede { margin-top: var(--s-4); font-size: 1.0625rem; }
  .hx-copy .btn-row { margin-top: var(--s-5); }
  .hx-key .hx-caption { margin-top: var(--s-2); }
  .hero-explode.is-animated { height: 260vh; }
  .hero-explode.is-animated .hx-sticky { position: sticky; top: var(--header-h); min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; padding-block: var(--s-5); }
  .hero-explode.is-animated .hx-scroll-hint { display: block; margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--c-muted); opacity: calc(1 - var(--p) * 3); }
  .hx-sticky > .container { width: 100%; }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .hx-copy h1 { font-size: 2.125rem; }
  .hx-copy .hero-tagline, .hero-explode.is-animated .hx-scroll-hint { display: none; }
  .hx-key .hx-caption { display: none; }
  .hero-explode.is-animated .hx-sticky { padding-block: var(--s-3); }
}

/* ---------- Factory photo band ---------- */
.factory-band { position: relative; isolation: isolate; color: #fff; background: var(--c-navy); overflow: hidden; }
.factory-band picture, .factory-band picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; z-index: -2; }
.factory-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(18,22,51,.92) 0%, rgba(18,22,51,.55) 45%, rgba(18,22,51,.15) 100%); }
.factory-band .container { min-height: clamp(420px, 64vh, 640px); display: flex; flex-direction: column; justify-content: flex-end; padding-block: var(--s-8); }
.factory-band h2 { max-width: 20ch; }
.factory-band p { margin-top: var(--s-4); max-width: 36rem; color: var(--c-on-navy-muted); font-size: var(--fs-lead); }
.factory-band .btn-row { margin-top: var(--s-5); }

/* ---------- Proof strip ---------- */
.proof { background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.hero-explode + .proof { border-top: 1px solid var(--c-line); }
.proof ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; }
.proof li { padding: var(--s-5) var(--s-4) var(--s-5) 0; border-top: 1px solid var(--c-line); }
.proof li:nth-child(-n+2) { border-top: 0; }
.proof li:nth-child(odd) { padding-right: var(--s-5); }
.proof li:nth-child(even) { padding-left: var(--s-5); border-left: 1px solid var(--c-line); }
.proof strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem); color: var(--c-brand); line-height: 1.2; }
.proof span.label { display: block; margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-sm); }
.proof .verify-tag { margin-left: 0; margin-top: var(--s-2); }
@media (min-width: 900px) {
  .proof ul { grid-template-columns: repeat(4, 1fr); }
  .proof li, .proof li:nth-child(odd), .proof li:nth-child(even) { border-top: 0; padding: var(--s-6) var(--s-5); border-left: 1px solid var(--c-line); }
  .proof li:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- Capabilities ---------- */
.cap-grid { list-style: none; display: grid; gap: var(--s-7) var(--s-6); }
@media (min-width: 768px) { .cap-grid { grid-template-columns: 1fr 1fr; } }
.cap-item a { display: block; color: inherit; text-decoration: none; }
.cap-item picture img, .cap-item .placeholder { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: var(--r-md); }
.cap-item h3 { margin-top: var(--s-5); }
.cap-item p { margin-top: var(--s-2); color: var(--c-muted); max-width: 34rem; }
.cap-item .more { display: inline-block; margin-top: var(--s-3); font-family: var(--font-head); font-weight: 500; font-size: var(--fs-sm); color: var(--c-brand); text-decoration: underline; text-underline-offset: 0.18em; }
.cap-item a:hover h3, .cap-item a:hover .more { color: var(--c-brand-dark); }

/* ---------- Products ---------- */
.product-grid { list-style: none; display: grid; gap: var(--s-6) var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 560px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product a { display: block; color: inherit; text-decoration: none; }
.product .frame { background: var(--c-steel); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; }
.product .frame img { width: 100%; height: 100%; object-fit: cover; }
.product .frame .placeholder { height: 100%; border-radius: var(--r-md); }
.product h3 { margin-top: var(--s-4); font-size: var(--fs-h4); }
.product p { margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-sm); }
.product a:hover h3 { color: var(--c-brand); text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------- Process (a true sequence, so it is numbered) ---------- */
.process { list-style: none; counter-reset: step; display: grid; gap: var(--s-6); }
.process li { counter-increment: step; display: grid; grid-template-columns: 96px 1fr; gap: var(--s-4); align-items: start; }
.process picture img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-sm); }
.process h3 { font-size: var(--fs-h4); }
.process h3::before { content: counter(step); display: block; margin-bottom: var(--s-1); font-family: var(--font-head); font-weight: 600; font-size: var(--fs-sm); color: var(--c-on-navy-accent); }
.process p { margin-top: var(--s-2); color: var(--c-on-navy-muted); font-size: var(--fs-sm); }
@media (min-width: 1024px) {
  .process { grid-template-columns: repeat(5, 1fr); gap: var(--s-5); position: relative; }
  .process li { grid-template-columns: 1fr; gap: var(--s-4); }
  .process picture img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .process li { border-top: 2px solid var(--c-navy-2); padding-top: var(--s-4); }
}

/* ---------- Factory / why Kennek ---------- */
.why { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 1024px) { .why { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.why picture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.why .photo-note { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--c-muted); }
.why h2 { max-width: 18ch; }
.reasons { list-style: none; margin-top: var(--s-6); }
.reasons li { padding-block: var(--s-4); border-top: 1px solid var(--c-line); }
.reasons li:last-child { border-bottom: 1px solid var(--c-line); }
.reasons h3 { font-size: var(--fs-h4); }
.reasons p { margin-top: var(--s-1); color: var(--c-muted); }

/* ---------- Industries and clients ---------- */
.industries { list-style: none; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--c-line); }
@media (min-width: 600px) { .industries { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }
@media (min-width: 1024px) { .industries { grid-template-columns: repeat(3, 1fr); } }
.industries li { padding: var(--s-4) 0; border-bottom: 1px solid var(--c-line); font-family: var(--font-head); font-weight: 450; }
.clients-placeholder { margin-top: var(--s-6); min-height: 120px; }

/* ---------- Credentials ---------- */
.cred-groups { display: grid; gap: var(--s-7); }
@media (min-width: 1024px) { .cred-groups { grid-template-columns: 2fr 1fr; gap: var(--s-8); } }
.cred-groups h3 { font-size: var(--fs-h4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--c-line); margin-bottom: var(--s-5); }
.cred-list { list-style: none; display: grid; gap: var(--s-5); grid-template-columns: 1fr 1fr; }
.partner-list { grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .cred-list:not(.partner-list) { grid-template-columns: repeat(4, 1fr); } }
.cred-list .logo { height: 72px; display: flex; align-items: center; }
.cred-list .logo img { max-height: 64px; max-width: 140px; width: auto; object-fit: contain; }
.cred-list strong { display: block; margin-top: var(--s-3); font-family: var(--font-head); font-weight: 500; font-size: var(--fs-sm); line-height: 1.35; }
.cred-list span.detail { display: block; color: var(--c-muted); font-size: var(--fs-xs); margin-top: 2px; }
.cred-list .verify-tag { margin: var(--s-2) 0 0; }
.cred-note { margin-top: var(--s-6); color: var(--c-muted); font-size: var(--fs-sm); max-width: 44rem; }

/* ---------- Testimonials ---------- */
.quotes { list-style: none; display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); } }
.quotes figure { margin: 0; padding-top: var(--s-5); border-top: 3px solid var(--c-brand); height: 100%; display: flex; flex-direction: column; }
.quotes blockquote { margin: 0; font-size: var(--fs-lead); line-height: 1.5; flex: 1; }
.quotes figcaption { margin-top: var(--s-5); font-size: var(--fs-sm); color: var(--c-muted); }
.quotes figcaption strong { display: block; color: var(--c-ink); font-family: var(--font-head); font-weight: 500; }

/* ---------- Enquiry CTA ---------- */
.cta-band { background: var(--c-brand); color: #fff; }
.cta-band .container { display: grid; gap: var(--s-6); padding-block: var(--s-8); align-items: center; }
@media (min-width: 900px) { .cta-band .container { grid-template-columns: 1.4fr 1fr; } .cta-band .btn-row { justify-content: flex-end; } }
.cta-band h2 { max-width: 20ch; }
.cta-band p { margin-top: var(--s-4); color: #E1E2F5; max-width: 38rem; }
.cta-band .verify-tag { margin-left: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-navy); color: var(--c-on-navy-muted); font-size: var(--fs-sm); }
.site-footer .container { padding-block: var(--s-8) var(--s-6); }
.footer-grid { display: grid; gap: var(--s-7); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand img { height: 84px; width: auto; background: #fff; padding: 10px 14px; border-radius: var(--r-md); }
.footer-brand p { margin-top: var(--s-4); max-width: 30rem; }
.site-footer h2 { font-size: var(--fs-base); color: #fff; margin-bottom: var(--s-4); }
.site-footer ul { list-style: none; display: grid; gap: var(--s-2); }
.site-footer a { color: var(--c-on-navy-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; display: grid; gap: var(--s-2); }
.site-footer .verify-tag { margin-left: 0; }
.footer-legal { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--c-navy-2); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); justify-content: space-between; font-size: var(--fs-xs); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Stage 6 — inner pages
   ========================================================================== */
.product-grid--4 { }
@media (min-width: 1024px) { .product-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.product--cta .cta-frame { display: flex; align-items: flex-end; padding: var(--s-5); background: var(--c-brand); color: #fff; font-family: var(--font-head); font-weight: 500; line-height: 1.35; }
.product--cta a:hover .cta-frame { background: var(--c-brand-dark); }

/* page header with breadcrumb */
.page-head { background: var(--c-surface); border-bottom: 1px solid var(--c-line); padding-block: var(--s-7) var(--s-7); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: var(--s-5); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s-2); color: var(--c-line-strong); }
.breadcrumb a { color: var(--c-muted); }
.page-head h1 { font-size: clamp(2rem, 1.6rem + 1.8vw, 3rem); max-width: 22ch; color: var(--c-navy); }
.page-intro { margin-top: var(--s-4); max-width: 44rem; font-size: var(--fs-lead); color: var(--c-muted); }

/* two-column detail layout */
.detail { display: grid; gap: var(--s-7); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .detail { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; } }
.detail-media picture img, .detail-media .placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.detail-media .placeholder { min-height: 280px; overflow-wrap: anywhere; }
@media (min-width: 1024px) { .detail-media { position: sticky; top: calc(var(--header-h) + var(--s-5)); } }
.block + .block { margin-top: var(--s-7); }
.block h2 { font-size: var(--fs-h3); margin-bottom: var(--s-4); }
.block p { color: var(--c-muted); max-width: 40rem; }
.ticks { list-style: none; display: grid; gap: var(--s-2); }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.6rem; height: 0.6rem; background: var(--c-copper); border-radius: 1px; }
.ticks--2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .ticks--2 { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }
.steps { list-style: none; counter-reset: s; display: grid; gap: var(--s-3); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; align-items: baseline; padding-block: var(--s-3); border-top: 1px solid var(--c-line); }
.steps li::before { content: counter(s); font-family: var(--font-head); font-weight: 600; color: var(--c-brand); }
.note { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); background: var(--c-brand-tint); border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--c-ink); max-width: 44rem; }
.rfq-box { padding: var(--s-6); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); }
.rfq-box h2 { font-size: var(--fs-h3); }
.rfq-box .ticks { margin-block: var(--s-4) var(--s-5); }

/* related links */
.related { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--c-line); }
@media (min-width: 768px) { .related { grid-template-columns: repeat(3, 1fr); column-gap: var(--s-6); } }
.related a { display: block; padding: var(--s-4) 0; border-bottom: 1px solid var(--c-line); font-family: var(--font-head); font-weight: 500; text-decoration: none; color: var(--c-ink); }
.related a:hover { color: var(--c-brand); }

/* service rows on the services overview */
.service-rows { list-style: none; display: grid; gap: var(--s-8); }
.service-row { display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 900px) { .service-row { grid-template-columns: 1fr 1fr; gap: var(--s-8); } .service-row:nth-child(even) .service-row-media { order: 2; } }
.service-row picture img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); }
.service-row h2 { font-size: var(--fs-h3); }
.service-row p { margin-top: var(--s-3); color: var(--c-muted); }
.service-row .ticks { margin-top: var(--s-4); }
.service-row .text-link { display: inline-block; margin-top: var(--s-4); }

/* projects */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.filters[hidden] { display: none; }
.filter-btn { min-height: 44px; padding: 0 var(--s-4); border-radius: 999px; border: 1.5px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-ink); font: 500 var(--fs-sm) var(--font-head); cursor: pointer; }
.filter-btn:hover { border-color: var(--c-brand); color: var(--c-brand); }
.filter-btn[aria-pressed="true"] { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.project-grid { list-style: none; display: grid; gap: var(--s-6) var(--s-5); }
@media (min-width: 600px) { .project-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }
.project-grid li[hidden] { display: none; }
.project-card picture img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-md); background: var(--c-steel); }
.project-card .industry { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--c-brand); font-family: var(--font-head); font-weight: 500; }
.project-card h2 { font-size: var(--fs-h3); margin-top: var(--s-1); }
.project-card p { margin-top: var(--s-2); color: var(--c-muted); font-size: var(--fs-sm); }
.project-count { color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: var(--s-5); }

/* quality */
.cert-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cert-table th, .cert-table td { text-align: left; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.cert-table th { font-family: var(--font-head); font-weight: 500; color: var(--c-muted); }
.cert-table td:first-child { font-weight: 600; }
.table-wrap { overflow-x: auto; }
@media (max-width: 767px) {
  .cert-table thead { display: none; }
  .cert-table tr { display: block; padding-block: var(--s-3); border-bottom: 1px solid var(--c-line); }
  .cert-table td { display: block; border: 0; padding: var(--s-1) 0; }
  .cert-table td::before { content: attr(data-label) ": "; color: var(--c-muted); font-weight: 400; }
  .cert-table td:first-child::before { content: none; }
}
.cert-group + .cert-group { margin-top: var(--s-8); }
.cert-group h2 { font-size: var(--fs-h3); }
.cert-group > p { margin: var(--s-2) 0 var(--s-5); color: var(--c-muted); max-width: 44rem; }
.cert-logos { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: center; margin-bottom: var(--s-5); }
.cert-logos img { max-height: 64px; width: auto; }

/* about */
.split { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.split picture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.prose p { color: var(--c-muted); max-width: 40rem; }
.prose h2 + p { margin-top: var(--s-4); }
.gallery { list-style: none; display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; }
.gallery picture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.gallery figcaption { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--c-muted); }
.team-group picture img { width: 100%; border-radius: var(--r-md); }
.team { list-style: none; display: grid; gap: var(--s-6) var(--s-5); grid-template-columns: 1fr 1fr; margin-top: var(--s-7); }
@media (min-width: 900px) { .team { grid-template-columns: repeat(5, 1fr); } }
.team picture img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-md); background: #E9EBF0; }
.team h3 { margin-top: var(--s-3); font-size: var(--fs-h4); }
.team p { color: var(--c-muted); font-size: var(--fs-sm); }

/* contact */
.contact-grid { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.contact-list { list-style: none; display: grid; gap: var(--s-5); }
.contact-list h2 { font-size: var(--fs-h4); margin-bottom: var(--s-1); }
.contact-list a { font-size: var(--fs-lead); }
.contact-list address { font-style: normal; font-size: var(--fs-lead); }
.map-card { padding: var(--s-6); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); }
.map-card picture img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-sm); margin-bottom: var(--s-4); }

/* 404 */
.not-found { padding-block: var(--s-section); }
.not-found p { margin-top: var(--s-4); color: var(--c-muted); max-width: 36rem; }
.not-found .btn-row { margin-top: var(--s-6); }
.project-card .location { margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-sm); }
.block .note { margin-top: var(--s-4); }

/* client logo wall: logos keep their own colours on equal tiles, sized for equal visual weight */
.clients-head { margin-top: var(--s-7); margin-bottom: var(--s-4); font-size: var(--fs-h4); }
.client-logos { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); padding-block: var(--s-4); }
.client-logos li { flex: 0 0 50%; display: grid; place-items: center; min-height: 96px; padding: var(--s-3); }
@media (min-width: 600px) { .client-logos li { flex-basis: 25%; } }
@media (min-width: 1024px) { .client-logos li { flex-basis: 16.666%; } }
.client-logos img { max-width: 100%; height: auto; }

/* ---------- Built around how you work (tabs) ---------- */
.aud-tabs { display: flex; gap: var(--s-1); padding: var(--s-1); background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 10px; width: fit-content; max-width: 100%; margin-bottom: var(--s-6); overflow-x: auto; }
.aud-tabs[hidden] { display: none; }
.aud-tab { flex: none; min-height: 44px; padding: 0 var(--s-5); border: 0; border-radius: 7px; background: transparent; color: var(--c-muted); font: 500 var(--fs-base) var(--font-head); cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast); }
.aud-tab:hover { color: var(--c-ink); }
.aud-tab[aria-selected="true"] { background: var(--c-surface); color: var(--c-brand); box-shadow: 0 1px 2px rgba(18,22,51,.12), 0 0 0 1px var(--c-line); }
@media (max-width: 559px) { .aud-tabs { width: 100%; } .aud-tab { flex: 1 1 0; padding: 0 var(--s-2); font-size: var(--fs-sm); } }
.aud-panel { display: grid; gap: var(--s-6); align-items: start; }
.aud-panel + .aud-panel { margin-top: var(--s-8); }
.tabs-ready .aud-panel + .aud-panel { margin-top: 0; }
.aud-panel[hidden] { display: none; }
@media (min-width: 1024px) { .aud-panel { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-8); } }
.aud-copy h3 { font-size: var(--fs-h3); }
.aud-intro { margin-top: var(--s-3); color: var(--c-muted); font-size: var(--fs-lead); max-width: 40rem; }
.aud-points { list-style: none; display: grid; gap: 0; margin-top: var(--s-5); border-top: 1px solid var(--c-line); }
@media (min-width: 640px) { .aud-points { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }
.aud-points li { padding-block: var(--s-4); border-bottom: 1px solid var(--c-line); }
.aud-points strong { display: block; font-family: var(--font-head); font-weight: 500; }
.aud-points span { display: block; margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-sm); }
.aud-copy .btn-row { margin-top: var(--s-6); }
.aud-media picture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }

/* equal-width buttons in "Built around how you work" */
.aud-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
.aud-tab { padding: 0 var(--s-5); text-align: center; }
.aud-copy .btn-row { display: grid; grid-template-columns: repeat(2, 15.75rem); max-width: 100%; }
@media (max-width: 559px) {
  .aud-tabs { width: 100%; }
  .aud-tab { padding: 0 var(--s-2); }
  .aud-copy .btn-row { grid-template-columns: 1fr; width: 100%; }
}

/* ---------- facts, highlight, social, WhatsApp ---------- */
@media (min-width: 768px) { .cred-list--3 { grid-template-columns: repeat(3, 1fr) !important; } }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--c-line); }
.facts > div { display: grid; grid-template-columns: minmax(0, 12rem) 1fr; gap: var(--s-4); padding-block: var(--s-3); border-bottom: 1px solid var(--c-line); }
.facts dt { font-family: var(--font-head); font-weight: 500; font-size: var(--fs-sm); }
.facts dd { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }
@media (max-width: 559px) { .facts > div { grid-template-columns: 1fr; gap: var(--s-1); } }
.highlight { margin-top: var(--s-7); padding: var(--s-6); display: grid; gap: var(--s-5); align-items: center; background: var(--c-navy); color: #fff; border-radius: var(--r-md); border-left: 6px solid var(--c-copper); }
@media (min-width: 900px) { .highlight { grid-template-columns: 1fr auto; } }
.highlight h2 { font-size: var(--fs-h3); }
.highlight p { margin-top: var(--s-2); color: var(--c-on-navy-muted); max-width: 44rem; }
.highlight .btn--primary { background: #fff; color: var(--c-brand-dark); }
.highlight .btn--primary:hover { background: var(--c-brand-tint); }
.social { list-style: none; display: flex; gap: var(--s-4); margin-top: var(--s-4); }
.social a { color: var(--c-on-navy-accent); text-decoration: underline; text-underline-offset: .18em; }
.btn--whatsapp { background: #1F7A44; color: #fff; }
.btn--whatsapp:hover { background: #17633A; color: #fff; }

/* ---------- About: timeline ---------- */
.timeline { list-style: none; display: grid; gap: 0; position: relative; }
.tl-item { position: relative; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: var(--s-4); padding-bottom: var(--s-6); }
.tl-item::before { content: ""; position: absolute; left: calc(1.25rem - 1px); top: 0.6rem; bottom: 0; width: 2px; background: var(--c-line); }
.tl-item:last-child::before { display: none; }
.tl-node { grid-column: 1; grid-row: 1 / span 4; justify-self: center; width: 14px; height: 14px; margin-top: 0.45rem; border-radius: 50%; background: var(--c-surface); border: 3px solid var(--c-brand); position: relative; z-index: 1; }
.tl-item--move .tl-node { background: var(--c-brand); }
.tl-visual { display: none; }
.tl-year, .tl-item h3, .tl-text, .tl-area { grid-column: 2; }
.tl-year { font-family: var(--font-head); font-weight: 600; font-size: 1.375rem; color: var(--c-brand); line-height: 1.2; }
.tl-item h3 { font-size: var(--fs-h4); margin-top: var(--s-1); }
.tl-text { margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-sm); }
.tl-area { margin-top: var(--s-2); font-size: var(--fs-xs); font-weight: 600; color: #8F4F1F; }
@media (min-width: 1024px) {
  .timeline { grid-template-columns: repeat(7, 1fr); column-gap: var(--s-4); }
  .tl-item { display: flex; flex-direction: column; padding-bottom: 0; }
  .tl-item::before { left: 0; right: calc(-1 * var(--s-4)); top: 92px; bottom: auto; width: auto; height: 2px; display: block; }
  .tl-item:last-child::before { right: 50%; }
  .tl-visual { display: flex; align-items: flex-end; height: 80px; }
  .tl-square { display: block; width: var(--side); height: var(--side); background: var(--c-brand-tint); border: 2px solid var(--c-brand); border-radius: 2px; }
  .tl-node { margin: 5px 0 0; width: 16px; height: 16px; align-self: flex-start; }
  .tl-year { margin-top: var(--s-4); }
}
.tl-scale-note { display: none; } @media (min-width: 1024px) { .tl-scale-note { display: inline; } }

/* ---------- Legal pages ---------- */
.legal { max-width: 46rem; }
.legal h2 { font-size: var(--fs-h4); margin-top: var(--s-7); margin-bottom: var(--s-3); }
.legal p { color: var(--c-muted); }
.legal p + p, .legal .ticks + p { margin-top: var(--s-3); }
.legal .ticks { margin-block: var(--s-3); color: var(--c-muted); }
.legal-updated { font-size: var(--fs-sm); }
.legal-address { font-style: normal; color: var(--c-muted); margin-top: var(--s-3); line-height: 1.7; }
.legal-lang { margin-top: var(--s-7); font-size: var(--fs-sm); }

/* About: vision and mission */
.purpose { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 900px) { .purpose { grid-template-columns: 5fr 7fr; gap: var(--s-8, 4rem); } }
.eyebrow { font-family: var(--font-head); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-brand); }
.purpose-aim h2 { margin-top: var(--s-2); }
.purpose-aim p:last-child { margin-top: var(--s-4); font-size: var(--fs-lead); color: var(--c-ink, inherit); border-left: 3px solid var(--c-brand); padding-left: var(--s-4); }
.purpose-sub { font-size: var(--fs-h4, 1.25rem); }
.purpose-list { list-style: none; display: grid; gap: 0; margin-top: var(--s-4); border-top: 1px solid var(--c-line); }
@media (min-width: 640px) { .purpose-list { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }
.purpose-list li { padding-block: var(--s-4); border-bottom: 1px solid var(--c-line); }
.purpose-list h4 { font-family: var(--font-head); font-weight: 500; font-size: 1.0625rem; color: var(--c-brand); }
.purpose-list p { margin-top: var(--s-1); color: var(--c-muted); font-size: var(--fs-sm); }

/* Photos show a soft tint while they load, instead of an empty white gap */
picture img { background-color: #E6E8EF; }
.client-logos picture img { background-color: transparent; }
