:root {
  --fondo: #f5f2ec;          /* warm white */
  --inchiostro: #17150f;     /* the read words */
  --spento: #cbc5ba;         /* the words still to read */
  --accento: #ff5a1f;        /* the one accent: tungsten orange */
  --tessera: #ffffff;
  --bordo: rgba(23, 21, 15, 0.09);
  --nota: #8a8377;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--fondo); }
body {
  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;
  overflow: hidden;
  display: grid;
  place-items: center;
}
@supports (height: 100lvh) { .palco { height: 100lvh; } }

.alone {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(48% 40% at 72% 28%, rgba(255, 150, 90, 0.10), transparent 70%),
    radial-gradient(40% 36% at 18% 82%, rgba(255, 255, 255, 0.9), transparent 70%);
  pointer-events: none;
}
.grana {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.47  0 0 0 0 0.42  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  pointer-events: none;
}

.cornice {
  position: relative;
  width: min(92vw, 1080px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 5.5vh, 56px);
  --fs: clamp(19px, min(6.2vw, 5.3vh), 58px);
}

.testa, .piede {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.marchio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(12px, 1.9vh, 15px);
  font-weight: 620;
  font-stretch: 108%;
  letter-spacing: -0.01em;
}
.marchio__segno { width: 1.45em; height: 1.45em; fill: none; stroke: var(--inchiostro); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.marchio__piega { stroke: var(--accento); }
.etichetta, .piede__nota {
  font-family: 'Geist Mono Variable', ui-monospace, monospace;
  font-size: clamp(9.5px, 1.5vh, 11.5px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nota);
}

.manifesto {
  font-size: var(--fs);
  line-height: 1.2;
  font-weight: 470;
  font-stretch: 104%;
  letter-spacing: -0.028em;
  max-width: 21em;
  text-wrap: pretty;
}
.coppia { white-space: nowrap; }
.parola { display: inline-block; color: var(--spento); }

/* ---------- the tile: the wrapper is for GSAP (width and margin), the body is for CSS ---------- */
.tessera {
  display: inline-block;
  position: relative;
  --a: 0;
  width: calc(var(--w, 1.7em) * max(var(--a), 0));
  margin-left: calc(0.2em * min(max(var(--a), 0), 1));
  height: 0.84em;
  vertical-align: -0.12em;
  outline: none;
  cursor: pointer;
}
.tessera__corpo {
  position: absolute;
  inset: 0;
  border-radius: min(0.26em, 50%);
  background: linear-gradient(180deg, #ffffff 0%, #fbf9f5 100%);
  box-shadow:
    0 0 0 1px var(--bordo),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 1px 1px rgba(23, 21, 15, 0.05),
    0 4px 10px -3px rgba(23, 21, 15, 0.10),
    0 14px 26px -14px rgba(120, 60, 20, 0.22);
  overflow: hidden;
  opacity: min(calc(var(--a) * 4), 1);
}
.tessera__corpo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.75) 48%, transparent 62%);
  translate: var(--luce, -120%) 0;
  pointer-events: none;
}
.tessera__ogg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--w, 1.7em);
  margin-left: calc(var(--w, 1.7em) / -2);
  display: grid;
  place-items: center;
}
.tessera[data-tessera="grafico"] { --w: 1.8em; }
.tessera[data-tessera="cursore"] { --w: 1.9em; }
.tessera[data-tessera="stato"] { --w: 2.5em; }
.tessera[data-tessera="interruttore"] { --w: 1.45em; }
.tessera:focus-visible .tessera__corpo { box-shadow: 0 0 0 2px var(--accento), 0 4px 10px -3px rgba(23, 21, 15, 0.1); }

/* the chart */
.grafico { width: 86%; height: 78%; overflow: visible; }
.grafico__rete { stroke: rgba(23, 21, 15, 0.07); stroke-width: 0.8; fill: none; stroke-dasharray: 1.5 2.5; }
.grafico__linea { fill: none; stroke: var(--accento); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grafico__mira { stroke: rgba(23, 21, 15, 0.22); stroke-width: 0.8; stroke-dasharray: 2 2; }

/* the cursor and its button */
.bottone {
  position: absolute;
  left: 11%;
  top: 23%;
  width: 52%;
  height: 54%;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a2720, var(--inchiostro));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 4px -1px rgba(23, 21, 15, 0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.bottone__testo { position: relative; color: #fff; font-size: 0.26em; font-weight: 600; letter-spacing: 0; font-stretch: 110%; }
.bottone__onda { position: absolute; width: 140%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 90, 31, 0.75), rgba(255, 90, 31, 0) 100%); opacity: 0; }
.freccia {
  position: absolute;
  left: 58%;
  top: 40%;
  width: 0.3em;
  height: 0.375em;
  overflow: visible;
  filter: drop-shadow(0 1.5px 1.5px rgba(23, 21, 15, 0.28));
}
.freccia path { fill: var(--inchiostro); stroke: #fff; stroke-width: 1.3; stroke-linejoin: round; }

/* the status pill */
.stato {
  display: flex;
  align-items: center;
  gap: 0.09em;
  height: 0.48em;
  padding: 0 0.15em 0 0.1em;
  border-radius: 999px;
  background: rgba(255, 90, 31, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.22);
  color: #c63d0c;
}
.stato__segno { width: 0.28em; height: 0.28em; overflow: visible; }
.stato__giro { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; transform-origin: 7px 7px; }
.stato__spunta { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stato__righe { position: relative; display: block; height: 1.25em; overflow: hidden; font-size: 0.24em; line-height: 1.25em; font-weight: 620; letter-spacing: 0.01em; font-stretch: 106%; width: 4.4em; }
.stato__riga { position: absolute; left: 0; top: 0; white-space: nowrap; }

/* the switch */
.interruttore {
  position: relative;
  width: 0.86em;
  height: 0.48em;
  border-radius: 999px;
  background: #e4dfd6;
  box-shadow: inset 0 1px 2px rgba(23, 21, 15, 0.16);
}
.interruttore__pomello {
  position: absolute;
  z-index: 1;
  left: 0.05em;
  top: 0.05em;
  width: 0.38em;
  height: 0.38em;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #f4f1ec);
  box-shadow: 0 1px 2px rgba(23, 21, 15, 0.25), 0 0 0 0.5px rgba(23, 21, 15, 0.06);
}

/* the footer link */
.squadra {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(28px, 4.6vh, 36px);
  padding: 0 14px 0 16px;
  border-radius: 999px;
  background: var(--tessera);
  box-shadow: 0 0 0 1px var(--bordo), 0 4px 10px -4px rgba(23, 21, 15, 0.14);
  color: var(--inchiostro);
  text-decoration: none;
  font-size: clamp(11.5px, 1.8vh, 13.5px);
  font-weight: 560;
  font-stretch: 104%;
  transition: box-shadow 0.4s;
}
.squadra__freccia { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: translate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@media (hover: hover) {
  .squadra:hover { box-shadow: 0 0 0 1px rgba(255, 90, 31, 0.4), 0 8px 18px -6px rgba(255, 90, 31, 0.3); }
  .squadra:hover .squadra__freccia { translate: 3px 0; }
}

@media (max-width: 560px) {
  .piede__nota { display: none; }
  .piede { justify-content: flex-start; }
}
