/* ============================================================================
   EMS-Trade Cooling · assets/pages-worker-5.css
   Bundle worker-5, loaded after assets/site.css on this bundle's pages.
   Single authority: every class this file defines starts with w5- . No class
   from design-tokens.css or site.css is re-declared here — not even inside a
   descendant selector — so check-css-conflicts sees one definition per class.

   Why a second class on a shared element: CSP is style-src 'self', so a page
   cannot pass a variable inline (style="--x:4"). A layout variant therefore
   arrives as a class of its own. Where a shared rule has to be outranked
   (plate__band, for instance) the override is written as two of this bundle's
   own classes, which beats the shared single class without naming it.

   Pages: /hose-piping/ (H6 band-over-wide)
          /hose-piping/epdm-hose/ (H2 split-copy-plate)
          /hose-piping/fittings-and-seals/ (H3 plate-over-band)
          /hose-piping/quick-disconnects/ (H5 specimen-index)
   ========================================================================= */

/* ------------------------------------------------- 1 · SHEET BODY -------- */

/* The body of the sheet, between the hero and the request band. The twelve
   column rules come from site.css; only the vertical rhythm is set here. */
.w5-flow {
  padding-block: var(--sp-8) var(--sp-9);
}

.w5-sec {
  padding-bottom: var(--sp-10);
}

.w5-sec:last-child {
  padding-bottom: var(--sp-2);
}

/* One visual band of the body. Every band of a section carries this class:
   the ruled section head, a copy band, a schedule, a figure, a row of figures,
   a note, an onward link line. This is the spacing between bands, and the
   marker that says which band it is. */
.w5-band {
  margin-top: var(--sp-6);
}

.w5-band--tight {
  margin-top: var(--sp-5);
}

/* The first band of a section butts against the section rule above it. */
.w5-band--head {
  margin-top: 0;
}

/* Rows of figures. Not named grid-* on purpose: a row here mixes a drawing and
   a photograph at their own proportions inside equal 3:2 mounts, which is what
   a specimen strip does. Every image keeps its own ratio and is never cropped;
   only the mount is fixed. */
.w5-row2,
.w5-row3 {
  display: grid;
  gap: var(--sp-5);
}

.w5-row2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.w5-row3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ------------------------------------------------- 2 · HERO: H6 ---------- */

/* band-over-wide. A wide frame with the copy band standing on the left third
   of the photograph, full height of the frame. */
.w5-hero {
  padding-top: var(--sp-6);
}

.w5-hero__eyebrow {
  display: block;
  margin-bottom: var(--sp-4);
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tr-micro);
  color: var(--on-scrim-2);
  text-shadow: var(--shadow-text);
}

.w5-hero__note {
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tr-micro);
  color: var(--on-scrim-2);
  text-shadow: var(--shadow-text);
}

.w5-wide {
  position: relative;
}

.w5-wide__frame {
  height: clamp(380px, 52vh, 640px);
}

.w5-wide__shot {
  height: 100%;
}

.w5-wide .w5-wide__band {
  left: 0;
  right: auto;
  top: 0;
  bottom: 0;
  width: min(500px, 38%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-8) var(--sp-7) var(--sp-7);
  background-image: none;
  background-color: var(--scrim-deep);
}

.w5-wide__band h1 {
  font-size: var(--fs-h1);
  letter-spacing: var(--tr-display);
}

/* Micro label on a band. The shared label colour is the reading value and is
   too dark on a scrim, so the band uses the lifted amber instead. */
.w5-band__lbl {
  display: block;
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tr-micro);
  color: var(--stamp-on-plate);
}

/* ------------------------------------------------- 3 · HERO: H3 ---------- */

/* plate-over-band, sized so the band lands inside the first screen at 1440
   by 900 rather than below the fold. */
.w5-over__frame {
  height: clamp(380px, 46vh, 560px);
}

.w5-over__shot {
  height: 100%;
}

.w5-over__band h1 {
  font-size: var(--fs-h1);
  letter-spacing: var(--tr-display);
}

/* ------------------------------------------------- 4 · HERO: H5 ---------- */

/* specimen-index. A row of part photographs, all mounts the same height, with
   the title standing on the leftmost one. The band is absolutely positioned,
   so it does not take a track of its own. */
.w5-idx {
  position: relative;
  display: grid;
  /* minmax(0, ...) on every track: a bare 1fr track floors at the image's own
     width, and a 1024px photograph then pushes the row 800px past the sheet. */
  grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  height: clamp(320px, 42vh, 460px);
  border: var(--hair-strong);
  background: var(--rule);
}

.w5-idx__cell {
  height: 100%;
  padding: 1px;
  background: var(--raise);
}

.w5-idx__shot {
  height: 100%;
}

.w5-idx .w5-idx__band {
  left: 0;
  right: auto;
  top: 0;
  bottom: 0;
  width: 33.3333%;
  /* The band is the first child of the figure so that it reads first and, on a
     phone, stacks above the tiles. Every shot is itself a positioned box, so
     without a z-index the tiles would paint over the band: same stacking
     context, later in the document. */
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  background-image: none;
  background-color: var(--scrim-deep);
}

.w5-idx__title {
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: var(--tr-display);
}

/* ------------------------------------------------- 5 · HERO: H2 ---------- */

/* split-copy-plate. The split itself is site.css; this only sets the plate
   mount inside the right hand column and the figure strip under the copy. */
.w5-split__plate {
  width: 100%;
}

.w5-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--sp-6);
  border-top: var(--hair);
}

.w5-facts > div {
  padding: var(--sp-3) 0;
  border-bottom: var(--hair-soft);
}

.w5-facts > div:nth-child(odd) {
  padding-right: var(--sp-4);
}

.w5-facts b {
  display: block;
  font-family: var(--f-util);
  font-size: var(--fs-data);
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.w5-facts span {
  display: block;
  margin-top: 2px;
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tr-label);
  color: var(--muted);
}

/* ------------------------------------------------- 6 · MARKS ------------- */

/* Compatibility marks for the matrix. Non-text use: the brand blue, the brand
   amber and the hairline value. Never a check character — the site carries no
   pictographic text, and an emoji would fail the no-emoji gate. */
.w5-yes {
  fill: none;
  stroke: var(--link-brand);
  stroke-width: 2;
}

.w5-cond {
  fill: none;
  stroke: var(--stamp-brand);
  stroke-width: 2;
}

.w5-no {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 2;
}

.w5-mark {
  flex: none;
  width: 16px;
  height: 16px;
  vertical-align: -0.22em;
}

/* ------------------------------------------------- 7 · REQUEST SECTION --- */

.w5-req {
  border-top: var(--hair-strong);
}

.w5-form {
  display: block;
}

/* ------------------------------------------------- 8 · SUPPLY BAND ------- */

/* The supply network as a ruled band, three cells. Same device as site.css
   §16, at the width this line needs. */
.w5-net {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: var(--hair);
}

.w5-net > div {
  padding: var(--sp-4) var(--sp-3);
  border-right: var(--hair-soft);
}

.w5-net > div:last-child {
  border-right: 0;
}

.w5-net b {
  display: block;
  font-family: var(--f-util);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.w5-net span {
  display: block;
  margin-top: var(--sp-1);
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tr-label);
  color: var(--muted);
}

.w5-net small {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-cap);
  line-height: 1.45;
  color: var(--body);
}

/* ------------------------------------------------- 9 · RESPONSIVE -------- */

@media (max-width: 1000px) {
  .w5-row3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .w5-sec {
    padding-bottom: var(--sp-9);
  }

  .w5-wide__frame,
  .w5-over__frame {
    height: clamp(300px, 40vh, 420px);
  }

  /* The index row drops to two columns and the band becomes the first row of
     the figure instead of standing on a thumbnail. minmax(0, ...) again: a bare
     track floors at the photograph's own width. */
  .w5-idx {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
  }

  .w5-idx__cell {
    height: 190px;
  }

  .w5-idx .w5-idx__band {
    position: static;
    width: auto;
    grid-column: 1 / -1;
    padding: var(--sp-6) var(--sp-5);
  }
}

@media (max-width: 720px) {
  .w5-flow {
    padding-block: var(--sp-6) var(--sp-7);
  }

  .w5-sec {
    padding-bottom: var(--sp-7);
  }

  /* A phone is short: the band has to clear the fold, so the frame behind it
     gives up height first. */
  .w5-wide__frame,
  .w5-over__frame {
    height: clamp(220px, 30vh, 320px);
  }

  /* site.css drops the band to static below 720px; the left third stops being
     a third at that width. */
  .w5-wide .w5-wide__band,
  .w5-idx .w5-idx__band {
    width: auto;
    padding: var(--sp-5) var(--sp-4);
  }

  .w5-row2,
  .w5-row3 {
    grid-template-columns: 1fr;
  }

  .w5-net {
    grid-template-columns: 1fr;
  }

  .w5-net > div {
    border-right: 0;
    border-bottom: var(--hair-soft);
  }

  .w5-net > div:last-child {
    border-bottom: 0;
  }
}
