/* /works/ gallery (T074–T076). Only loaded on that page. */
.gallery { padding: 0 var(--gutter) 120px; color: var(--c-ink); }
.gallery__filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 50px; }
.gallery__filter a { padding: 10px 24px; border: 1px solid #0003; border-radius: 60px; color: inherit; text-decoration: none; transition: background-color .3s, color .3s, border-color .3s; }
.gallery__filter a:hover, .gallery__filter a:focus-visible { border-color: var(--c-black); }
.gallery__filter a[aria-current="page"] { border-color: var(--c-black); background: var(--c-black); color: var(--c-white); }
.gallery__section + .gallery__section { margin-top: 90px; }
.gallery__heading { margin: 0 0 30px; font-family: var(--f-ar); font-size: clamp(28px, 3vw, 44px); font-weight: 400; }
.gallery .works-grid { padding: 0; }

.banner-sets, .logos-grid { display: grid; margin: 0; padding: 0; list-style: none; }
.banner-sets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 30px; }
.banner-set__card { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.banner-set__cover { display: block; overflow: hidden; border-radius: 20px; background: #0000000d; }
.banner-set__cover img { display: block; width: 100%; height: auto; transition: transform .5s; }
.banner-set__card:hover img, .banner-set__card:focus-visible img { transform: scale(1.03); }
.banner-set__name { font-size: 22px; font-weight: 500; }
.banner-set__count { font-size: 14px; opacity: .6; }

.logos-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px; }
.logos-grid__tile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 18%; border-radius: 20px; background: var(--c-white); }
.logos-grid__tile img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.logos-grid__brand { margin: 10px 0 0; font-size: 14px; text-align: center; opacity: .7; }

/* Dialog. Without JavaScript: opened by :target as a plain scrolling list of every picture. */
.lightbox { display: none; position: fixed; inset: 0; z-index: 2147483000; flex-direction: column; background: #0d0b0e; color: var(--c-white); }
.lightbox:target, .lightbox.is-open { display: flex; }
.lightbox__bar { display: flex; align-items: center; gap: 20px; padding: 18px var(--gutter); }
.lightbox__title { flex: 1; margin: 0; font-size: 18px; }
.lightbox__title a, .lightbox figcaption a { color: inherit; text-decoration: underline; }
.lightbox__count { font-size: 14px; opacity: .7; direction: ltr; }
.lightbox__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #ffffff1a; color: inherit; font-size: 28px; line-height: 1; text-decoration: none; }
.lightbox__items { flex: 1; overflow-y: auto; padding: 0 var(--gutter) 40px; }
.lightbox__item { margin: 0 auto 30px; max-width: 1100px; text-align: center; }
.lightbox__item img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { margin-top: 12px; font-size: 15px; }
/* With JavaScript: one picture at a time, arrows, swipe. */
.lightbox.is-js .lightbox__items { display: flex; align-items: center; justify-content: center; overflow: hidden; padding-bottom: 20px; touch-action: pan-y; }
.lightbox.is-js .lightbox__item { display: none; margin: 0; }
.lightbox.is-js .lightbox__item.is-current { display: block; }
.lightbox.is-js .lightbox__item img { max-height: calc(100vh - 140px); width: auto; }
.lightbox__nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; background: #ffffff1f; color: var(--c-white); font-size: 26px; cursor: pointer; }
.lightbox__nav:hover, .lightbox__nav:focus-visible, .lightbox__close:hover, .lightbox__close:focus-visible { background: #ffffff40; }
.lightbox__nav--prev { right: 20px; }
.lightbox__nav--next { left: 20px; }
.lightbox__nav[hidden] { display: none; }
html.lightbox-open { overflow: hidden; }

@media (max-width: 1024px) {
	.banner-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.logos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.banner-sets { grid-template-columns: 1fr; }
	.logos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.lightbox__nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { .banner-set__cover img { transition: none; } }
