/* The logo on the guide lines: a stage as big as the window, an SVG the script fills with the five guide lines of a
   type designer and the letters of the name. Minimal: a warm white ground, one ink, one accent for the last line. */
:root {
  --ground: #f4f1ea;        /* the background */
  --ink: #141414;           /* the letters */
  --guide: #b9b3a7;         /* the guide lines */
  --hint: #8f897d;          /* the labels of the lines and the small text */
  --accent: #e2462b;        /* the baseline, once the name is set */
  --elastic: cubic-bezier(0.34, 1.9, 0.45, 1);
  --screen: 100vh;
}
@supports (height: 100lvh) {
  :root { --screen: 100lvh; }
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  height: 100%;
}
body {
  background: var(--ground);
  overflow: hidden;
}

.scena {
  position: relative;
  height: var(--screen);
}

/* the name is set in this face: the script reads it to measure the letters */
.palco {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  font-family: 'Roboto Flex Variable', 'Helvetica Neue', Arial, sans-serif;
}

.guida {
  fill: none;
  stroke: var(--guide);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.etichetta {
  fill: var(--hint);
  font-size: 11px;
  font-weight: 460;
  letter-spacing: 0.02em;
}
.lettera { fill: var(--ink); }

/* ---------------------------------------------------------------- the elastic pill */
.pillola {
  position: absolute;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ground);
  font: 600 13px/1 'Roboto Flex Variable', 'Helvetica Neue', Arial, sans-serif;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.pillola::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--ink);
  transition: inset 0.6s var(--elastic);
}
.pillola__scritta {
  font-stretch: 86%;
  transition: font-stretch 0.6s var(--elastic);
}
.pillola__scritta::before {
  content: attr(data-testo);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-stretch: 100%;
}
@media (hover: hover) and (pointer: fine) {
  .pillola:hover::before { inset: -2px -7px; }
  .pillola:hover .pillola__scritta { font-stretch: 100%; }
}
.pillola:active::before { inset: 2px 3px; }
.pillola:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
