/* Base: reset leggero, tipografia, link, pulsanti, utilità. */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--pi-font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--pi-ink);
  background: var(--pi-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pi-blue-dark);
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 2.2vw + 22px, 42px); }
h2 { font-size: clamp(30px, 2.2vw + 22px, 42px); }
h3 { font-size: clamp(20px, 0.8vw + 16px, 24px); }
h4 { font-size: 20px; }

p { margin: 0 0 9px; }

a { color: var(--pi-blue); }
a:hover { color: var(--pi-blue-dark); }

strong, b { font-weight: 700; }

:focus-visible { outline: 3px solid var(--pi-mint); outline-offset: 2px; }

/* Ancore sotto l'header fisso. */
[id] { scroll-margin-top: calc(var(--pi-header-height) + 10px); }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 18px;
  background: #fff;
  border-radius: var(--pi-radius-pill);
}

.pi-container {
  width: 100%;
  max-width: var(--pi-container);
  margin-inline: auto;
  padding-inline: var(--pi-gutter);
}

/* Pulsanti del tema (fuori dai blocchi). */
.pi-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  color: var(--pi-blue);
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--pi-radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.pi-button:hover { transform: translateY(-1px); color: var(--pi-blue-dark); }
.pi-button--primary { background: var(--pi-blue); color: #fff; }
.pi-button--primary:hover { background: var(--pi-blue-dark); color: #fff; }
.pi-button--mint { background: var(--pi-mint); color: var(--pi-blue-dark); border-radius: 3px; }
.pi-button--mint:hover { background: var(--pi-mint-light); color: var(--pi-blue-dark); }
.pi-button--glass { background: var(--pi-glass); color: #fff; border-color: var(--pi-glass-border); }
.pi-button--glass:hover { background: var(--pi-glass-light); color: #fff; }

/* Icone: maschera SVG colorata con currentColor. Uso: <span class="pi-icon pi-icon--euro"></span> */
.pi-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--pi-icon) center / contain no-repeat;
  mask: var(--pi-icon) center / contain no-repeat;
}
