/* Added pages keep the same gravel, paper, ink and lake palette as the home page. */
.work-page-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 124px) var(--pad) clamp(56px, 7vw, 92px);
}
.work-page-head .step-name { margin-bottom: 16px; }
.work-page-head h1 { font-size: clamp(42px, 6.2vw, 88px); }
.work-page-intro { max-width: 44em; margin-top: 24px; font-size: clamp(19px, 2vw, 23px); }
.work-page-head .hero-actions { margin-top: 30px; }
.work-gallery { padding: 0 var(--pad) clamp(80px, 10vw, 136px); }
.work-gallery > * { max-width: var(--max); margin-inline: auto; }
.work-gallery-bar { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.work-gallery .work-filters { margin: 0 0 24px; }
.gallery-count { padding-top: 12px; color: var(--ink-2); font-family: var(--sans); font-size: 14px; white-space: nowrap; }
.work-grid--full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  grid-auto-flow: row;
  gap: 12px;
}
.work-grid--full li,
.work-grid--full li.w-wide,
.work-grid--full li.w-tall { grid-column: span 1; grid-row: span 1; aspect-ratio: 4 / 3; }
.work-grid--full .photo-open {
  display: block;
  width: 100%; height: 100%;
  padding: 0; border: 0; color: inherit; text-align: left; text-decoration: none;
  background: transparent; cursor: zoom-in;
}
.work-grid--full figure { height: 100%; }
.work-grid--full picture { display: block; width: 100%; height: 100%; }
.work-grid--full img { width: 100%; height: 100%; object-fit: cover; }
.work-grid--full figcaption { max-width: calc(100% - 18px); }
.work-grid--full .photo-open:focus-visible { outline-offset: 4px; }
.work-visit {
  border-top: 1px solid var(--rule);
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 112px) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.work-visit h2 { font-size: clamp(38px, 5vw, 68px); }
.work-visit [data-open-now] {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; font-family: var(--sans); font-size: 17px; font-weight: 600;
}
.work-visit address { display: grid; gap: 8px; font-style: normal; }
.work-visit address > a:first-child { font-size: 20px; line-height: 1.4; text-decoration: none; }
.work-visit .phone-big { margin: 4px 0 12px; }
.work-visit .btn { justify-self: start; }

.photo-viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--ink); color: var(--marker);
}
.photo-viewer::backdrop { background: rgba(14, 16, 18, .94); }
.viewer-shell {
  width: 100%; height: 100%;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(16px, env(safe-area-inset-top)) var(--pad) max(18px, env(safe-area-inset-bottom));
}
.viewer-tools { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-family: var(--sans); }
.viewer-position { color: rgba(245,244,240,.72); font-size: 14px; }
.viewer-close, .viewer-control {
  min-width: 48px; min-height: 48px; padding: 10px 14px;
  border: 1px solid rgba(245,244,240,.65); border-radius: var(--ease-edge);
  background: transparent; color: var(--marker); font: 600 15px var(--sans); cursor: pointer;
}
.viewer-close:hover, .viewer-control:hover { background: var(--marker); color: var(--ink); }
.viewer-stage {
  min-height: 0; display: grid; grid-template-columns: minmax(88px, 1fr) minmax(0, 1000px) minmax(88px, 1fr);
  align-items: center; justify-items: center; gap: 18px;
}
.viewer-image { width: 100%; height: 100%; max-height: calc(100dvh - 150px); object-fit: contain; }
.viewer-caption { min-height: 34px; padding-top: 10px; text-align: center; font-family: var(--sans); font-size: 15px; }

.not-found-strip { height: 200px; overflow: hidden; background: var(--gravel); }
.not-found-strip img { width: 100%; height: 100%; object-fit: cover; }
.not-found-content {
  max-width: 800px; min-height: 420px; margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) var(--pad);
}
.not-found-content h1 { font-size: clamp(38px, 5vw, 68px); }
.not-found-content p { margin-top: 18px; max-width: 30em; }
.not-found-content .hero-actions { margin-top: 28px; }

@media (max-width: 900px) {
  .work-gallery-bar { display: block; }
  .gallery-count { padding: 0 0 20px; }
  .work-grid--full { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-visit { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .work-page-head { padding-top: 60px; }
  .work-page-intro { margin-top: 18px; }
  .work-page-head .hero-actions .btn { flex: 1 1 100%; }
  .work-gallery .work-filters { margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
  .work-grid--full { gap: 8px; }
  .work-grid--full li { aspect-ratio: 1 / 1; }
  .viewer-shell { padding-inline: 12px; }
  .viewer-stage { grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 6px; }
  .viewer-control { min-width: 48px; min-height: 54px; padding: 8px 4px; font-size: 13px; }
  .viewer-image { max-height: calc(100dvh - 190px); }
  .not-found-strip { height: 200px; }
  .not-found-content { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-viewer, .photo-viewer::backdrop { transition: none; }
}
