/* ============================================================================
   EMS-Trade Cooling · assets/pages-worker-4.css
   Bundle worker-4, loaded after assets/site.css on this bundle's pages.
   Single authority: this file defines ONLY classes that start with w4- .
   Every other class on these pages comes from site.css and is never
   re-declared here, so check-css-conflicts sees one definition per class.

   Why a variant arrives as a second class on a shared element: CSP is
   style-src 'self', so a page cannot pass a variable inline (style="--x:4").
   A page-level variant is therefore written as this bundle's own class and
   hung on the same element; it outranks the shared rule by specificity of
   this bundle's own names, never by naming a shared class in a selector.

   Pages and their hero variants:
     /coolant-filtration/                  H2 split-copy-plate
     /coolant-filtration/filter-housings/  H3 plate-over-band
     /coolant-filtration/filter-cartridges/H2 split-copy-plate
     /coolant-filtration/water-quality/    H5 specimen-index
   ========================================================================= */

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

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

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

.w4-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 line of
   figures, an onward link line. It is the spacing between bands and the
   marker that says which band it is — a paragraph band and a data band are
   two different bands, not one long column. */
.w4-block {
  margin-top: var(--sp-6);
}

.w4-block--tight {
  margin-top: var(--sp-5);
}

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

/* A band of figures that spans both columns of the ink plate. */
.w4-span2 {
  grid-column: 1 / -1;
}

/* ------------------------------------------------- 2 · HERO: SHARED ------ */

.w4-hero {
  padding-top: var(--sp-6);
}

.w4-eyebrow {
  display: block;
  margin-bottom: var(--sp-3);
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tr-micro);
  color: var(--muted);
}

.w4-hero__note {
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tr-micro);
  color: var(--muted);
}

/* -------------------------------------------------- 3 · HERO: H2 --------- */

/* split-copy-plate. The sheet's own split is 5fr / 7fr with the copy on the
   left; at 40px the shared 15ch cap breaks the headline into two words a
   line, so this bundle caps it at 20ch instead. */
.w4-split .w4-hero__copy .w4-title {
  max-width: 20ch;
}

.w4-split .w4-hero__figure {
  min-width: 0;
}

/* On the split hero the copy band's lede and the control row keep the shared
   spacing; only the note beside the control is dropped a step in weight. */
.w4-split .w4-hero__note {
  color: var(--muted);
}

/* -------------------------------------------------- 4 · HERO: H3 --------- */

/* plate-over-band: the photograph sits above and the copy band overlaps its
   lower edge. site.css insets that band by one cell so a plate can live in a
   grid column; on a hero the band runs the full width of the plate. */
.w4-over .w4-over__slip {
  left: 0;
  right: 0;
  padding-block: var(--sp-7) var(--sp-6);
  z-index: 2;
}

.w4-over .w4-over__slip .w4-title {
  font-size: var(--fs-h1);
  letter-spacing: var(--tr-display);
}

.w4-over .w4-eyebrow,
.w4-over .w4-hero__note {
  color: var(--on-scrim-2);
  text-shadow: var(--shadow-text);
}

/* -------------------------------------------------- 5 · HERO: H5 --------- */

/* specimen-index: one portrait specimen carries the title, and a row of
   three index frames stands beside it. The lead frame is the only place on
   the sheet where the h1 sits on a specimen rather than on a scene. */
.w4-index {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--sp-6);
  align-items: stretch;
}

.w4-index__lead {
  display: flex;
  flex-direction: column;
}

.w4-index__rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--sp-5);
  min-width: 0;
}

.w4-index__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.w4-index__cell {
  margin: 0;
}

.w4-index__no {
  display: block;
  margin-top: var(--sp-2);
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  color: var(--stamp);
}

.w4-index__name {
  display: block;
  margin-top: 2px;
  font-family: var(--f-util);
  font-size: var(--fs-micro);
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* The title band on the lead specimen. The eyebrow, the h1, the one line of
   explanation and the one control: nothing else goes on a hero band. The band
   is an absolutely positioned overlay, so it carries its own z-index rather
   than relying on document order. */
.w4-index__band {
  z-index: 2;
}

.w4-index__lead .w4-title {
  font-size: var(--fs-h1);
  letter-spacing: var(--tr-display);
  text-shadow: var(--shadow-text);
}

.w4-index__lead .w4-index__lede {
  margin-top: var(--sp-3);
  font-size: var(--fs-data);
  line-height: 1.45;
  color: var(--on-scrim-2);
  text-shadow: var(--shadow-text);
}

.w4-index__lead .w4-index__act {
  margin-top: var(--sp-4);
}

/* ------------------------------------------------- 6 · MAT SHOT --------- */

/* A part photographed on transparency, drawn whole rather than cropped.
   The ratio is written as a number: the four ratio slots in site.css are
   3/2, 2/3, 1/1 and 3/4, and a 4:3 part does not belong to any of them. */
.w4-mat {
  aspect-ratio: 1.3333;
}

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

/* The request slip itself is the shared component (tickable document rows,
   three fields, one promise). Only its top rule and the figure band that
   closes it are this bundle's. Numbers and units inside a half width cell on
   the plate are separated by a real space in the text, never by a margin: a
   margin earns no line break, and the cell then reads "0.1mlocating" at a
   narrow width. */

.w4-cta {
  border-top: var(--hair-strong);
}

/* A figure band inside the ink plate keeps the plate's own ground rather
   than the paper mount a framed figure normally sits on. */
.w4-cta .w4-block--plate {
  margin-top: var(--sp-6);
}

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

@media (max-width: 1000px) {
  .w4-index {
    grid-template-columns: minmax(0, 1fr);
  }

  .w4-index__rail {
    grid-template-rows: auto auto;
  }
}

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

@media (max-width: 720px) {
  .w4-hero {
    padding-top: 0;
  }

  /* site.css drops every copy band to static flow under 720px, which is right
     for the plate-over-band hero where the band is a sibling of the frame and
     simply stacks under it. The specimen index is the other case: its band
     lives inside the shot, so a static band is clipped by the shot box and
     runs over the caption. This bundle's own class, on the same element,
     puts the overlay back — and scale the h1 to the frame it is pressed on. */
  .w4-index__band {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
  }

  .w4-index__lead .w4-title {
    font-size: var(--fs-h3);
  }

  .w4-index__lead .w4-eyebrow {
    margin-bottom: var(--sp-2);
  }

  .w4-over .w4-over__slip {
    padding-block: var(--sp-5) var(--sp-4);
  }

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

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

  .w4-flow {
    padding-block: var(--sp-6) var(--sp-7);
  }
}
