/* The pricing cards that line up as you scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f5f4f0;
  --carta: #ffffff;
  --inchiostro: #17171a;
  --tenue: #86857f;
  --linea: #e4e2db;
  --accento: #4655f0;
  --accento-tenue: #eceefe;
}

* { 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: 400vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  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 (500 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: 500px; }

/* ---------- the header ---------- */
.testa {
  position: absolute;
  left: 0;
  right: 0;
  top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.testa__marchio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.testa__marchio svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.testa__titolo {
  margin-top: 7px;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 640;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -0.02em;
}
.is-stretta .testa__titolo { font-size: 21px; }

.interruttore {
  position: relative;
  margin-top: 11px;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #ebe9e3;
  box-shadow: inset 0 1px 2px rgba(23, 23, 26, 0.06);
}
.interruttore__pillola {
  position: absolute;
  left: 0;
  top: 3px;
  height: calc(100% - 6px);
  width: 10px;
  border-radius: 999px;
  background: var(--carta);
  box-shadow: 0 1px 2px rgba(23, 23, 26, 0.08), 0 3px 8px -3px rgba(23, 23, 26, 0.18);
}
.interruttore__voce {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 560;
  color: var(--tenue);
  white-space: nowrap;
}
.interruttore__voce:first-of-type { color: var(--inchiostro); }
.sconto {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.01em;
  color: var(--accento);
  background: var(--accento-tenue);
}

/* ---------- the row of cards ---------- */
.fila {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 126px;
  display: flex;
  gap: 14px;
}
.is-stretta .fila { left: 12px; right: 12px; gap: 10px; }

.card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 268px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--carta);
  border: 1px solid var(--linea);
  box-shadow: 0 1px 2px rgba(23, 23, 26, 0.04), 0 10px 24px -14px rgba(23, 23, 26, 0.22);
  overflow: hidden;
  will-change: transform;
}
.is-stretta .card { padding: 14px 12px 12px; }

/* the sheen that crosses the chosen card when it takes the accent */
.card__luce {
  position: absolute;
  inset: -20% auto -20% 0;
  width: 46%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.card__nome { font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.card__per { margin-top: 2px; font-size: 10.5px; color: var(--tenue); }

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 620;
  color: var(--accento);
  background: var(--accento-tenue);
}
.is-stretta .badge { top: 12px; right: 10px; padding: 3px 6px; font-size: 8.5px; }

/* the price: one column of digits per figure, rolled by the script */
.prezzo {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  line-height: 1;
}
.prezzo__valuta { margin-top: 4px; margin-right: 1px; font-size: 15px; font-weight: 560; }
.prezzo__cifre {
  display: inline-flex;
  font-size: 36px;
  font-weight: 660;
  font-variation-settings: 'wdth' 104;
  letter-spacing: -0.03em;
}
.colonna {
  position: relative;
  display: block;
  width: 0.6em;
  height: 1.08em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(transparent 0, #000 22%, #000 78%, transparent 100%);
}
.colonna__pila { display: block; will-change: transform; }
.colonna__pila span { display: block; height: 1.08em; line-height: 1.08em; text-align: center; }
.prezzo__mese { align-self: flex-end; margin: 0 0 5px 3px; font-size: 11px; color: var(--tenue); }

.card__nota {
  position: relative;
  margin-top: 4px;
  height: 14px;
  font-size: 10px;
  color: var(--tenue);
  white-space: nowrap;
}
.card__nota span { position: absolute; left: 0; top: 0; }
.card__nota [data-nota-anno] { opacity: 0; }

.lista {
  list-style: none;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--linea);
  display: grid;
  gap: 8px;
}
.lista li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  white-space: nowrap;
}
.is-stretta .lista li { font-size: 10.2px; gap: 5px; }
.lista svg {
  flex: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card--scelta .lista svg { stroke: var(--accento); }

.pulsante {
  margin-top: auto;
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variation-settings: 'wdth' 100;
  border: 1px solid var(--linea);
  background: var(--carta);
  transition: font-variation-settings 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
}
.pulsante--pieno { border-color: var(--inchiostro); background: var(--inchiostro); color: #fff; }
@media (hover: hover) {
  .pulsante:hover { font-variation-settings: 'wdth' 118; }
}

.invito {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--tenue);
}
.invito svg { width: 9px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
