/* ==========================================================================
   Boss Waste — subpage components
   Loaded after styles.css, styles-light.css and styles-home.css on every page
   other than the homepage. It adds only what the service, hub, Boss Group and
   case-study pages need and never rebinds :root tokens.
   ========================================================================== */


/* ==========================================================================
   03  Breadcrumb — sits inside the dark page band above the eyebrow
   ========================================================================== */

.bw-crumb {
  margin: 0 0 var(--sp-4);
}

.bw-crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 var(--fs-caption) / var(--lh-caption) var(--font-body);
  letter-spacing: .04em;
  color: rgba(247, 247, 247, .55);
}

.bw-crumb li + li::before {
  content: "/";
  margin-right: var(--sp-2);
  color: rgba(247, 247, 247, .3);
}

.bw-crumb a {
  color: rgba(247, 247, 247, .75);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.bw-crumb a:hover {
  color: var(--white);
  border-color: var(--green-500);
}

.bw-crumb [aria-current="page"] {
  color: var(--white);
}


/* ==========================================================================
   08  Page hero — the homepage dark band at a shorter height with a photo
   ========================================================================== */

.bw-band--page .bw-band__inner {
  min-height: clamp(360px, 40vh, 480px);
  padding-block: var(--sp-8);
}

/* A page header, not the homepage hero: the photo takes 44% rather than
   52%, and the headline steps down from display scale. */
.bw-band--page .bw-band__bleed {
  width: 44%;
}

/* The text column stops 32px short of the photo whatever the viewport.
   Below 1248px the inner hugs the gutter, so 56vw - 56px is the limit;
   above it the inner is centred and 600px always clears the photo. */
.bw-band--page .bw-band__title,
.bw-band--page .bw-band__lead {
  max-width: min(600px, 56vw - 56px);
}

.bw-band--page .bw-band__title {
  font-size: clamp(30px, 3.1vw, 44px);
}

.bw-band--page .bw-band__kicker {
  font-size: clamp(14px, 1.2vw, 18px);
}

.bw-band--page .bw-band__title .bw-heading__highlight {
  font-size: clamp(38px, 4vw, 58px);
}

.bw-band__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-6);
  margin-top: var(--sp-5);
}

.bw-band__actions .bw-band__cta {
  margin-top: 0;
}

.bw-band__tel {
  font: 700 var(--fs-body-lg) / 1 var(--font-display);
  letter-spacing: .02em;
  color: var(--text-on-dark);
  text-decoration: none;
  border: none;
}

.bw-band__tel:hover {
  color: var(--green-500);
}


/* Light page band: matches the homepage's light opening band. The photo
   keeps its hard edge; only the ground and the type change. */
.bw-band--page.bw-band--light {
  background: var(--paper);
  border-bottom: 1px solid var(--border-hairline);
}

.bw-band--page.bw-band--light .bw-crumb ol {
  color: var(--lt-muted);
}

.bw-band--page.bw-band--light .bw-crumb li + li::before {
  color: var(--border-strong);
}

.bw-band--page.bw-band--light .bw-crumb a {
  color: var(--lt-body);
}

.bw-band--page.bw-band--light .bw-crumb a:hover,
.bw-band--page.bw-band--light .bw-crumb [aria-current="page"] {
  color: var(--lt-ink);
}

.bw-band--page.bw-band--light .bw-eyebrow {
  color: var(--lt-green);
}

.bw-band--page.bw-band--light .bw-band__title {
  color: var(--lt-ink);
}

.bw-band--page.bw-band--light .bw-band__lead {
  color: var(--lt-body);
}

.bw-band--page.bw-band--light .bw-band__tel {
  color: var(--lt-ink);
}

.bw-band--page.bw-band--light .bw-band__tel:hover {
  color: var(--lt-green);
}


/* ==========================================================================
   11  Splits — a reversed variant for alternating photo sides
   ========================================================================== */

.bw-split--tight {
  padding-block: var(--section-y-tight);
}


/* ==========================================================================
   12  Checklists and service rails
   ========================================================================== */

.bw-checks {
  padding-block: var(--section-y-tight);
}

.bw-checks__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-7);
  margin-top: var(--sp-6);
}

.bw-checks__block {
  padding: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--border-hairline);
}

.bw-checks__title {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  text-transform: none;
}

.bw-checklist {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  color: var(--text-body);
}

.bw-checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.bw-checklist .bw-icon {
  flex: none;
  margin-top: .2em;
  color: var(--lt-green);
}

.bw-checklist--no .bw-icon {
  color: var(--text-muted);
}

/* A row of the other services in the same route. The homepage grid is
   2x2 inside a half-width panel; here the panel is full width. */
.bw-rail .bw-route__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bw-hub .bw-route__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bw-rail .bw-route__head,
.bw-hub .bw-route__head {
  justify-content: space-between;
}

.bw-route__all {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
  font: 600 var(--fs-caption) / 1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.bw-route__all:hover {
  color: var(--green-500);
}


/* ==========================================================================
   14  Case studies — gallery grid and fact panel
   ========================================================================== */

/* styles-home.css gives .bw-work a section-sized top margin for its mid-page
   slot. Directly under the page band that margin is an empty strip. */
.bw-band--page + .bw-work {
  margin-top: 0;
  border-top: none;
}

.bw-gallery {
  padding-block: var(--section-y-tight);
}

.bw-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

.bw-figure__frame--3x4 { aspect-ratio: 3 / 4; }
.bw-figure__frame--3x2 { aspect-ratio: 3 / 2; }

/* The fact panel is deliberately dark on the light page: it echoes the band
   above and keeps the numbers legible beside the prose. */
.bw-facts {
  display: grid;
  gap: var(--sp-4);
  margin: 0;
  padding: var(--sp-6);
  background: var(--n-900);
  border: none;
  box-shadow: none;
}

.bw-facts > div {
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.bw-facts > div:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.bw-facts dt {
  margin: 0 0 var(--sp-1);
  font: 600 var(--fs-caption) / var(--lh-caption) var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-500);
}

.bw-facts dd {
  margin: 0;
  font: 700 var(--fs-body-lg) / 1.3 var(--font-display);
  color: var(--white);
}

/* Pager between case studies */
.bw-casenav {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}


/* ==========================================================================
   20  Legal — privacy-and-cookies.html: one reading column, no figures
   ========================================================================== */

.bw-legal {
  max-width: 760px;
  padding-block: var(--section-y-tight) var(--section-y);
}

.bw-legal__updated {
  margin: 0 0 var(--sp-6);
  font: 500 var(--fs-caption) / var(--lh-caption) var(--font-body);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bw-legal h2 {
  margin: var(--sp-7) 0 var(--sp-3);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  color: var(--text-heading);
}

.bw-legal p,
.bw-legal li {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
}

.bw-legal ul {
  padding-left: 1.2em;
}

.bw-legal a {
  color: var(--text-heading);
  text-underline-offset: .15em;
}

.bw-legal table {
  width: 100%;
  margin: var(--sp-4) 0 0;
  border-collapse: collapse;
}

.bw-legal th,
.bw-legal td {
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 0;
  border-bottom: 1px solid var(--border-hairline);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  text-align: left;
  vertical-align: top;
  color: var(--text-body);
}

.bw-legal th {
  font-weight: 600;
  color: var(--text-heading);
}


/* ==========================================================================
   21  Responsive
   ========================================================================== */

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

@media (max-width: 860px) {
  .bw-band--page .bw-band__inner {
    min-height: 0;
    padding-block: var(--sp-7);
  }

  .bw-band--page .bw-band__bleed {
    width: 100%;
  }

  .bw-band--page .bw-band__title {
    max-width: none;
  }

  .bw-band--page .bw-band__lead {
    max-width: 60ch;
  }

  .bw-checks__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .bw-rail .bw-route__grid,
  .bw-hub .bw-route__grid,
  .bw-gallery__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bw-route__all {
    display: none;
  }
}

/* Hubs and rails with five or four cards respectively. */
@media (min-width: 1001px) {
  .bw-hub .bw-route__grid:has(> :nth-child(5)) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .bw-rail .bw-route__grid:has(> :nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.bw-hub .bw-route__grid > .bw-svc:nth-child(5):last-child,
.bw-rail .bw-route__grid > .bw-svc:nth-child(5):last-child {
  grid-column: auto;
}

@media (max-width: 1000px) {
  .bw-hub .bw-route__grid > .bw-svc:nth-child(5):last-child {
    grid-column: 1 / -1;
  }
}

/* A cutout sits on the paper as an object: no frame, no crop, no parallax.
   The JPG is flattened onto the paper colour so its edges disappear. */
.bw-figure__frame--cutout {
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
}

.bw-figure__frame--cutout img {
  position: static;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ---- Client review note (temporary) ------------------------------------- */
.bw-note {
  margin: 0 auto var(--sp-6);
  max-width: 860px;
  padding: var(--sp-5) var(--sp-6);
  border: 2px dashed var(--orange-500);
  background: rgba(232, 125, 66, .08);
}

.bw-note__title {
  margin: var(--sp-2) 0 var(--sp-3);
  font: 700 clamp(22px, 2.4vw, 28px) / 1.15 var(--font-display);
}

.bw-note p {
  margin: 0 0 var(--sp-3);
}

.bw-note__meta {
  font-size: 13px;
  opacity: .7;
}
