/* ============================================================
   Modern reset — minimale, mirato.
   Ispirato a Josh Comeau + Andy Bell, adattato a Consulix.
   ============================================================ */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100dvh;
  line-height: var(--lh-normal);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--fg-primary);
  background: var(--bg-page);
  text-wrap: pretty;
}

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

img { font-style: italic; background-repeat: no-repeat; background-size: cover; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
}

button { cursor: pointer; user-select: none; }

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

ul, ol { list-style: none; }

table { border-collapse: collapse; border-spacing: 0; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

h1, h2, h3, h4 { text-wrap: balance; }

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

[hidden] { display: none !important; }

/* Skip link a11y */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--c-navy-900);
  color: var(--fg-on-dark);
  border-radius: var(--r-sm);
  z-index: var(--z-toast);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { top: 1rem; }
