:root {
  --muro: #f2b53f;            /* the mustard wall */
  --muro-scuro: #d9932a;      /* the wainscot and the shade on the wall */
  --cabina: #18857f;          /* the teal enamel of the booth */
  --cabina-scura: #0d5551;    /* the shade of the enamel */
  --cromo: #dfe3e8;           /* the chrome trim, the slot and the coin plate */
  --tenda: #c4213a;           /* the velvet curtain */
  --insegna: #1e2240;         /* the navy sign on top and the dark text */
  --crema: #fff4e2;           /* the sign letters, the strip paper and the floor tiles */
  --rosa: #ff7fa8;            /* the first backdrop and the button */
  --oro: #f7c948;             /* the coin, the crown and the tassel */
  --inchiostro: #1e2240;      /* the text */
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--muro);
  color: var(--inchiostro);
  font-family: 'Bricolage Grotesque Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

p, h1, h2 { margin: 0; }

/* ---------------------------------------------------------------- the stage */
.giro {
  position: relative;
  height: 500lvh;
}

.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: var(--muro);
}

.scena {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------------------------------------------------------- the words over the stage */
.testata {
  position: absolute;
  top: clamp(12px, 3.2vh, 30px);
  left: clamp(14px, 4.5vw, 60px);
  right: clamp(14px, 4.5vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}

.marchio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(17px, min(2.3vw, 3.8vh), 28px);
  font-weight: 800;
  font-variation-settings: 'wdth' 85;
  letter-spacing: -0.02em;
}

.marchio svg { width: 1.2em; height: 1.2em; }
.marchio__corpo { fill: var(--cabina); }
.marchio__lampo { fill: var(--insegna); }
.marchio__lente { fill: var(--insegna); stroke: var(--cromo); stroke-width: 1.6; }
.marchio__riflesso { fill: var(--crema); }

/* the name of the moment, top right: it jumps from one name to the next */
.stato {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.stato__nome {
  font-size: clamp(14px, min(1.9vw, 3.3vh), 24px);
  font-weight: 750;
  font-variation-settings: 'wdth' 80;
  line-height: 1.05;
}

.stato__nota {
  font-size: clamp(10px, min(1.15vw, 2.1vh), 13px);
  font-weight: 500;
  opacity: 0.75;
}

/* the title, the line and the button at the end */
.finale {
  position: absolute;
  right: clamp(16px, 6vw, 90px);
  top: 50%;
  width: min(40vw, 470px);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 2vh, 18px);
  visibility: hidden;
  opacity: 0;
}

.finale__sopra {
  font-size: clamp(10px, min(1.2vw, 2.1vh), 13px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finale__titolo {
  font-size: clamp(30px, min(6.4vw, 11vh), 96px);
  font-weight: 800;
  font-variation-settings: 'wdth' 78;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.finale__titolo em {
  font-style: normal;
  color: var(--crema);
  -webkit-text-stroke: 0.02em var(--inchiostro);
  paint-order: stroke fill;
  text-shadow: 0.05em 0.05em 0 var(--inchiostro);
}

.finale__testo {
  max-width: 34ch;
  font-size: clamp(12px, min(1.4vw, 2.4vh), 17px);
  line-height: 1.4;
  font-weight: 500;
}

/* the site's elastic pill: the word widens on the wdth axis and the background swells with a bounce */
.tasto {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: clamp(9px, 1.6vh, 14px) clamp(18px, 2.2vw, 28px);
  border-radius: 999px;
  color: var(--inchiostro);
  text-decoration: none;
  font-weight: 750;
  font-size: clamp(13px, min(1.4vw, 2.5vh), 17px);
  isolation: isolate;
}

.tasto::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rosa);
  border: 2px solid var(--inchiostro);
  box-shadow: 3px 3px 0 var(--inchiostro);
  transition: transform 0.5s cubic-bezier(0.34, 1.8, 0.5, 1);
}

.tasto span {
  font-variation-settings: 'wdth' 80;
  transition: font-variation-settings 0.5s cubic-bezier(0.34, 1.8, 0.5, 1);
}

@media (hover: hover) {
  .tasto:hover::before { transform: scale(1.07, 1.12); }
  .tasto:hover span { font-variation-settings: 'wdth' 100; }
}

.cenno {
  position: absolute;
  left: 50%;
  bottom: clamp(10px, 3vh, 28px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(11px, min(1.2vw, 2.2vh), 14px);
  font-weight: 650;
  white-space: nowrap;
  pointer-events: none;
}

.cenno svg {
  width: 0.9em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* a narrow stage: the title goes on top, the booth and the strip below it */
.palco[data-stretto] .finale {
  left: 50%;
  right: auto;
  top: clamp(52px, 13vh, 110px);
  width: min(90vw, 520px);
  transform: translateX(-50%);
  align-items: center;
  text-align: center;
  gap: clamp(5px, 1.2vh, 12px);
}

.palco[data-stretto] .finale__sopra,
.palco[data-stretto] .finale__testo { display: none; }

.palco[data-stretto] .finale__titolo { font-size: clamp(28px, min(10vw, 9vh), 64px); }

/* ---------------------------------------------------------------- after the stage */
.dopo {
  min-height: 45vh;
  padding: clamp(40px, 10vh, 120px) clamp(16px, 6vw, 90px);
  background: var(--insegna);
  color: var(--crema);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.dopo__marchio {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oro);
}

.dopo__titolo {
  max-width: 18ch;
  font-size: clamp(28px, min(5vw, 8vh), 64px);
  font-weight: 800;
  font-variation-settings: 'wdth' 80;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.dopo__testo {
  max-width: 44ch;
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.5;
  opacity: 0.85;
}
