/* Fit the photographs and their credits into the existing grid. */
.photo-plates {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: clamp(2rem, 6vw, 7rem);
}
.photo-plate { grid-column: span 3; min-width: 0; margin: 0; }
.photo-plate img { display: block; width: 100%; height: auto; }
.photo-plate figcaption,.photo-location {
  padding-top: .65rem;
  color: #525650;
}
.photo-location { margin: 0 var(--margin); }
.photo-plate:only-child { grid-column: 2 / 6; }
.photo-plates:has(figure:nth-child(3)) .photo-plate { grid-column: span 2; }
.photo-diptych .photo-plate:first-child { grid-column: span 4; }
.photo-diptych .photo-plate:last-child { grid-column: span 2; }
.photo-about-facts { gap: 1.5rem; padding-block: 2rem; }
.photo-about-facts .label { color: #525650; }
.cover-about-content p + p { margin-top: .85em; }
.cover-about-content a,.editorial-essay a,.essay-credit a { text-decoration: underline; }
.chapter-text + .chapter-text { margin-top: .85em; }
.essay-credit { margin-top: 1.4em; font-size: .86em; }
[id="contact"] { scroll-margin-top: 5rem; }
@media(max-width:767px) {
  .photo-plates .photo-plate,
  .photo-plates:has(figure:nth-child(3)) .photo-plate {
    grid-column: 1 / -1;
  }
}

.header-links { gap: .45em; }
.photo-header-brand { width: max-content; }
.photo-header-logomark {
  width: 44px;
  aspect-ratio: 411 / 215;
  background: currentColor;
  mask: url("/photo-release-audit-20261120/portfolio-photo/assets/images/marzoug-logo-dark.png") center / contain no-repeat;
}
.photo-chapter-copy { min-width: 0; }
[role="button"]:focus-visible { outline: 2px solid currentColor; outline-offset: .3em; }
button:is(.header-toggler,.header-toggler-close,.footer-scroll):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Use the photograph's own ratio wherever the layout exposes a thumbnail. */
[data-photo-frame] {
  height: 0 !important;
  padding-top: var(--photo-padding) !important;
}
[data-photo-fit] { object-fit: contain !important; }
.card-work > [data-photo-frame] > div:first-child,
.widget-next [data-photo-frame] > div:first-child,
.works-item-image .image,
.fullwidth-image-inner[data-photo-frame] { transform: none !important; }
[data-photo-still] [data-photo-fit] {
  height: 100% !important;
  margin-top: 0 !important;
  transform: none !important;
}

/* The home sequence uses the original scroll triggers and the photos' own proportions. */
.home .lazy.loaded { opacity: 1; transition: opacity .45s ease; }
.home .cover-home-scroll-dark { width: max-content; cursor: pointer; }
.home .cover-home-scroll-dark:hover { color: #111; }
.photo-mobile-start { display: none; }
#wrapper:not([data-photo-intro-ready]) .photo-mobile-start { visibility: hidden; }
[data-photo-intro-complete] [data-photo-home-start] { visibility: hidden; }
.photo-vision-frame { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.photo-vision-frame.active { opacity: 1; }
.vision-title button { cursor: pointer; }
.works-item:is(:hover, :focus-visible) .works-item-title::before {
  transform-origin: 0;
  --tw-scale-x: 100%;
}
c-process .process-item { text-align: left; }
c-process .process-image { transition: opacity .35s ease; }
c-process .process-image img { object-fit: contain; }
c-process > div:has(.process-image) { align-self: start; }
c-process > div:has(.process-image) > div:first-child { height: 0; padding-top: 75%; }
.photo-process-link { display: inline-block; margin-top: 1rem; }
/* Keep the final section and contact block close while retaining the footer reveal. */
.home c-process { padding-bottom: clamp(48px, 5vw, 80px); }
.home footer { height: auto; }
.home footer c-footer {
  flex: none;
  padding-top: clamp(48px, 5vw, 80px);
  padding-bottom: clamp(48px, 5vw, 80px);
}
@media (max-width: 1199px) {
  c-works-grid .works-grid-button {
    position: relative;
    height: auto;
    margin-bottom: 0;
    padding: 1rem var(--margin);
    transform: none !important;
  }
  c-works-grid .works-grid-button + div {
    margin-top: 0;
    padding-top: 2rem;
  }
  [data-photo-grid-opening] .works-grid-image { transform: none !important; }
  .photo-mobile-start {
    display: inline-flex;
    justify-self: start;
    width: max-content;
    padding: .5rem .65rem;
    min-height: 44px;
    align-items: center;
    white-space: nowrap;
    background: #171717;
    color: white;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home .lazy.loaded, .photo-vision-frame, c-process .process-image { transition: none; }
}

.card-work .card-work-term { color: #626863; }
.photo-open { display: block; width: 100%; cursor: zoom-in; }
c-cover-work .photo-open { height: 100%; }
.photo-open:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.photo-viewer[open] {
  position: fixed; inset: 0; margin: 0; box-sizing: border-box;
  width: 100%; max-width: none; height: 100dvh; max-height: none;
  display: grid; grid-template-rows: auto minmax(0,1fr) auto;
  gap: 12px; padding: max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right))
    max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  background: #111; color: #fff; overscroll-behavior: contain; font: inherit;
}
.photo-viewer::backdrop { background: #111; }
.photo-viewer header,.photo-viewer footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-viewer button { min-width: 44px; min-height: 44px; cursor: pointer; color: inherit; font: inherit; }
.photo-viewer button:disabled { opacity: .35; cursor: default; }
.photo-viewer img { display: block; width: 100%; height: 100%; object-fit: contain; touch-action: pan-y pinch-zoom; }
.photo-viewer .photo-viewer-caption { flex: 1; text-align: center; }

.photo-series-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: clamp(36px, 5vw, 72px) var(--margin) 0;
  border-top: 1px solid currentColor;
}
.photo-series-nav a { display: grid; align-content: start; gap: .4em; min-height: 44px; padding: 1em 0; }
.photo-series-nav a[rel="next"] { text-align: end; }
.photo-series-nav span { font-size: max(12px, .85em); color: #555; }
.photo-series-nav strong { font-size: clamp(16px, 2vw, 26px); font-weight: inherit; }
.photo-series-nav a:is(:hover, :focus-visible) strong { text-decoration: underline; }
.photo-series-nav a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
