/* La lattina che gira */
:root {
  --carta: #FFF4DC;
  --inchiostro: #2B1408;
  --arancio: #FF6B2C;
  --margine: clamp(18px, 4vw, 56px);
  --alto: 100vh;
}
@supports (height: 100svh) {
  :root { --alto: 100svh; }
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  background: var(--carta);
}
body {
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
}

.intro {
  display: grid;
  align-content: space-between;
  gap: 8vh;
  min-height: calc(var(--alto) * 0.72);
  padding: var(--margine);
}
.nota {
  max-width: 38ch;
  margin: 0;
  font-size: clamp(0.92rem, 0.84rem + 0.3vw, 1.08rem);
  font-weight: 480;
  line-height: 1.38;
  opacity: 0.72;
}
.intro__titolo {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.3rem, 1rem + 5vw, 6rem);
  font-stretch: 112%;
  font-weight: 860;
  letter-spacing: -0.03em;
  line-height: 0.92;
}

/* ---------------------------------------------------------------- il giro */
.giro {
  position: relative;
  height: calc(var(--alto) * 3);
}
.palco {
  position: sticky;
  top: 0;
  height: var(--alto);
  height: 100lvh;
  overflow: hidden;
}
/* le due parole ai lati: nel mezzo resta il posto per la lattina */
.parole {
  position: absolute;
  left: var(--margine);
  right: var(--margine);
  top: 50%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  translate: 0 -50%;
  font-size: 19.5vw;
  font-stretch: 125%;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.84;
  white-space: nowrap;
}
/* la tenda: un velo color carta, un po' trasparente, che scende e si inclina mentre le parole salgono */
.tenda {
  position: absolute;
  inset: -1.2rem;
  background: rgb(255 244 220 / 0.82);
  transform-origin: 0 0;
  will-change: transform;
}
.lattina {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
}

.fine {
  display: grid;
  place-items: center;
  min-height: calc(var(--alto) * 0.7);
  padding: var(--margine);
}
.fine__testo {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.6rem);
  font-weight: 540;
  line-height: 1.3;
  text-align: center;
}

/* in verticale le parole vanno una sopra e una sotto la lattina */
@media (max-aspect-ratio: 4/5) {
  .parole {
    top: calc(var(--margine) * 1.5);
    bottom: calc(var(--margine) * 1.5);
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    translate: none;
    font-size: 31vw;
  }
  .parole span:first-child { align-self: flex-start; }
  .parole span:nth-child(2) { align-self: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .giro { height: var(--alto); }
  .tenda { display: none; }
}
