/* A number made of marks: the clients of a made-up design studio, in the minimal style. A warm white page, black
   ink, one electric blue for the newest client. In a tall section a stage stays still while you scroll: the marks are
   drawn on a canvas by the script, the years and the counts are plain HTML laid over it. */
:root {
  --carta: #f3f0e8;        /* the warm white of the page */
  --inchiostro: #141414;   /* the number, the marks and the words */
  --tenue: #8d887e;        /* the small text */
  --sottile: #d3cec2;      /* the hairline under the bars */
  --accento: #2242ff;      /* the mark of the newest client */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Archivo Variable', Archivo, 'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}

.nascosto {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------ the opening and the end */
.apertura {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 92vh;
  padding: 80px clamp(16px, 5vw, 72px);
}

.apertura--fine {
  min-height: 70vh;
}

.piccolo {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.piccolo--tenue {
  color: var(--tenue);
}

.titolo {
  margin: 0;
  font-size: clamp(46px, 8.4vw, 124px);
  font-weight: 300;
  font-stretch: 88%;
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.titolo--medio {
  font-size: clamp(38px, 6vw, 88px);
}

/* ------------------------------------------------------------ the stage */
.racconto {
  position: relative;
  height: 640lvh;
}

.palco {
  position: sticky;
  top: 0;
  height: 100lvh;
  overflow: hidden;
}

.tela {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.testa {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 26px clamp(16px, 5vw, 72px);
}

.marchio {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

/* the years under the bars and the counts on top of them: their places are written by the script */
.anni {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.anno,
.conto {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  margin-left: -40px;
  text-align: center;
  white-space: nowrap;
}

.anno {
  overflow: hidden;
  padding: 2px 0;
}

.anno__nome {
  display: inline-block;
  font-size: 13px;
  font-weight: 560;
  font-stretch: calc(var(--wd, 100) * 1%);
  letter-spacing: 0.01em;
}

.conto {
  color: var(--tenue);
  font-size: 12px;
  font-weight: 500;
  transform-origin: 50% 100%;
}

.conto--ultimo {
  color: var(--accento);
}

/* one line at a time, each one slides up out of a window */
.didascalia {
  position: absolute;
  left: clamp(16px, 5vw, 72px);
  bottom: 28px;
  z-index: 2;
  display: grid;
  margin: 0;
  overflow: hidden;
  padding: 3px 0;
}

.didascalia__riga {
  grid-area: 1 / 1;
  font-size: clamp(17px, 1.6vw, 23px);
  font-weight: 460;
  font-stretch: calc(var(--wd, 100) * 1%);
  letter-spacing: -0.015em;
  white-space: nowrap;
}

/* ------------------------------------------------------------ phone: the same, with smaller measures */
@media (max-width: 640px) {
  .anno__nome {
    font-size: 11px;
  }

  .conto {
    font-size: 11px;
  }

  .didascalia {
    bottom: 22px;
  }
}
