/* V4: photographed work and moving images keep their own proportions. */
.real-portal { background: #e1ded5; }
.portal-photo { display: block; width: 100%; height: 0; min-height: 0; flex: 1 1 0; object-fit: cover; object-position: 50% 50%; transform: none; transform-origin: 50% 56%; }
.real-portal figcaption { position: relative; z-index: 1; flex: 0 0 auto; background: #e1ded5; color: #202224; }
.motion .portal-photo { transform: translateY(var(--media-y, 0px)) scale(var(--media-scale, 1)); will-change: transform; }

.work-visual { isolation: isolate; background: #101112; }
.work-photo, .scene-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.work-panel.has-video .work-visual.has-video { height: auto; aspect-ratio: 16 / 9; align-self: center; }
.motion .work-panel.has-video .work-visual.has-video { max-height: 100%; }
.work-visual.has-video .scene-video { object-fit: contain; }
.media-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(transparent 65%, #0008); pointer-events: none; }
.work-visual .visual-index { z-index: 2; max-width: calc(100% - 90px); color: #f2f1ec; text-shadow: 0 1px 12px #0008; }
.preview-toggle { position: absolute; right: 16px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid #f2f1ecb3; border-radius: 50%; background: #101112c9; color: #f2f1ec; font: 500 18px/1 Body, Arial, sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.preview-toggle:hover { background: #f2f1ec; color: #101112; }
.preview-toggle:focus-visible { outline-color: #f2f1ec; outline-offset: 4px; }
.work-location { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.35; letter-spacing: .025em; }
.work-copy .work-location + h3 { margin-top: 14px; }

.story-media { margin-top: 42px; }
.story-media img, .gallery-grid img { display: block; width: 100%; height: auto; }
.image-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; overflow: hidden; text-align: left; }
.image-open img { transition: transform .45s ease; }
.image-open::after { content: '+'; position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #f2f1ecb3; border-radius: 50%; background: #101112c9; color: #f2f1ec; font: 500 25px/1 Body, Arial, sans-serif; pointer-events: none; }
.image-open:hover img { transform: scale(1.008); }
.image-open:hover::after { background: #f2f1ec; color: #101112; }
.image-open:focus-visible { z-index: 1; outline-offset: 5px; }
.story-media figcaption, .gallery-grid figcaption, .editorial-previews figcaption { position: static; padding-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.5; letter-spacing: .015em; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 30px; margin-top: 36px; }
.gallery-grid figure { min-width: 0; }
.gallery-grid figure.title-graphic { background: #101112; }
.gallery-grid figure.title-graphic .image-open { background: #101112; }
.gallery-grid figure.title-graphic img { object-fit: contain; }
.gallery-grid figure.title-graphic figcaption { padding: 12px 15px 15px; color: #c1c3bd; }
.project-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 25px 0; margin: 36px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.project-facts > div { min-width: 0; }
.project-facts dt { color: var(--muted); font-size: 10px; line-height: 1.4; text-transform: uppercase; letter-spacing: .065em; }
.project-facts dd { font-size: 16px; line-height: 1.4; margin: 10px 0 0; }
.story-text { max-width: 740px; margin-top: 40px; font-size: 18px; line-height: 1.55; }
.story-text h3 { margin-bottom: 18px; font-size: 25px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.story-text p + p { margin-top: 22px; }
.story-text a { text-decoration: underline; text-underline-offset: .2em; }
.story-video { margin-top: 42px; }
.story-video video, .film-grid video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #101112; }
.story-video figcaption { color: var(--muted); font-size: 11px; line-height: 1.5; padding-top: 12px; }
.film-grid { display: grid; grid-template-columns: 1fr; gap: 36px; margin-top: 42px; }
.film-grid > article { min-width: 0; }
.film-grid h3, .film-grid .film-title { font-size: 23px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; margin-top: 19px; }
.film-grid p { font-size: 16px; line-height: 1.5; color: var(--muted); margin-top: 11px; }
.film-grid .work-kind { margin-top: 19px; font-size: 10px; }
.film-grid .work-kind + h3 { margin-top: 9px; }
.approach-portrait { margin-top: 42px; }
.approach-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 45% 45%; }
.approach-portrait figcaption { padding-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.approach-context { max-width: 740px; margin-top: 36px; }
.approach-context p { font-size: 18px; line-height: 1.55; }
.approach-context p + p { margin-top: 22px; }
.editorial-previews { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; align-items: start; margin-top: 42px; }
.editorial-previews figure { min-width: 0; }
.editorial-previews video { display: block; width: 100%; background: #101112; object-fit: contain; }
.editorial-preview-wide video { aspect-ratio: 16 / 9; }
.editorial-preview-tall video { aspect-ratio: 9 / 16; max-height: 500px; }
.podcast-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.podcast-links .pill-link { justify-content: center; }

/* Native dialog remains hidden until the user opens a photograph. */
.image-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 76px 0 0; border: 0; background: #101112; color: #f0eee7; overflow: hidden; overscroll-behavior: contain; }
.image-dialog[open] { display: flex; flex-direction: column; }
.image-dialog::backdrop { background: #101112f5; }
.image-dialog-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; min-height: 76px; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #101112; }
#image-count { font-size: 12px; letter-spacing: .065em; }
.image-dialog .dialog-close { border-color: #f0eee76b; background: #101112; color: #f0eee7; }
.image-dialog .dialog-close:hover { background: #f0eee7; color: #101112; }
.image-viewer-figure { display: flex; flex: 1 1 auto; min-height: 0; width: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 3vw; }
#viewer-photo { display: block; width: auto; height: auto; max-width: 94vw; max-height: calc(100dvh - 195px); object-fit: contain; }
#viewer-caption { max-width: min(80ch, 90vw); color: #c1c3bd; font-size: 11px; line-height: 1.5; text-align: center; }
.image-viewer-nav { display: flex; flex: 0 0 74px; align-items: center; justify-content: center; gap: 22px; padding: 12px 24px 18px; }
.image-viewer-nav button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #f0eee76b; border-radius: 50%; background: transparent; color: #f0eee7; font-size: 22px; line-height: 1; cursor: pointer; }
.image-viewer-nav button:hover { background: #f0eee7; color: #101112; }
.image-viewer-nav button:disabled { opacity: .25; cursor: default; }
.image-dialog button:focus-visible { outline-color: #f0eee7; outline-offset: 4px; }

@media (max-width: 1000px) {
  .work-copy .work-location + h3 { margin-top: 11px; }
  .gallery-grid { gap: 24px; }
  .editorial-previews { gap: 24px; }
}
@media (max-width: 700px) {
  .work-location { font-size: 10px; margin-top: 5px; }
  .motion .work-copy .work-location + h3 { margin-top: 6px; }
  .motion .work-panel { grid-template-rows: minmax(85px, 1fr) auto; }
  .motion .work-copy .pill-link { max-width: calc(100% - 48px); gap: 22px; }
  .preview-toggle { right: 14px; bottom: 12px; }
  .work-visual .visual-index { bottom: 18px; max-width: calc(100% - 85px); }
  .story-media, .story-video, .approach-portrait, .editorial-previews { margin-top: 33px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 27px; margin-top: 27px; }
  .image-open::after { width: 36px; height: 36px; right: 12px; bottom: 12px; font-size: 23px; }
  .project-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; padding: 24px 0; margin-top: 30px; }
  .project-facts > div:last-child { grid-column: 1 / -1; }
  .project-facts dd { font-size: 15px; margin-top: 8px; }
  .story-text { margin-top: 32px; font-size: 17px; }
  .story-text h3 { font-size: 24px; }
  .film-grid { gap: 30px; margin-top: 33px; }
  .film-grid h3, .film-grid .film-title { font-size: 21px; }
  .film-grid p { font-size: 15px; }
  .approach-context { margin-top: 28px; }
  .approach-context p { font-size: 17px; }
  .editorial-previews { grid-template-columns: 1fr; gap: 28px; }
  .editorial-preview-tall { width: min(100%, 300px); margin: 0 auto; }
  .editorial-preview-tall video { max-height: 480px; }
  .podcast-links { gap: 12px; }
  .image-dialog-top { padding-left: 20px; padding-right: 20px; }
  #viewer-photo { max-height: calc(100dvh - 208px); }
  #viewer-caption { font-size: 10px; }
}
@media (max-width: 360px) {
  .motion .work-copy h3 { font-size: 25px; }
  .motion .work-summary { font-size: 14px; }
  .project-facts { grid-template-columns: 1fr; gap: 20px; }
  .project-facts > div:last-child { grid-column: auto; }
  .story-text, .approach-context p { font-size: 16px; }
}
@media (max-width: 700px) and (min-height: 601px) and (max-height: 720px) {
  .motion .work-stage .section-intro h2 { font-size: 25px; }
  .motion .work-selector { margin-bottom: 10px; }
  .motion .work-panel { gap: 12px; grid-template-rows: minmax(70px, 1fr) auto; }
  .motion .work-copy h3 { font-size: 25px; }
  .motion .work-summary { font-size: 14px; margin-top: 9px; }
  .motion .work-copy .pill-link { margin-top: 12px; }
  .motion .work-stage .work-note { margin-top: 10px; padding-top: 9px; }
}
@media (max-height: 600px) {
  .image-dialog { padding-top: 62px; }
  .image-dialog-top { min-height: 62px; padding-top: 9px; padding-bottom: 9px; }
  #viewer-photo { max-height: calc(100dvh - 164px); }
  .image-viewer-figure { gap: 10px; }
  .image-viewer-nav { flex-basis: 62px; padding: 9px 24px; }
}
@media (prefers-reduced-motion: reduce), (max-height: 600px) {
  .motion .portal-photo { transform: none; will-change: auto; }
  .motion .work-copy .pill-link { max-width: none; }
  .motion .work-panel { grid-template-rows: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .image-open img { transition: none; }
  .image-open:hover img { transform: none; }
}
