:root {
  --carta: #f6f3ee;
  --carta-2: #ece7df;
  --inchiostro: #17150f;
  --grigio: #8d877c;
  --spento: #cfc9bf;
  --accento: #3554f5;
  --filo: rgba(23, 21, 15, .12);
  --serif: "Fraunces Variable", Georgia, serif;
  --sans: "Mona Sans Variable", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--carta); }
body {
  font-family: var(--sans);
  color: var(--inchiostro);
  background: var(--carta);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html.lenis, html.lenis body { height: auto; }

.testata {
  position: fixed; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(12px, 2.4vh, 22px) clamp(16px, 4vw, 44px);
  font-size: 13px; letter-spacing: .01em;
  pointer-events: none;
  background: linear-gradient(var(--carta) 55%, rgba(246, 243, 238, 0));
}
.marchio { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-stretch: 110%; }
.marchio svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.testata__voce { color: var(--grigio); }

/* the opening */
.apertura {
  height: 100vh; min-height: 300px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 0 clamp(20px, 8vw, 120px);
}
.occhiello { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--grigio); margin-bottom: clamp(10px, 2vh, 18px); }
.titolo {
  font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 96, "SOFT" 50;
  font-size: clamp(30px, min(7vw, 11vh), 92px); line-height: 1.02; letter-spacing: -.02em; max-width: 13em;
}
.titolo em { font-style: italic; color: var(--accento); font-weight: 340; }
.riga { margin-top: clamp(12px, 2.4vh, 22px); font-size: clamp(13px, min(1.6vw, 2.6vh), 17px); color: #5d584f; max-width: 30em; }
.invito { margin-top: clamp(18px, 5vh, 54px); display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--grigio); letter-spacing: .06em; }
.invito svg { width: 10px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* the pinned stage */
.palco { position: relative; }
.palco__dentro { position: relative; height: 100vh; overflow: hidden; }

.capitoli {
  position: absolute; z-index: 2; left: 50%; top: clamp(44px, 9vh, 92px); transform: translateX(-50%);
  display: flex; gap: clamp(10px, 2.4vw, 28px); font-size: clamp(10.5px, 1.2vw, 12.5px); letter-spacing: .04em;
  color: var(--spento); white-space: nowrap; padding-bottom: 8px;
}
.capitoli span { transition: color .35s ease; }
.capitoli span.acceso { color: var(--inchiostro); }
.capitoli__segno { position: absolute; left: 0; bottom: 0; height: 1.5px; width: 10px; background: var(--accento); border-radius: 1px; transform-origin: 0 50%; }

.scena {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: clamp(70px, 16vh, 150px) clamp(18px, 6vw, 90px) clamp(24px, 6vh, 60px);
  visibility: hidden;
}

/* manifesto */
.manifesto {
  font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 72, "SOFT" 30;
  font-size: clamp(21px, min(4.8vw, 7.2vh), 64px); line-height: 1.14; letter-spacing: -.015em;
  max-width: 15.5em; text-align: center; color: var(--spento);
}
.manifesto .parola { display: inline-block; color: var(--spento); }
.manifesto em { font-style: italic; position: relative; }
.manifesto .parola--accento { position: relative; }
.manifesto .sotto { position: absolute; left: 0; right: 0; bottom: .02em; height: max(1.5px, .045em); background: var(--accento); transform: scaleX(0); transform-origin: 0 50%; border-radius: 2px; }

/* numbers */
.scena--numeri { gap: clamp(14px, 6vw, 90px); }
.numero { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.numero__riga { display: block; width: 100%; min-width: clamp(70px, 14vw, 200px); height: 1px; background: var(--inchiostro); transform: scaleX(0); transform-origin: 0 50%; margin-bottom: clamp(10px, 2.2vh, 20px); }
.numero__cifre {
  display: flex; font-family: var(--serif); font-weight: 340; font-variation-settings: "opsz" 144, "SOFT" 0;
  font-size: clamp(40px, min(10vw, 15vh), 150px); line-height: 1; letter-spacing: -.03em;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.cifra { display: block; height: 1.12em; overflow: hidden; position: relative; }
.cifra__nastro { display: flex; flex-direction: column; will-change: transform; }
.cifra__nastro span { display: block; height: 1.12em; line-height: 1.12; text-align: center; }
.numero[data-numero="projects"] .numero__cifre { color: var(--accento); }
.numero__nome { margin-top: clamp(8px, 1.6vh, 14px); font-size: clamp(11px, min(1.3vw, 2.4vh), 14px); color: var(--grigio); letter-spacing: .01em; white-space: nowrap; }

/* values */
.scena--valori { gap: clamp(10px, 2vw, 26px); perspective: 1100px; }
.valore { width: clamp(150px, min(24vw, 34vh), 290px); aspect-ratio: 4 / 5; }
.valore__giro { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.valore__faccia {
  position: absolute; inset: 0; border-radius: clamp(12px, 1.6vw, 20px);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.valore__faccia--dietro {
  background: var(--carta-2); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--filo);
}
.valore__faccia--dietro svg { width: 34%; height: 34%; fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.valore__faccia--davanti {
  transform: rotateY(180deg);
  background: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: clamp(14px, 2vw, 24px);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 0 0 1px var(--filo), 0 18px 40px -22px rgba(23, 21, 15, .35);
}
.valore__faccia--davanti strong { font-family: var(--serif); font-weight: 420; font-size: clamp(17px, min(2.2vw, 3.4vh), 28px); letter-spacing: -.01em; line-height: 1.05; }
.valore__faccia--davanti span { font-size: clamp(11px, min(1.2vw, 2.2vh), 14px); line-height: 1.4; color: #5d584f; }
.scena--valori.a-righe { flex-direction: column; }
.scena--valori.a-righe .valore { width: min(88vw, 520px); aspect-ratio: auto; height: clamp(62px, 17vh, 110px); }
.scena--valori.a-righe .valore__faccia--davanti { transform: rotateX(180deg); justify-content: center; gap: 4px; }
.scena--valori.a-righe .valore__faccia--dietro svg { width: auto; height: 46%; }

/* people */
.scena--persone { flex-direction: column; gap: clamp(12px, 3vh, 30px); }
.persone__titolo { font-family: var(--serif); font-weight: 380; font-size: clamp(20px, min(3.4vw, 5.4vh), 44px); letter-spacing: -.015em; }
.persone { display: grid; grid-template-columns: repeat(4, var(--pw)); gap: clamp(10px, 1.8vw, 24px); --pw: min(19vw, 27vh, 230px); }
.persona { width: var(--pw); }
.persona__foto { width: 100%; aspect-ratio: 4 / 5; border-radius: clamp(8px, 1.2vw, 14px); overflow: hidden; background: var(--carta-2); position: relative; }
.persona__foto img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.02); transform-origin: 50% 60%; }
.persona__foto::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(23,21,15,.08); pointer-events: none; }
.persona figcaption { display: flex; flex-direction: column; margin-top: 8px; overflow: hidden; width: calc(var(--pw) + 24px); padding-bottom: 2px; }
.persona__nome { white-space: nowrap; font-size: clamp(10.5px, min(1.25vw, 2.3vh), 15px); font-weight: 600; font-stretch: 105%; }
.persona__ruolo { white-space: nowrap; font-size: clamp(9.5px, min(1.1vw, 2vh), 13px); color: var(--grigio); margin-top: 2px; }
@media (hover: hover) {
  .persona__foto { transition: transform .5s cubic-bezier(.2,.9,.3,1.2), box-shadow .5s ease; }
  .persona__foto img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
  .persona:hover .persona__foto { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(23,21,15,.45); }
  .persona:hover .persona__foto img { transform: scale(1.04); }
}

/* closing */
.chiusura {
  height: 70vh; min-height: 220px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 3vh, 26px);
  padding: 0 20px; text-align: center;
}
.chiusura__frase { font-family: var(--serif); font-weight: 380; font-size: clamp(22px, min(4vw, 6.4vh), 52px); letter-spacing: -.015em; }
.tasto {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--inchiostro); color: var(--carta); border-radius: 999px;
  padding: 12px 18px 12px 22px; font-size: 14px; font-weight: 550;
}
.tasto svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .tasto { transition: background .3s ease; }
  .tasto svg { transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
  .tasto:hover { background: var(--accento); }
  .tasto:hover svg { transform: translateX(3px); }
}

/* narrow screens and the phone box */
@media (max-width: 620px) {
  .persone { grid-template-columns: repeat(2, var(--pw)); --pw: min(30vw, 16.5vh); column-gap: clamp(12px, 5vw, 22px); row-gap: 8px; }
  .scena--persone { gap: 8px; }
  .scena--numeri { gap: 14px; }
  .numero__riga { min-width: 0; }
  .capitoli { gap: 9px; }
}

/* reduced motion: no pin, everything already in place */
.ridotto .palco, .ridotto .palco__dentro { height: auto; overflow: visible; }
.ridotto .scena { position: relative; inset: auto; visibility: visible; min-height: 0; padding: clamp(40px, 10vh, 90px) 20px; }
.ridotto .capitoli { display: none; }
.ridotto .manifesto, .ridotto .manifesto .parola { color: var(--inchiostro); }
.ridotto .manifesto em { color: var(--accento); }
.ridotto .manifesto .sotto, .ridotto .numero__riga { transform: none; }
.ridotto .valore__giro { transform: rotateY(180deg); }
.ridotto .scena--valori.a-righe .valore__giro { transform: rotateX(180deg); }
.valore__segno { position: absolute; top: clamp(12px, 1.8vw, 20px); left: clamp(14px, 2vw, 24px); width: clamp(18px, 2.2vw, 26px); height: clamp(18px, 2.2vw, 26px); display: block; }
.valore__segno svg { width: 100%; height: 100%; fill: none; stroke: var(--accento); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scena--valori.a-righe .valore__faccia--davanti { padding-left: clamp(52px, 14vw, 70px); }
.scena--valori.a-righe .valore__segno { top: 50%; transform: translateY(-50%); left: 18px; }
