/* Accessibilità (WCAG 2.1 AA): regole trasversali caricate da entrambi i master. */

/* Link "Vai al contenuto": invisibile finché non riceve il focus da tastiera. */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2147483646;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--yellow-color);
  color: var(--black-color);
  font-family: var(--font-title);
  font-size: 16px;
  text-transform: uppercase;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}
#contenuto:focus {
  outline: none;
}

/* Focus da tastiera ben visibile su fondi neri, bianchi e gialli: anello nero interno + anello giallo esterno. */
:focus-visible {
  outline: 3px solid var(--yellow-color) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px var(--black-color) !important;
}
#contenuto:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Area cliccabile di almeno 24px per hamburger e pallini degli slider (l'aspetto resta lo stesso). */
.burger::after {
  content: "";
  position: absolute;
  inset: -10px -6px;
}
.swiper-pagination-bullet {
  position: relative;
}
.swiper-pagination-bullet::after {
  content: "";
  position: absolute;
  inset: -8px;
}
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
  margin: 0 8px;
}

/* Form: il segnaposto resta visibile anche durante la digitazione e ha contrasto sufficiente. */
form .form-control:focus::placeholder,
.contact-form .form-control:focus::placeholder {
  opacity: 1;
}
.contact-form-banner .contact-form .form-control::placeholder {
  color: var(--grey-color);
  opacity: 1;
}
.form-required-note {
  font-family: var(--font-mono);
  font-size: var(--xxs-text);
  color: var(--grey-color);
  margin: 0 0 8px;
}

/* Contrasto testi. */
.bg-yellow .project-card .project-meta,
.bg-yellow .project-card .project-tags {
  color: var(--black-color);
}
.alffor-for {
  color: var(--black-color);
}
.menu-index a {
  color: #6E6A63;
  opacity: 1;
}
.menu-index a:hover {
  color: var(--black-color);
  opacity: 1;
}
/* Etichette gialle dei blocchi progetto/articolo: su fondo chiaro diventano testo nero su evidenziatore giallo. */
body.bg-white .alf-block-label {
  display: block;
  width: fit-content;
  padding: 0.1em 0.4em;
  background: var(--yellow-color);
  color: var(--black-color) !important;
}
body.bg-yellow .alf-block-label {
  color: var(--black-color) !important;
}

/* Pulsante pausa/riproduci per nastri scorrevoli e video in loop. */
.a11y-motion-wrap {
  position: relative;
}
.a11y-pause {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--yellow-color);
  border-radius: 50%;
  background: var(--black-color);
  color: var(--yellow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
}
.a11y-pause:hover {
  opacity: 1;
}
.a11y-pause svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.a11y-motion-wrap > .a11y-pause.is-ticker {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.ticker.is-paused .ticker-track {
  animation-play-state: paused;
}

/* Riduci movimento: niente transizioni lunghe né preloader animato. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .preloader {
    display: none !important;
  }
}
