.gallery-page{
  --gallery-page-bg:#191919;
  --gallery-page-text:#f5f4f1;
  --gallery-page-gold:#ad965b;
  min-height:100vh;
  padding:160px 5vw 100px;
  overflow:hidden;
  background:var(--gallery-page-bg);
  color:var(--gallery-page-text);
}

.gallery-page__intro,
.gallery-page__filter-wrap,
.gallery-page__grid{
  width:min(1440px,100%);
  margin-inline:auto;
}

.gallery-page__intro{margin-bottom:66px;}

.gallery-page__kicker{
  display:block;
  margin-bottom:18px;
  color:var(--gallery-page-gold);
  font-size:10px;
  font-weight:600;
  line-height:1;
  letter-spacing:.24em;
  text-transform:uppercase;
}

.gallery-page__intro-grid{
  display:grid;
  grid-template-columns:minmax(300px,.72fr) minmax(420px,1.28fr);
  align-items:end;
  gap:70px;
}

.gallery-page h1{
  margin:0;
  color:var(--gallery-page-gold);
  font-size:clamp(60px,7vw,110px);
  line-height:.88;
}

.gallery-page__intro p{
  max-width:760px;
  margin:0;
  color:rgba(245,244,241,.82);
  font-size:14px;
  line-height:1.8;
}

.gallery-page__filter-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:30px;
  margin-bottom:36px;
  border-bottom:1px solid rgba(173,150,91,.22);
}

.gallery-page__filters{
  display:flex;
  align-items:center;
  gap:38px;
  overflow-x:auto;
  scrollbar-width:none;
}

.gallery-page__filters::-webkit-scrollbar{display:none;}

.gallery-page__filter{
  position:relative;
  flex:none;
  padding:0 0 17px;
  border:0;
  background:transparent;
  color:var(--gallery-page-gold);
  font-size:12px;
  font-weight:400;
  line-height:1;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.62;
  transition:opacity .25s ease;
}

.gallery-page__filter::after{
  content:"";
  position:absolute;
  right:0;
  bottom:-1px;
  left:0;
  height:2px;
  background:var(--gallery-page-gold);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .3s ease;
}

.gallery-page__filter:hover,
.gallery-page__filter:focus-visible,
.gallery-page__filter.is-active{opacity:1;}
.gallery-page__filter.is-active::after{transform:scaleX(1);}

.gallery-page__grid{
  columns:3;
  column-gap:18px;
}

.gallery-page__item{
  position:relative;
  display:inline-block;
  width:100%;
  margin:0 0 18px;
  overflow:hidden;
  break-inside:avoid;
  background:#252525;
}

.gallery-page__item[hidden]{display:none;}

.gallery-page__media{overflow:hidden;}

.gallery-page__media[role="button"]{cursor:zoom-in;}
.gallery-page__media[role="button"]:focus-visible{outline:2px solid var(--gallery-page-gold);outline-offset:-2px;}

.gallery-page__item img{
  display:block;
  width:100%;
  height:auto;
  transition:transform .8s cubic-bezier(.22,.72,.22,1),filter .4s ease;
}

.gallery-page__item figcaption{
  position:absolute;
  right:0;
  bottom:0;
  left:0;
  z-index:2;
  padding:56px 18px 17px;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.68));
  color:#fff;
  font-size:10px;
  font-weight:500;
  line-height:1.3;
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .3s ease,transform .3s ease;
}

.gallery-page__item:hover img{transform:scale(1.025);filter:brightness(.9);}
.gallery-page__item:hover figcaption{opacity:1;transform:none;}

html.gallery-lightbox-open,
body.gallery-lightbox-open{overflow:hidden;}

.gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:20000;
  display:grid;
  place-items:center;
  opacity:0;
  transition:opacity .25s ease;
}

.gallery-lightbox[hidden]{display:none;}
.gallery-lightbox.is-open{opacity:1;}

.gallery-lightbox__backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:rgba(10,10,10,.96);
}

.gallery-lightbox__panel{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:64px minmax(0,1fr) 64px;
  align-items:center;
  width:100%;
  height:100%;
  padding:48px 34px 30px;
  pointer-events:none;
}

.gallery-lightbox__figure{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:0;
  height:100%;
  margin:0;
}

.gallery-lightbox__figure img{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:calc(100vh - 130px);
  object-fit:contain;
  box-shadow:0 18px 60px rgba(0,0,0,.35);
}

.gallery-lightbox__figure figcaption{
  width:100%;
  max-width:1100px;
  margin-top:16px;
  color:#fff;
  font-size:11px;
  letter-spacing:.14em;
  text-align:center;
  text-transform:uppercase;
}

.gallery-lightbox__close,
.gallery-lightbox__arrow{
  pointer-events:auto;
  border:0;
  background:transparent;
  color:#fff;
}

.gallery-lightbox__close{
  position:absolute;
  top:20px;
  right:25px;
  z-index:2;
  width:44px;
  height:44px;
  padding:0;
  font-family:Arial,sans-serif;
  font-size:38px;
  font-weight:200;
  line-height:1;
  transition:color .2s ease,transform .2s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus-visible{color:var(--gallery-page-gold);transform:rotate(4deg);}

.gallery-lightbox__arrow{
  display:grid;
  place-items:center;
  width:52px;
  height:70px;
  padding:0;
  transition:color .2s ease,transform .2s ease;
}

.gallery-lightbox__arrow:hover,
.gallery-lightbox__arrow:focus-visible{color:var(--gallery-page-gold);}
.gallery-lightbox__arrow--prev:hover{transform:translateX(-4px);}
.gallery-lightbox__arrow--next:hover{transform:translateX(4px);}

.gallery-lightbox__arrow svg{
  width:17px;
  height:30px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.gallery-lightbox__count{
  position:absolute;
  right:30px;
  bottom:24px;
  color:rgba(255,255,255,.68);
  font-size:11px;
  letter-spacing:.14em;
}

@media(max-width:980px){
  .gallery-page{padding:130px 24px 76px;}
  .gallery-page__intro-grid{grid-template-columns:1fr;gap:28px;}
  .gallery-page__intro{margin-bottom:48px;}
  .gallery-page__grid{columns:2;}
}

@media(max-width:620px){
  .gallery-page{padding:112px 19px 58px;}
  .gallery-page h1{font-size:58px;}
  .gallery-page__intro p{font-size:12px;line-height:1.7;}
  .gallery-page__filter-wrap{display:block;margin-bottom:22px;}
  .gallery-page__filters{gap:26px;}
  .gallery-page__grid{columns:1;}
  .gallery-page__item figcaption{opacity:1;transform:none;}
  .gallery-lightbox__panel{
    grid-template-columns:42px minmax(0,1fr) 42px;
    padding:58px 8px 26px;
  }
  .gallery-lightbox__figure img{max-height:calc(100vh - 150px);}
  .gallery-lightbox__figure figcaption{padding-inline:8px;font-size:9px;}
  .gallery-lightbox__arrow{width:40px;height:58px;}
  .gallery-lightbox__close{top:10px;right:12px;}
  .gallery-lightbox__count{right:18px;bottom:14px;font-size:9px;}
}

@media(prefers-reduced-motion:reduce){
  .gallery-page__item img,
  .gallery-page__item figcaption,
  .gallery-lightbox{transition:none;}
}
