/* Автопомощь · Motion system v1 · 2026-12-01
   Lightweight animations: only opacity/transform, no layout changes.
   Static content stays visible without JavaScript and in reduced-motion mode. */

/* Interactive affordances, intentionally independent from scrolling JavaScript. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service, .area-card, .case-preview-grid article {
    transition: box-shadow .3s ease, border-color .3s ease, transform .3s cubic-bezier(.2,.8,.2,1);
  }
  .service:hover, .area-card:hover, .case-preview-grid article:hover {
    transform: translateY(-4px);
    border-color: #9acfc3;
    box-shadow: 0 15px 34px rgb(11 49 55 / 9%);
  }
  .service-image img, .source-media img {
    transition: transform .55s cubic-bezier(.2,.8,.2,1);
  }
  .service:hover .service-image img { transform: scale(1.035); }
  .button, .header-cta, .footer-v2 .af-card-button {
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  }
  .button:hover, .header-cta:hover { box-shadow: 0 9px 22px rgb(3 100 82 / 19%); }
  .footer-v2 .af-card-button:hover { box-shadow: 0 8px 18px rgb(0 53 53 / 16%); }
  .footer-v2 .af-card-button span { transition: transform .24s ease; }
  .footer-v2 .af-card-button:hover span { transform: translateX(5px); }
  .header .nav a { position: relative; }
  .header .nav a:not([aria-current="page"])::after {
    content: "";
    position: absolute;
    height: 2px;
    background: #15b994;
    bottom: 4px; left: 0; right: 0;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
  }
  .header .nav a:not([aria-current="page"]):hover::after,
  .header .nav a:not([aria-current="page"]):focus-visible::after { transform: scaleX(1); }
  .migration-directory li a { transition: color .23s ease, padding-left .23s ease; }
  .migration-directory li a:hover { padding-left: 6px; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes evik-hero-rise {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes evik-hero-side {
    from { opacity: 0; transform: translate3d(18px, 0, 0) scale(.986); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }
  @keyframes evik-soft-glow {
    0%, 100% { box-shadow: 0 0 0 4px #23d9aa22; }
    50% { box-shadow: 0 0 0 7px #23d9aa16; }
  }

  /* First screen on home, service pages and editorial pages. */
  main .hero-copy > .eyebrow,
  main .hero-copy > h1,
  main .hero-copy > .hero-description,
  main .hero-copy > .hero-actions,
  main .hero-copy > .hero-note,
  main .inner-hero .eyebrow,
  main .inner-hero h1,
  main .inner-hero .inner-lead,
  main .inner-hero .inner-hero-actions,
  main .article-hero .eyebrow,
  main .article-hero h1,
  main .article-hero .article-date {
    animation: evik-hero-rise .7s cubic-bezier(.2,.8,.2,1) both;
  }
  main .hero-copy > h1,
  main .inner-hero h1,
  main .article-hero h1 { animation-delay: 80ms; }
  main .hero-copy > .hero-description,
  main .inner-hero .inner-lead,
  main .article-hero .article-date { animation-delay: 165ms; }
  main .hero-copy > .hero-actions,
  main .inner-hero .inner-hero-actions { animation-delay: 230ms; }
  main .hero-copy > .hero-note { animation-delay: 300ms; }
  main .hero-visual,
  main .inner-hero .dispatch-card,
  main .article-hero .case-photo {
    animation: evik-hero-side .76s cubic-bezier(.2,.8,.2,1) .18s both;
  }

  /* Scroll reveal is opt-in per element: pages are never hidden by default. */
  .evik-motion-reveal {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition-property: opacity, transform;
    transition-duration: .64s;
    transition-timing-function: cubic-bezier(.2,.8,.2,1);
    transition-delay: var(--evik-motion-delay, 0ms);
  }
  .evik-motion-reveal.evik-motion-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  .footer-v2 .af-live-dot { animation: evik-soft-glow 4.2s ease-in-out infinite; }
}

/* Mouse effects and reveal transforms must compose on hovered cards. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service.evik-motion-reveal.evik-motion-visible:hover,
  .area-card.evik-motion-reveal.evik-motion-visible:hover,
  .case-preview-grid article.evik-motion-reveal.evik-motion-visible:hover {
    transform: translateY(-4px);
  }
}
@media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
  .evik-motion-reveal {
    transform: translate3d(0, 13px, 0);
    transition-duration: .48s;
  }
  main .hero-visual,
  main .inner-hero .dispatch-card { animation-duration: .6s; }
}
@media (prefers-reduced-motion: reduce) {
  .evik-motion-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .footer-v2 .af-live-dot { animation: none !important; }
  main .hero-copy > *, main .hero-visual, main .inner-hero *, main .article-hero * {
    animation: none !important;
  }
}
