/* The letter pulled by its handles: a stage as big as the window, an SVG the script draws into in pixels.
   Minimal: a warm white page, one ink for the letter, one electric blue for the points and handles of the pen tool
   (the colour of a selection in a drawing program). */
:root {
  --ground: #f3f0e8;        /* the page */
  --ink: #141414;           /* the path, the full letter, the pen */
  --accent: #2b4dff;        /* anchor points and handles */
  --guide: #cfc8b9;         /* cap height and baseline */
  --hint: #8f897d;          /* the small text */
  --screen: 100vh;
}
@supports (height: 100lvh) {
  :root { --screen: 100lvh; }
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  height: 100%;
}
html { touch-action: manipulation; }
body {
  background: var(--ground);
  color: var(--ink);
  overflow: hidden;
  font-family: 'Instrument Sans Variable', 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.scena {
  position: relative;
  height: var(--screen);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.palco {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ---------------------------------------------------------------- the guides */
.guida {
  fill: none;
  stroke: var(--guide);
  stroke-width: 1;
}
.etichetta {
  fill: var(--hint);
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- the letter */
.pieno { fill: var(--ink); }
.tracciato {
  fill: none;
  stroke: var(--ink);
  stroke-linejoin: round;
  stroke-linecap: round;
}
.maniglia {
  stroke: var(--accent);
  fill: none;
}
.punta {
  fill: var(--ground);
  stroke: var(--accent);
}
.nodo {
  fill: var(--ground);
  stroke: var(--accent);
}
/* the point the pen is working on is selected: full */
.nodo.is-scelto { fill: var(--accent); }

/* ---------------------------------------------------------------- the pen tool */
.penna__corpo {
  fill: var(--ground);
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.penna__taglio {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linecap: round;
}

/* ---------------------------------------------------------------- the name of the typeface */
.nome {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0.2em 0 0.3em;
  font-size: clamp(13px, 1.25vw, 16px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: pre;
  pointer-events: none;
}
.nome span {
  display: inline-block;
  will-change: transform;
}

.nota {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.03em;
  text-align: center;
  color: var(--hint);
  pointer-events: none;
}
