:root {
  --carta: #f4f1ea;
  --inchiostro: #1d1a16;
  --scuro: #1d1a16;
  --chiaro: #f4f1ea;
  --grigio: #7a7369;
  --spento: rgba(244, 241, 234, 0.24);
  --accento: #e4572e;
  --linea: rgba(29, 26, 22, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

/* ---------- the header: stays above the strips, its colours turn when the menu is open ---------- */
.testa {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 3.4vh, 30px) clamp(16px, 4.4vw, 52px);
  pointer-events: none;
}
.testa > * { pointer-events: auto; }

.marchio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(14px, min(2.1vw, 3.6vh), 17px);
  font-weight: 640;
  letter-spacing: -0.01em;
  transition: color 0.4s ease;
}
.marchio__segno { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.marchio__segno rect:nth-child(2) { fill: var(--accento); stroke: none; }

.apri {
  appearance: none;
  border: 1px solid var(--linea);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: clamp(13px, min(1.9vw, 3.4vh), 15px);
  font-weight: 560;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px 0 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.4s ease, background-color 0.25s ease;
}
@media (hover: hover) { .apri:hover { background: rgba(29, 26, 22, 0.05); } }
.apri:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.apri__parole { position: relative; display: inline-block; height: 1.2em; overflow: hidden; line-height: 1.2; }
.apri__parola { display: block; }
.apri__parola--chiudi { position: absolute; left: 0; top: 0; }
.apri__icona { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; overflow: visible; }

.stage.is-aperto .testa { color: var(--chiaro); }
.stage.is-aperto .apri { border-color: rgba(244, 241, 234, 0.22); }
@media (hover: hover) { .stage.is-aperto .apri:hover { background: rgba(244, 241, 234, 0.08); } }

/* ---------- the page underneath ---------- */
.pagina {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(16px, 4.4vw, 52px);
  gap: clamp(8px, 2vh, 18px);
}
.pagina__etichetta { font-size: clamp(11px, min(1.5vw, 2.8vh), 13px); color: var(--grigio); font-weight: 520; }
.pagina__titolo {
  font-size: clamp(26px, min(6.4vw, 10vh), 76px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 640;
  font-variation-settings: "wdth" 92;
  max-width: 14ch;
}
.pagina__testo { font-size: clamp(12px, min(1.7vw, 3vh), 15px); color: var(--grigio); max-width: 36ch; line-height: 1.45; }

/* ---------- the strips ---------- */
.strisce {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  pointer-events: none;
}
.striscia {
  flex: 1 1 0;
  /* a little taller than the stage at the top, so the small bounce on landing never shows a gap */
  align-self: flex-end;
  height: 112%;
  margin-right: -1px; /* no hairline gap between strips */
  background: var(--scuro);
  visibility: visible;
  will-change: transform;
}

/* ---------- the menu ---------- */
.menu {
  position: absolute;
  inset: 0;
  z-index: 4;
  color: var(--chiaro);
  padding: clamp(64px, 15vh, 130px) clamp(16px, 4.4vw, 52px) clamp(14px, 3.4vh, 30px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  column-gap: clamp(12px, 3vw, 40px);
}
.menu[hidden] { display: none; }

.menu__voci {
  list-style: none;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: clamp(0px, 0.6vh, 6px);
}
.voce a { display: inline-block; outline: none; }
.voce a:focus-visible .voce__parola { color: var(--accento); }
.voce__maschera { display: block; overflow: hidden; padding: 0.04em 0.06em 0.08em 0; }
.voce__parola {
  display: block;
  font-size: clamp(30px, min(8.4vw, 10.6vh), 104px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: var(--p, 560);
  font-variation-settings: "wdth" var(--w, 100);
  transition: color 0.3s ease;
  will-change: transform;
}

.anteprima {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  width: clamp(84px, min(24vw, 34vh), 250px);
  opacity: 0;
  visibility: hidden;
  will-change: transform;
}
.anteprima__finestra {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: clamp(6px, 1vw, 12px);
  overflow: hidden;
  background: #2a2620;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}
.anteprima__nastro { position: absolute; inset: 0; }
.anteprima__disegno { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.anteprima__didascalia {
  margin-top: 8px;
  font-size: clamp(10px, min(1.3vw, 2.4vh), 12px);
  color: rgba(244, 241, 234, 0.6);
  line-height: 1.35;
}

.menu__piede {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(244, 241, 234, 0.14);
  padding-top: clamp(8px, 1.8vh, 16px);
  font-size: clamp(11px, min(1.4vw, 2.6vh), 13px);
  color: rgba(244, 241, 234, 0.62);
}
.menu__social { display: inline-flex; gap: 14px; }

/* the drawn pointer of the autopilot */
.cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  z-index: 10;
  fill: var(--inchiostro);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
