/* Finesse Media — photography gallery (native <dialog>). Build 20260928-21.
   Sessions layout: every session is a hero photo plus a square grid, and the whole gallery
   scrolls vertically. The photo viewer is a vertical, snap-scrolling feed. */
html { font-variant-emoji: text; }
.gallery-dialog {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #0b0a09; color: #f3ece0;
  display: flex; flex-direction: column; text-align: left;
}
.gallery-dialog:not([open]) { display: none; }
.gallery-dialog p { text-align: left; } /* overrides the lightbox rule dialog p { text-align: center } */
.gallery-dialog::backdrop { background: rgba(0, 0, 0, .85); }
html.gallery-open { overflow: hidden; }

.gallery-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: max(18px, env(safe-area-inset-top)) 5% 16px;
  border-bottom: 1px solid rgba(243, 236, 224, .12);
}
.gallery-head .eyebrow { color: #ddc5a0; font-size: 11px; letter-spacing: .16em; margin: 0 0 6px; }
.gallery-head h2 { font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 48px); line-height: 1; color: #f3ece0; margin: 0; }
.gallery-line { margin: 8px 0 0; font-size: 13px; color: #c7bca9; }
.gallery-close {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(221, 197, 160, .45); background: transparent;
  color: #f3ece0; font-size: 26px; line-height: 1; cursor: pointer;
}
.gallery-close:hover { background: rgba(221, 197, 160, .15); }
.gallery-close:focus-visible, .gallery-back:focus-visible, .gallery-nav:focus-visible { outline: 2px solid #ddc5a0; outline-offset: 3px; }

/* Sessions: the only scroll direction is down */
.gallery-body {
  flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 5% 32px;
}
.gallery-body[hidden] { display: none; }
/* Filter chips (only when a category holds more than one kind of shoot). They wrap, never scroll sideways. */
.g-chips {
  position: sticky; top: 0; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 -5.3%; padding: 14px 5.3% 12px;
  background: rgba(11, 10, 9, .94); border-bottom: 1px solid rgba(243, 236, 224, .08);
  backdrop-filter: blur(8px);
}
.g-chips[hidden] { display: none; }
.g-chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(221, 197, 160, .38); background: transparent; color: #f3ece0;
  font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 7px;
}
.g-chip:hover { background: rgba(221, 197, 160, .12); }
.g-chip[aria-pressed="true"] { background: #ddc5a0; border-color: #ddc5a0; color: #1a1612; }
.g-chip-n { font-size: 11px; opacity: .7; }
.g-chip:focus-visible { outline: 2px solid #ddc5a0; outline-offset: 3px; }
.g-session { padding: 26px 0 10px; }
.g-session + .g-session { border-top: 1px solid rgba(243, 236, 224, .1); margin-top: 18px; }
.g-session-head { margin: 0 0 16px; max-width: 640px; }
.g-eyebrow { margin: 0 0 8px; font-size: 11px; letter-spacing: .16em; color: #ddc5a0; }
.g-session-head h3 { margin: 0; font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.05; color: #f3ece0; }
.g-session-head p:not(.g-eyebrow) { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: #c7bca9; }

.g-session-media { display: flex; flex-direction: column; gap: 8px; }
.g-hero, .g-thumb {
  display: block; width: 100%; padding: 0; border: 0; overflow: hidden;
  background: #1a1612; cursor: zoom-in;
}
.g-hero { border-radius: 8px; }
.g-hero img { display: block; width: 100%; height: auto; max-height: 78svh; object-fit: cover; object-position: center 30%; transition: transform .6s ease; }
.g-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.g-thumb { aspect-ratio: 1 / 1; border-radius: 5px; }
.g-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .5s ease; }
.g-hero:hover img, .g-thumb:hover img { transform: scale(1.03); }
.g-hero:focus-visible, .g-thumb:focus-visible, .g-more:focus-visible { outline: 2px solid #ddc5a0; outline-offset: 3px; }
.g-session.is-collapsed .g-extra { display: none; }
.g-more {
  aspect-ratio: 1 / 1; border-radius: 5px; cursor: pointer;
  border: 1px solid rgba(221, 197, 160, .45); background: #1a1612; color: #f3ece0;
  font: inherit; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.g-more-n { font-family: var(--serif, Georgia, serif); font-size: 28px; line-height: 1; color: #ddc5a0; }
.g-more:hover { background: rgba(221, 197, 160, .12); }

/* Desktop: hero on the left stays in view while its grid scrolls beside it */
@media (min-width: 900px) {
  .g-session-media { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
  .g-hero { position: sticky; top: 16px; }
  .g-hero img { max-height: calc(100dvh - 300px); min-height: 320px; }
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .g-session--all .g-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Viewer: one photo per stop, scroll or swipe up for the next */
.gallery-viewer { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.gallery-viewer[hidden] { display: none; }
.gallery-vbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 5%; }
.gallery-back {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(221, 197, 160, .4); background: rgba(11, 10, 9, .7);
  color: #f3ece0; font: inherit; font-size: 13px; cursor: pointer;
}
.gallery-back:hover { background: rgba(221, 197, 160, .15); }
.gallery-count { margin: 0; font-size: 12px; letter-spacing: .12em; color: #c7bca9; font-variant-numeric: tabular-nums; }
.gallery-feed {
  position: relative; flex: 1; min-height: 0;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
  padding: 0 5%;
}
.gallery-feed:focus { outline: none; }
.gallery-slide {
  margin: 0; height: calc(100% - 56px); padding-bottom: 12px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  scroll-snap-align: start; scroll-snap-stop: always;
}
.gallery-slide:last-child { height: 100%; }
.gallery-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; background: #1a1612; }
.gallery-vnav { position: absolute; right: 20px; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 10px; }
.gallery-nav {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(221, 197, 160, .45); background: rgba(11, 10, 9, .6);
  color: #f3ece0; font-size: 22px; line-height: 1; cursor: pointer;
}
.gallery-nav:hover { background: rgba(221, 197, 160, .18); }
.gallery-hint {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; margin: 0;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  background: rgba(11, 10, 9, .8); border: 1px solid rgba(243, 236, 224, .25);
  font-size: 12px; color: #f3ece0; transition: opacity .4s ease;
}
.gallery-hint.is-gone { opacity: 0; }

.gallery-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 5% max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(243, 236, 224, .12);
}
.gallery-pricing { color: #ddc5a0; font-size: 14px; display: inline-flex; gap: 10px; align-items: center; min-height: 44px; }
.gallery-foot .gold-button { --button-ink: #1a1612; }

@media (max-width: 700px) {
  .gallery-body { padding: 0 16px 24px; }
  .g-chips { margin: 0 -16px; padding: 12px 16px 10px; gap: 6px; }
  .g-chip { min-height: 38px; padding: 0 12px; font-size: 12px; }
  .g-session { padding-top: 22px; }
  .g-grid { gap: 6px; }
  .gallery-vbar { padding: 10px 16px; }
  .gallery-feed { padding: 0 10px; }
  .gallery-vnav { display: none; }
  .gallery-foot { justify-content: center; gap: 4px; padding-top: 10px; }
  .gallery-foot .gold-button { width: 100%; justify-content: center; }
}
@media (hover: none) { .gallery-vnav { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .g-hero img, .g-thumb img, .gallery-hint { transition: none; }
  .gallery-feed { scroll-behavior: auto; }
}

/* Triggers */
button.spot-cta { border: 0; font-family: inherit; cursor: pointer; }
.vf-has-gallery { cursor: zoom-in; }

/* Photography cards: a gallery button nobody can miss */
.photo-actions .gallery-cta {
  flex: 1 0 100%;
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: #ddc5a0;
  color: #1a1612;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.photo-actions .gallery-cta:hover { background: #ebd8b6; transform: translateY(-1px); }
.photo-actions .gallery-cta:focus-visible { outline: 2px solid #f3ece0; outline-offset: 3px; }
.gallery-cta-count { margin-left: auto; font-size: 12px; font-weight: 400; opacity: .75; }

/* Chip on the photo itself */
.vf-gallery-chip {
  position: absolute; z-index: 3; top: 26px; right: 30px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(10, 8, 6, .62); color: #fffcf6;
  font-size: 11px; letter-spacing: .06em;
  border: 1px solid rgba(255, 252, 246, .35);
  pointer-events: none;
}
@media (max-width: 700px) {
  .vf-gallery-chip { top: auto; bottom: 64px; right: 50%; translate: 50% 0; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .photo-actions .gallery-cta { transition: none; } }
