/* chalco · stili di base del sito
   parte da tokens.css (pacchetto di sviluppo 18.10.2026). regole di marca:
   testi in minuscolo, montserrat per tutto, ibm plex mono solo per i dati. */

/* ---------- font (file locali, licenza SIL OFL) */
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Regular.woff2") format("woff2"), url("../fonts/Montserrat-Regular.ttf") format("truetype");   font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Medium.woff2") format("woff2"), url("../fonts/Montserrat-Medium.ttf") format("truetype");    font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-SemiBold.woff2") format("woff2"), url("../fonts/Montserrat-SemiBold.ttf") format("truetype");  font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Bold.woff2") format("woff2"), url("../fonts/Montserrat-Bold.ttf") format("truetype");      font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-ExtraBold.woff2") format("woff2"), url("../fonts/Montserrat-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- reset essenziale */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; overflow-x: clip; font-family: var(--font-sans); color: var(--c-ink); background-color: var(--c-paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  /* griglia deformata di fondo, dietro tutti i contenuti */
  background-image: url("../img/griglia_bianco.svg");
  background-repeat: no-repeat; background-position: top center; background-size: 1440px auto;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--c-black); color: #fff; padding: 12px 18px;
  font-size: var(--fs-btn); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.skip:focus { top: 12px; }

/* ---------- layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter-x); }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); }
.section { position: relative; }

/* ---------- testi */
.h-hero    { font-size: var(--fs-hero); font-weight: 800; letter-spacing: var(--ls-display); line-height: 1; margin: 0; }
.h-section { font-size: var(--fs-section); font-weight: 800; letter-spacing: var(--ls-display); line-height: 1; margin: 20px 0 0; }
.h-info    { font-size: var(--fs-info); font-weight: 800; letter-spacing: -.045em; line-height: .98; margin: 16px 0 0; }
.lead  { font-size: var(--fs-body); line-height: 1.75; color: var(--c-ink-2); max-width: 520px; margin: 28px 0 0; }
.label { font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--ls-label); text-transform: uppercase; }
.badge { display: inline-block; min-width: 34px; height: 34px; line-height: 32px; padding: 0 12px; text-align: center;
  border: 1px solid var(--c-black); border-radius: 17px; font-size: 12px; font-weight: 700; background: var(--c-paper); }

/* ---------- pulsanti (hover proposto nel LEGGIMI: il colore si inverte) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: var(--fs-btn); font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; border: 1px solid var(--c-black); padding: 13px 24px; white-space: nowrap;
  transition: background-color .18s, color .18s; }
.btn--primary { background: var(--c-black); color: #fff; }
.btn--primary:hover { background: transparent; color: var(--c-black); }
.btn--secondary { background: transparent; color: var(--c-ink); }
.btn--secondary:hover { background: var(--c-black); color: #fff; }

/* ---------- dati: IBM Plex Mono, solo per i valori nei riquadri dati */
.data { font-family: var(--font-mono); font-size: 11px; font-weight: 400; }

/* ---------- led (punto colorato) */
.led { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: middle; flex-shrink: 0; }
.led--y { background: var(--c-yellow); } .led--r { background: var(--c-red); } .led--b { background: var(--c-blue); } .led--k { background: var(--c-black); }

/* ---------- segnaposto delle sezioni ancora da costruire */
.placeholder { padding-top: 120px; padding-bottom: 120px; border-top: 1px dashed rgba(14,14,16,.35); }
.placeholder p { margin: 12px 0 0; color: var(--c-ink-3); font-size: 14px; }

/* ---------- responsive (indicazioni del LEGGIMI §8, mobile non ancora disegnato) */
@media (max-width: 1279px) { :root { --gutter-x: 48px; } }
@media (max-width: 1023px) {
  :root { --cols: 6; --gutter-x: 32px; --fs-section: 60px; --fs-hero: 52px; --fs-info: 44px; }
  body { background-size: 1100px auto; }
}
@media (max-width: 767px) {
  :root { --cols: 1; --gutter-x: 16px; --fs-section: 44px; --fs-hero: 40px; --fs-info: 34px; }
  body { background-size: 900px auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* avviso a comparsa (pagine in preparazione) */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--c-black); color: #fff; padding: 13px 20px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 6px 6px 0 var(--c-yellow); transition: opacity .2s, transform .2s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
/* la griglia di fondo su un livello proprio, così non viene ridisegnata a ogni scorrimento */
body { background-image: none; }
body::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 15000px; max-height: 100%;
  background: url("../img/griglia_bianco.svg") top center / 1440px auto no-repeat; pointer-events: none; transform: translateZ(0); }
html, body { position: relative; }
body { min-height: 100%; }
@media (max-width: 1023px) { body::after { background-size: 1100px auto; } }
@media (max-width: 767px) { body::after { background-size: 900px auto; } }
