/*
 * Shared interaction polish for primary marketing pages.
 * Scroll entrance continues to use the theme's existing AOS runtime, which is
 * already disabled below 768px. This file adds no JavaScript or scroll handler.
 */

body [data-aos] {
  transition-timing-function: cubic-bezier(.2, 0, 0, 1) !important;
}

body :where(
  .home-service-card,
  .home-case-card,
  .home-project-card,
  .home-blog-card,
  .services-card,
  .faq-item,
  article.bg-white.rounded-medium,
  div.bg-white.rounded-medium.shadow-box,
  div.bg-white.rounded-medium.shadow-nav
):not([data-aos]) {
  transition-property: translate, box-shadow, border-color;
  transition-duration: 140ms;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}

body :where(
  .home-service-card,
  .home-case-card,
  .home-project-card,
  .home-blog-card,
  .services-card,
  .faq-item,
  article.bg-white.rounded-medium,
  div.bg-white.rounded-medium.shadow-box,
  div.bg-white.rounded-medium.shadow-nav
)[data-aos] {
  transition-property: opacity, transform, translate, box-shadow, border-color !important;
  transition-duration: 680ms, 680ms, 140ms, 140ms, 140ms !important;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1) !important;
}

body :where(
  .home-service-card__cta,
  .home-project-card__link,
  .home-blog-card__cta,
  .services-button,
  .services-card > a,
  main .btn,
  main .btn-outline,
  body > section .btn,
  body > section .btn-outline
) {
  transition-property: scale, color, background-color, border-color;
  transition-duration: 140ms;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}

body :where(
  .home-service-card__cta,
  .home-project-card__link,
  .home-blog-card__cta,
  .services-button,
  .services-card > a,
  main .btn,
  main .btn-outline,
  body > section .btn,
  body > section .btn-outline
):active {
  scale: .96;
}

body :where(
  .home-service-card__cta,
  .home-project-card__link,
  .home-blog-card__cta,
  .services-button,
  .services-card > a
) :where(i, span[aria-hidden="true"]) {
  transition: translate 140ms cubic-bezier(.2, 0, 0, 1);
}

body :where(
  .home-blog-card__media img,
  .home-project-card img,
  .services-card img
) {
  outline: 1px solid oklch(0 0 0 / .1);
  outline-offset: -1px;
  transition: scale 140ms cubic-bezier(.2, 0, 0, 1);
}

.dark body :where(
  .home-blog-card__media img,
  .home-project-card img,
  .services-card img
) {
  outline-color: oklch(1 0 0 / .1);
}

body .faq-header {
  transition-property: background-color, border-color;
  transition-duration: 140ms;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body :where(
    .home-service-card,
    .home-case-card,
    .home-project-card,
    .home-blog-card,
    .services-card,
    .faq-item,
    article.bg-white.rounded-medium,
    div.bg-white.rounded-medium.shadow-box,
    div.bg-white.rounded-medium.shadow-nav
  ):hover,
  body :where(
    .home-service-card,
    .home-case-card,
    .home-project-card,
    .home-blog-card,
    .services-card,
    .faq-item,
    article.bg-white.rounded-medium,
    div.bg-white.rounded-medium.shadow-box,
    div.bg-white.rounded-medium.shadow-nav
  ):focus-within {
    translate: 0 -4px;
    border-color: rgb(183 204 146 / .72);
    box-shadow: 0 20px 45px rgb(54 70 32 / .13);
  }

  body .home-service-card {
    transform: none !important;
  }

  body :where(
    .home-service-card__cta,
    .home-project-card__link,
    .home-blog-card__cta,
    .services-button,
    .services-card > a
  ):hover :where(i, span[aria-hidden="true"]),
  body :where(
    .home-service-card__cta,
    .home-project-card__link,
    .home-blog-card__cta,
    .services-button,
    .services-card > a
  ):focus-visible :where(i, span[aria-hidden="true"]) {
    translate: 3px 0;
  }

  body :where(
    .home-blog-card,
    .home-project-card,
    .services-card
  ):hover img,
  body :where(
    .home-blog-card,
    .home-project-card,
    .services-card
  ):focus-within img {
    scale: 1.025;
  }

  body .services-card__icon {
    transition: scale 140ms cubic-bezier(.2, 0, 0, 1);
  }

  body .services-card:hover .services-card__icon,
  body .services-card:focus-within .services-card__icon {
    scale: 1.06;
  }

  body .faq-header:hover,
  body .faq-header:focus-visible {
    border-color: rgb(183 204 146 / .8);
    background-color: #f7faef;
  }

  .dark body .faq-header:hover,
  .dark body .faq-header:focus-visible {
    background-color: #252820;
  }
}

@media (max-width: 767px), (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  body [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body :where(
    .home-service-card,
    .home-case-card,
    .home-project-card,
    .home-blog-card,
    .services-card,
    .faq-item,
    article.bg-white.rounded-medium,
    div.bg-white.rounded-medium.shadow-box,
    div.bg-white.rounded-medium.shadow-nav,
    .faq-header,
    .home-service-card__cta,
    .home-project-card__link,
    .home-blog-card__cta,
    .services-button,
    .services-card > a,
    main .btn,
    main .btn-outline,
    body > section .btn,
    body > section .btn-outline
  ) {
    translate: none !important;
    scale: none !important;
    transition: none !important;
  }
}
