/* NERVEN 3.3.17: interaction feedback without changing layout or artwork. */
:root { --nrv-motion-direction: 1; }
html[dir="rtl"], body.nrv-ar { --nrv-motion-direction: -1; }
.nrv-button, .nrv-text-link, .nrv-nav a, .nrv-footer a,
.nrv-mobile-menu a, summary {
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 180ms ease;
}
.nrv-button svg, .nrv-text-link svg, .nrv-app-arrow-3310 {
  transition: translate 180ms ease;
}
.nrv-card, .nrv-stack-row, .nrv-insight-text-card,
.nrv-tech-reference-grid > a, .nrv-application-card-item,
.nrv-app-card-3310, .nrv-datasheet-card {
  transition: transform 200ms ease, border-color 180ms ease, box-shadow 200ms ease, background-color 180ms ease;
}
.nrv-card figure img, .nrv-system-panel img,
.nrv-project-archive-feature figure img, .nrv-app-bg-3310 {
  transition-duration: 280ms !important;
}
/* Hover motion is reserved for a precise pointer; touch retains immediate taps. */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .nrv-button:hover { transform: translateY(-2px); }
  .nrv-button:hover svg, .nrv-text-link:hover svg,
  .nrv-app-card-3310:hover .nrv-app-arrow-3310 { translate: calc(3px * var(--nrv-motion-direction)) 0; }
  .nrv-insight-text-card:hover, .nrv-datasheet-card:hover {
    transform: translateY(-3px);
    border-color: var(--nrv-accent);
  }
  .nrv-stack-row:hover, .nrv-app-card-3310:hover {
    box-shadow: inset 0 -2px var(--nrv-accent);
  }
}
:is(a,button,summary,input,textarea,select):focus-visible {
  outline: 2px solid var(--nrv-accent, #f11728);
  outline-offset: 4px;
}
form :is(input,textarea,select) {
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
form :is(input,textarea,select):focus {
  border-color: var(--nrv-accent, #f11728);
  box-shadow: 0 0 0 2px rgba(241,23,40,.14);
}
.nrv-faq-list summary > span {
  display: inline-block;
  transition: rotate 180ms ease, color 160ms ease;
}
.nrv-faq-list details[open] > summary > span {
  rotate: 45deg;
  color: var(--nrv-accent);
}
/* Apply to every page, including legacy inline hover effects. Never reset the
   transform of all images: the approved Arabic hero intentionally mirrors. */
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto!important; }
  body *, body *::before, body *::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
  body .nrv-button:hover, body .nrv-card:hover,
  body .nrv-card:hover figure img, body .nrv-system-panel:hover img,
  body .nrv-project-archive-feature:hover figure img,
  body .nrv-app-card-3310:hover .nrv-app-bg-3310,
  body .nrv-application-index > a.nrv-application-card-item:hover,
  body .nrv-applications-section .nrv-application-card-item:hover .nrv-application-card-bg,
  body .nrv-application-index > a:hover .nrv-application-thumb img,
  body .nrv-tech-reference-grid > a:hover,
  body .nrv-marquee-item:hover, body .nrv-marquee-item:hover img {
    transform:none!important;
  }
}
