/* The name that spins like a skater: one word turning on warm white, a thin track, one accent. */
:root {
  --fondo: #f4f1ea;      /* warm white paper */
  --inchiostro: #1b1a17; /* the letters */
  --accento: #2f55d4;    /* the one accent: the first letter and its trail */
  --riga: #cfc9bc;       /* the track the letters ride on */
  --nota: #9a948a;       /* the small lines of text */
}

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

html, body { height: 100%; }

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

.scena {
  position: relative;
  height: 100vh;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.scena.tiene { cursor: grabbing; }

/* the centre of the turn; the script places everything around it in pixels */
.palco {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0;
  height: 0;
  opacity: 0;
}

.segni {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  width: 1px;
  height: 1px;
}

.pista { fill: none; stroke: var(--riga); stroke-width: 1; }
.orma { fill: none; stroke: var(--riga); stroke-width: 1; stroke-dasharray: 1 5; opacity: 0; }
.scia { fill: none; stroke: var(--accento); stroke-width: 1.5; stroke-linecap: round; }
.scia-lunga { stroke-width: 1; opacity: 0.28; }
.asse { stroke: var(--inchiostro); stroke-width: 1; stroke-linecap: round; }

.ruota {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* each letter sits on the track; the script writes its place, its turn, its width and weight */
.lettera {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  /* the turn starts from the letter's own corner, so translate(-50%, -50%) after the rotation lands its centre exactly on the track */
  transform-origin: 0 0;
  will-change: transform;
}
.lettera.prima { color: var(--accento); }

.lettura,
.nota {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--nota);
  font-size: clamp(11px, min(3.2vw, 3vh), 14px);
  letter-spacing: 0.02em;
  font-variation-settings: 'wdth' 100;
  opacity: 0;
}
.lettura { font-weight: 560; color: var(--inchiostro); }
.lettura span { display: inline-block; min-width: 2.6em; text-align: right; }
.nota { font-weight: 450; }
