/* ACF Industries — single stylesheet, no build step */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --navy: #102643;      /* logo navy */
  --navy-2: #1b3558;
  --slate: #646970;     /* logo grey, darkened for text contrast */
  --alu: #e4e7ea;       /* brushed aluminium */
  --alu-2: #f3f4f6;
  --line: #cfd4da;
  --white: #fff;
  --mark: #f4b223;      /* marking-out yellow: actions only */
  --wide: 118%;
  --pad: clamp(1rem, 4vw, 3rem);
  --max: 82rem;
  --gutter: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--navy);
  font: 400 1rem/1.5 "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-stretch: var(--wide); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: -999rem; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--white);
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem var(--gutter); border-bottom: 1px solid var(--line);
}
.brand img { width: 7.2rem; }
.top nav { display: flex; gap: 1.5rem; margin-left: auto; }
.top nav a { text-decoration: none; font-weight: 600; padding: .3rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover { border-bottom-color: var(--navy); }
.call {
  text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--navy); color: #fff; padding: .55rem .9rem; border-radius: 3px;
}
.call:hover { background: var(--navy-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: baseline; gap: .5rem; text-decoration: none; font-weight: 700;
  padding: .8rem 1.15rem; border-radius: 3px; border: 2px solid var(--navy); color: var(--navy); background: transparent;
}
.btn small { font-weight: 500; font-size: .8rem; color: var(--slate); }
.btn:hover { background: var(--alu-2); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center; max-width: var(--max); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) var(--pad) clamp(2.5rem, 6vw, 5rem);
}
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 4.1rem); font-weight: 850; max-width: 14ch; }
.hero-text > p { max-width: 34rem; margin-top: 1.4rem; font-size: 1.125rem; color: #2b3d57; }
.hero-text > p.loyal { margin-top: .8rem; }
.loyal em { font-style: italic; }
.hero-text > p.hero-cta { margin-top: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-fig { margin: 0; justify-self: center; max-width: 24rem; }
.hero-fig img { width: 100%; }
.hero-fig figcaption { margin-top: .75rem; padding-top: .75rem; border-top: 2px solid var(--navy); font-size: .95rem; color: var(--slate); }

/* Range + finder */
.range { background: var(--alu-2); border-top: 1px solid var(--line); padding-bottom: clamp(3rem, 6vw, 5rem); }
.finder { max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--pad) 1.5rem; }
.finder h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.search { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; align-items: center; margin-top: 1.5rem; max-width: 46rem; }
.search label { grid-column: 1 / -1; font-weight: 700; }
.search input {
  font: inherit; font-size: 1.05rem; width: 100%; padding: .85rem 1rem; color: var(--navy);
  background: var(--white); border: 2px solid var(--navy); border-radius: 3px;
}
.search input::placeholder { color: #7d848c; }
.search output { font-variant-numeric: tabular-nums; color: var(--slate); min-width: 6.5rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.25rem 0 0; }
.chips a {
  display: inline-flex; gap: .5rem; align-items: baseline; text-decoration: none; font-weight: 600; font-size: .95rem;
  background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: .4rem .7rem;
}
.chips a:hover { border-color: var(--navy); }
.chips span { font-variant-numeric: tabular-nums; color: var(--slate); font-weight: 500; font-size: .85rem; }

/* Category */
.cat {
  display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 3rem);
  max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 4vw, 3rem) var(--pad) 0;
}
.cat + .cat { margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.cat-side { align-self: start; position: sticky; top: 5.5rem; }
.cat h3 { font-size: 1.55rem; }
.blurb { margin-top: .7rem; color: #2b3d57; }
.photos { display: flex; gap: .5rem; margin-top: 1.1rem; }
.photos img { flex: 1 1 0; min-width: 0; height: 5.5rem; object-fit: contain; background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: .4rem; }
.dim { margin: .5rem 0 0; background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: .9rem; }
.dim img { margin: 0 auto; max-height: 11rem; width: auto; max-width: 100%; object-fit: contain; }
.dim img + img { margin-top: .75rem; }
.dim a { display: block; }
.dim .zoom { display: block; text-align: center; font-size: .85rem; font-weight: 600; margin-top: .4rem; }
.dim figcaption { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--slate); }
.dim dl { margin: 0; display: grid; gap: .2rem; }
.dim dl div { display: grid; grid-template-columns: 1.4rem 1fr; }
.dim dt { font-weight: 800; color: var(--navy); }
.dim dd { margin: 0; }

/* Tables */
.tbl-wrap { position: relative; overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 3px; }
.tbl-wrap + .tbl-wrap { margin-top: 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 800; font-stretch: var(--wide); background: var(--navy); color: #fff; padding: .55rem .9rem; font-size: 1rem; }
th, td { padding: .5rem .7rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--alu); }
thead th { font-size: .82rem; font-weight: 600; color: var(--slate); border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody th { font-weight: 600; min-width: 11rem; }
caption, th:first-child { padding-left: .9rem; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: #f8f9fa; }
tbody tr.on { background: #fff8e3; }
.num { text-align: right; white-space: nowrap; }
.part { font-weight: 700; white-space: nowrap; }
.code, .thr { white-space: nowrap; color: #3b4a60; }
.u { color: var(--slate); font-size: .85em; }
.na { color: #a9b0b8; }
.act { text-align: right; width: 1%; }
.add {
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; min-width: 4.6rem;
  color: var(--navy); background: var(--white); border: 1.5px solid var(--navy); border-radius: 3px; padding: .3rem .6rem;
}
.add:hover { background: var(--alu-2); }
.add[aria-pressed="true"] { background: var(--mark); border-color: var(--mark); }
#empty { max-width: var(--max); margin: 2rem auto 0; padding: 0 var(--pad); font-size: 1.1rem; }

/* Contact */
.contact { background: var(--navy); color: #fff; padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); }
.contact h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.contact > p { margin-top: 1rem; color: #c9d3e0; font-size: 1.1rem; }
.contact > p { max-width: 40rem; }
.contact-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; margin-top: 2rem; }
.contact-ways a {
  display: block; text-decoration: none; border-top: 3px solid var(--mark); padding: 1rem 0 0;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem); font-weight: 800; font-stretch: var(--wide); overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
.contact-ways a:hover { color: var(--mark); }
.contact-ways span { display: block; font-size: .9rem; font-weight: 500; font-stretch: 100%; color: #c9d3e0; margin-bottom: .2rem; }

/* Footer */
.foot { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem 2.5rem; align-items: center; padding: 2rem var(--pad) 6rem; max-width: var(--max); margin: 0 auto; color: var(--slate); font-size: .95rem; }
.foot img { width: 6.5rem; }
.foot a { color: var(--navy); font-weight: 600; }
.foot .fine { grid-column: 1 / -1; font-size: .85rem; border-top: 1px solid var(--line); padding-top: 1rem; }

/* Enquiry tray */
.tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem var(--gutter);
  box-shadow: 0 -6px 24px rgba(16, 38, 67, .25);
}
.tray[hidden] { display: none; }
.tray p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-list { color: #c9d3e0; margin-left: .5rem; font-variant-numeric: tabular-nums; }
.tray div { display: flex; gap: .75rem; align-items: center; flex: none; }
.tray button:not(.send) { font: inherit; background: none; border: 0; color: #c9d3e0; text-decoration: underline; cursor: pointer; padding: .4rem; }
.tray .send { font: inherit; font-weight: 700; cursor: pointer; background: var(--mark); border-color: var(--mark); color: var(--navy); padding: .55rem 1rem; }
.tray .send:hover { background: #ffc94d; }

/* Copy confirmation */
.copied {
  width: min(30rem, calc(100% - 2rem)); margin: auto; padding: 2rem; text-align: center;
  color: var(--navy); background: var(--white); border: 0; border-top: 6px solid var(--mark); border-radius: 4px;
  box-shadow: 0 20px 60px rgba(16, 38, 67, .35);
}
.copied::backdrop { background: rgba(16, 38, 67, .6); }
.copied h2 { font-size: 1.6rem; display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.copied svg { color: #1c8a4b; flex: none; }
.copied p { margin-top: .9rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.copied p a { font-weight: 700; }
.copied textarea { font: inherit; font-size: .85rem; width: 100%; margin-top: .9rem; padding: .6rem; border: 1px solid var(--line); border-radius: 3px; }
.copied form { margin-top: 1.4rem; }
.copied .btn { font: inherit; font-weight: 700; cursor: pointer; }

/* Small screens */
@media (max-width: 72rem) {
  .cat { grid-template-columns: minmax(0, 1fr); }
  .cat-side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.25rem; }
  .cat-side h3, .cat-side .blurb { grid-column: 1 / -1; }
  .cat-side .photos { align-self: start; flex-wrap: wrap; }
  .cat-side .dim { margin-top: 1.1rem; }
  .cat-main { margin-top: .25rem; }
}
@media (max-width: 44rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-fig { max-width: 17rem; justify-self: start; }
  .top { gap: .75rem; }
  .top nav { gap: 1rem; font-size: .95rem; }
  .top nav a[href$=".pdf"] { display: none; }
  .brand img { width: 5.6rem; }
  .cat-side { grid-template-columns: minmax(0, 1fr); }
  .search { grid-template-columns: 1fr; }
  /* Tables become stacked rows on phones: no sideways scrolling */
  table, tbody, tbody tr, caption { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { position: relative; padding: .7rem .8rem; border-bottom: 1px solid var(--alu); }
  tbody tr:last-child { border-bottom: 0; }
  tbody th, tbody td { border: 0; padding: 0; }
  tbody th:first-child { display: block; min-width: 0; padding: 0 5.2rem 0 0; margin-bottom: .25rem; }
  tbody td { display: inline-block; margin-right: .9rem; text-align: left; width: auto; }
  tbody td[data-l]::before { content: attr(data-l) " "; color: var(--slate); font-size: .8rem; font-weight: 500; }
  tbody td.nil { display: none; }
  tbody td.act { position: absolute; top: .6rem; right: .7rem; margin: 0; width: auto; }
  .foot { grid-template-columns: 1fr; }
  .tray-list { display: none; }
}
@media (max-width: 26rem) {
  .top nav a[href="#contact"] { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .top, .tray, .finder .search, .chips, .add { display: none !important; } .cat-side { position: static; } }
