/* ============================================================
   METALMEC — Base: font, reset, container, utilities
   ============================================================ */

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

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  letter-spacing: var(--ls-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* cintura di sicurezza contro overflow orizzontali */
}

/* Contiene le sezioni [data-enter-right] che partono fuori dal viewport a
   destra (translateX 100vw): clip REALE sui discendenti. Sul body il clip
   viene propagato al viewport e non conterrebbe la traslazione. `clip` (non
   hidden) non crea uno scroll-container → lo sticky della hero resta valido. */
main {
  overflow-x: clip;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

/* --- Tipografia di sistema --- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
}

h1 {
  font-size: var(--text-h1);
  line-height: 1;
  letter-spacing: var(--ls-h1);
}

h2 {
  font-size: var(--text-h2);
  line-height: 1;
  letter-spacing: var(--ls-h2);
}

h3 {
  font-size: var(--text-h3);
  line-height: 1.2;
}

/* --- Container ---
   Mai usare 100vw (overflow con scrollbar Windows):
   full-bleed = width 100% su sezioni figlie dirette di body/main. */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

/* --- Utilities --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.text-muted {
  color: var(--muted);
}
