/* Gallery page (Oct 2026): masonry, films strip, lightbox */
.page-intro .lede { max-width: 46ch; }
.chip-n { display: inline-block; min-width: 18px; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: rgba(31, 24, 18, .08); font-size: 10px; letter-spacing: 0; }
.chip.active .chip-n { background: rgba(247, 242, 234, .2); }

/* Masonry: same column widths as before (sizes attribute stays accurate) */
.ed-gallery { display: block !important; column-count: 2; column-gap: 8px; }
@media (min-width: 720px) { .ed-gallery { column-count: 3; } }
.ed-gallery .g { break-inside: avoid; margin: 0 0 14px !important; position: relative; opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease; }
.ed-gallery .g.is-hidden { display: none; }
.ed-gallery .g.is-in { animation: g-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes g-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ed-gallery .g .frame { aspect-ratio: auto !important; border-radius: 14px; position: relative; }
.ed-gallery .g .frame img { height: auto !important; transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .4s ease; }
.ed-gallery .g:hover .frame img { transform: scale(1.04); }
.ed-gallery .g .frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 15, 10, .35), transparent 45%); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.ed-gallery .g:hover .frame::after { opacity: 1; }
.ed-gallery .g .g-provenance { display: none !important; }
.ed-gallery .g .g-cat { margin-top: 7px; }
.ed-gallery .g:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 14px; }

/* Films */
.films { padding: 0 0 26px; }
.films__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 3.4vw, 32px); margin: 0 20px 12px; color: var(--ink); }
.films__title em { color: var(--accent-ink); }
.films__track { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 10px; overflow-x: auto; padding: 0 20px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
.films__track::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .films__track { grid-auto-columns: 23%; } }
.film { margin: 0; scroll-snap-align: start; }
.film video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; background: var(--tone); display: block; }
.film figcaption { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 9999; background: rgba(12, 9, 6, .94); display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; opacity: 0; transition: opacity .25s ease; touch-action: pan-y; }
.lb.is-on { opacity: 1; }
.lb[hidden] { display: none; }
.lb__fig { grid-column: 2; grid-row: 1; margin: 0; display: flex; flex-direction: column; align-items: center; max-height: 100vh; padding: 56px 0 18px; }
.lb__fig img { max-width: min(92vw, 900px); max-height: calc(100vh - 190px); object-fit: contain; border-radius: 10px; transition: opacity .2s ease, transform .25s ease; }
.lb__fig figcaption { text-align: center; color: #F3EADB; margin-top: 14px; max-width: 54ch; padding: 0 12px; display: flex; flex-direction: column; gap: 4px; }
.lb__fig .g-cat { font: 500 10px/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: #E5CFA8; }
.lb__fig .g-label { font-family: var(--font-display); font-style: italic; font-size: 18px; }
.lb__prov { font: 12px/1.5 var(--font-body); color: #CDBFA9; }
.lb__count { font: 12px var(--font-body); color: #9c8f7d; }
.lb__close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font-size: 26px; cursor: pointer; }
.lb__nav { grid-row: 1; width: 44px; height: 44px; justify-self: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lb__nav:hover, .lb__close:hover { background: rgba(255, 255, 255, .16); }
@media (max-width: 640px) { .lb { grid-template-columns: 0 1fr 0; } .lb__nav { display: none; } }
.lb button:focus-visible { outline: 2px solid #E5CFA8; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .ed-gallery .g, .ed-gallery .g .frame img, .lb, .lb__fig img { transition: none; animation: none !important; } }
.lb__nav--prev { grid-column: 1; } .lb__nav--next { grid-column: 3; }
.ed-gallery .g, .ed-gallery figure.gallery-item { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
.lb { background: rgba(12, 9, 6, .97); }
