/* ---- Gallery hero ---- */
.gallery-hero{
  max-width:1240px;margin:0 auto;
  padding:64px 28px 28px;
  background:linear-gradient(135deg,rgba(25,62,0,.03),transparent 60%);
}
.gallery-hero h1.display{
  font-family:'Fraunces',serif;font-weight:500;
  font-size:clamp(40px,5.5vw,68px);line-height:1;letter-spacing:-.025em;
  margin:18px 0 16px;
}
.gallery-hero h1.display em{font-style:italic;color:#3a5a2a}
.gallery-hero .lede{font-size:17px;color:var(--ink-2);max-width:600px}

/* ---- Gallery sections ---- */
.gallery-block{padding-top:48px}
.gallery-cat{margin-bottom:56px}
.gallery-cat:last-child{margin-bottom:0}

.cat-head{display:flex;align-items:center;gap:18px;margin-bottom:22px}
.cat-label{
  font-family:'JetBrains Mono',monospace;font-size:12px;
  text-transform:uppercase;letter-spacing:.15em;color:var(--brand);
  white-space:nowrap;
}
.cat-rule{flex:1;height:1px;background:rgba(25,62,0,.16)}

/* ---- Grid ---- */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.gallery-grid.two{grid-template-columns:repeat(2,1fr)}

@media (max-width:900px){
  .gallery-grid,
  .gallery-grid.two{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:600px){
  .gallery-grid,
  .gallery-grid.two{grid-template-columns:1fr}
}

/* ---- Gallery item (card in the paper style) ---- */
.gallery-item{
  position:relative;overflow:hidden;cursor:pointer;
  margin:0;
  background:#fff;
  border:1px solid rgba(25,62,0,.12);
  border-radius:12px;
  transition:transform .25s, box-shadow .25s;
}
.gallery-item:hover{
  transform:translateY(-3px);
  box-shadow:0 20px 30px -20px rgba(25,62,0,.28);
}
.gallery-item img{
  display:block;width:100%;height:240px;object-fit:cover;
  transition:transform .5s cubic-bezier(.4,0,.2,1);
}
.gallery-item.tall img{height:320px}
.gallery-item:hover img{transform:scale(1.05)}

/* Overlay caption */
.gallery-overlay{
  position:absolute;inset:0;
  display:flex;align-items:flex-end;
  padding:18px;margin:0;
  background:linear-gradient(to top,rgba(20,24,32,.78),rgba(20,24,32,.05) 55%,transparent);
  opacity:0;transition:opacity .3s ease;
}
.gallery-item:hover .gallery-overlay{opacity:1}
.gallery-overlay span{
  color:var(--paper);
  font-family:'Fraunces',serif;font-weight:500;font-size:18px;
  letter-spacing:-.01em;line-height:1.25;
}

/* ---- Lightbox (paper theme) ---- */
.wb-lightbox{
  position:fixed;inset:0;z-index:9999;
  display:none;align-items:center;justify-content:center;
  padding:32px;
  background:rgba(25,62,0,.55);
  backdrop-filter:blur(6px);
}
.wb-lightbox.active{display:flex;animation:wb-lb-fade .2s ease}
@keyframes wb-lb-fade{from{opacity:0}to{opacity:1}}

.wb-lightbox-figure{
  margin:0;max-width:min(1100px,92vw);max-height:88vh;
  background:#fff;border:1px solid rgba(25,62,0,.15);
  border-radius:14px;overflow:hidden;
  box-shadow:0 30px 60px -15px rgba(25,62,0,.45);
  display:flex;flex-direction:column;
  animation:wb-lb-pop .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes wb-lb-pop{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}
.wb-lightbox-figure img{
  display:block;width:100%;max-height:78vh;object-fit:contain;
  background:var(--paper-2);
}
.wb-lightbox-figure figcaption{
  padding:14px 20px;
  font-family:'Fraunces',serif;font-weight:500;font-size:17px;
  color:var(--ink);letter-spacing:-.01em;
  border-top:1px solid rgba(25,62,0,.1);
}
.wb-lightbox-figure figcaption:empty{display:none}

.wb-lightbox-close{
  position:absolute;top:22px;right:22px;
  width:42px;height:42px;border-radius:50%;
  background:#fff;color:var(--brand);
  border:1px solid rgba(25,62,0,.15);
  display:grid;place-items:center;cursor:pointer;
  box-shadow:0 8px 20px -6px rgba(25,62,0,.3);
  transition:transform .25s ease, background .15s;
}
.wb-lightbox-close:hover{background:var(--paper-2);transform:rotate(90deg)}

/* CTA band tweak so the gallery CTA sits nicely */
.gallery-block + .cta-band{margin-top:60px}