/* Barwa Sam — mobile-first. The old site had no viewport tag at all; this is
   built phone-up because merchants and foremen read it on site. */

/* LIGHT ONLY — deliberately no prefers-color-scheme block.
   This is a manufacturer's product brochure. The packaging is photographed on
   white, so a dark page makes every product shot glare, and nobody in the trade
   expects a chemicals manufacturer's site to be black. Following the visitor's
   OS theme meant anyone on dark mode saw a near-black site they never chose.

   Palette: the logo's red for anything branded or clickable, over cool
   blue-greys carried across from the old site (#106AA9 family). The blue lives
   in the neutrals — backgrounds, rules, body text — so the page reads light and
   airy without setting up a second brand colour to fight the red. */
:root {
  color-scheme: light;

  --red: #D40400;        /* from the logo */
  --red-dark: #A50300;
  --blue: #106AA9;       /* from the old site's theme, kept as a cool neutral base */

  --ink: #16242E;        /* near-black with a blue cast, softer than #000 */
  --body: #42525E;
  --muted: #5E6E7A;
  --line: #D8E1E9;
  --bg: #ffffff;
  --panel: #F2F6FA;      /* the light blue Jan asked for, as page furniture */
  --panel-2: #E3EBF2;
  --focus: #0057b8;
  --max: 1120px;

  --accent: var(--red);
  --chip-bg: #E3EBF2;
  --chip-fg: #42525E;
  --chip-line: #CBD8E3;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.8rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
/* Focus ring is deliberately blue, not brand red: it must stay visible against
   red buttons and links, and it only ever appears during keyboard navigation. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute; left: -9999px; background: var(--red); color: #fff;
  padding: .6em 1em; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.head-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 20px; max-width: var(--max); margin: 0 auto;
}
.brand { display: flex; align-items: baseline; gap: 6px; text-decoration: none; margin-right: auto; }
.brand b { font-size: 1.45rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.brand span {
  background: var(--red); color: #fff; font-weight: 800; font-size: 1.45rem;
  padding: 0 .28em; border-radius: 3px; letter-spacing: -.03em;
}
.head-contact { font-size: .9rem; color: var(--muted); text-align: right; }
.head-contact a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }

.site-nav { border-top: 1px solid var(--line); background: var(--panel-2); }
.site-nav ul {
  list-style: none; margin: 0 auto; padding: 0 12px; max-width: var(--max);
  display: flex; flex-wrap: wrap;
}
.site-nav a {
  display: block; padding: 12px 12px; color: var(--ink); text-decoration: none;
  font-size: .93rem; font-weight: 600; border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--red); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--red); }

/* ---------- hero ---------- */
.hero { background: var(--panel); border-bottom: 1px solid var(--line); padding: 44px 0; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .09em; font-size: .78rem;
  font-weight: 700; color: var(--red); margin-bottom: .7em;
}
.hero p.lead { font-size: 1.1rem; max-width: 62ch; }

/* ---------- layout helpers ---------- */
main { padding: 36px 0 56px; }
.section { margin-bottom: 46px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  border: 1px solid var(--line); border-radius: 6px; padding: 20px;
  background: var(--bg); display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .35em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--red); }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: .8em; }

/* ---------- product ---------- */
.prod-head { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 34px; }
@media (min-width: 760px) { .prod-head { grid-template-columns: 260px 1fr; } }
.prod-photo {
  border: 1px solid var(--line); border-radius: 6px; padding: 16px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}

.factbox { border-top: 2px solid var(--ink); }
.factbox dl { margin: 0; }
.factbox div {
  display: grid; grid-template-columns: 1fr; gap: 2px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 520px) { .factbox div { grid-template-columns: 190px 1fr; gap: 14px; } }
.factbox dt { font-weight: 700; color: var(--ink); font-size: .92rem; }
.factbox dd { margin: 0; }

table.spec { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
table.spec th, table.spec td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th { width: 42%; color: var(--ink); background: var(--panel); font-weight: 700; }
.table-scroll { overflow-x: auto; }

.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li { margin-bottom: 10px; }
.downloads a {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 5px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .94rem; background: var(--bg);
}
.downloads a:hover { border-color: var(--red); color: var(--red); }
.downloads .pdf {
  background: var(--red); color: #fff; font-size: .66rem; font-weight: 800;
  padding: 3px 6px; border-radius: 3px; letter-spacing: .04em;
}

.note {
  border-left: 4px solid var(--line); background: var(--panel);
  padding: 14px 18px; font-size: .93rem; color: var(--muted); border-radius: 0 5px 5px 0;
}
.note strong { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--red); color: #fff; font-weight: 700;
  padding: 14px 26px; border-radius: 5px; text-decoration: none; border: 0;
  font-size: 1rem; cursor: pointer;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn.ghost:hover { border-color: var(--red); color: var(--red); }

.cta {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 26px; text-align: center;
}

/* ---------- distributors ---------- */
.dist-search { margin-bottom: 26px; }
.dist-search input {
  width: 100%; padding: 14px 16px; font-size: 1rem; border: 2px solid var(--line);
  border-radius: 5px; background: var(--bg); color: var(--ink);
}
.dist-search input:focus { border-color: var(--red); outline: none; }
.dist {
  border: 1px solid var(--line); border-radius: 6px; padding: 20px; margin-bottom: 14px;
}
.dist h3 { margin-bottom: .3em; }
.dist .terr { font-size: .9rem; color: var(--muted); margin-top: .7em; }
.dist[hidden] { display: none; }
.dist-none { padding: 20px; background: var(--panel); border-radius: 6px; }

/* ---------- distributor map ---------- */
.mapa-search { position: relative; margin-bottom: 14px; }
.mapa-search ul {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 1001; margin: 4px 0 0; padding: 4px 0;
  list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
  box-shadow: 0 6px 18px rgba(22, 36, 46, .12);
}
.mapa-search li { padding: 9px 14px; cursor: pointer; color: var(--ink); }
.mapa-search li span { color: var(--muted); font-size: .86rem; }
.mapa-search li[aria-selected="true"], .mapa-search li:hover { background: var(--panel); }
#mapa {
  height: 470px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px;
  background: var(--panel);
}
@media (max-width: 640px) { #mapa { height: 380px; } }
.mapa-legend { font-size: .86rem; color: var(--muted); margin: 0 0 16px; }
/* No focus rectangle on the map: the selection itself is drawn along the region's border. */
#mapa:focus, #mapa:focus-visible,
#mapa .leaflet-interactive:focus, #mapa .leaflet-interactive:focus-visible { outline: none; }
.mapa-label span {
  display: inline-block; transform: translate(-50%, -50%); white-space: nowrap;
  font-weight: 700; font-size: 11.5px; line-height: 1.15; color: var(--ink);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 4px #fff, 0 0 4px #fff;
}
.mapa-wynik {
  border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 6px;
  padding: 16px 20px; margin-bottom: 30px; background: var(--bg);
}
.mapa-wynik[hidden] { display: none; }
.mapa-where { color: var(--ink); }
.mapa-dist { padding-top: 10px; }
.mapa-dist + .mapa-dist { border-top: 1px solid var(--line); margin-top: 10px; }
.mapa-dist h3 { margin-bottom: .2em; }
.mapa-dist p { margin: .2em 0; }
.mapa-more { font-size: .9rem; }
.mapa-alt { font-size: .9rem; color: var(--muted); margin-top: .8em; }
.mapa-none { background: var(--panel); border-radius: 5px; padding: 12px 14px; }
.dist:target { border-color: var(--red); box-shadow: 0 0 0 2px rgba(212, 4, 0, .15); }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: .93rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem;
  border: 2px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red); outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.req { color: var(--red); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 3px solid var(--red); background: var(--panel);
  padding: 36px 0 28px; font-size: .92rem; color: var(--muted); margin-top: 40px;
}
.site-foot h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.site-foot a { color: var(--body); }
.foot-legal {
  border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px;
  font-size: .84rem; line-height: 1.6;
}

.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs span { padding: 0 6px; }

/* ============================================================
   Colour system + photo-led cards
   ============================================================ */

.sub { color: var(--muted); margin-top: -.4em; margin-bottom: 1.4em; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 46px 0; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 55%, var(--bg) 100%);
  border-bottom: 3px solid var(--red);
  padding: 48px 0 40px;
}
.hero-in { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .hero-in { grid-template-columns: 1.5fr 1fr; align-items: center; } }
.hero h1 { margin-bottom: .45em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }

.hero-stats { display: flex; gap: 10px; }
@media (min-width: 880px) { .hero-stats { flex-direction: column; gap: 12px; } }
.hero-stats div {
  flex: 1; background: var(--bg); border: 1px solid var(--line);
  border-left: 4px solid var(--blue); border-radius: 5px; padding: 14px 16px;
}
.hero-stats b { display: block; font-size: 1.9rem; color: var(--red); line-height: 1; letter-spacing: -.03em; }
.hero-stats span { font-size: .84rem; color: var(--muted); }

/* ---------- "what do you need" job cards ---------- */
.jobgrid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .jobgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .jobgrid { grid-template-columns: repeat(3, 1fr); } }
.jobcard {
  display: block; padding: 18px 20px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
  border-top: 3px solid var(--red); transition: transform .12s ease, box-shadow .12s ease;
}
.jobcard:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09); }
.jobcard h3 { margin-bottom: .3em; color: var(--ink); font-size: 1.05rem; }
.jobcard p { color: var(--muted); font-size: .9rem; margin-bottom: .6em; }
.jobcard-n { font-size: .78rem; font-weight: 700; color: var(--red); }

/* ---------- category cards ---------- */
.catgrid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .catgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .catgrid { grid-template-columns: repeat(3, 1fr); } }
.catcard {
  position: relative; display: block; text-decoration: none; border-radius: 6px;
  padding: 22px 20px 20px; background: var(--panel);
  border: 1px solid var(--line); border-left: 5px solid var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.catcard:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09); border-left-color: var(--red); }
.catcard h3 { color: var(--ink); font-size: 1.05rem; margin-bottom: .3em; padding-right: 46px; }
.catcard p { color: var(--muted); font-size: .9rem; margin: 0; }
.catcard-n {
  position: absolute; top: 16px; right: 18px; font-size: 1.6rem; font-weight: 800;
  color: var(--accent); line-height: 1; letter-spacing: -.03em;
}

/* ---------- product cards with photos ---------- */
.pgrid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .pgrid { grid-template-columns: repeat(4, 1fr); } }

.pcard {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.10); border-color: var(--accent); }
.pcard-media {
  display: block; background: #fff; aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.pcard-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pcard-body h3 { font-size: 1rem; margin: .45em 0 .3em; }
.pcard-body h3 a { color: var(--ink); text-decoration: none; }
.pcard:hover h3 a { color: var(--accent); }
.pcard-body p {
  font-size: .87rem; color: var(--muted); margin-bottom: .8em; line-height: 1.5;
}
.pcard-foot {
  margin-top: auto; font-size: .78rem; font-weight: 600; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 10px;
}

.ph-none {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: var(--panel); color: var(--muted); font-size: .8rem;
  text-align: center; line-height: 1.4;
}

/* ---------- chips ---------- */
.chip {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 20px;
  background: var(--chip-bg); color: var(--chip-fg);
  text-decoration: none; align-self: flex-start;
  border: 1px solid var(--chip-line);
}
a.chip:hover { background: var(--red); color: #fff; border-color: var(--red); }

.chipnav {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px;
}
.chipnav b { font-size: .82rem; color: var(--muted); margin-right: 2px; }
.chipnav a {
  font-size: .84rem; font-weight: 600; text-decoration: none; color: var(--ink);
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg);
}
.chipnav a:hover { border-color: var(--red); color: var(--red); }
.chipnav a.chip { color: var(--chip-fg); }

/* ---------- category section + head ---------- */
.catsec h2 { display: flex; align-items: center; gap: 12px; }
.catsec h2 a { color: var(--ink); text-decoration: none; }
.catsec h2 a:hover { color: var(--accent); }
.catsec h2::before {
  content: ""; width: 6px; height: 1.1em; background: var(--accent);
  border-radius: 3px; flex: none;
}
.hcount {
  font-size: .8rem; font-weight: 700; color: var(--chip-fg);
  background: var(--chip-bg); border: 1px solid var(--chip-line);
  padding: 3px 10px; border-radius: 20px;
}
.cathead { border-left: 5px solid var(--accent); padding-left: 18px; margin-bottom: 28px; }

/* ---------- accents on the "why us" cards ---------- */
.card.acc-red, .card.acc-blue, .card.acc-green { border-top: 3px solid var(--red); }

/* product page picks up its category accent */
.prod-photo img { width: 100%; height: auto; object-fit: contain; }
.factbox { border-top: 2px solid var(--accent); }
.downloads a:hover { border-color: var(--accent); color: var(--accent); }
.cta { border-top: 3px solid var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .jobcard, .catcard, .pcard { transition: none; }
  .jobcard:hover, .catcard:hover, .pcard:hover { transform: none; }
}

/* ============================================================
   Editorial photography
   ============================================================ */

/* Hero: text and photo sit side by side. Text is never laid over the image —
   a scrim on a busy aerial shot is where hero contrast usually breaks. */
.hero-media { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(22,36,46,.16); }
.hero-shot { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; display: block; }
.hero-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(22,36,46,0) 0%, rgba(22,36,46,.82) 100%);
  color: #fff; font-size: .82rem; font-weight: 600; padding: 26px 14px 10px;
}

/* Stat band under the hero — freed up by the photo taking the right-hand slot. */
.statband {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; margin-top: 30px;
}
@media (min-width: 620px) { .statband { grid-template-columns: repeat(4, 1fr); } }
.statband div { background: var(--bg); padding: 16px 18px; text-align: center; }
.statband b {
  display: block; font-size: 1.75rem; color: var(--red); line-height: 1;
  letter-spacing: -.03em; margin-bottom: 4px;
}
.statband span { font-size: .82rem; color: var(--muted); }

/* Captioned figure used through the body pages. */
.shot { margin: 0 0 1.6em; }
.shot img {
  width: 100%; border-radius: 8px; border: 1px solid var(--line);
  display: block;
}
.shot figcaption {
  font-size: .86rem; color: var(--muted); padding-top: 9px;
  border-left: 3px solid var(--red); padding-left: 11px; margin-top: 10px;
}
