/* Client gallery. Builds on site.css (tokens, type, buttons). */
:root { --gbar-h: 60px; }
/* scrollbar-gutter keeps the scrollbar's space reserved even while scrolling is locked
   (PIN screen, full-screen photo), so the page never widens and shifts sideways. */
html { scroll-padding-top: calc(var(--gbar-h) + 8px); scrollbar-gutter: stable; }
html.is-locked { overflow: hidden; }   /* lock on <html> so scrollbar-gutter keeps its space */

[data-icon] { display: inline-flex; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.studio.has-logo { display: flex; align-items: center; }
.studio__logo { display: block; height: 30px; width: auto; max-width: 240px; object-fit: contain; object-position: left center; }
@media (max-width: 560px) { .studio__logo { height: 24px; max-width: 160px; } }
.studio { font-weight: 800; font-stretch: 118%; font-size: 14px; letter-spacing: .04em; white-space: nowrap; text-transform: uppercase; }
.gtitle {
  font-weight: 800; font-stretch: 112%;
  font-size: clamp(52px, 11vw, 188px);
  line-height: .88; letter-spacing: -.045em;
  text-transform: uppercase;
}

/* Small square-ish icon buttons */
.ibtn {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: inline-grid; place-items: center;
  transition: background .15s ease, transform .12s ease;
}
.ibtn:hover { background: var(--faint); }
.ibtn:active { transform: scale(.94); }
.ibtn[aria-pressed="true"] { color: var(--accent); }
.ibtn[aria-pressed="true"] svg path { fill: currentColor; }

/* ===== PIN gate ===== */
.gate {
  position: fixed; inset: 0; z-index: 100;
  background: var(--white);
  display: flex; flex-direction: column; overflow-y: auto;
}
.gate[hidden] { display: none; }
.gate__top { width: 100%; height: var(--gbar-h); display: flex; align-items: center; border-bottom: 1px solid var(--black); }
.gate__body { width: 100%; margin: auto; padding-top: 48px; padding-bottom: 64px; }
.gate__body .gtitle { margin: 14px 0 40px; }
.gate__help { display: block; font-size: 15px; margin-bottom: 14px; }
.pin-boxes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pin-boxes input {
  width: 64px; height: 72px;
  border: 1px solid var(--black); border-radius: var(--radius);
  font: 800 32px var(--font); text-align: center; color: var(--black); background: var(--white);
}
.pin-boxes input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pin-boxes .btn { height: 72px; margin-left: 8px; padding: 0 28px; }
.gate__error { min-height: 22px; margin: 12px 0 4px; color: var(--accent); font-weight: 600; font-size: 14px; }

/* ===== Sticky bar ===== */
.gbar { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--black); }
.gbar__inner { height: var(--gbar-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.gnav { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; font-size: 13px; }
.gnav::-webkit-scrollbar { display: none; }
.gnav { position: relative; }
.gnav a { white-space: nowrap; padding: 6px 0; color: var(--grey); font-weight: 600; transition: color .2s ease; }
.gnav a:hover { color: var(--black); }
.gnav a.is-on { color: var(--black); }
/* Orange bar under the current section; slides from one to the next */
.gnav::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent);
  width: var(--bar-w, 0); transform: translateX(var(--bar-x, 0)); opacity: 0;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), width .35s cubic-bezier(.2, .7, .2, 1), opacity .2s ease;
  pointer-events: none;
}
.gnav.has-on::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .gnav a, .gnav::after { transition: none; } }
.gbar__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.gbar__actions .btn { gap: 8px; }
.gfav {
  height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--black); border-radius: var(--radius);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.gfav:hover { background: var(--faint); }
.gfav:active { transform: scale(.97); }
.gfav svg path { fill: var(--accent); stroke: var(--accent); }
.gfav[aria-pressed="true"] { background: var(--black); color: var(--white); }

/* ===== Title + note ===== */
.ghead { padding: 48px 0 8px; }
.ghead__meta { color: var(--grey); }
.ghead .gtitle { margin: 14px 0 40px; }
.ghead__row {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter);
  border-top: 1px solid var(--black); padding-top: 20px;
}
.ghead__label { grid-column: 1 / 4; padding-top: 4px; }
.note { grid-column: 4 / 10; font-size: 19px; line-height: 1.5; max-width: 60ch; }
.note__sign { margin-top: 12px; font-weight: 700; font-size: 15px; }
.note__sign::before { content: "— "; color: var(--accent); }
.facts { grid-column: 10 / 13; font-size: 13px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--faint); }
.facts div:first-child { padding-top: 4px; }
.facts dt { color: var(--grey); }
.facts dd { font-weight: 600; text-align: right; }

/* ===== Sections ===== */
.gsec { margin-top: 72px; border-top: 1px solid var(--black); padding-top: 18px; }
.gsec__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.gsec__head h2 { font-weight: 800; font-stretch: 108%; font-size: clamp(28px, 3.4vw, 48px); line-height: 1; letter-spacing: -.03em; }
.gsec__count { margin-left: auto; color: var(--grey); font-size: 13px; }

/* Mixed-layout rows */
.prow { display: grid; gap: 8px; margin-bottom: 8px; }
.prow--hero  { grid-template-columns: 1fr; }
.prow--pair  { grid-template-columns: 1fr 1fr; }
.prow--trio  { grid-template-columns: repeat(3, 1fr); }
.prow--wide-left  { grid-template-columns: 2fr 1fr; }
.prow--wide-right { grid-template-columns: 1fr 2fr; }
.prow--hero .ph { aspect-ratio: 16 / 9; }
.prow--pair .ph { aspect-ratio: 1 / 1; }
.prow--trio .ph { aspect-ratio: 4 / 5; }
.prow--wide-left .ph:first-child, .prow--wide-right .ph:last-child { aspect-ratio: 3 / 2; }

.ph { position: relative; overflow: hidden; background: var(--faint); cursor: zoom-in; }
/* Watermark over photos (the gallery's setting) */
.has-wm .ph { container-type: inline-size; }
.has-wm .glb__stage { container-type: size; }
.has-wm .ph img, .has-wm .glb__stage img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 1; }
.wm b { font-weight: 800; font-stretch: 118%; font-size: clamp(11px, 6.5cqw, 72px); letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.5); text-shadow: 0 1px 4px rgba(0,0,0,.3); text-align: center; padding: 0 8%; line-height: 1.1; }
.glb__stage .wm b { font-size: clamp(16px, 6cqmin, 88px); }
.wm img { width: 32%; max-width: 360px; opacity: .5; filter: drop-shadow(0 1px 3px rgba(0,0,0,.3)); }
.glb__stage .wm img { width: min(32cqmin, 360px); }
.ph img { position: absolute; inset: 0; }
.ph__fav {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); color: var(--black);
  opacity: 0; transition: transform .12s ease;
}
.ph__fav:active { transform: scale(.9); }
.ph:hover .ph__fav, .ph:focus-within .ph__fav, .ph.is-fav .ph__fav { opacity: 1; }
.ph.is-fav .ph__fav svg path { fill: var(--accent); stroke: var(--accent); }
@media (hover: none) { .ph__fav { opacity: 1; } }

.gempty { padding: 80px 0; }
.gempty h2 { font-weight: 800; font-stretch: 108%; font-size: clamp(28px, 3.4vw, 48px); letter-spacing: -.03em; }
.gempty p { margin: 8px 0 20px; color: var(--grey); }

/* ===== Footer ===== */
.gfoot {
  margin-top: 88px; padding-top: 20px; padding-bottom: 32px;
  border-top: 1px solid var(--black);
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--grey);
}
.gfoot strong { color: var(--black); font-weight: 600; }
.gfoot a:hover { color: var(--black); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* ===== Lightbox ===== */
.glb {
  position: fixed; inset: 0; z-index: 50;
  background: var(--white);
  display: grid; grid-template-rows: 60px 1fr 48px;
}
.glb[hidden] { display: none; }
.glb__top { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 var(--pad); border-bottom: 1px solid var(--black); }
.glb__actions { display: flex; gap: 4px; }
/* The photo box fills the stage (minus room for the arrows) and the photo is scaled to fit inside it */
.glb__stage { position: relative; min-height: 0; overflow: hidden; }
.glb__stage img, .glb__stage video {
  position: absolute; top: 24px; left: 80px;
  width: calc(100% - 160px); height: calc(100% - 48px);
  object-fit: contain; background: none; user-select: none; -webkit-user-drag: none;
}
/* Temporary copy of the photo used for the open/close zoom */
.glb__ghost { position: fixed; z-index: 55; object-fit: cover; pointer-events: none; background: none; }
.glb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.glb__nav:active { transform: translateY(-50%) scale(.94); }
.glb__nav svg { width: 24px; height: 24px; }
.glb__nav--prev { left: 16px; }
.glb__nav--next { right: 16px; }
.glb__cap { align-self: center; text-align: center; color: var(--grey); }

/* ===== Download dialog ===== */
.gdlg {
  width: min(460px, calc(100vw - 32px)); padding: 0; margin: auto;
  border: 1px solid var(--black); border-radius: 0;
  background: var(--white); color: var(--black);
}
.gdlg::backdrop { background: rgba(0,0,0,.5); }
.gdlg form { padding: 20px 24px 24px; }
.gdlg__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gdlg h2 { font-weight: 800; font-stretch: 108%; font-size: 30px; letter-spacing: -.03em; }
.gdlg fieldset { border: 0; display: grid; gap: 8px; margin-bottom: 18px; }
.gdlg legend { color: var(--grey); margin-bottom: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border: 1px solid var(--faint); border-radius: var(--radius); cursor: pointer;
}
.opt:hover { border-color: #bdbdbd; }
.opt:has(input:checked) { border-color: var(--black); }
.opt:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.opt input { accent-color: var(--black); margin: 0; }
.opt span { display: flex; flex-direction: column; line-height: 1.3; }
.opt b { font-size: 14px; font-weight: 600; }
.opt small { font-size: 12px; color: var(--grey); }
.gdlg__foot { display: flex; justify-content: flex-end; gap: 8px; }
.gdlg--wide { width: min(560px, calc(100vw - 32px)); }
.gdlg__lede { font-size: 14px; color: var(--grey); margin-bottom: 16px; }
.gdlg__lede b { color: var(--black); font-weight: 600; }

/* Outlined icon button (share) */
.ibtn--line { width: 38px; height: 38px; border: 1px solid var(--black); }

/* ===== Share dialog ===== */
.sharebox { display: flex; border: 1px solid var(--black); border-radius: var(--radius); overflow: hidden; }
.sharebox input {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px;
  border: 0; background: none; font: 500 13px var(--font); color: var(--black);
}
.sharebox input:focus { outline: none; background: #fafafa; }
.sharebox__pin { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-left: 1px solid var(--faint); }
.sharebox__pin .label { color: var(--grey); font-size: 11px; }
.sharebox__pin b { font-size: 15px; font-weight: 800; letter-spacing: .12em; }
.check { display: flex; align-items: center; gap: 8px; margin: 14px 0 20px; font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--black); width: 16px; height: 16px; margin: 0; }

/* ===== Send favorites ===== */
.sendbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 12px 12px 12px 16px; margin-bottom: 16px;
  border: 1px solid var(--black); border-radius: var(--radius); font-size: 14px;
}
.sendbar p { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.sendbar b { font-weight: 700; }
.sendbar .btn { flex: none; }
.sendbar--changed { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sendbar__check {
  display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 4px;
  border-radius: 50%; background: var(--accent); color: var(--black);
}
.sendbar__check svg { width: 13px; height: 13px; stroke-width: 2.4; }

.sendthumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: 20px; }
.sendthumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--faint); }
.sendthumb img { position: absolute; inset: 0; }
.sendthumb--more { display: grid; place-items: center; font-size: 13px; font-weight: 700; }

.field { display: block; margin-bottom: 20px; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.field__top .label { color: var(--grey); }
.field__count { font-size: 12px; color: var(--grey); font-variant-numeric: tabular-nums; }
.field__count.is-near { color: var(--accent); font-weight: 600; }
.field textarea {
  display: block; width: 100%; min-height: 112px; padding: 12px;
  border: 1px solid #c4c4c4; border-radius: var(--radius);
  font: 400 15px/1.5 var(--font); color: var(--black); resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 1px var(--black); }
.field textarea::placeholder { color: #9a9a9a; }

/* ===== Toast ===== */
.gtoast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: var(--black); color: var(--white);
  padding: 12px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 500;
  display: none;
}
.gtoast.is-on { display: block; }

/* ===== Tablet ===== */
@media (max-width: 1000px) {
  .gbar__inner { grid-template-columns: auto 1fr auto; }
  .gnav { justify-content: center; }
  .ghead__label { grid-column: 1 / -1; padding-bottom: 10px; }
  .note { grid-column: 1 / 8; }
  .facts { grid-column: 9 / 13; }
}

/* ===== Phone ===== */
@media (max-width: 720px) {
  :root { --gbar-h: 100px; }
  .gate__top { height: 56px; }
  .pin-boxes input { width: 56px; height: 64px; font-size: 28px; }
  .pin-boxes .btn { height: 52px; margin: 8px 0 0; flex-basis: 100%; }

  .gbar__inner { height: auto; padding-top: 10px; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .gbar__inner .studio { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gnav { grid-column: 1 / -1; order: 3; justify-content: flex-start; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 6px; }
  .hide-sm { display: none; }
  .gbar__actions .btn { width: 38px; padding: 0; }
  .gbar__actions { gap: 6px; }

  .sendbar { flex-direction: column; align-items: stretch; padding: 14px; }
  .sendbar .btn { width: 100%; }
  .sendthumbs { grid-template-columns: repeat(4, 1fr); }
  .sharebox__pin { padding: 0 10px; }

  .ghead { padding-top: 28px; }
  .ghead .gtitle { margin-bottom: 28px; }
  .note { grid-column: 1 / -1; font-size: 17px; }
  .facts { grid-column: 1 / -1; margin-top: 24px; }

  .gsec { margin-top: 48px; }
  .prow { gap: 4px; margin-bottom: 4px; }
  .ph__fav { width: 32px; height: 32px; right: 6px; bottom: 6px; }
  .ph__fav svg { width: 16px; height: 16px; }

  .glb { grid-template-rows: 56px 1fr 44px; }
  .glb__stage img, .glb__stage video { top: 0; left: 0; width: 100%; height: 100%; }
  .glb__nav { display: none; }   /* swipe instead */
  .gfoot { margin-top: 56px; }
}

/* ===== Videos ===== */
.ph--video { cursor: pointer; }
.ph__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); color: var(--black); pointer-events: none; transition: transform .15s ease;
}
.ph__play svg { width: 26px; height: 26px; margin-left: 3px; }
.ph--video:hover .ph__play { transform: translate(-50%, -50%) scale(1.06); }
.ph__dur {
  position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border-radius: var(--radius);
  background: var(--white); color: var(--black); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  pointer-events: none; max-width: calc(100% - 70px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.glb__stage video { background: none; outline: none; }
@media (max-width: 720px) {
  .ph__play { width: 48px; height: 48px; }
  .ph__play svg { width: 20px; height: 20px; }
  .ph__dur { left: 6px; bottom: 6px; font-size: 11px; padding: 4px 7px; }
}
@media (prefers-reduced-motion: reduce) { .ph__play { transition: none; } }
.gmissing { padding-top: 15vh; padding-bottom: 15vh; display: grid; gap: 16px; } .gmissing p:last-child { color: var(--grey); max-width: 44ch; }

/* ===== Per-photo download + ZIP progress ===== */
.ph__dl {
  position: absolute; right: 56px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); color: var(--black);
  opacity: 0; transition: transform .12s ease;
}
.ph__dl:active { transform: scale(.9); }
.ph:hover .ph__dl, .ph:focus-within .ph__dl { opacity: 1; }
@media (hover: none) { .ph__dl { display: none; } }   /* phones: download from the photo view */

.gzip {
  position: fixed; right: 24px; bottom: 24px; z-index: 61; width: min(360px, calc(100vw - 32px));
  background: var(--black); color: var(--white); border-radius: var(--radius);
  padding: 14px 44px 16px 16px; font-size: 13px; font-weight: 500;
}
.gzip[hidden] { display: none; }
.gzip__text { display: block; margin-bottom: 10px; }
.gzip__track { display: block; height: 3px; background: rgba(255,255,255,.2); }
.gzip__bar { display: block; height: 100%; width: 0; background: var(--accent); }
.gzip__x { position: absolute; top: 8px; right: 10px; color: inherit; font-size: 20px; line-height: 1; padding: 4px; }
@media (max-width: 720px) { .gzip { right: 16px; bottom: 16px; } }

/* Touch polish: bigger tap areas without bigger visuals, and a hint that section tabs scroll */
.ph__fav::after { content: ''; position: absolute; inset: -8px; }
@media (hover: none), (max-width: 700px) {
  .gnav a { padding: 12px 0; }
  .gnav.is-scrollable { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .gnav.is-scrollable.is-end { -webkit-mask-image: none; mask-image: none; }
}

/* Phone "Save to Photos" prompt, shown when the share sheet needs one more tap */
.savebar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 200; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #000; color: #fff; border-radius: 6px; font-size: 14px; }
.savebar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.savebar button { font: inherit; font-weight: 700; border: 0; border-radius: 6px; padding: 10px 14px; background: #ff4f00; color: #fff; }
.savebar .savebar__x { background: transparent; padding: 10px; font-weight: 400; }

/* Report link and dialog */
.gfoot__report { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.gfoot__report:hover { color: var(--black); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.rpt__opts { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; }
.rpt__opts legend { margin-bottom: 8px; }
.rpt__opts label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line, #ddd); border-radius: 6px; cursor: pointer; font-size: 14px; }
.rpt__opts label:has(input:checked) { border-color: var(--black, #000); }
.rpt__opts input { accent-color: #ff4f00; margin: 0; }
.rpt__warn { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid #ff4f00; background: #fff4ee; font-size: 13px; }
.rpt__email { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: 6px; }
.rpt__fine { font-size: 12px; color: var(--grey, #777); margin: 0 0 8px; }

/* Download dialog: where to save */
.dest { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt--dest > span { display: grid; gap: 2px; }
.dest__ic { width: 22px; height: 22px; margin-bottom: 6px; display: block; }
.dest__ic svg { width: 22px; height: 22px; display: block; }
.dest__note { margin-top: 10px; font-size: 13px; color: #6b6b6b; }
.gzip.is-google .gzip__text a { color: inherit; text-decoration: underline; font-weight: 700; }
@media (max-width: 420px) { .dest { grid-template-columns: 1fr; } }

/* Email step on the gate */
.egate__row { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.egate__row input { flex: 1 1 240px; height: 60px; padding: 0 18px; border: 1px solid var(--black); border-radius: var(--radius); font: 500 18px var(--font); background: var(--white); color: var(--black); }
.egate__row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.egate__row .btn { height: 60px; }
.egate__fine { max-width: 560px; font-size: 13px; color: var(--grey); }
.egate__skip { margin-left: 6px; padding: 0; background: none; border: 0; font: inherit; font-weight: 700; color: var(--black); text-decoration: underline; cursor: pointer; }
@media (max-width: 520px) { .egate__row .btn { flex: 1 1 100%; } }
