/* Homepage portfolio only: equal prominence, full approved image compositions. */
.page-index .company-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;align-items:stretch}
.page-index .company-grid .company-card{display:flex;flex-direction:column;height:auto;min-height:0;background:#111918}
.page-index .company-grid .company-image{width:100%;height:auto;aspect-ratio:8/5;flex:none;background:#111918}
.page-index .company-grid .company-image img{width:100%;height:100%;object-fit:contain}
.page-index .company-grid .company-content{display:grid;grid-template-rows:auto auto 1fr auto auto;flex:1;padding:1.5rem;gap:.75rem;min-height:18rem;align-items:start}
.page-index .company-grid .card-category{margin:0;font-size:.5625rem;line-height:1.5}
.page-index .company-grid h3{font:400 1.6rem/1.15 var(--serif);letter-spacing:-.02em;margin:0;white-space:normal}
.page-index .company-grid .card-description{font:400 1.0625rem/1.4 var(--serif);letter-spacing:0;margin:0}
.page-index .company-grid .card-motto{font-size:.6875rem;letter-spacing:.04em;line-height:1.6;margin:0;min-height:3.2em}
.page-index .company-grid .card-link{align-self:end;justify-self:stretch;width:100%;min-height:44px;margin:0;padding:.75rem 1rem;font-size:.5625rem;letter-spacing:.12em;white-space:normal}
@media(min-width:901px) and (max-width:1200px){.page-index .company-grid .company-content{padding:1.25rem}.page-index .company-grid h3{font-size:1.4rem}}
@media(max-width:900px){.page-index .company-grid{grid-template-columns:minmax(0,1fr);max-width:32rem;margin-inline:auto;gap:1.25rem;grid-auto-rows:1fr}.page-index .company-grid .company-content{min-height:17rem}.page-index .company-grid h3{font-size:1.9375rem}}

/* Shared 1 CSS px boundary; included in the equal media-box dimensions. */
.page-index .company-grid .company-image{border-bottom:1px solid #aaa79e;overflow:hidden}
.page-index .company-grid .company-image img{object-position:center top}
/* Only the two legacy delivery images contain baked-in pale frame pixels.
   Fit their wrappers to the actual photo, then cover that frame at source scale. */
.page-index .company-grid .company-image{position:relative;container-type:size}
.page-index .company-grid .company-image picture{position:absolute;top:0;left:50%;transform:translateX(-50%);width:min(100cqw,calc(100cqh * var(--photo-ratio)));height:auto;aspect-ratio:var(--photo-ratio);overflow:hidden;border-radius:var(--photo-corner)}
.page-index .company-grid .company-card:first-child picture{--photo-ratio:417/253;--photo-edge:calc(100cqw / 417);--photo-corner:calc(100cqw * 6 / 417)}
.page-index .company-grid .company-card:nth-child(2) picture{--photo-ratio:402/253;--photo-edge:calc(100cqw / 402);--photo-corner:calc(100cqw * 2 / 402)}
.page-index .company-grid .company-image picture::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit}
@media(min-width:1800px){
  .page-index .company-grid .company-card:first-child picture{--photo-ratio:1610/977;--photo-edge:0px;--photo-corner:0px}
  .page-index .company-grid .company-card:nth-child(2) picture{--photo-ratio:1581/995;--photo-edge:0px;--photo-corner:0px}
}
/* Two pale lower rows plus half a source pixel for resampling; other edges one.
   Shadows retain fractional scaling instead of rounding border widths. */
.page-index .company-grid .company-image picture::after{border:0;box-shadow:inset 0 0 0 var(--photo-edge) #111918;background:linear-gradient(to top,#111918 0 calc(2.5 * var(--photo-edge)),transparent calc(2.5 * var(--photo-edge)))}
/* v1.1.1: fill the existing media height; center the minimal horizontal crop.
   Trades and the source-perimeter covers retain their approved treatment. */
.page-index .company-grid .company-card:first-child picture{width:calc(100cqh * var(--photo-ratio));height:100%}
.page-index .company-grid .company-card:nth-child(3) .company-image img{object-fit:cover}

/* Let the shorter homepage hero follow its content on mobile. */
@media(max-width:600px){.page-index .hero{min-height:0}}

/* Two remaining heading items: title and portfolio link, without an empty column. */
.page-index .section-heading{grid-template-columns:minmax(0,1fr) auto;min-height:0}
.page-index .section-heading .view-all{grid-column:auto;justify-self:end}
