/* ==========================================================================
   Gallery page
   A dark, quiet title block, then a soft masonry of rounded photos that
   unveil from the bottom as they scroll into view. Hover (or, on touch
   screens, always) shows a glass caption. Tapping opens the lightbox.
   Driven by js/gallery-page.js.
   ========================================================================== */

/* ---- title block ------------------------------------------------------- */
.gp-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0b0b0c;
  padding: 190px 0 120px;
  text-align: center;
}
.gp-hero::before {                       /* two slow pools of light */
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -1;
  background:
    radial-gradient(38% 46% at 22% 34%, rgba(255, 255, 255, .11), transparent 70%),
    radial-gradient(34% 44% at 80% 62%, rgba(190, 200, 215, .10), transparent 70%);
  filter: blur(28px);
  animation: gp-drift 20s ease-in-out infinite alternate;
}
@keyframes gp-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
.gp-hero::after {                        /* hairline at the foot */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: rgba(255, 255, 255, .08);
}
.gp-eyebrow {
  display: block;
  margin-bottom: 20px;
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.gp-title-mask { display: inline-block; overflow: hidden; padding: 0 .06em .14em; }
.gp-title {
  display: block;
  margin: 0;
  font-family: 'Prata', Georgia, serif;
  font-weight: 400;
  font-size: clamp(64px, 12vw, 160px);
  line-height: 1;
  letter-spacing: -.035em;
  color: #fff;
  animation: gp-rise 1.1s cubic-bezier(.2, .8, .2, 1) .15s both;
}
.gp-sub {
  margin: 22px auto 0;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .62);
  animation: gp-fade 1s ease .55s both;
}
@keyframes gp-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes gp-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- masonry ----------------------------------------------------------- */
.gp-section { background: #f6f6f7; padding: 90px 0 96px; }
.gp-section .container { max-width: 1240px; }
.gp-grid { columns: 3; column-gap: 22px; }

.gp-item { position: relative; margin: 0 0 22px; break-inside: avoid; }
.gp-item a { display: block; position: relative; border-radius: 22px; }
.gp-frame {
  position: relative;
  aspect-ratio: var(--ar, 4 / 5);
  overflow: hidden;
  border-radius: 22px;
  background: #e1e2e5;
  box-shadow: 0 34px 56px -34px rgba(17, 17, 18, .5), 0 2px 4px rgba(17, 17, 18, .05);
  clip-path: inset(100% 0 0 0 round 22px);                  /* hidden until scrolled into view */
  transition: clip-path 1s cubic-bezier(.77, 0, .18, 1) var(--d, 0s);
}
.gp-item.is-in .gp-frame { clip-path: inset(0 0 0 0 round 22px); }

.gp-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  transform: scale(1.25);
  transition: transform 1.5s cubic-bezier(.2, .7, .2, 1) var(--d, 0s);
}
.gp-item.is-in .gp-frame img { transform: scale(1); }
.gp-item.is-in a:hover .gp-frame img,
.gp-item.is-in a:focus-visible .gp-frame img { transform: scale(1.06); transition-delay: 0s; transition-duration: .9s; }
.gp-item a:focus-visible { outline: 2px solid #5d6167; outline-offset: 4px; }

/* glass caption */
.gp-cap {
  position: absolute;
  left: 14px; bottom: 14px; right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 999px;
  background: var(--gl-sheen), rgba(17, 17, 18, .45);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  color: #fff;
  font-family: 'Work Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.22, .61, .36, 1);
}
.gp-cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-cap i {                                  /* the plus */
  position: relative; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff;
}
.gp-cap i::before, .gp-cap i::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: #111112; transform: translate(-50%, -50%);
}
.gp-cap i::before { width: 11px; height: 1.5px; }
.gp-cap i::after { width: 1.5px; height: 11px; }
.gp-item a:hover .gp-cap,
.gp-item a:focus-visible .gp-cap { opacity: 1; transform: none; }

@media (hover: none) {                       /* touch screens: no hover, so always show */
  .gp-cap { opacity: 1; transform: none; left: 10px; right: 10px; bottom: 10px; padding: 6px 6px 6px 14px; font-size: 12px; }
  .gp-cap i { width: 24px; height: 24px; }
}

.gp-more { display: flex; justify-content: center; margin-top: 30px; }
.gp-more .default_btn { margin-top: 0; }

/* ---- tablet / phone ------------------------------------------------------ */
@media (max-width: 991px) {
  .gp-hero { padding: 160px 0 96px; }
  .gp-section { padding: 70px 0 80px; }
  .gp-grid { columns: 2; column-gap: 16px; }
  .gp-item { margin-bottom: 16px; }
}
@media (max-width: 575px) {
  .gp-hero { padding: 132px 0 76px; }
  .gp-sub { font-size: 15px; margin-top: 16px; }
  .gp-section { padding: 48px 0 64px; }
  .gp-section .container { padding-left: 12px; padding-right: 12px; }
  .gp-grid { column-gap: 10px; }
  .gp-item { margin-bottom: 10px; }
  .gp-frame, .gp-item a { border-radius: 16px; }
  .gp-frame { clip-path: inset(100% 0 0 0 round 16px); }
  .gp-item.is-in .gp-frame { clip-path: inset(0 0 0 0 round 16px); }
  .gp-more { margin-top: 24px; }
  .gp-cap { border-radius: 16px; padding: 7px 7px 7px 12px; font-size: 11.5px; line-height: 1.25; }
  .gp-cap span { white-space: normal; overflow: visible; }
}

/* ---- filter chips ------------------------------------------------------- */
.gp-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.gp-chip {
  appearance: none; -webkit-appearance: none;
  padding: 12px 22px;
  border: 1px solid #dcdde0;
  border-radius: 999px;
  background: #fff;
  font-family: 'Work Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #4a4c50;
  cursor: pointer;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.gp-chip:hover { border-color: #161617; color: #161617; }
.gp-chip.is-on { border-color: transparent; background: var(--gl-sheen), #161617; color: #fff; }
.gp-chip:focus-visible { outline: 2px solid #5d6167; outline-offset: 3px; }
.gp-item[hidden] { display: none; }
@media (max-width: 575px) {
  .gp-filters { gap: 8px; margin-bottom: 26px; }
  .gp-chip { padding: 10px 15px; font-size: 10.5px; letter-spacing: .12em; }
}
