/* Motion enhances a fully visible, usable page. The script opts elements in. */
.motion-reveal {
  opacity: 0;
  translate: 0 14px;
  transition: opacity 600ms cubic-bezier(.16, 1, .3, 1),
              translate 600ms cubic-bezier(.16, 1, .3, 1);
}
.project-card.motion-reveal {
  transition: opacity 600ms cubic-bezier(.16, 1, .3, 1),
              translate 600ms cubic-bezier(.16, 1, .3, 1),
              box-shadow 250ms ease, transform 250ms ease;
}
.motion-reveal.is-revealed,
.motion-reveal:focus-within {
  opacity: 1;
  translate: 0 0;
}
.motion-reveal:focus-within { transition: none !important; }
.project-card.motion-reveal:nth-child(even),
.film.motion-reveal:nth-child(even) {
  transition-delay: 55ms, 55ms, 0ms, 0ms;
}
.parallax-layer { translate: 0 var(--parallax-y, 0px); }
.parallax-layer.is-parallax-active { will-change: translate; }

@media (max-width: 899px), (hover: none), (pointer: coarse) {
  .motion-reveal { translate: 0 6px; transition-duration: 360ms; }
  .motion-reveal.is-revealed,
  .motion-reveal:focus-within { translate: 0 0; }
  .project-card.motion-reveal { transition-duration: 360ms, 360ms, 250ms, 250ms; }
  .project-card.motion-reveal:nth-child(even),
  .film.motion-reveal:nth-child(even) { transition-delay: 0ms; }
  .parallax-layer { translate: none; will-change: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-reveal { opacity: 1 !important; translate: none !important; transition: none !important; }
  .parallax-layer { translate: none !important; will-change: auto !important; }
  .project-visual:hover img { transform: none; }
  .agentic-visual > img,
  .agentic-visual:hover > img { transform: none; }
}
@media print {
  .motion-reveal { opacity: 1 !important; translate: none !important; transition: none !important; }
  .parallax-layer { translate: none !important; will-change: auto !important; }
}

/* Brief entrances preserve readable, stationary page content. */
@media (prefers-reduced-motion: no-preference) {
  .portrait-frame { animation: portrait-enter 550ms cubic-bezier(.16,1,.3,1) both; }
  dialog[open] { animation: project-enter 190ms cubic-bezier(.16,1,.3,1); }
  dialog[open]::backdrop { animation: backdrop-enter 190ms ease-out; }
}
@keyframes portrait-enter { from { opacity:.55; transform:translateY(9px); } to { opacity:1; transform:translateY(0); } }
@keyframes project-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes backdrop-enter { from { opacity:0; } to { opacity:1; } }
