/* The manifesto that lights up word by word on scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #ffffff;
  --inchiostro: #0b0b0f;
  --spento: #d4d4d8;
  --secondario: #71717a;
  --bordo: rgba(10, 10, 20, 0.08);
  --accento: #4f46e5;
  --evidenza: #e0e7ff;
  --volto-1: #c7d2fe;
  --volto-2: #fde68a;
  --volto-3: #bbf7d0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--fondo); }
body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.corsa { position: relative; height: 320vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 4.2vh, 40px);
  padding: clamp(14px, 5vh, 56px) clamp(16px, 7vw, 120px);
  overflow: hidden;
}

.occhiello {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px 6px 9px;
  border: 1px solid var(--bordo);
  border-radius: 999px;
  font-size: clamp(11px, min(1.25vw, 2.1vh), 13px);
  font-weight: 520;
  color: var(--secondario);
  background: #fafafa;
}
.occhiello svg { width: 14px; height: 14px; fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.manifesto {
  max-width: 30em;
  font-size: clamp(17px, min(3.5vw, 5.6vh), 50px);
  line-height: 1.22;
  letter-spacing: -0.022em;
  font-weight: 440;
  color: var(--spento);
  font-variation-settings: 'wdth' 100;
}

/* a word: the hidden bold copy keeps the width still while the weight changes */
.w { display: inline-grid; justify-items: center; vertical-align: baseline; }
.w > .w__in, .w::after { grid-area: 1 / 1; }
.w::after { content: attr(data-t); visibility: hidden; font-weight: var(--peso-largo, 580); height: 0; overflow: hidden; }
.w__in { display: inline-block; position: relative; will-change: transform; }

/* the highlighter behind «calmer», drawn by GSAP with scaleX */
.w--evidenza .w__in { z-index: 0; }
.evidenziatore {
  position: absolute;
  left: -0.12em; right: -0.12em;
  top: 0.16em; bottom: 0.02em;
  background: var(--evidenza);
  border-radius: 0.14em 0.3em 0.18em 0.34em;
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: -1;
}

/* three avatars after «together»: always holding their room, so the paragraph never jumps */
.volti {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  height: 0.7em;
  vertical-align: -0.02em;
  margin-left: 0.22em;
  padding-right: 0.05em;
}
.volti i {
  display: inline-grid;
  place-items: center;
  width: 2.75em;
  height: 2.75em;
  margin-left: -0.5em;
  line-height: 1;
  border-radius: 50%;
  border: 0.2em solid var(--fondo);
  font-style: normal;
  font-size: 0.35em;
  font-weight: 640;
  letter-spacing: 0;
  color: var(--inchiostro);
  transform: scale(0);
}
.volti i:first-child { margin-left: 0; background: var(--volto-1); }
.volti i:nth-child(2) { background: var(--volto-2); }
.volti i:nth-child(3) { background: var(--volto-3); }

.firma { display: flex; flex-direction: column; gap: clamp(8px, 2.2vh, 16px); max-width: 30em; }
.firma__riga { display: block; height: 1px; width: min(100%, 420px); background: var(--bordo); transform: scaleX(0); transform-origin: 0 50%; }
.firma__chi { display: flex; align-items: center; gap: 10px; opacity: 0; }
.firma__marchio { width: clamp(22px, 4vh, 30px); height: clamp(22px, 4vh, 30px); flex: none; }
.firma__marchio rect { fill: var(--inchiostro); }
.firma__marchio path { fill: none; stroke: var(--fondo); stroke-width: 1.8; stroke-linecap: round; }
.firma__chi p { display: flex; flex-direction: column; line-height: 1.25; font-size: clamp(11px, min(1.3vw, 2.2vh), 14px); }
.firma__chi b { font-weight: 600; }
.firma__chi span { color: var(--secondario); }

.piede {
  height: 60vh;
  display: grid;
  place-items: center;
  color: var(--secondario);
  font-size: 14px;
  border-top: 1px solid var(--bordo);
}

@media (max-width: 560px) {
  .palco { padding-inline: 18px; }
}
