.gallery-page {
  --gallery-paper: #f7f5ee;
  --gallery-ink: #172c25;
  --gallery-accent: #ad4827;
  --gallery-rule: #c8cabf;
  --wall-gap: clamp(.85rem, 1.85vw, 1.8rem);
  color: var(--gallery-ink);
  background: var(--gallery-paper);
}
.gallery-page .wrap { max-width: 1520px; }
.gallery-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  padding-top: clamp(2.2rem, 5.5vw, 5rem);
  padding-bottom: clamp(1.6rem, 3.2vw, 3rem);
}
.gallery-meta, .film-meta {
  margin: 0 0 .7rem;
  color: var(--gallery-accent);
  font: 700 .82rem/1.3 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.gallery-heading h1, .film-intro h2 {
  font: 680 clamp(3.3rem, 6.5vw, 6.4rem)/.98 var(--sans);
  letter-spacing: -.077em;
  text-wrap: initial;
}
.gallery-heading h1 em, .film-intro h2 em {
  font: italic normal 1em/.98 Georgia, serif;
  letter-spacing: -.075em;
}
.gallery-heading .gallery-intro {
  width: min(37%, 24rem);
  margin: 0 0 .17rem;
  color: #41594d;
  font-size: clamp(1rem, 1.15vw, 1.19rem);
  line-height: 1.55;
}
.gallery-body { padding-bottom: clamp(2.4rem, 6vw, 5rem); }
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem 1.2rem;
  flex-wrap: wrap;
  padding: .85rem 0;
  border-block: 1px solid var(--gallery-rule);
  margin-bottom: clamp(1.1rem, 2vw, 2rem);
}
.gallery-page .gcontrols {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
  margin: 0;
}
.gallery-page .filter {
  min-height: 42px;
  padding: .4rem .85rem;
  color: var(--gallery-ink);
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  font: 650 .95rem/1.25 var(--sans);
}
.gallery-page .filter span { font-size:.78em; font-weight:500; margin-left:.12rem; }
.gallery-page .filter:hover { background:#e6e8dc; }
.gallery-page .filter[aria-pressed=true] { color:var(--gallery-paper); background:var(--gallery-ink); }
.watch-films {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 42px;
  padding: .3rem .14rem;
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
}
.watch-films span { color:var(--gallery-accent); font-family:Arial,sans-serif; font-size:1.15rem; }
.watch-films:hover { text-decoration:underline; text-underline-offset:4px; }
.watch-films-mobile { display:none; }
.gallery-page .photos {
  --row: clamp(172px, 16.8vw, 260px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(1.2rem, 2.65vw, 2.5rem) var(--wall-gap);
}
.gallery-page .tile {
  flex: var(--photo-ratio) 1 calc(var(--row) * var(--photo-ratio));
  min-width: 0;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--gallery-ink);
  cursor: zoom-in;
}
.gallery-page .photos::after { content:""; flex:10000 1 0px; }
.gallery-body:has(.filter[data-category="All"][aria-pressed="true"]) .tile:nth-child(1) { flex-basis: calc((100% - var(--wall-gap)) * .571); }
.gallery-body:has(.filter[data-category="All"][aria-pressed="true"]) .tile:nth-child(2) { flex-basis: calc((100% - var(--wall-gap)) * .429); }
.gallery-page .tile figure { margin: 0; }
.photo-frame { position:relative; overflow:hidden; background:#e3e4da; }
.gallery-page .tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  object-fit: contain;
  border-radius: 0;
  transition: filter .22s ease;
}
.gallery-page .tile:hover img { filter:brightness(1.035); }
.enlarge {
  position:absolute;
  bottom:.65rem;
  right:.65rem;
  width:2rem;
  height:2rem;
  display:grid;
  place-items:center;
  border:1px solid #fff9;
  border-radius:50%;
  color:white;
  background:#172c25bc;
  opacity:0;
  transition:opacity .18s;
  font:400 1.45rem/1 var(--sans);
}
.tile:is(:hover,:focus-visible) .enlarge { opacity:1; }
.photo-title {
  display:block;
  margin-top:.5rem;
  color:#253d30;
  font:600 clamp(.91rem,1.05vw,1.04rem)/1.38 var(--sans);
}
.gallery-sr {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
.gallery-page .lightbox {
  --viewer-pad:clamp(.85rem,3.2vw,3rem);
  margin:auto;
  padding:0;
  inset:0;
  width: min(100%, 1640px);
  max-width:100vw;
  height:min(100dvh, 1100px);
  max-height:100dvh;
  border:0;
  border-radius:0;
  background:#111d19;
  color:#f7f5ee;
}
.gallery-page .lightbox[open] { display:flex; flex-direction:column; }
.gallery-page .lightbox::backdrop { background:#0b1210f5; }
.gallery-page .light-head {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:1rem;
  padding:.5rem var(--viewer-pad);
  color:#d5dfd5;
  font:600 .88rem/1.4 var(--sans);
  letter-spacing:.03em;
  border-bottom:1px solid #90a1903b;
}
.gallery-page .count { margin-right:auto; }
.gallery-page .lightbox button {
  min-height:44px;
  border:1px solid #667b6e;
  border-radius:100px;
  background:transparent;
  padding:.4rem .95rem;
  color:#fff;
}
.gallery-page .lightbox button:hover { background:#30433a; }
.gallery-page .viewer-menu { display:none; }
.gallery-page .light-head [data-close] span { margin-left:.22rem; font:1.3em/1 Arial,sans-serif; }
.gallery-page .lightbox > img {
  flex:1 1 0;
  min-height:0;
  width:100%;
  height:0;
  max-height:none;
  padding:clamp(.5rem,1.2vw,1.1rem) var(--viewer-pad);
  object-fit:contain;
}
.light-tools {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1.25rem;
  flex:0 0 auto;
  padding:.75rem var(--viewer-pad) max(.85rem,env(safe-area-inset-bottom));
  border-top:1px solid #90a1903b;
}
.gallery-page .light-caption {
  display:block;
  margin:0;
  padding:0;
  min-height:0;
  max-width:72ch;
  font:normal 1.04rem/1.5 var(--sans);
}
.gallery-page .light-nav { flex-shrink:0; padding:0; border:0; gap:.75rem; }
.gallery-page .light-nav [data-step] { width:44px; padding:0; font:normal 1.8rem/.8 Georgia,serif; }
.gallery-page .light-nav button:disabled { opacity:.35; }
.gallery-page .original { color:#e8e9dc; white-space:nowrap; }
.gallery-films { background:var(--gallery-ink); color:var(--gallery-paper); padding:clamp(2.7rem,6vw,6rem) 0; }
.film-intro {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:1rem;
  padding-bottom:1.5rem;
  margin-bottom:1.5rem;
  border-bottom:1px solid #e9ead061;
}
.film-intro h2 { font-size:clamp(2.8rem,4.8vw,5rem); }
.film-intro > a { font-size:.95rem; }
.film-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(1.5rem,3.5vw,4rem); }
.gallery-page .film-pair article, .gallery-page .film-pair .reel { padding:0; background:none; }
.gallery-page .film-media {
  display:grid;
  position:relative;
  place-items:center;
  overflow:hidden;
  width:100%;
  height: clamp(250px,32vw,450px);
  background:#0c1813;
}
.film-media video, .gallery-page .film-media img {
  display:block;
  width:100%;
  height:100%;
  max-height:100%;
  object-fit:contain;
}
.gallery-page .film-media video { position:absolute; inset:0; }
.gallery-page .film-media.player img { width:100%; height:100%; object-fit:contain; }
.gallery-page .film-media:has(iframe) { height:auto; min-height:360px; }
.gallery-page .film-media iframe { width:min(100%,410px); height:560px; border:0; }
.gallery-page .film-play {
  position:absolute;
  left:50%;
  bottom:.85rem;
  transform:translateX(-50%);
  width:max-content;
  max-width:95%;
  min-height:44px;
  margin:0;
  padding:.55rem 1rem;
  color:var(--gallery-ink);
  background:var(--gallery-paper);
  border:0;
  border-radius:100px;
  font-weight:650;
}
.film-copy { padding-top:1rem; }
.film-copy .film-meta { color:#e2b196; }
.film-copy h3 { margin-bottom:.4rem; font:italic normal clamp(1.85rem,2.4vw,2.7rem)/1.1 Georgia,serif; letter-spacing:-.045em; }
.film-copy p, .film-copy aside { font-size:1rem; line-height:1.55; }
.gallery-page .film-copy aside { color:inherit; border-left:2px solid #e2b196; margin:.65rem 0; padding-left:.85rem; }
.gallery-page .film-copy a { color:var(--gallery-paper); }
@media (max-width:740px) {
  .gallery-page .viewer-menu { display:inline-block; }
  .gallery-page .light-head { gap:.42rem; }
  .light-tools { flex-direction:column; align-items:stretch; gap:.65rem; }
  .gallery-page .light-caption { font-size:.98rem; }
  .gallery-page .light-nav { justify-content:space-between; }
  .gallery-heading { align-items:start; flex-direction:column; gap:.75rem; }
  .gallery-heading .gallery-intro { width:auto; max-width:36rem; }
}
@media (max-width:640px) {
  .gallery-heading { gap:.5rem; padding-top:1.4rem; padding-bottom:.85rem; }
  .gallery-heading h1 { font-size:clamp(3.2rem,12vw,4.8rem); }
  .gallery-toolbar { gap:0; padding:.22rem 0; margin-bottom:.85rem; }
  .gallery-page .gcontrols { display:grid; width:100%; grid-template-columns:auto auto auto auto; gap:.12rem; }
  .gallery-page .filter { min-height:44px; padding:.3rem .22rem; font-size:.93rem; white-space:nowrap; }
  .gallery-toolbar .watch-films { display:none; }
  .watch-films-mobile { display:inline; color:var(--gallery-accent); font-weight:650; white-space:nowrap; }
  .gallery-page .photos { --row:150px; row-gap:1.4rem; }
  .gallery-page .tile { flex-basis:calc(145px * var(--photo-ratio)); }
  .gallery-page .tile:nth-child(-n+2) { flex-basis:100%!important; }
  .gallery-page .photo-title { font-size:.93rem; }
  .gallery-page .film-pair { grid-template-columns:1fr; }
  .gallery-page .film-media { height:clamp(270px,78vw,430px); }
}
@media (max-width:345px) {
  .gallery-page .filter span { display:none; }
  .gallery-page .gcontrols { grid-template-columns:1.3fr 1.1fr 1.1fr .7fr; gap:0; }
}
@media (max-height:470px) and (orientation:landscape) {
  .gallery-page .light-head { padding-block:.1rem; }
  .light-tools { flex-direction:row; align-items:center; padding-block:.2rem; }
  .gallery-page .light-caption { font-size:.82rem; line-height:1.25; }
}
@media (prefers-reduced-motion:reduce) {
  .gallery-page *, .gallery-page *::before, .gallery-page *::after { transition:none!important; }
}

