.hero-link { touch-action: pan-y pinch-zoom; }
.hero-controls { position: relative; }
.hero-controls > span { padding-right: .25rem; white-space: nowrap; }
.hero-controls button { padding-inline: clamp(.35rem, 1vw, .72rem); }
.hero-controls [data-feature-rotation] { font-size: .73rem; white-space: nowrap; }
.hero-controls [data-feature-rotation][hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero-controls[data-rotating]::after {
    position: absolute;
    inset: auto 0 -1px;
    height: 2px;
    content: '';
    background: var(--accent);
    transform-origin: left;
    animation: featured-progress 6.8s linear both;
    pointer-events: none;
  }

  .project-grid[data-view="gallery"] .project-caption .arrow {
    transition: transform .35s cubic-bezier(.22, .68, .22, 1), background-color .2s, color .2s;
  }

  .project-grid[data-view="gallery"] .project-link:is(:hover, :focus-visible) .arrow {
    transform: translate(.23rem, -.23rem);
  }

  @keyframes featured-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

@media (max-width: 46rem) {
  .hero-caption:has(.hero-controls:not([hidden])) { align-items: stretch; flex-direction: column; }
  .hero-controls:not([hidden]) { align-self: flex-start; width: min(100%, 16.5rem); border-block: 1px solid var(--line); }
}
