/* The logo that falls into its shadow: a warm white ground, a hairline of earth, the letters in ink and one accent
   for the full stop that lands last. Anybody has a width axis and a weight axis: the letters fall narrow and light
   and land wide and full. */
:root {
  --ground: #f3f0e8;        /* the background */
  --ink: #161513;           /* the letters and the line of earth */
  --shade: #161513;         /* the colour of the shadows (they are drawn faint) */
  --accent: #e2462b;        /* the full stop that falls last */
  --hint: #9b968b;          /* the small text */
  --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;
  font-family: 'Anybody Variable', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.scena {
  position: relative;
  height: var(--screen);
  min-height: 360px;
  overflow: hidden;
}

.palco {
  position: absolute;
  inset: 0;
}

/* the line of earth, redrawn by the script with the dips of every landing */
.terra {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.terra path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-linecap: round;
}

.ombre,
.lettere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* one soft ellipse per letter: the script sets its size and moves it with transforms */
.ombra {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--shade) 0%, color-mix(in srgb, var(--shade) 55%, transparent) 45%, transparent 100%);
  opacity: 0;
  will-change: transform, opacity, filter;
}
.ombra.is-accent {
  background: radial-gradient(closest-side, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, transparent) 45%, transparent 100%);
}

.riga {
  position: absolute;
  display: block;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 50% 50%;
}

.lettera {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink);
  line-height: 1;
  white-space: pre;
  font-weight: 700;
  font-stretch: 100%;
  will-change: transform;
}
.lettera.is-accent { color: var(--accent); }

.misura {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  visibility: hidden;
  white-space: pre;
  line-height: 1;
}
.misura span { display: block; }

/* ---------------------------------------------------------------- the elastic pill */
.pillola {
  position: absolute;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.01em;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
}
.pillola::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  transition: inset 0.6s var(--elastic), background-color 0.3s;
}
.pillola__scritta {
  font-stretch: 86%;
  text-align: center;
  transition: font-stretch 0.6s var(--elastic);
}
.pillola__scritta::before {
  content: attr(data-testo);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-stretch: 112%;
}
@media (hover: hover) and (pointer: fine) {
  .pillola:hover::before { inset: -2px -7px; }
  .pillola:hover .pillola__scritta { font-stretch: 112%; }
}
.pillola:active::before { inset: 2px 3px; }
.pillola:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
