/* Gallery motion inspired by 21st.dev reveal and animated-link patterns. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes gallery-enter {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes gallery-image-reveal {
    from { clip-path: inset(0 0 14% 0); opacity: .72; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
  }
  .hero-copy > *, .portfolio-hero .wrap > *, .article-header > * {
    animation: gallery-enter .72s both cubic-bezier(.2,.75,.2,1);
  }
  .hero-copy > :nth-child(2), .portfolio-hero .wrap > :nth-child(2), .article-header > :nth-child(2) { animation-delay: .1s; }
  .hero-copy > :nth-child(3), .portfolio-hero .wrap > :nth-child(3), .article-header > :nth-child(3) { animation-delay: .2s; }
  .hero-copy > :nth-child(4), .portfolio-hero .wrap > :nth-child(4), .article-header > :nth-child(4) { animation-delay: .3s; }
  .motion-reveal.is-revealed { animation: gallery-enter .65s both cubic-bezier(.2,.75,.2,1); animation-delay: var(--motion-delay,0ms); }
  .motion-image.is-revealed img { animation: gallery-image-reveal .75s both cubic-bezier(.2,.75,.2,1); animation-delay: var(--motion-delay,0ms); }
  .gallery-grid .work img, .artist-profile img, .blog-image img, .portfolio-item img { transition: transform .55s cubic-bezier(.2,.75,.2,1); }
  @media (hover:hover) and (pointer:fine) {
    .gallery-grid .work:hover img, .artist-profile:hover img, .blog-image:hover img, .portfolio-item:hover img { transform: scale(1.035); }
    .gallery-grid .work:hover .work-caption span, .portfolio-item:hover::after { transform: translate(2px,-2px); background: var(--wine,#762b38); }
    .button:hover { transform: translateY(-2px); box-shadow: 0 9px 24px #0002; }
  }
}
.gallery-grid .work-caption span, .portfolio-item::after { transition: transform .25s ease, background-color .25s ease; }
.nav a:not(.button), .footer-links a, .text-link, .artist-link, .portfolio-nav a, .article-aside a { transition: color .2s ease; }
@media (hover:hover) and (pointer:fine) {
  .nav a:not(.button), .footer-links a, .text-link, .artist-link { position:relative; }
  .nav a:not(.button)::after, .footer-links a::after, .text-link::after, .artist-link::after {
    content:"";position:absolute;left:0;right:0;bottom:-3px;height:1px;background:currentColor;
    transform:scaleX(0);transform-origin:left;transition:transform .28s cubic-bezier(.2,.75,.2,1);
  }
  .nav a:not(.button):hover::after, .nav a:not(.button):focus-visible::after,
  .footer-links a:hover::after, .footer-links a:focus-visible::after,
  .text-link:hover::after, .text-link:focus-visible::after,
  .artist-link:hover::after, .artist-link:focus-visible::after { transform:scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .button, .gallery-grid .work img, .artist-profile img, .blog-image img, .portfolio-item img { transition:none !important; }
}
