:root {
  --fondo: #f4f1ea;      /* warm white paper */
  --inchiostro: #1b1a17; /* the letters at rest */
  --accento: #d9542b;    /* the one accent: the letter nearest the pointer and the mark under it */
  --riga: #cfc9bd;       /* the thin rule */
  --nota: #9a948a;       /* the small lines 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;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.6vh, 22px);
  padding: 0 16px;
  touch-action: pan-y;
}

.marchio {
  font-size: clamp(10px, min(2.6vw, 2.4vh), 13px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nota);
  font-weight: 500;
}

.titolo {
  font-size: clamp(38px, min(12.5vw, 15.5vh), 148px);
  font-weight: 640;
  font-stretch: 92%;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-align: center;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

/* one word never breaks; the line breaks between words */
.parola { display: inline-block; white-space: nowrap; }

/* the box GSAP moves in on the entrance */
.voce { display: inline-block; }

/* each letter: GSAP never touches it, the script writes the rotation and the accent mix as custom properties */
.lettera {
  display: inline-block;
  transform-origin: 50% 92%;
  transform: rotate(calc(var(--a, 0) * 1deg));
  color: color-mix(in oklab, var(--accento) calc(var(--k, 0) * 100%), var(--inchiostro));
  font-weight: calc(640 + var(--k, 0) * 100);
  will-change: transform;
}

.riga {
  position: relative;
  width: min(78vw, 640px);
  height: 1px;
  background: var(--riga);
}

.tacca {
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--accento);
  opacity: 0;
  will-change: transform, opacity;
}

.nota {
  font-size: clamp(10px, min(2.6vw, 2.4vh), 13px);
  color: var(--nota);
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .lettera { transform: none; transition: color 0.4s ease; }
}
