/* Project photos retain the site's paper, forest-green and serif palette. */
.gallery-section { background: #edf0e6; border-top: 1px solid var(--line); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 45px; }
.gallery-card { display: block; min-width: 0; }
.gallery-card figure { margin: 0; }
.gallery-photo { aspect-ratio: 1; overflow: hidden; background: var(--sage); border: 1px solid #d3d9ca; }
.gallery-photo > img { width: 100%; height: 100%; object-fit: contain; }
.gallery-photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.gallery-photo-pair > div { position: relative; min-width: 0; height: 100%; overflow: hidden; }
.gallery-photo-pair img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.gallery-photo-pair span { position: absolute; top: 10px; left: 10px; background: rgba(32, 53, 43, .88); color: var(--white); padding: 4px 9px; font-size: 10px; line-height: 1.5; }
.gallery-card > figure > figcaption { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 21px 0 20px; border-bottom: 1px solid #cbd3c0; }
.gallery-category { display: block; font-size: 8px; line-height: 1.5; letter-spacing: 1px; color: var(--muted); margin-bottom: 8px; }
.gallery-card h3 { font: 400 27px/1.15 var(--serif); letter-spacing: -.7px; }
.gallery-view { display: inline-flex; align-items: center; gap: 10px; font-size: 9px; white-space: nowrap; padding-bottom: 3px; }
.gallery-view > span { font-size: 18px; line-height: 1; transition: transform .2s; }
.gallery-card:hover .gallery-view > span { transform: translate(2px, -2px); }
.gallery-card:hover > figure > figcaption { border-bottom-color: var(--green); }
.gallery-bottom { margin-top: 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.gallery-bottom > p { color: var(--muted); font-size: 12px; }
body.gallery-is-open { overflow: hidden; }
.gallery-dialog { padding: 22px; width: min(1060px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; }
.gallery-dialog::backdrop { background: rgba(16, 29, 22, .82); }
.gallery-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.gallery-dialog .eyebrow { font-size: 9px; color: var(--muted); }
.gallery-dialog h2 { margin: 7px 0 0; font-size: 30px; line-height: 1.15; letter-spacing: -.7px; }
.gallery-close { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: transparent; font-size: 30px; line-height: 1; }
.gallery-close:hover, .gallery-controls button:hover { background: var(--sage); }
.gallery-image-frame { display: grid; place-items: center; margin-top: 18px; background: #18281f; min-height: 100px; }
#gallery-full-image { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 245px); object-fit: contain; }
.gallery-comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; width: 100%; padding: 12px; }
.gallery-comparison figure { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.gallery-comparison figcaption { color: var(--paper); font-size: 11px; line-height: 1.5; padding-bottom: 8px; }
.gallery-comparison img { max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 285px); object-fit: contain; }
.gallery-dialog > p.gallery-dialog-description { margin-top: 14px; font-size: 12px; line-height: 1.6; }
.gallery-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; }
.gallery-original-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.gallery-controls { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.gallery-controls button { width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; font-size: 22px; line-height: 1; }
#gallery-count { min-width: 57px; text-align: center; font-size: 10px; color: var(--muted); }
@media (max-width: 1100px) {
  .gallery-grid { gap: 23px; }
  .gallery-card > figure > figcaption { display: block; }
  .gallery-card h3 { font-size: 25px; }
  .gallery-view { margin-top: 14px; }
}
@media (min-width: 621px) and (max-width: 800px) {
  .header-inner .brand-descriptor { display: none; }
  .desktop-nav { gap: 14px; }
  .gallery-grid { gap: 17px; }
  .gallery-card h3 { font-size: 23px; }
  .gallery-category { font-size: 7px; letter-spacing: .6px; }
}
@media (max-width: 620px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 30px; margin-top: 31px; }
  .gallery-card > figure > figcaption { display: flex; padding-block: 18px; }
  .gallery-card h3 { font-size: 29px; }
  .gallery-view { margin-top: 0; }
  .gallery-category { font-size: 8px; }
  .gallery-bottom { display: block; }
  .gallery-bottom .text-link { margin-top: 12px; }
  .gallery-dialog { width: calc(100% - 20px); padding: 16px; max-height: calc(100dvh - 20px); }
  .gallery-dialog h2 { font-size: 26px; }
  .gallery-dialog-footer { flex-wrap: wrap; gap: 17px; }
  .gallery-controls { margin-left: auto; }
  .gallery-image-frame { margin-top: 15px; }
  #gallery-full-image { max-height: calc(100dvh - 275px); }
  .gallery-comparison { gap: 8px; padding: 8px; }
  .gallery-comparison img { max-height: calc(100dvh - 305px); }
}
@media (max-height: 520px) {
  #gallery-full-image, .gallery-comparison img { max-height: 65dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-card:hover .gallery-view > span { transform: none; }
}
