/* Motion only: resting layout, colors and typography stay in style.css. */
:root { --motion-ease: cubic-bezier(.22, 1, .36, 1); }

.cat-corner { top: 64px; bottom: auto; z-index: 4; }
.cat-corner[data-cat-visible="false"] .paper-cat-art * { animation-play-state: paused; }

@media (hover: hover) and (pointer: fine) {
  .main-nav a, .tab-pill, .sync-tab, .code-tab, .icon-step, .copy-btn {
    transition: color .22s ease, background-color .22s ease,
      border-color .22s ease, transform .32s var(--motion-ease), box-shadow .22s ease;
  }
  .main-nav a:hover, .tab-pill:hover, .sync-tab:hover, .code-tab:hover,
  .icon-step:hover, .copy-btn:hover { transform: translateY(-1px); }
  .btn svg { transition: transform .35s var(--motion-ease); }
  .btn:hover svg { transform: translateX(2px); }
  .feature-item h3, .feature-num, .support-tags span {
    transition: transform .4s var(--motion-ease);
  }
  .feature-item:hover h3 { transform: translateX(3px); }
  .feature-item:hover .feature-num { transform: translateY(-2px); }
  .support-tags span:hover { transform: translateY(-2px); }
  .footer-links a, .ribbon-links a, .text-link {
    transition: color .2s ease, transform .3s var(--motion-ease);
  }
  .footer-links a:hover, .ribbon-links a:hover { transform: translateY(-1px); }
  .faq-list summary { transition: color .2s ease; }
  .faq-list summary:hover { color: var(--accent); }
}

.btn:active { transform: translateY(0) scale(.98); }
.tab-pill:active, .sync-tab:active, .code-tab:active, .icon-step:active,
.copy-btn:active, .theme-btn:active { transform: scale(.96); }
.theme-btn svg { transition: transform .4s var(--motion-ease); }
.theme-btn.active svg { transform: rotate(12deg); }
.theme-btn.active:not(:hover) svg { transform: none; }
.lightbox { transform-origin: 50% 42%; }
.lightbox[open]::backdrop { animation: backdrop-appear .28s ease both; }
.lightbox.is-closing::backdrop { animation: backdrop-disappear .18s ease both; }
@keyframes backdrop-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-disappear { from { opacity: 1; } to { opacity: 0; } }

@media (max-width: 900px) {
  /* Keep the existing mobile position and dimensions. */
  .cat-corner { top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .main-nav a:hover, .tab-pill:hover, .sync-tab:hover, .code-tab:hover,
  .icon-step:hover, .copy-btn:hover, .btn:active, .btn:hover svg,
  .feature-item:hover h3, .feature-item:hover .feature-num,
  .support-tags span:hover, .footer-links a:hover, .ribbon-links a:hover,
  .tab-pill:active, .sync-tab:active, .code-tab:active, .icon-step:active,
  .copy-btn:active, .theme-btn:active, .theme-btn.active svg { transform: none; }
}
