/* The full stop that turns into a comma on scroll: one sentence on warm white, one orange mark. */
:root {
  --carta: #f4f1ea;       /* the warm white paper */
  --inchiostro: #1b1a17;  /* the words and the marks that are already written */
  --accento: #e0522a;     /* the one accent: the mark that is still deciding */
  --grigio: #a39d92;      /* the small text */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--carta); }
body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.corsa {
  position: relative;
  height: 460vh;
}

.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.marchio {
  position: absolute;
  top: clamp(14px, 3.6vh, 30px);
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(11px, min(1.3vw, 2vh), 13px);
  font-variation-settings: 'wght' 560, 'wdth' 100;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.scendi {
  position: absolute;
  bottom: clamp(14px, 4vh, 34px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-variation-settings: 'wght' 500, 'wdth' 110;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grigio);
}

/* the sentence: left aligned, as big as the box allows in width and in height */
.frase {
  --lh: 1.12;
  font-size: clamp(20px, min(8.2vw, 8.4vh), 76px);
  line-height: var(--lh);
  font-variation-settings: 'wght' 540, 'wdth' 96;
  letter-spacing: -0.022em;
  will-change: transform;
}

.riga {
  white-space: nowrap;
}

/* every letter is a span the script moves; the mark at the end of the line is a small drawing */
.lettera {
  display: inline-block;
  white-space: pre;
  transform-origin: 50% 100%;
}

.segno {
  display: inline-block;
  position: relative;
  width: 0.26em;
  height: 1em;
  vertical-align: baseline;
  margin-left: 0.015em;
}

.segno svg {
  position: absolute;
  left: 0;
  bottom: -0.32em;
  width: 0.26em;
  height: 1.32em;
  overflow: visible;
}

.segno__punto,
.segno__coda {
  transform-box: fill-box;
}

.segno__punto { transform-origin: 50% 70%; }

.segno__coda {
  fill: none;
  stroke-linecap: round;
}

/* the last full stop can be touched */
.segno--ultimo { cursor: pointer; }
.segno--ultimo::before {
  content: '';
  position: absolute;
  left: -0.25em;
  right: -0.25em;
  top: 0.35em;
  bottom: -0.35em;
}
