/* The product roadmap whose cards change state as you scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f7f6f2;
  --carta: #ffffff;
  --inchiostro: #16161a;
  --secondario: #77746d;
  --spento: #b9b5ac;
  --bordo: rgba(22, 22, 26, 0.08);
  --griglia: rgba(22, 22, 26, 0.1);
  --accento: #0f7a55;
  --accento-tenue: rgba(15, 122, 85, 0.1);
}

* { 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: 340vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.6vh, 28px);
  padding: clamp(10px, 3vh, 40px) clamp(10px, 4vw, 64px);
  overflow: hidden;
}

/* the header */
.testa { display: flex; flex-direction: column; align-items: center; gap: clamp(4px, 1.1vh, 10px); text-align: center; }
.occhiello {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 9px;
  border: 1px solid var(--bordo); border-radius: 999px;
  background: var(--carta);
  color: var(--secondario);
  font-size: clamp(10px, min(1.2vw, 1.9vh), 13px);
  font-weight: 540;
  box-shadow: 0 1px 2px rgba(22, 22, 26, 0.04);
}
.occhiello svg { width: 13px; height: 13px; fill: none; stroke: var(--accento); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.titolo {
  font-size: clamp(19px, min(4.4vw, 6vh), 54px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  font-stretch: 112%;
}
.conto {
  color: var(--secondario);
  font-size: clamp(11px, min(1.3vw, 2.1vh), 15px);
  font-weight: 460;
  font-variant-numeric: tabular-nums;
}
.conto .rullo { color: var(--inchiostro); font-weight: 640; }

/* a rolling slot: one line tall, the spans inside stacked */
.rullo {
  display: inline-block;
  position: relative;
  height: 1.2em;
  line-height: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
}
.rullo__dentro { display: block; }
.rullo__dentro > span { display: block; height: 1.2em; }

/* the board */
.tavola { position: relative; width: min(1080px, 100%); }
.linea { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.linea__base { fill: none; stroke: var(--griglia); stroke-width: 1; stroke-dasharray: 1 1; }
.linea__piena { fill: none; stroke: var(--accento); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.tacca { stroke: var(--spento); stroke-width: 1; }
.tacca.accesa { stroke: var(--accento); }

.mese {
  position: absolute; left: 0; top: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--inchiostro);
  color: #fff;
  font-size: clamp(9px, min(1vw, 1.6vh), 11px);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 10px -4px rgba(22, 22, 26, 0.35);
  opacity: 0;
}
.mese .rullo { height: 1.3em; line-height: 1.3em; }
.mese .rullo__dentro > span { height: 1.3em; }

.corsie {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.6vw, 22px);
  padding-top: clamp(28px, 4.4vh, 40px);
}
.corsia { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); min-width: 0; }
.corsia__testa {
  display: flex; align-items: baseline; gap: 7px;
  padding-left: 2px;
  font-size: clamp(11px, min(1.25vw, 2vh), 14px);
  font-weight: 620;
  font-stretch: 108%;
  letter-spacing: -0.01em;
}
.corsia__quante { color: var(--spento); font-weight: 500; font-variant-numeric: tabular-nums; }
.corsia__carte { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 12px); }

.carta {
  position: relative;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 12px;
  padding: clamp(8px, 1.6vh, 16px) clamp(10px, 1.3vw, 16px) clamp(8px, 1.5vh, 14px);
  box-shadow: 0 1px 2px rgba(22, 22, 26, 0.04), 0 10px 24px -18px rgba(22, 22, 26, 0.25);
  display: flex; flex-direction: column; gap: clamp(4px, 0.9vh, 9px);
  min-width: 0;
}
.carta__riga { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.carta__nome {
  font-size: clamp(11.5px, min(1.35vw, 2.15vh), 15.5px);
  font-weight: 580;
  letter-spacing: -0.012em;
  color: var(--secondario);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.carta__nota {
  font-size: clamp(10px, min(1.1vw, 1.8vh), 12.5px);
  line-height: 1.35;
  color: var(--secondario);
}
.spunta { flex: none; width: clamp(14px, min(1.5vw, 2.4vh), 18px); height: auto; overflow: visible; }
.spunta__cerchio { fill: var(--accento); }
.spunta__segno { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.spunta__anello { fill: none; stroke: var(--griglia); stroke-width: 1; stroke-dasharray: 2 2.2; }

.carta__piede { display: flex; align-items: center; gap: 9px; }
.chip {
  flex: none;
  position: relative;
  height: 1.7em;
  border-radius: 999px;
  overflow: hidden;
  font-size: clamp(9px, min(0.95vw, 1.6vh), 11px);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.chip__fondo { position: absolute; inset: 0; border-radius: inherit; background: rgba(22, 22, 26, 0.06); }
.chip__rullo { position: relative; display: block; }
.chip__rullo > span { display: block; width: max-content; height: 1.7em; line-height: 1.7em; padding: 0 8px; }
.barra { display: block; flex: 1; height: 3px; border-radius: 3px; background: var(--griglia); overflow: hidden; min-width: 18px; }
.barra__piena { display: block; position: relative; height: 100%; width: 100%; border-radius: 3px; background: var(--inchiostro); transform-origin: 0 50%; overflow: hidden; }
.barra__luce { display: block; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)); opacity: 0; }
.cifra {
  flex: none; min-width: 2.6em; text-align: right;
  font-size: clamp(9px, min(0.95vw, 1.6vh), 11px);
  color: var(--spento); font-weight: 560; font-variant-numeric: tabular-nums;
}

.chiusa {
  color: var(--secondario);
  font-size: clamp(10px, min(1.15vw, 1.9vh), 13px);
  opacity: 0;
}

.piede {
  padding: 28px 16px 40px;
  text-align: center;
  color: var(--spento);
  font-size: 12px;
}

/* narrow: the lanes become rows, two cards side by side, the line runs down the left */
@media (max-width: 600px) {
  .corsie { grid-template-columns: 1fr; padding-top: 0; padding-left: 18px; gap: clamp(8px, 1.8vh, 14px); }
  .corsia__carte { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .carta { border-radius: 10px; }
  .carta__nota { display: none; }
  .cifra { display: none; }
  .titolo { font-stretch: 100%; }
  .mese { display: none; }
}
