/* The company story that runs sideways with the years. Colours in :root (the Playground palette). */
:root {
  --fondo: #f6f5f1;
  --carta: #ffffff;
  --inchiostro: #16171a;
  --tenue: #8a8983;
  --linea: #e3e1da;
  --figura: #efeee8;
  --accento: #1f8a62;
  --accento-tenue: #e3f2eb;
}

* { 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: 500vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.5vh, 28px) clamp(8px, 3vw, 32px);
  overflow: hidden;
}

/* the artboard is drawn at 640 x 420 (420 x 420 when the stage is narrow) and scaled to fit on width and height */
.spazio { position: relative; flex: none; }
.tavola {
  position: absolute;
  left: 0;
  top: 0;
  width: 640px;
  height: 420px;
  transform-origin: 0 0;
}
.tavola.is-stretta { width: 420px; }

/* ---------- the header: mark, label, the big rolling year ---------- */
.testa {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 12px;
}
.is-stretta .testa { left: 24px; right: 24px; }
.testa__riga {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.marchio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.01em;
}
.marchio svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.etichetta {
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tenue);
}
.anno {
  margin-top: 10px;
  display: flex;
  font-size: 68px;
  line-height: 1;
  font-weight: 690;
  font-variation-settings: 'wdth' 112;
  letter-spacing: -0.035em;
}
.is-stretta .anno { font-size: 58px; }
.colonna {
  position: relative;
  display: block;
  width: 0.62em;
  height: 1.04em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.colonna__pila {
  position: absolute;
  left: 0;
  top: 0.02em;
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.colonna__pila span { display: block; height: 1.04em; text-align: center; }
.sottotitolo {
  margin-top: 6px;
  font-size: 12px;
  color: var(--tenue);
  font-weight: 460;
}

/* ---------- the track of milestones that runs sideways ---------- */
.finestra {
  position: absolute;
  left: 0;
  right: 0;
  top: 150px;
  height: 196px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.binario {
  position: absolute;
  left: 0;
  top: 6px;
  display: flex;
  gap: 24px;
  will-change: transform;
}
.tappa {
  flex: none;
  width: 248px;
  padding: 8px;
  border-radius: 16px;
  background: var(--carta);
  border: 1px solid var(--linea);
  box-shadow: 0 1px 2px rgba(22, 23, 26, 0.04), 0 14px 30px -20px rgba(22, 23, 26, 0.3);
  transform-origin: 50% 60%;
}
.is-stretta .tappa { width: 232px; }
.tappa__figura {
  height: 104px;
  border-radius: 10px;
  background: var(--figura);
  overflow: hidden;
}
.tappa__figura svg { display: block; width: 100%; height: 100%; }
.tappa__titolo {
  margin: 10px 4px 0;
  font-size: 14.5px;
  line-height: 1.15;
  font-weight: 640;
  font-variation-settings: 'wdth' 106;
  letter-spacing: -0.012em;
}
.tappa__testo {
  margin: 4px 4px 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--tenue);
  font-weight: 450;
}

/* the drawings inside the milestones: thin lines, one accent */
.carta-foglio { fill: #fbfaf6; stroke: #d7d5cc; stroke-width: 1; }
.matita { fill: none; stroke: #6f6e68; stroke-width: 1.3; stroke-linecap: round; }
.tratteggio { stroke-dasharray: 3 3; }
.lapis__corpo { fill: var(--accento); }
.lapis__punta { fill: #2b2b2b; }
.telefono { fill: var(--carta); stroke: var(--inchiostro); stroke-width: 1.4; }
.telefono__orecchio { fill: #d9d7cf; }
.riga-app { fill: var(--figura); stroke: #dad8d0; stroke-width: 1; }
.riga-app--accesa { fill: var(--accento-tenue); stroke: var(--accento); }
.spunta { fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.riga-testo { fill: none; stroke: #c9c7bf; stroke-width: 2; stroke-linecap: round; }
.riga-chiara { fill: none; stroke: #c9c7bf; stroke-width: 1.6; stroke-linecap: round; }
.beta {
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 620;
  fill: var(--accento);
  letter-spacing: 0.02em;
}
.asse { fill: none; stroke: #c9c7bf; stroke-width: 1.2; stroke-linecap: round; }
.barra { fill: #d9d7cf; }
.barra--accesa { fill: var(--accento); }
.tendenza { fill: none; stroke: var(--inchiostro); stroke-width: 1.2; stroke-dasharray: 2 3; stroke-linecap: round; }
.nuvola { fill: var(--carta); stroke: var(--inchiostro); stroke-width: 1.4; stroke-linejoin: round; }
.freccia { fill: none; stroke: var(--accento); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.taglio { fill: none; stroke: var(--tenue); stroke-width: 1.4; stroke-linecap: round; }
.schermo { fill: var(--carta); stroke: var(--inchiostro); stroke-width: 1.4; }
.base { fill: #dcdad2; }
.lato { fill: var(--inchiostro); }
.lato + .riga-chiara { stroke: #6b6b6b; }

/* ---------- the thin line under the years ---------- */
.linea {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 364px;
  height: 40px;
}
.is-stretta .linea { left: 24px; right: 24px; }
.linea__fondo,
.linea__piena {
  position: absolute;
  left: 0;
  top: 6px;
  height: 1.5px;
  border-radius: 2px;
}
.linea__fondo { right: 0; background: var(--linea); }
.linea__piena {
  width: 100%;
  background: var(--accento);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
/* the travelling notch: a short upright bar, not a round dot */
.linea__segno {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--accento);
  box-shadow: 0 0 0 3px var(--fondo);
}
.linea__anni { list-style: none; }
.linea__anni li {
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 540;
  color: var(--tenue);
  white-space: nowrap;
}
.linea__anni li::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -10px;
  width: 1px;
  height: 6px;
  margin-left: -0.5px;
  background: currentColor;
  opacity: 0.6;
}

.invito {
  position: absolute;
  right: 40px;
  top: 112px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 520;
  color: var(--tenue);
}
.is-stretta .invito { display: none; }
.invito svg {
  width: 10px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
