/* Un solo riflesso al passaggio: al termine la superficie torna normale. */
.effect-definitions { position: absolute; pointer-events: none; }
:is(.project-image, .service-image, .company-visual picture, .gallery-image)::before { content: none; }
.project-link:is(:hover, :focus-visible) .image-arrow { background: #fff; border: 0; color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
main .button:hover { box-shadow: none; }
main .button:hover > span { transform: none; background: #ffffff2e; }
main .button-blue:hover { background: var(--blue); }
main .button-dark:hover { background: var(--navy); }
.contact-photo-section .button-dark:hover { background: #009ec9; }
.slider-control:hover { background: #ffffff12; border-color: #ffffff45; }
.work-buttons button:hover { background: #fff; color: #17232d; }

main :is(.button, .text-link),
.slider-control,
.work-buttons button,
.work-panel-footer button,
.gallery-dialog button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
:is(main .button, main .text-link, .slider-control, .work-buttons button, .work-panel-footer button, .gallery-dialog button, .work-slide > a)::before {
  content: '';
  position: absolute;
  inset: -30% -60%;
  z-index: 2;
  background: linear-gradient(115deg, transparent 24%, #ffffff06 34%, #ffffff4d 48%, #ffffff1f 58%, transparent 74%);
  opacity: 0;
  pointer-events: none;
}
.service-title a:hover > span { color: #77baff; }
.home-page .service-title a:hover > span { color: #5cc8e3; }

/* Il filtro rende trasparente la carta bianca prima di applicare la luce. */
.certifications-logos img,
.certifications-logos figure:hover img,
.certifications-logos figure:focus-within img {
  mix-blend-mode: normal;
  filter: url('#certificate-ink') drop-shadow(0 0 0 transparent);
  transition: none;
}
.certifications-logos figure:is(:hover, :focus-within) { transform: none; background: transparent; box-shadow: none; }
.certificate-link::after { content: none; }
.certifications-logos figure:is(:hover, :focus-within) figcaption { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  :is(main .button, main .text-link, .slider-control, .work-buttons button, .work-panel-footer button, .gallery-dialog button, .work-slide > a):focus-visible::before {
    animation: gloss-pass 1400ms cubic-bezier(.22,.61,.36,1);
  }
  .gallery-image:focus-visible::after,
  .project-link:focus-visible .project-image::after,
  .service:focus-within .service-image::after { animation: gloss-pass 1600ms cubic-bezier(.22,.61,.36,1); }
  .certifications-logos figure:focus-within img { animation: certificate-light 1500ms ease; }
  @media (hover: hover) and (pointer: fine) {
    :is(main .button, main .text-link, .slider-control, .work-buttons button, .work-panel-footer button, .gallery-dialog button, .work-slide > a):hover::before {
      animation: gloss-pass 1400ms cubic-bezier(.22,.61,.36,1);
    }
    .gallery-image:hover::after,
    .project-link:hover .project-image::after,
    .service:hover .service-image::after,
    .company-visual:hover picture::after { animation: gloss-pass 1600ms cubic-bezier(.22,.61,.36,1); }
    .certifications-logos figure:hover img { animation: certificate-light 1500ms ease; }
  }
}
@keyframes gloss-pass {
  0% { opacity: 0; transform: translate3d(-65%,0,0); }
  25% { opacity: .9; }
  65% { opacity: .6; }
  100% { opacity: 0; transform: translate3d(65%,0,0); }
}
@keyframes certificate-light {
  0%, 100% { filter: url('#certificate-ink') drop-shadow(0 0 0 transparent); }
  40%, 60% { filter: url('#certificate-ink') drop-shadow(0 0 10px #009ec980); }
}

/* Marchi originali: colori e proporzioni restano quelli dei documenti forniti. */
.certifications-logos--current { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.certifications-logos--current img[data-certificate-original] { filter: none !important; animation: none !important; mix-blend-mode: normal; object-fit: contain; }
@media (max-width: 760px) { .certifications-logos--current { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
