/* The headline with the rolling full stop: one word on warm white, a thin baseline, one accent ball. */
:root {
  --fondo: #f4f1ea;          /* warm white paper */
  --inchiostro: #1b1a17;     /* the word */
  --riga: #1b1a17;           /* the baseline and its end stop */
  --accento: #e0532a;        /* the one accent: the full stop */
  --accento-scuro: #b13d1b;  /* the shaded side of the ball */
  --luce: #f39a74;           /* the small highlight on the ball */
  --nota: #9a948a;           /* the small line 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;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}

/* the word plus the stretch of line the ball can roll on; the script tilts this whole block a hair */
.palco {
  position: relative;
  font-size: clamp(38px, min(19vw, 24vh), 150px);
  padding-right: 1.5em;          /* the track: the script reads it back, TRACK in script.js keeps it in step */
  will-change: transform;
  opacity: 0;
}

.parola {
  font-size: 1em;
  font-weight: 640;
  font-variation-settings: 'wdth' 100;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
}

.lettera { display: inline-block; will-change: transform; }

/* a zero-size mark sitting on the baseline, so the script can read where the baseline is */
.marca { display: inline-block; width: 0; height: 0; vertical-align: baseline; }

.binario {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.riga, .fermo {
  fill: none;
  stroke: var(--riga);
  stroke-width: 1.25;
  stroke-linecap: round;
}
.fermo { stroke-width: 1.5; }

.ombra { fill: var(--inchiostro); opacity: 0.12; }

.segno {
  fill: none;
  stroke: var(--luce);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.55;
}

.nota {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 5vh, 40px);
  text-align: center;
  font-size: clamp(10px, min(2.8vw, 2.4vh), 13px);
  letter-spacing: 0.02em;
  color: var(--nota);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .palco, .lettera { will-change: auto; }
}
