/* The cards that straighten up: minimal. Warm paper, ink, and one accent, a violet worn by the last card only.
   A pixel typeface with variable axes (Bitcount) for the titles, a narrow sans for the rest. */
:root {
  --fondo: #f3f0e8;        /* the page */
  --carta: #fbfaf6;        /* the light card */
  --inchiostro: #141414;   /* the text and the dark card */
  --tenue: #8b867b;        /* the small print */
  --accento: #7a4dff;      /* the last card */
  --filo: rgba(20, 20, 20, 0.16); /* the hairlines */
  --raggio: 22px;          /* the corners of the cards */
}

* {
  box-sizing: border-box;
}

html {
  background: var(--fondo);
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Instrument Sans Variable', 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.pagina {
  overflow-x: clip;
}

.apertura {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78vh;
  padding: 10vh 6vw 6vh;
}

.occhiello {
  margin: 0 0 18px;
  color: var(--tenue);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.apertura__titolo {
  max-width: 13ch;
  margin: 0;
  font-family: 'Bitcount Prop Single Variable', monospace;
  font-variation-settings: 'ELSH' 50;
  font-size: clamp(40px, 7.4vw, 104px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.scendi {
  margin: 40px 0 0;
  color: var(--tenue);
  font-size: 13px;
}

/* the deck: the cards overlap a little, each over the one before */
.mazzo {
  position: relative;
  padding: 0 6vw;
}

.carta {
  position: relative;
  margin: 0 auto -48px;
  max-width: 1080px;
}

.carta__dentro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  gap: 24px 32px;
  min-height: min(68vh, 620px);
  padding: clamp(26px, 4vw, 54px);
  border-radius: var(--raggio);
  transform-origin: 0% 0%;
}

.carta--chiara .carta__dentro {
  background: var(--carta);
  box-shadow: inset 0 0 0 1px var(--filo);
}

.carta--scura .carta__dentro {
  background: var(--inchiostro);
  color: var(--fondo);
  --filo: rgba(243, 240, 232, 0.22);
}

.carta--accento .carta__dentro {
  background: var(--accento);
  color: #ffffff;
  --filo: rgba(255, 255, 255, 0.4);
}

/* the title: the custom properties are the dot shape and the weight, moved by the scroll */
.carta__titolo {
  grid-column: 1 / -1;
  margin: 0;
  font-family: 'Bitcount Prop Single Variable', monospace;
  font-variation-settings: 'ELSH' var(--forma, 50);
  font-weight: var(--peso, 700);
  font-size: clamp(54px, 10.5vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.carta__voci {
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.carta__voci li {
  padding: 7px 14px 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--filo);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.carta__testo {
  grid-row: 3;
  grid-column: 2;
  align-self: end;
  max-width: 26ch;
  margin: 0;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.4;
}

.chiusura {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 120px 6vw 10vh;
}

.chiusura__titolo {
  margin: 0;
  font-family: 'Bitcount Prop Single Variable', monospace;
  font-variation-settings: 'ELSH' 50;
  font-size: clamp(40px, 8vw, 120px);
  font-weight: 700;
}

@media (max-width: 640px) {
  .carta__dentro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto auto;
    min-height: 64vh;
  }

  .carta__testo {
    grid-row: 4;
    grid-column: 1;
  }
}
