/* ==========================================================================
   OASI — Base: reset + typography defaults
   Fonte: DESIGN.md §3 (Typography), §4 (Layout), §8 (Accessibility)
   e stili base del prototipo (delivery/prototipo/index.html)
   ========================================================================== */

/* Reset ------------------------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  /* Nessuno scroll orizzontale di pagina (100vw hero/deco + scrollbar).
     `clip` non crea un contenitore di scroll, quindi non rompe position:sticky. */
  overflow-x: clip;
}

body {
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--bg-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* Typography (prototipo + DESIGN.md §3) ----------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-heading);
  letter-spacing: -.03em;
  line-height: .98;
}

h1 {
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 9rem);
  letter-spacing: -.05em;
  line-height: .92;
}

h2 {
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  letter-spacing: -.04em;
}

h3 {
  font-weight: 700;
  font-size: 1.5rem;
}

p {
  font-family: var(--font-body);
  color: var(--text-body);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* Container (DESIGN.md §4.2) ----------------------------------------------- */

.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* Focus ring (DESIGN.md §8) ------------------------------------------------ */

:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

/* Responsive globale (pass Fase 12c) --------------------------------------- */

/* Nessuna parola/elemento deve sforare in orizzontale sui poster H1 */
h1, h2 { overflow-wrap: break-word; }

/* Su telefono l'H1 poster (88–96px desktop) scende sotto la soglia della
   scala DS per non traboccare — resta comunque display/poster. */
@media (max-width: 480px) {
  h1 { font-size: clamp(2.6rem, 10.5vw, 3.4rem); }
}
