/* V2-30: presentation-only motion. No hidden content, timers or reveal effects. */
:root {
  --hl-motion-duration: 200ms;
  --hl-motion-ease: cubic-bezier(.2, .65, .3, 1);
}

/* Existing reusable native card classes; no page-ID targeting. */
.site-content :is(.hl-card, .hl-catalog-card, .hl-v221-card, .hl-v221-project-card) {
  transform: none;
  box-shadow: none;
  transition: transform 220ms var(--hl-motion-ease),
    box-shadow 220ms var(--hl-motion-ease),
    border-color var(--hl-motion-duration) ease;
}
.site-content :is(.hl-card, .hl-catalog-card, .hl-v221-card, .hl-v221-project-card):focus-within {
  border-inline-color: var(--hl-primary);
  border-bottom-color: var(--hl-primary);
}

/* Preserve the square frame and contain geometry, with room for a 1.015 hover. */
.hl-product-catalog .hl-catalog-thumb img {
  max-width: 98%;
  max-height: 98%;
  transform: none;
  transform-origin: center;
  transition: transform 220ms var(--hl-motion-ease);
}

/* Use existing hover colours, including the light CTA's outline variant. */
.site :is(.wp-block-button__link, .hl-catalog-details, .hl-header-action-menu a,
  .hl-language-menu a, .hl-footer-menu a, .hl-history-nav button,
  .hl-carousel-controls button, .main-header-menu .menu-link,
  .ast-header-navigation .menu-link, .ast-mobile-popup-content .menu-link,
  .menu-toggle, .ast-menu-toggle) {
  transition: color var(--hl-motion-duration) ease,
    background-color var(--hl-motion-duration) ease,
    border-color var(--hl-motion-duration) ease;
}
.site :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--hl-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}
/* Keep keyboard rings inside the horizontally scrollable history navigation. */
.site .hl-history-nav button:focus-visible { outline-offset: -5px; box-shadow: none; }
.site .hl-history-nav button[aria-selected="true"]:focus-visible { outline-color: #fff; }
.site-header .main-header-menu .menu-link:hover {
  color: var(--hl-primary);
}

/* Enable positional effects only for a fine pointer, never for touch/mobile. */
@media (min-width: 782px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .site-content :is(.hl-card, .hl-catalog-card, .hl-v221-card, .hl-v221-project-card):hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgb(27 35 40 / 7%);
    border-inline-color: #bec6ca;
    border-bottom-color: #bec6ca;
  }
  .hl-product-catalog .hl-catalog-card:hover .hl-catalog-thumb img {
    transform: scale(1.015);
  }
}

/* Cancel legacy unguarded card hover as well as the new opt-in motion. */
@media (max-width: 781px), (hover: none), (pointer: coarse) {
  .site-content :is(.hl-card, .hl-catalog-card, .hl-v221-card, .hl-v221-project-card):hover {
    transform: none;
    box-shadow: none;
  }
  .hl-product-catalog .hl-catalog-card:hover .hl-catalog-thumb img {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .site-content :is(.hl-card, .hl-catalog-card, .hl-v221-card, .hl-v221-project-card),
  .site-content :is(.hl-card, .hl-catalog-card, .hl-v221-card, .hl-v221-project-card):hover,
  .hl-product-catalog .hl-catalog-thumb img,
  .hl-product-catalog .hl-catalog-card:hover .hl-catalog-thumb img {
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .site :is(.wp-block-button__link, .hl-catalog-details, .hl-header-action-menu a,
    .hl-language-menu a, .hl-footer-menu a, .hl-history-nav button,
    .hl-carousel-controls button, .main-header-menu .menu-link,
    .ast-header-navigation .menu-link, .ast-mobile-popup-content .menu-link,
    .menu-toggle, .ast-menu-toggle),
  .site-header .sub-menu {
    transition: none !important;
    animation: none !important;
  }
}
