/* Styles for individual picture pages (public/works/NNNN.html). */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.4s;
  animation-timing-function: ease-in-out;
}

.site-header {
  view-transition-name: site-header;
}

::view-transition-old(site-header),
::view-transition-new(site-header) {
  animation: none;
}

.work-wrap > h1 {
  view-transition-name: work-title;
  font-size: 31px;
  line-height: 1.25;
  margin: 0 0 32px;
}

.work-nav {
  view-transition-name: work-nav-count;
}

.work-facts {
  view-transition-name: work-facts;
}

@keyframes work-text-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes work-text-fade-in {
  from {
    opacity: 0;
  }
}

::view-transition-old(work-title),
::view-transition-old(work-nav-count),
::view-transition-old(work-facts) {
  animation: work-text-fade-out 0.15s ease-in-out both;
  object-fit: none;
  object-position: left top;
}

::view-transition-new(work-title),
::view-transition-new(work-nav-count),
::view-transition-new(work-facts) {
  animation: work-text-fade-in 0.25s ease-in-out 0.15s both;
  object-fit: none;
  object-position: left top;
}

::view-transition-group(work-title),
::view-transition-group(work-nav-count),
::view-transition-group(work-facts) {
  animation-duration: 0s;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

.work-body,
.work-body *,
.work-body *::before,
.work-body *::after {
  box-sizing: border-box;
}

.work-body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: 'Inter', sans-serif;
}

.work-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 64px;
}

.work-layout {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.work-picture-col {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 62%;
}

.work-picture-col img {
  display: block;
  max-width: 100%;
  max-height: max(420px, calc(100vh - 400px));
  width: auto;
  height: auto;
  cursor: default;
}

#work-main-pic {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M8 16 H23 M17 10 L23 16 L17 22" fill="none" stroke="white" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 16 H23 M17 10 L23 16 L17 22" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') 16 16, pointer;
}

.work-credit {
  font-size: 0.9rem;
  color: #555;
  margin: 20px 0 0;
}

.work-side {
  flex: 0 0 280px;
  width: 280px;
}

.work-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
}

.work-nav-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555;
  text-decoration: none;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.work-nav-arrow::before {
  content: '';
  position: absolute;
  inset: -12px;
}

.work-nav-arrow:hover {
  color: #111;
}

.work-nav-arrow:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

@media (hover: hover) {
  #work-prev.work-nav-arrow:hover {
    transform: translateX(-3px);
  }

  #work-next.work-nav-arrow:hover {
    transform: translateX(3px);
  }
}

.work-nav-count {
  font-size: 14px;
  color: #555;
  letter-spacing: 0.02em;
}

.work-facts dl {
  margin: 0;
}

.work-fact {
  margin: 0 0 32px;
}

.work-fact-label {
  display: block;
  font-size: 14px;
  color: #555;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.work-fact-value {
  display: block;
  font-size: 15px;
  color: #111;
  margin: 0;
}

.work-fact-value a {
  color: inherit;
  text-decoration: none;
}

.work-fact-value a:hover {
  text-decoration: underline;
}

.work-rows {
  width: 100%;
  margin-top: 48px;
}

.work-row {
  border-top: 1px solid #dddddd;
  padding-top: 16px;
  margin-top: 32px;
}

.work-row:first-child {
  margin-top: 0;
}

.work-row-label {
  font-size: 0.875rem;
  color: #555;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.work-row-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.work-row-track::-webkit-scrollbar {
  display: none;
}

.work-tile {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}

.work-tile-pic {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  height: 280px;
}

.work-tile-imgwrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.work-tile img {
  display: block;
  height: 280px;
  width: auto;
  max-width: 560px;
  object-fit: contain;
  object-position: bottom;
  transition: opacity 0.2s ease;
}

.work-tile:hover img {
  opacity: 0.85;
}

.work-tile-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .work-tile[data-title]:hover .work-tile-veil {
    opacity: 1;
  }
}

.work-tile-veil-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #fff;
  text-align: center;
}

.work-tile-caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 0;
  min-width: 100%;
  font-size: 15px;
  color: #111;
  margin-top: 10px;
}

.work-tile-catnum {
  display: block;
  width: 0;
  min-width: 100%;
  font-size: 1rem;
  color: #555;
  margin-top: 10px;
}

.work-row-hairline {
  display: none;
}

@media (min-width: 701px) {
  .work-row-hairline:not(.wrh-hidden) {
    display: block;
    position: relative;
    height: 24px;
    margin-top: 4px;
    cursor: grab;
  }

  .work-row-hairline:not(.wrh-hidden).wrh-dragging {
    cursor: grabbing;
  }
}

.work-row-hairline-track {
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 10px;
  background: #d0d0d0;
}

.work-row-hairline-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 10px;
  background: #555;
}

.work-row-hairline-thumb:hover,
.work-row-hairline.wrh-dragging .work-row-hairline-thumb {
  background: #333;
}

@media (max-width: 700px) {
  .work-row-label {
    margin: 0 0 12px;
  }

  .work-row-track {
    gap: 16px;
  }

  .work-tile-pic {
    height: 180px;
  }

  .work-tile img {
    height: 180px;
    max-width: 320px;
  }
}

.work-fullscreen-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 32px 0 0;
  padding: 12px 20px;
  border: 1px solid #111;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #111;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.work-play-icon {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.work-fullscreen-link:hover,
.work-fullscreen-link:focus-visible {
  background: #111;
  color: #fff;
  cursor: pointer;
}

.work-fullscreen-link:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.work-fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.work-fs-overlay[hidden] {
  display: none;
}

.work-fs-imgwrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-fs-img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transform-origin: 50% 50%;
  transition: transform 0.2s ease, opacity 1.5s ease;
  opacity: 1;
  z-index: 1;
}

.work-fs-img.work-fs-back {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.work-fs-img.work-fs-zoomed {
  cursor: zoom-out;
}

@media (prefers-reduced-motion: reduce) {
  .work-fs-img {
    transition: none;
  }
}

.work-fs-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.work-fs-close:hover,
.work-fs-close:focus-visible {
  opacity: 1;
}

.work-fs-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.work-fs-overlay.work-fs-controls-hidden {
  cursor: none;
}

.work-fs-overlay.work-fs-controls-hidden .work-fs-close {
  opacity: 0;
  pointer-events: none;
}

.work-fs-overlay.work-fs-controls-hidden .work-fs-img {
  cursor: none;
}

@media (max-width: 800px) {
  .work-wrap {
    padding: 24px 16px;
  }

  .work-wrap > h1 {
    font-size: 22px;
    line-height: 1.25;
    margin: 0 0 20px;
  }

  .work-layout {
    flex-direction: column;
  }

  .work-picture-col {
    max-width: 100%;
    order: 1;
  }

  .work-picture-col img {
    max-width: 100%;
    max-height: none;
    width: 100%;
  }

  .work-nav {
    order: 2;
    margin: 16px 0;
    justify-content: center;
  }

  .work-nav-arrow {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }

  .work-nav-arrow:hover {
    transform: none;
  }

  .work-side {
    order: 3;
    width: 100%;
    flex-basis: auto;
  }
}

/* Gallery-grid tile captions: catalogue number always shown, real title
   revealed on hover (desktop / hover-capable pointers only). */

.gallery-tile-imgwrap {
  position: relative;
  display: block;
  line-height: 0;
}

.gallery-tile-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  text-align: center;
}

@media (hover: hover) {
  .gallery-item:hover .gallery-tile-veil {
    opacity: 1;
  }
}

.gallery-tile-veil-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.35;
  color: #fff;
}

.gallery-tile-catnum {
  display: block;
  margin: 8px 2px 0;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: rgba(232, 224, 214, 0.6);
}

.gallery-words {
  max-width: 640px;
  margin: 24px 0 32px max(32px, calc((100vw - 1400px) / 2 + 32px));
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: rgba(232, 224, 214, 0.6);
}
