/* ==========================================================================
   V16 — IMAGE BOXES (v16-image-boxes.css)
   Owner brief 2026-11-09: images must sit in PROPER BOXES — no full-width
   stretching, no big empty spacing around images, and oversized content
   images made SMALLER / compact. Placement, sizing and spacing ONLY:
   no img src/alt is changed here (Image Restoration agent owns content),
   no text-reveal rules, no page/section spacing.
   Linked LAST on every page (after v16-text-scrub.css) so these rules win.
   Audit basis: 445 <img> measured at 1440px + 390px (CDP, 2026-11-09).
   Result: 0 real distortion (318 object-fit:cover, 5 fill-with-matching
   aspect on /process/ — skipped, rebuild agent owns that page), 0 mobile
   overflow, every image already inside a classed container. Only 3 boxes
   were actually full-width stretched (free-audit hero, flooring hero,
   restaurants showcase); only those 3 are resized below. Rule A also
   caps the /process/ hero (1136→880) as a side effect — that page is
   being rebuilt by its own agent, which may drop this link; the cap is
   in the same direction as its brief, so it is left in place.
   Everything else in this file is a no-op guard that restates the box the
   image already has, so a future edit cannot silently unbox an image.
   ========================================================================== */

/* --- A. Standalone hero figures: figure.page-hero-figure sitting directly
   in .wrap with no .page-hero-visual wrapper (free-audit hero was
   1136x710 full-width; about 512 / contact 620 / blog hub 880 are below
   the cap and unchanged). Compact centred box; each image keeps its own
   natural aspect (height:auto), so no crop changes.
   Specificity is deliberately LOW (:where() strips .page-hero): a
   page-specific cap elsewhere must win — e.g. v16-about-contact.css
   caps the contact hero at 620px (.page-contact …, 0,3,0) and the about
   hero via .page-about rules; this rule (0,2,1) loses to those by design
   and only caps heroes that were previously uncapped full-width. --- */
:where(.page-hero) > .wrap > figure.page-hero-figure {
  width: 100%;
  max-width: 880px;
  margin: 1.75rem auto 0;
  border-radius: 18px;
  overflow: hidden;
}
:where(.page-hero) > .wrap > figure.page-hero-figure > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* --- B. Industry hero that lost its .page-hero-visual wrapper (flooring
   only: 1136x630 full-width). The per-page inline <style> forces
   max-width:none!important / width:100%!important, so this needs the
   higher-specificity main#main.v13-ind selector + !important to win.
   720px centred box; the other 17 industry heroes are 505px in their
   split column and sit below the cap, unchanged. Inline 16/9 kept. --- */
main#main.v13-ind .page-hero > .wrap > figure.page-hero-figure {
  max-width: 720px !important;
  margin-inline: auto !important;
}

/* --- C. Restaurants showcase: .rest-plain-fig was a 1186x420 full-width
   band (a 2.8:1 crop of a 667x1000 portrait). Compact centred 720px box,
   16/10 — a gentler crop than the old band. Overrides
   v16-industry-white.css (main#main .rest-plain-fig, max-height:420px). --- */
main#main .rest-showcase .rest-plain-fig {
  max-width: 720px !important;
  margin: 0 auto !important;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 48px -20px rgba(14, 14, 15, .18);
}
main#main .rest-showcase .rest-plain-fig > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10 !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
}

/* --- D. Guardrails: restate the proper box each group already has, so no
   image can render unboxed or distorted. No visual change expected. --- */
/* Split heroes + band/row images: defined box, cover crop, radius. */
.split-fig img,
.page-hero-figure img {
  object-fit: cover;
}
/* Service approach rows (565x377, half-column) and process step thumbs
   (219x137): keep their compact defined boxes, never full-width. */
.bz-row-media img,
.step-photo {
  object-fit: cover;
}
/* Industry process thumbs (183x139, 4/3 cards). */
.mini-step-img {
  object-fit: cover;
}
/* Blog: article cover (720x360, 2:1) and hub cards (324x202, 16/10). */
.article-cover img,
.post-card .slot-art img {
  object-fit: cover;
}
/* Hub tiles/cards: absolute-fill cover inside their tile box. */
.ind-card-img,
.sv-media img,
.ix-media img,
.svc-card-img img,
.hub-shot img,
.disc-card img,
.design-reference-media img {
  object-fit: cover;
}
/* No image may ever exceed its container. */
figure img,
.post-card img,
.ind-card img,
.svc-card img {
  max-width: 100%;
}

/* --- E. Mobile: capped boxes above are all wider than the viewport, so
   phones keep the existing full-column behaviour (already verified:
   no image wider than 392px at 390px viewport). Nothing to change. --- */
