/* ==========================================================================
   BASE — reset, font, tipografia, layout di base
   ========================================================================== */

/* Font del sito originale (file locali, nessuna richiesta esterna):
   Helvetica Neue nei 5 tagli usati + Inter variabile per il lockup VG.
   Servire gli stessi woff dell'originale garantisce metriche identiche
   su ogni sistema operativo. */
@font-face {
  font-family: "Helvetica Neue VG";
  src: url("../assets/fonts/HelveticaNeue-Thin.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Neue VG";
  src: url("../assets/fonts/HelveticaNeue-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Neue VG";
  src: url("../assets/fonts/HelveticaNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Neue VG";
  src: url("../assets/fonts/HelveticaNeue-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Neue VG";
  src: url("../assets/fonts/HelveticaNeue-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

/* Azzera l'outline nativo del browser (es. il riquadro blu di default):
   senza questo reset, quando :focus-visible scatta ma non siamo in
   "is-tabbing", il browser applica comunque il proprio stile predefinito. */
a:focus-visible,
button:focus-visible {
  outline: none;
}

/* Focus visibile solo per navigazione da tastiera reale (classe "is-tabbing"
   impostata da js/main.js). Evita che il riquadro compaia sui dispositivi
   touch quando il focus viene spostato via script (es. apertura/chiusura
   del menu mobile), caso in cui l'euristica nativa di :focus-visible di
   alcuni browser mobile scatta comunque. */
html.is-tabbing a:focus-visible,
html.is-tabbing button:focus-visible {
  outline: 1px solid #FFFFFF;
  outline-offset: 3px;
}

/* --- Tipografia ----------------------------------------------------------- */

/* Titolo pagina (H1 "Dove il tempo ha ancora il suo peso.") */
.h1 {
  font-weight: var(--fw-bold);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
}

/* Claim ("Comfort quotidiano. Scelte pensate per durare.") */
.h2 {
  font-weight: var(--fw-bold);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}

/* Titoli terziari: voci servizio, città footer */
.h3 {
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}

/* Eyebrow maiuscole (DOVE SIAMO, ORARI, I NOSTRI SERVIZI) */
.label {
  font-weight: var(--fw-bold);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
}

/* Numeri 01-04 della lista servizi: 15px Medium (scala Vicari) */
.num {
  font-weight: var(--fw-medium);
  font-size: var(--fs-num);
  color: var(--color-text-soft);
}

/* Testo secondario */
.soft {
  color: var(--color-text-soft);
}

/* --- Layout ---------------------------------------------------------------- */

.container {
  padding-inline: var(--pad-x);
}

/* Riga divisoria dentro fascia da 40px (SVG "Frame 17" dell'originale) */
.divider {
  height: var(--divider-h);
  display: flex;
  align-items: center;
}

.divider::before {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--color-line);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 12px 20px;
  border: 1px solid #FFFFFF;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Varianti testo per breakpoint (testi diversi nell'originale) */
.bp-desktop { display: inline; }
.bp-mobile { display: none; }

@media (max-width: 799px) {
  .bp-desktop { display: none; }
  .bp-mobile { display: inline; }
}

/* --- Cursore personalizzato: rotondo 7x7px, bianco, senza bordo (vedi
   Reference/Design Token/design-token.md). Attivato via JS solo su
   dispositivi con puntatore fine (mouse/trackpad) e solo dal breakpoint
   Desktop (≥1280px): su tablet, mobile, in assenza di JS o su touch
   resta il cursore di sistema. ------------------------------------- */
html.custom-cursor-active,
html.custom-cursor-active * {
  cursor: none;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFFFFF;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.custom-cursor--visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
