/* The document, navigation and painted scene survive internal navigation.
   First entry keeps the existing animations; only routed entries use this fade. */
.route-scene-underlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.route-scene-underlay[hidden] { display: none; }
html[data-soft-navigation] body,
html[data-soft-navigation] .cinematic-preview { background: transparent; }

html[data-soft-navigation] :is(.site-brand, .works-brand, .site-nav, .works-nav, .site-nav > a, .works-nav > a, .site-menu-toggle, .site-menu-icon,
  .animate-blur-fade-up, .works-copy, .works-filter, .works-filters, .works-card,
  .profile-intro > *, .profile-section-heading, .profile-card, .profile-card-heading, .profile-card-body,
  .contact-intro, .contact-card, .contact-card > *, .projects-intro, .projects-toolbar, .projects-filters, .projects-library-note,
  .project-video, .project-caption, .project-external, .project-action, .project-play > svg, .project-placeholder, .project-placeholder > *,
  .notes-intro, .notes-toolbar, .notes-filters, .notes-library-note, .notes-empty, .notes-empty > *, .room-pin, .workshop-instruction) {
  animation: none;
}
html[data-soft-navigation] :is(.hero-media, .works-scene, .projects-scene, .notes-scene, .profile-scene, .contact-scene,
  .cinematic-preview > .blur-top, .cinematic-preview > .blur-bottom) {
  animation: none;
  opacity: 1;
  transition: opacity 360ms ease-out;
}
html[data-route-phase="mounting"] :is(.hero-media, .works-scene, .projects-scene, .notes-scene, .profile-scene, .contact-scene,
  .cinematic-preview > .blur-top, .cinematic-preview > .blur-bottom) { opacity: 0; }

/* Fade the glass surfaces themselves, preserving their background sampling. */
html[data-soft-navigation] :is(.works-copy, .works-filters, .works-card, .works-footer,
  .profile-intro, .profile-section-heading, .profile-card, .profile-footer,
  .contact-intro, .contact-card, .contact-footer,
  .projects-intro, .projects-toolbar, .project-video, .project-placeholder, .projects-footer,
  .notes-intro, .notes-toolbar, .notes-empty, .notes-footer,
  .workshop-route, .hero-description, .workshop-instruction, .hero-caption) {
  transition: opacity 180ms ease-out;
}
html:is([data-route-phase="leaving"], [data-route-phase="mounting"]) :is(.works-copy, .works-filters, .works-card, .works-footer,
  .profile-intro, .profile-section-heading, .profile-card, .profile-footer,
  .contact-intro, .contact-card, .contact-footer,
  .projects-intro, .projects-toolbar, .project-video, .project-placeholder, .projects-footer,
  .notes-intro, .notes-toolbar, .notes-empty, .notes-footer,
  .workshop-route, .hero-description, .workshop-instruction, .hero-caption) {
  opacity: 0;
  pointer-events: none;
}
html[data-soft-navigation] :is(.works-footer, .projects-footer, .notes-footer, .profile-footer, .contact-footer) { visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  html[data-soft-navigation] .works-stack[data-filter-motion="play"] .works-card {
    animation: glassFadeUp 1s ease-out var(--entry-delay, 0ms) backwards;
  }
  html[data-soft-navigation] .projects-grid[data-filter-motion="play"] :is(.project-video, .project-placeholder) {
    animation: glassFadeUp 1s ease-out var(--entry-delay, 0ms) backwards;
  }
  html[data-soft-navigation] .projects-grid[data-filter-motion="play"] :is(.project-caption, .project-external, .project-action, .project-play > svg, .project-placeholder > *) {
    animation: contentSharpen 1s ease-out var(--entry-delay, 0ms) backwards;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-soft-navigation] :is(.hero-media, .works-scene, .projects-scene, .notes-scene, .profile-scene, .contact-scene,
    .cinematic-preview > .blur-top, .cinematic-preview > .blur-bottom,
    .works-copy, .works-filters, .works-card, .works-footer, .profile-intro, .profile-section-heading, .profile-card, .profile-footer,
    .contact-intro, .contact-card, .contact-footer, .projects-intro, .projects-toolbar, .project-video, .project-placeholder, .projects-footer,
    .notes-intro, .notes-toolbar, .notes-empty, .notes-footer, .workshop-route, .hero-description, .workshop-instruction, .hero-caption) { transition: none; }
}
