/* App-shell behaviour shared by every page in Next.js and the static build.
   Pure CSS: navigation stays on static assets and never reaches the Worker. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* No double-tap zoom on controls; pinch zoom and scrolling stay available. */
:where(a[href], button, summary, label, select, input, textarea, [role="button"], [role="switch"], [role="tab"]) { touch-action: manipulation; }

/* Touch screens have no hover: links answer the finger directly instead. */
@media (hover: none) {
  :where(a[href]):active { opacity: .72; }
}

/* Same-origin page loads cross-fade instead of flashing a blank page. The
   visible logo is named only during the transition (lib/app-shell.mjs), so it
   stays in place while the content changes. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

::view-transition-old(root) { animation: 140ms cubic-bezier(0.4, 0, 1, 1) both slovo-page-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(0.23, 1, 0.32, 1) 40ms both slovo-page-in; }
::view-transition-group(slovo-brand) { animation-duration: 300ms; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
::view-transition-old(slovo-brand), ::view-transition-new(slovo-brand) { animation-duration: 200ms; }

@keyframes slovo-page-out { to { opacity: 0; } }
@keyframes slovo-page-in { from { opacity: 0; transform: translateY(6px); } }
