/* Art&Works — clone fedele del sito live (tema Fluida), HTML5 statico */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --color-bg:        #f3f3f3;
  --color-text:       #555555;
  --color-heading:    #333333;
  --color-accent:     #697275; /* slate — overlay, link hover */
  --color-header-bg:  #ffffff;
  --color-rule:       #e5e5e5;
  --font: "Open Sans", Arial, sans-serif;
  --container: 1265px;
  --header-h: 100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.sr-only:focus {
  position: static; width: auto; height: auto; margin: 0; padding: .5rem 1rem;
  background: var(--color-accent); color: #fff;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 300;
  color: var(--color-heading);
  margin: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-header-bg);
  height: var(--header-h);
  border-bottom: 1px solid var(--color-rule);
}
.site-header-inner {
  max-width: 1920px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.logo img { height: 74px; width: auto; }

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 0;
  padding: 0;
}
.primary-nav a,
.primary-nav .nav-trigger {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6d6d6d;
  transition: color .2s ease;
}
.primary-nav a:hover,
.primary-nav a.attivo,
.nav-dropdown:hover .nav-trigger,
.nav-dropdown:focus-within .nav-trigger { color: var(--color-accent); }

.nav-trigger {
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  cursor: default;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
}

.nav-dropdown { position: relative; }
.primary-nav .dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 10px 0;
  background: #fff;
  border: 1px solid var(--color-rule);
  box-shadow: 0 12px 28px rgba(0,0,0,.1);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 550;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li { gap: 0; }
.dropdown-menu a {
  display: block;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .5px;
  text-transform: none;
  white-space: nowrap;
  color: #6d6d6d;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible,
.dropdown-menu a.attivo { color: var(--color-accent); background: #f7f7f7; }

.lang-switch { display: flex; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 1px; margin-left: 8px; }
.lang-switch a { opacity: .5; }
.lang-switch a.attivo { opacity: 1; color: var(--color-accent); }
.lang-switch a:hover { opacity: 1; }

.btn-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.btn-menu span { width: 24px; height: 1px; background: #6d6d6d; display: block; }

.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 84vw);
  background: #fff;
  padding: calc(var(--header-h) + 24px) 32px 32px;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -12px 0 32px rgba(0,0,0,.12);
  z-index: 600;
  overflow-y: auto;
}
.mobile-nav.aperto { transform: translateX(0); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.mobile-nav a,
.mobile-nav .nav-trigger { font-size: 15px; letter-spacing: 1px; text-transform: uppercase; font-weight: 300; color: #555; }
.mobile-nav a:hover,
.mobile-nav a.attivo { color: var(--color-accent); }

.mobile-submenu { gap: 14px !important; margin-top: 14px !important; padding-left: 18px !important; }
.mobile-submenu a { font-size: 13px; font-weight: 300; color: #6d6d6d; }
.overlay-menu {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
  z-index: 590;
}
.overlay-menu.attivo { opacity: 1; pointer-events: auto; }

/* ---------- Home hero ---------- */
.home-hero { position: relative; width: 100%; overflow: hidden; }
.home-hero img { width: 100%; height: auto; object-fit: cover; display: block; }

/* ---------- Home grid (lp-boxes clone) ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.service-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background-size: cover;
  background-position: center;
}
.service-tile .tile-overlay {
  position: absolute; inset: 0;
  background: rgba(105, 114, 117, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  transition: background-color .35s ease;
}
.service-tile:hover .tile-overlay,
.service-tile:focus-visible .tile-overlay { background: rgba(105, 114, 117, .92); }

.service-tile .tile-title {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 1px;
  color: #ddd;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
  margin: 0 0 14px;
}
.service-tile .tile-more {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease .05s, transform .35s ease .05s;
}
.service-tile:hover .tile-title,
.service-tile:hover .tile-more,
.service-tile:focus-visible .tile-title,
.service-tile:focus-visible .tile-more { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ---------- Single page (service pages) ---------- */
.page-hero { width: 100%; overflow: hidden; }
.page-hero img { width: 100%; height: auto; max-height: 520px; object-fit: cover; }

.page-content { padding: 56px 0 80px; }
.page-content .container { max-width: 900px; }
.page-content h1 {
  font-size: 40px;
  font-weight: 300;
  color: var(--color-heading);
  margin: 0 0 28px;
}
.page-content p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--color-text);
  margin: 0 0 22px;
}
.page-content p:last-child { margin-bottom: 0; }
.page-content a:not(.link-more) { color: var(--color-accent); border-bottom: 1px solid currentColor; }
.page-content a:not(.link-more):hover { color: var(--color-heading); }

.inline-plate { margin: 32px 0; }
.inline-plate img { width: 100%; height: auto; }

/* ---------- Contact ----------
   Ritmo verticale unico: 40px fra i blocchi, 10px fra etichetta e contenuto.
   Le due griglie (sedi ed e-mail) condividono le stesse misure. */
.locations-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  column-gap: 40px;
  row-gap: 40px;
}
.locations-grid { margin: 40px 0 0; }
.contact-grid {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--color-rule);
}
.page-content .location-block h2,
.page-content .contact-block h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  line-height: 1.4;
  color: #6d6d6d;
  margin: 0 0 10px;
}
.page-content .location-block p,
.page-content .contact-block p {
  margin: 0;
  line-height: 1.75;
}
.contact-block a { color: var(--color-accent); font-weight: 600; }
.contact-block a:hover { color: var(--color-heading); }

/* ---------- Legal notice / privacy ---------- */
.legal-note {
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 3px;
  padding: 18px 22px;
  font-size: 14px;
  color: #6d6d6d;
  margin: 0 0 32px;
}
.page-content h2 { font-size: 22px; color: var(--color-heading); margin: 40px 0 16px; font-weight: 400; }
.page-content h2:first-of-type { margin-top: 0; }
.page-content h3 { font-size: 17px; color: var(--color-heading); margin: 28px 0 10px; font-weight: 600; }
.page-content ul, .page-content ol { color: var(--color-text); font-size: 17px; margin: 0 0 22px; padding-left: 22px; }
.page-content li { margin-bottom: 8px; }

/* ---------- Accessibility declaration ---------- */
.acc-table { width: 100%; border-collapse: collapse; margin: 0 0 32px; font-size: 15px; }
.acc-table th, .acc-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--color-rule); vertical-align: top; }
.acc-table th { font-weight: 600; color: var(--color-heading); border-bottom: 2px solid var(--color-heading); }
.acc-table td:first-child { white-space: nowrap; font-weight: 600; color: var(--color-heading); }
.limitazione { background: #fff; border: 1px solid var(--color-rule); border-left: 3px solid var(--color-accent); padding: 14px 18px; margin: 0 0 22px; }
.updated-note { font-size: 13px; color: #6d6d6d; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--color-rule); }

/* ---------- Footer ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--color-rule);
  padding: 28px 0;
  text-align: center;
}
.site-footer p {
  margin: 0;
  font-size: 13px;
  letter-spacing: .5px;
  color: #6d6d6d;
}
.site-footer p.legal-info {
  font-size: 12px;
  margin-bottom: 6px;
}
.site-footer p a { color: #6d6d6d; text-decoration: underline; }
.site-footer p a:hover { color: var(--color-accent); }

@media (max-width: 860px) {
  .primary-nav, .lang-switch-desktop { display: none; }
  .btn-menu { display: flex; }
  .site-header-inner { padding: 0 20px; }
  .page-content h1 { font-size: 30px; }
}
@media (min-width: 861px) {
  .btn-menu { display: none !important; }
  .mobile-nav, .overlay-menu { display: none; }
}

/* ---------- Striscia clienti (marquee CSS) ----------
   Il nastro contiene DUE volte la stessa lista: l'animazione trasla di -50%
   (= esattamente una lista) e riparte, quindi il loop è invisibile.
   Ogni logo ha padding orizzontale (non gap) perché tutti gli elementi devono
   avere la stessa larghezza-contributo: con gap il 50% non cadrebbe esatto.
   Velocità: --strip-duration = larghezza di UNA lista / px al secondo voluti.
   42 loghi = 7492px; a 61px/s → 123s. Aggiungendo loghi, alza la durata
   in proporzione per non accelerare il nastro. */
.client-strip {
  background: #fff;
  border-top: 1px solid var(--color-rule);
  padding: 34px 0;
  overflow: hidden;
  /* sfuma i bordi invece di tagliare i loghi di netto */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
}
.client-track {
  --strip-duration: 123s;
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: client-scroll var(--strip-duration) linear infinite;
  will-change: transform;
}
.client-track li {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 32px; /* 64px di aria fra un logo e l'altro */
}
.client-track img {
  height: 100%;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  opacity: .5;
  filter: grayscale(1); /* rete di sicurezza se un logo arriva a colori */
  transition: opacity .3s ease;
}
.client-track li:hover img { opacity: 1; }

/* pausa al passaggio del mouse o quando un logo riceve il focus */
.client-strip:hover .client-track,
.client-strip:focus-within .client-track { animation-play-state: paused; }

@keyframes client-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* niente movimento automatico: nastro fermo e scorrimento manuale */
@media (prefers-reduced-motion: reduce) {
  .client-strip { overflow-x: auto; }
  .client-track { animation: none; }
  .client-track li[aria-hidden="true"] { display: none; }
}

@media (max-width: 560px) {
  .client-strip { padding: 24px 0; }
  .client-track li { height: 36px; padding: 0 22px; }
  .client-track img { max-width: 130px; }
}
