/* "From the bench" photo wall on the home page (markup: tools/build-home-bench.js, lightbox: home-bench.js). */
.bench-section { padding-top: 60px; }
.bench-wrap { container-type: inline-size; }
.bench-wall { --gap: 14px; --row: 380px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--row); grid-auto-flow: dense; gap: var(--gap); }
@supports (width: 1cqw) { .bench-wall { --row: calc((100cqw - 3 * var(--gap)) / 4 / .72); } }
.bench-wall li { margin: 0; min-height: 0; }
.bench-wall li.is-wide { grid-column: span 2; }
.bench-item { position: relative; height: 100%; margin: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: #101215; box-shadow: 0 14px 40px rgba(0,0,0,.28); transition: border-color .25s ease, box-shadow .25s ease; }
.bench-item:hover, .bench-item:focus-within { border-color: rgba(255,133,40,.55); box-shadow: 0 22px 54px rgba(0,0,0,.45); }
.bench-open { display: block; height: 100%; cursor: zoom-in; }
.bench-open:focus-visible { outline: 2px solid var(--orange-bright, #ff8528); outline-offset: -3px; }
.bench-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.bench-item:hover img, .bench-item:focus-within img { transform: scale(1.05); }
.bench-item figcaption { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 3px; padding: 46px 14px 12px; background: linear-gradient(180deg, rgba(8,9,10,0), rgba(8,9,10,.88) 62%); pointer-events: none; }
.bench-item figcaption strong { color: #fff; font-size: 14px; line-height: 1.25; }
.bench-item figcaption span { color: #c5cad1; font-size: 12px; line-height: 1.4; }

.bench-lightbox { width: min(94vw, 980px); max-width: none; max-height: 94vh; padding: 0; border: 1px solid rgba(255,133,40,.4); background: #0c0e10; color: #fff; overflow: hidden; }
.bench-lightbox::backdrop { background: rgba(4,5,6,.86); }
.bench-lightbox[open] { display: flex; flex-direction: column; }
.bench-lightbox img { display: block; width: 100%; max-height: calc(94vh - 92px); object-fit: contain; background: #000; }
.bench-lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.bench-lightbox-bar p { margin: 0; color: #c5cad1; font-size: 14px; line-height: 1.4; }
.bench-lightbox-bar strong { display: block; color: #fff; font-size: 16px; }
.bench-lightbox-nav { display: flex; gap: 8px; flex: none; }
.bench-lightbox button { width: 40px; height: 40px; border: 1px solid rgba(255,133,40,.45); background: rgba(247,121,32,.08); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.bench-lightbox button:hover, .bench-lightbox button:focus-visible { background: rgba(247,121,32,.28); outline: none; }
.bench-lightbox-close { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(8,9,10,.7) !important; }

@media (max-width: 900px) {
  .bench-wall { --gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @supports (width: 1cqw) { .bench-wall { --row: calc((100cqw - var(--gap)) / 2 / .72); } }
}
@media (max-width: 720px) {
  .bench-item figcaption { padding: 34px 10px 9px; }
  .bench-item figcaption strong { font-size: 13px; }
  .bench-item figcaption span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bench-item, .bench-item img { transition: none; } .bench-item:hover img, .bench-item:focus-within img { transform: none; } }
