/* Motion is decorative: real text, native scroll, and no hover-only actions. */
.hero-name { display: block; width: 100%; padding: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit; text-align: inherit; touch-action: manipulation; }
.hero-name:disabled { cursor: default; opacity: 1; }
.hero-name:focus-visible { outline-offset: 16px; border-radius: 2px; }
#hero-title { translate: var(--name-x, 0px) var(--name-y, 0px); transition: translate .65s cubic-bezier(.16,1,.3,1); }
.hero-word { transform-origin: center bottom; }
.hero-motion-hint { display: none; position: absolute; bottom: 34px; left: var(--gutter); margin: 0; color: #bab67d; font-size: .7rem; letter-spacing: .02em; pointer-events: none; }
@media (hover: none) and (pointer: coarse) {
  .motion-ready .hero-motion-hint { display: block; }
}

/* Word masks retain spaces and manual line breaks, so headings still reflow. */
.motion-word { display: inline-block; overflow: clip; vertical-align: bottom; padding: .12em .04em; margin: -.12em -.04em; }
.motion-word-inner { display: inline-block; }
.motion-ready .motion-reveal { transform: translateY(12px); transition-duration: .48s; }
.motion-ready .motion-heading { opacity: 1; transform: none; }
.motion-ready .motion-heading .motion-word-inner { transform: translateY(108%) rotate(1.5deg); transition: transform .72s cubic-bezier(.16,1,.3,1); transition-delay: var(--word-delay, 0ms); }
.motion-ready .motion-reveal.is-revealed { transform: none; }
.motion-ready .motion-heading.is-revealed .motion-word-inner { transform: none; }
.motion-ready .motion-reveal:focus-within { opacity: 1; transform: none; }
.motion-ready .motion-heading:focus-within .motion-word-inner { transform: none; transition: none; }
/* One animation owner per block; no parent/child fades fighting each other.
   Resting content remains visible even when observers or animation APIs fail. */
.motion-ready .motion-managed,
.motion-ready .work-media.motion-managed { opacity: 1; transform: none; clip-path: none; transition: none; }
.motion-ready .motion-managed .motion-word-inner { transform: none; transition: none; }
.about-traits > span, .work-tags > span { transform-origin: left center; }

/* The same feedback is available on keyboard focus and a phone's native press. */
.work-link:is(:focus-visible, :active) span[aria-hidden],
.video-source:is(:hover, :focus-visible, :active) span[aria-hidden] { transform: translate(3px,-3px); }
.video-source span[aria-hidden] { display: inline-block; transition: transform .3s ease; }
.hero-discover:is(:focus-visible, :active) span { transform: translateY(5px); }
.nav-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.work-entry:focus-within .work-media-image img { filter: grayscale(0); }
.video-trigger { transition: scale .25s cubic-bezier(.16,1,.3,1); }
.video-trigger:active { scale: .985; }

/* Project-to-project navigation exchanges only the case title. The document
   itself swaps without a curtain, scale, or background animation. */
@view-transition { navigation: auto; }
.project-detail h1, [data-case-study="carrot-dash"] main h1 { view-transition-name: project-title; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-group(project-title) { animation-duration: .64s; animation-timing-function: cubic-bezier(.16,1,.3,1); }
::view-transition-image-pair(project-title) { overflow: clip; }
::view-transition-old(project-title) { animation: project-title-out .64s cubic-bezier(.16,1,.3,1) both; }
::view-transition-new(project-title) { animation: project-title-in .64s cubic-bezier(.16,1,.3,1) both; }
@keyframes project-title-out { to { opacity: 0; transform: translateY(-108%); } }
@keyframes project-title-in { from { opacity: 0; transform: translateY(108%); } to { opacity: 1; transform: none; } }
@media (hover: none) {
  .work-media-image img { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(project-title), ::view-transition-old(project-title), ::view-transition-new(project-title) { animation: none; }
  #hero-title { translate: none; transition: none; }
  .motion-ready .hero-motion-hint { display: none; }
  .motion-ready .motion-reveal,
  .motion-ready .motion-heading .motion-word-inner { opacity: 1; transform: none; transition: none; }
  .video-trigger:active { scale: none; }
  .work-link:is(:focus-visible, :active) span[aria-hidden],
  .video-source:is(:hover, :focus-visible, :active) span[aria-hidden],
  .hero-discover:is(:focus-visible, :active) span { transform: none; }
}
@media print {
  .hero-motion-hint { display: none !important; }
  .motion-ready .motion-reveal,
  .motion-ready .motion-heading .motion-word-inner { opacity: 1; transform: none; transition: none; }
}
