/* The sentence that shifts its stress: one sentence on warm white, one stress mark, one accent. */
:root {
  --fondo: #f4f1ea;      /* warm white paper */
  --inchiostro: #1b1a17; /* the stressed word */
  --piano: #aaa499;      /* the words said softly */
  --accento: #3148d4;    /* the one accent: the stress mark */
  --glossa: #6f6a61;     /* the meaning under the sentence */
  --nota: #a39d92;       /* the small line at the bottom */
}

* { 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;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  cursor: default;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.palco {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

/* the size fits the width and the height of the box: two lines and the meaning under them */
.frase {
  font-size: clamp(26px, min(8.4vw, 12.5vh), 104px);
  line-height: 1.08;
  text-align: center;
  color: var(--piano);
}

.riga {
  display: block;
  white-space: nowrap;
}

/* each word: the script writes its weight, its width and its colour every frame; GSAP moves the child */
.parola {
  display: inline-block;
  padding: 0 0.13em;
  cursor: pointer;
}

.parola-dentro {
  display: inline-block;
  will-change: transform;
}

/* the stress mark sits above the start of the stressed word, like the mark in a dictionary */
.segno {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.segno-tratto {
  position: absolute;
  left: -1.5px;
  bottom: 0;
  width: 3px;
  height: clamp(10px, min(2.6vw, 3.8vh), 30px);
  border-radius: 2px;
  background: var(--accento);
  transform-origin: 50% 100%;
  will-change: transform;
}

.glossa {
  margin-top: clamp(14px, 3.4vh, 34px);
  min-height: 1.3em;
  font-size: clamp(13px, min(2.3vw, 3.4vh), 22px);
  font-variation-settings: 'wght' 420, 'wdth' 100;
  letter-spacing: 0.01em;
  color: var(--glossa);
  text-align: center;
  white-space: nowrap;
}

.nota {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 5vh, 40px);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  font-variation-settings: 'wght' 420;
  color: var(--nota);
  opacity: 0;
}
