/* The changelog with version numbers that roll on scroll. Colours in :root (the Playground palette): one indigo accent
   for the timeline, the version chips and the New tags, an amber for the fixes, everything else neutral. The panel is
   drawn at a fixed size (400 wide) and scaled to fit the stage: the scale goes on .cornice, GSAP moves what is inside. */
:root {
  --fondo: #efeeeb;          /* the page */
  --fondo-alto: #fbfaf8;     /* the soft light of the page behind the panel */
  --pannello: #ffffff;       /* the panel */
  --scheda: #ffffff;         /* the card of the release being read */
  --inchiostro: #17171c;     /* the words */
  --tenue: #6f7079;          /* the small words */
  --spento: #a9aab2;         /* the quietest words */
  --linea: rgba(20, 20, 30, 0.08); /* thin rules */
  --accento: #5a4cf0;        /* the timeline, the version chips, the New tags */
  --accento-chiaro: #ebe8ff; /* the tint of the version chips */
  --ambra: #b86e12;          /* the Fixed tags */
  --ambra-chiaro: #fbf0e0;   /* the tint of the Fixed tags */
}

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

.novita { position: relative; height: 400vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vh, 40px) clamp(10px, 4vw, 48px);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(90% 70% at 50% 38%, var(--fondo-alto), var(--fondo) 70%);
}
.alone {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(70vw, 70vh);
  height: min(70vw, 70vh);
  margin: calc(min(70vw, 70vh) / -2) 0 0 calc(min(70vw, 70vh) / -2);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accento) 22%, transparent), transparent);
  filter: blur(30px);
  opacity: 0.5;
}
.grana {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.spazio { position: relative; flex: none; }
.cornice { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* ------------------------------------------------------------------ the panel */
.pannello {
  --mx: 30%;
  --my: 0%;
  position: relative;
  width: 400px;
  padding: 20px 22px 16px;
  border-radius: 24px;
  background: var(--pannello);
  border: 1px solid rgba(20, 20, 30, 0.07);
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 2px rgba(20, 20, 40, 0.06),
    0 10px 24px -10px rgba(30, 25, 80, 0.16),
    0 40px 80px -30px rgba(30, 25, 80, 0.28);
  overflow: hidden;
}
.pannello__luce {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--accento) 7%, transparent), transparent 70%);
}

.barra { position: relative; display: flex; align-items: center; justify-content: space-between; }
.marchio { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 640; font-stretch: 108%; letter-spacing: -0.01em; }
.marchio svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 4px rgba(74, 61, 224, 0.35)); }
.campana {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--linea);
  background: linear-gradient(180deg, #fff, #f6f6f7);
  box-shadow: 0 1px 2px rgba(20, 20, 40, 0.06);
  color: var(--inchiostro);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.3s;
}
.campana svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; transform-origin: 50% 18%; }
.campana:active { transform: scale(0.92); }
@media (hover: hover) {
  .campana:hover { box-shadow: 0 4px 10px -2px rgba(30, 25, 80, 0.18); transform: translateY(-1px); }
}

.capo { position: relative; display: flex; align-items: flex-end; justify-content: space-between; margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--linea); }
.capo__occhiello { font-size: 11px; font-weight: 560; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accento); }
.capo__titolo { margin-top: 4px; font-size: 27px; line-height: 1; font-weight: 660; font-stretch: 112%; letter-spacing: -0.035em; }
.ultima { text-align: right; }
.ultima__etichetta { font-size: 10.5px; font-weight: 520; color: var(--tenue); letter-spacing: 0.02em; }
.ultima__numero { margin-top: 2px; font-size: 25px; line-height: 1; font-weight: 640; font-stretch: 100%; letter-spacing: -0.02em; }
.ultima__data { position: relative; display: grid; justify-items: end; margin-top: 5px; height: 14px; overflow: hidden; font-size: 11px; color: var(--tenue); white-space: nowrap; }
.ultima__data span { grid-area: 1 / 1; }

/* the rollers: a column of ten digits behind a one-digit window */
.rullo { display: inline-flex; align-items: baseline; }
.rullo__v { margin-right: 0.04em; color: var(--spento); }
.cifra { position: relative; display: inline-block; width: 0.62em; height: 1em; overflow: hidden; line-height: 1; text-align: center; vertical-align: top;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); }
.cifra__col { display: flex; flex-direction: column; will-change: transform; }
.cifra__col b { display: block; height: 1em; font-weight: inherit; }
.punto { display: inline-block; width: 0.26em; text-align: center; }

/* ------------------------------------------------------------------ the body */
.corpo {
  position: relative;
  height: 316px;
  margin-top: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 94%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 94%, transparent);
}
.binario { position: absolute; left: 7px; top: 0; bottom: 0; width: 1px; background: var(--linea); }
.binario__pieno {
  position: absolute;
  left: -0.5px;
  top: 0;
  width: 2px;
  height: 100%;
  border-radius: 2px;
  transform-origin: 50% 0;
  transform: scaleY(0);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accento) 25%, transparent), var(--accento));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accento) 40%, transparent);
}

.scheletro { position: absolute; left: 24px; right: 0; top: 150px; display: grid; gap: 10px; }
.scheletro i {
  display: block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f2 0%, #f8f8fa 40%, #f0f0f2 80%) 0 0 / 300% 100%;
  animation: luccica 1.6s linear infinite;
}
.scheletro i:nth-child(1) { width: 38%; height: 18px; }
.scheletro i:nth-child(2) { width: 72%; }
.scheletro i:nth-child(3) { width: 86%; }
.scheletro i:nth-child(4) { width: 60%; }
@keyframes luccica { to { background-position: -150% 0; } }

.elenco { position: relative; list-style: none; padding-left: 24px; will-change: transform; }
.versione { position: relative; padding-bottom: 12px; }
/* the hairline from the timeline to the card */
.versione__tacca { position: absolute; left: -17px; top: 25px; width: 12px; height: 1px; background: var(--accento); transform-origin: 0 50%; }
.scheda {
  position: relative;
  padding: 13px 15px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
}
/* the surface of the release being read: GSAP fades it in and out */
.scheda__fondo {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--scheda);
  border: 1px solid rgba(20, 20, 30, 0.08);
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 2px rgba(20, 20, 40, 0.05),
    0 8px 20px -8px rgba(30, 25, 80, 0.16),
    0 24px 40px -24px rgba(30, 25, 80, 0.22);
  overflow: hidden;
}
/* the light that sweeps across the card once its lines are written */
.scheda__lampo {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(122, 108, 255, 0.11), transparent);
}
/* the beam round the edge of a major release */
.scheda__raggio {
  --ang: 0deg;
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--ang), transparent 0 70%, color-mix(in srgb, var(--accento) 80%, #fff) 82%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
}
.scheda > *:not(.scheda__fondo):not(.scheda__raggio) { position: relative; }
.riga1 { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px 0 7px;
  border-radius: 7px;
  background: var(--accento-chiaro);
  color: var(--accento);
  font-size: 12.5px;
  font-weight: 640;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accento) 14%, transparent);
}
.chip .rullo__v { color: color-mix(in srgb, var(--accento) 55%, transparent); }
.chip .cifra { height: 1.1em; line-height: 1.1; }
.chip .cifra__col b { height: 1.1em; }
.data { font-size: 11.5px; color: var(--tenue); }
.maggiore {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, #7d70ff, #4a3de0);
  box-shadow: 0 4px 10px -3px rgba(74, 61, 224, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.titolo { margin-top: 9px; font-size: 16px; line-height: 1.25; font-weight: 640; font-stretch: 104%; letter-spacing: -0.015em; }
.voci { list-style: none; margin-top: 8px; display: grid; gap: 6px; }
.voce { display: grid; grid-template-columns: 66px 1fr; align-items: start; gap: 6px; }
.etichetta {
  justify-self: start;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.45;
  font-weight: 600;
  background: #f2f2f4;
  color: #50515a;
}
.etichetta--new { background: var(--accento-chiaro); color: var(--accento); }
.etichetta--fixed { background: var(--ambra-chiaro); color: var(--ambra); }
.testo { position: relative; font-size: 12.5px; line-height: 1.5; color: #3a3b44; }
.titolo .c, .testo .c { opacity: 0; }
.titolo .c.su, .testo .c.su { opacity: 1; }
.cursore {
  position: absolute;
  top: 0.18em;
  left: 0;
  width: 1.5px;
  height: 1.15em;
  border-radius: 1px;
  background: var(--accento);
  opacity: 0;
  pointer-events: none;
}
.titolo { position: relative; }

.piede { position: relative; display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--linea); font-size: 11.5px; color: var(--tenue); }
.piede__link { display: inline-flex; align-items: center; gap: 4px; color: var(--inchiostro); font-weight: 580; text-decoration: none; }
.piede__link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
@media (hover: hover) {
  .piede__link:hover svg { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .scheletro i { animation: none; }
}
