/* Page changes stay light, and the original artwork is never cropped. */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--paper, #f5f3ee);
  pointer-events: none;
}
.page-transition-card { display: flex; align-items: center; gap: 30px; max-width: 650px; }
.page-transition-card > img { width: 128px; height: 172px; flex-shrink: 0; object-fit: contain; box-shadow: 0 16px 40px #29231b18; }
.page-transition-caption { font-size: 8px; letter-spacing: .16em; color: var(--muted); margin-bottom: 17px; }
.page-transition-title { font-size: clamp(23px, 3vw, 42px); line-height: 1.45; letter-spacing: -.035em; }
.page-transition-brand { margin-top: 10px; font: italic 15px/1.5 var(--serif); color: var(--muted); }
.is-page-leaving .page-transition { pointer-events: auto; }

@media (prefers-reduced-motion: no-preference) {
  .project-page .case-title .entrance-line-content {
    animation-name: case-title-unfold;
    animation-duration: 1.05s;
    animation-delay: .16s;
  }
  .project-page .case-title .entrance-line:nth-child(2) .entrance-line-content { animation-delay: .29s; }
  @keyframes case-title-unfold {
    from { opacity: 0; transform: translateY(80%) rotate(1.2deg); }
    to { opacity: 1; transform: translateY(0) rotate(0); }
  }
  .project-page .case-cover-inner { animation-duration: 1.1s; animation-delay: .38s; }
  /* Internal navigation has one shared fade, without a second title entrance. */
  body.has-project-entry .site-header .wordmark,
  body.has-project-entry .site-header nav,
  body.has-project-entry .case-intro .back-link,
  body.has-project-entry .case-kicker,
  body.has-project-entry .case-title .entrance-line-content,
  body.has-project-entry .case-intro-bottom,
  body.has-project-entry .case-cover-inner { animation: none; }
  .project-page .case-figure.reveal,
  .project-page .chapter-heading.reveal,
  .project-page .next-project.reveal {
    transition: opacity .85s cubic-bezier(.22,1,.36,1), transform 1s cubic-bezier(.22,1,.36,1);
  }
  .project-page .case-figure.will-reveal { transform: translateY(30px) scale(.985); }
  .project-page .chapter-heading.will-reveal,
  .project-page .next-project.will-reveal { transform: translateY(23px); }
  .project-page .case-gallery .case-figure:nth-child(2n) { transition-delay: .1s; }
  .project-page .next-image { transition: transform .7s cubic-bezier(.22,1,.36,1); }
  @media (hover:hover) and (pointer:fine) {
    .project-page .next-project > a:not(.all-work-link):hover .next-image { transform: translateY(-8px) rotate(0); }
  }
}
@media (max-width:700px) {
  .page-transition-card { gap: 20px; }
  .page-transition-card > img { width: 96px; height: 132px; }
  .page-transition-caption { font-size: 7px; margin-bottom: 12px; }
  .page-transition-brand { font-size: 12px; }
}
@media print { .page-transition { display: none!important; } }
