:root {
  --fondo: #ffffff;
  --inchiostro: #0a0a0a;
  --tenue: #8a8a8a;
  --accento: #ff6831;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--fondo); color: var(--inchiostro); }
body {
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* the page around the grid: small, quiet, tabular */
.testa, .piede { padding: clamp(14px, 3vh, 32px) clamp(16px, 3vw, 44px); }
.testa {
  min-height: 68vh;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.testa__riga { display: flex; justify-content: space-between; gap: 16px; font-size: clamp(12px, 1.1vw, 15px); font-weight: 560; }
.testa__voce { color: var(--tenue); font-weight: 450; }
.testa__frase {
  max-width: 26ch;
  font-size: clamp(17px, min(2.4vw, 3.6vh), 34px);
  line-height: 1.12; letter-spacing: -0.02em; font-weight: 520;
}
.testa__scorri {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono Variable', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tenue);
}
.testa__scorri svg { width: 9px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.2; }

/* the grid: one unit --u sets everything, from the width and the height of the window */
.griglia {
  --u: min(0.95vw, 2.15vh);
  --col: calc(35 * var(--u));
  --riga: calc(10 * var(--u));
  --cima: calc(3.4 * var(--u));
  position: relative;
  --largo: calc(var(--col) / 2 + 10 * var(--col));
  height: calc(var(--cima) + 3 * var(--riga) + 3 * var(--u));
  overflow: clip;
}
@media (max-width: 640px) {
  .griglia { --u: min(1.5vw, 1.6vh); --cima: max(18px, calc(3.4 * var(--u))); }
}

/* the columns: a thin line every thirty seconds of the track, with its time on top */
.griglia__linee { position: absolute; left: 0; top: 0; bottom: calc(3 * var(--u)); width: var(--largo); z-index: 1; will-change: transform; }
.colonna {
  position: absolute; top: 0; bottom: 0; width: var(--col);
  left: calc(var(--col) / 2 + var(--i) * var(--col));
}
.colonna__bordo {
  position: absolute; left: 0; top: calc(var(--cima) * 0.25); bottom: 0; width: 1px;
  background: var(--inchiostro);
  transform-origin: 50% 0%;
}
.colonna__tempo {
  position: absolute; left: 7px; top: calc(var(--cima) * 0.22);
  font-family: 'JetBrains Mono Variable', monospace; font-size: clamp(9px, calc(1.05 * var(--u)), 12px);
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em; color: var(--tenue);
}
.colonna__tacche { position: absolute; left: 0; right: 0; top: calc(var(--cima) - 5px); height: 5px; }
.colonna__tacche i {
  position: absolute; bottom: 0; width: 1px; height: 100%; background: var(--inchiostro); opacity: 0.35;
  transform-origin: 50% 100%;
}

/* the rows of words */
.griglia__righe { position: absolute; left: 0; width: var(--largo); top: var(--cima); z-index: 2; }
.riga { position: relative; height: var(--riga); will-change: transform; }
.riga__bordo {
  position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--inchiostro);
  transform-origin: 0% 50%;
}
.riga:last-child::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--inchiostro);
}
.parola {
  position: absolute; top: 0;
  left: calc(var(--col) / 2 + var(--c) * var(--col) + 0.55 * var(--u));
  font-size: calc(12.5 * var(--u));
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-weight: 560;
  font-variation-settings: 'wdth' 100;
  white-space: nowrap;
  padding-top: calc(0.9 * var(--u));
}

/* on the left a white cover, with its own border, hides where the grid begins */
.griglia__coperta {
  position: absolute; left: 0; top: 0; bottom: calc(3 * var(--u)); z-index: 3;
  width: calc(var(--col) / 2 - 2px);
  background: var(--fondo);
  border-right: 1px solid var(--inchiostro);
  box-shadow: 0 -2em 0 0 var(--fondo);
}
@media (max-width: 640px) { .griglia__coperta { width: calc(var(--col) / 4); } }

/* the playhead: still, orange, with the time of the track under it */
.testina { position: absolute; top: 0; bottom: calc(3 * var(--u)); left: 62%; z-index: 4; pointer-events: none; }
.testina__filo {
  position: absolute; left: 0; top: calc(var(--cima) * 0.9); bottom: 0; width: 1px; background: var(--accento);
  transform-origin: 50% 0%;
}
.testina__filo::before {
  content: ''; position: absolute; left: -3px; top: -1px; width: 7px; height: 4px; background: var(--accento);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.testina__tempo {
  position: absolute; left: 7px; top: calc(var(--cima) * 0.22);
  display: flex; gap: 5px; align-items: baseline;
  font-family: 'JetBrains Mono Variable', monospace; font-size: clamp(9px, calc(1.05 * var(--u)), 12px);
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em; white-space: nowrap;
  background: var(--fondo); padding: 0 12px 0 3px;
}
.testina__tempo b { color: var(--accento); font-weight: 600; }
.testina__tempo i { font-style: normal; color: var(--tenue); }

.piede { min-height: 68vh; display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; padding-top: clamp(22px, 6vh, 64px); }
.piede__titolo { font-size: clamp(12px, 1.1vw, 15px); font-weight: 560; }
.piede__date { list-style: none; max-width: 640px; }
.piede__date li {
  display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 12px;
  padding: 9px 0; border-top: 1px solid rgba(10, 10, 10, 0.14);
  font-size: clamp(12px, 1.1vw, 15px);
}
.piede__date li:last-child { border-bottom: 1px solid rgba(10, 10, 10, 0.14); }
.piede__date span:nth-child(2) { color: var(--tenue); }
.piede__date time { font-family: 'JetBrains Mono Variable', monospace; font-size: 0.85em; font-variant-numeric: tabular-nums; }
