/* Reset moderno — mobile-first, nessuna libreria. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--n2);
}

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

body {
  font-family: var(--sans);
  font-size: var(--fs-md);
  background: var(--n2);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  min-height: 100dvh;
}

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

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul,
ol {
  list-style: none;
}

/* Focus sempre visibile, contrasto adeguato su fondo chiaro e scuro */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

::placeholder {
  color: var(--n5);
  opacity: 1;
}

/* iOS: campi che non zoomano al focus se >= 16px */
@media (max-width: 640px) {
  input,
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}
