:root {
  --fondo: #01060e;        /* the page, a blue almost black */
  --carta: #050c18;        /* the cards, a touch lighter than the page */
  --avorio: #dcd6c7;       /* text and drawings */
  --avorio-tenue: rgba(220, 214, 199, 0.62);
  --blu: #00408a;          /* the one accent: the blade, the cloth's shine */
  --filo: rgba(220, 214, 199, 0.14);
  --ombra: 0;              /* the shadow a rising card casts on the one below (set by the script) */
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--avorio); }
body {
  font-family: 'Inter Variable', system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.apertura {
  height: 100lvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(10px, 2.4vh, 22px);
  padding: 0 16px;
  text-align: center;
  background: radial-gradient(60% 50% at 50% 60%, rgba(0, 64, 138, 0.22), transparent 70%);
}
.occhiello {
  margin: 0;
  font-size: clamp(10px, min(2.8vw, 2.2vh), 13px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--avorio-tenue);
}
.apertura__titolo {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-size: clamp(38px, min(12vw, 13vh), 150px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.apertura__titolo em, .chiusura__titolo em { font-style: italic; color: #efe9dc; }
.scendi {
  margin: clamp(8px, 3vh, 30px) 0 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--avorio-tenue);
}
.scendi svg { width: 12px; height: clamp(24px, 6vh, 40px); fill: none; stroke: var(--avorio-tenue); stroke-width: 1; }

.passi { position: relative; }
.passi::after { content: ''; display: block; height: 70lvh; }

.passo {
  position: sticky;
  top: 0;
  height: 100lvh;
  margin-top: -2lvh;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 50% 70%, rgba(0, 64, 138, 0.12), transparent 70%),
    var(--carta);
  border-top: 1px solid var(--filo);
  box-shadow: 0 -2.5vh 7vh rgba(0, 0, 0, calc(var(--ombra) * 0.72)), 0 -1px 0 rgba(220, 214, 199, calc(var(--ombra) * 0.06));
}
.passo:first-child { margin-top: 0; }
/* a fine grain on every card, so the dark is paper and not a screen */
.passo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='160' height='160' filter='url(%23g)'/></svg>");
}

.passo__disegno {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding-bottom: clamp(14px, 6vh, 70px);
}
.passo__disegno svg {
  width: min(72vw, 70vh, 860px);
  height: auto;
  overflow: visible;
}
.passo__disegno svg * { fill: none; stroke: var(--avorio); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.passo__disegno .sottile { stroke-width: 1; stroke: var(--avorio-tenue); }
.passo__disegno .tratteggio { stroke-dasharray: 3 5; }
.passo__disegno .pieno-blu { fill: rgba(0, 64, 138, 0.38); }
.passo__disegno .pieno-tenue { fill: rgba(220, 214, 199, 0.08); }
.passo__disegno .pieno-carta { fill: var(--carta); }
.passo__disegno text.scritta {
  stroke: none;
  fill: var(--avorio);
  font-family: 'Fraunces Variable', Georgia, serif;
  font-style: italic;
  font-weight: 350;
  font-size: 13px;
}
.passo__disegno text.scritta--centro { text-anchor: middle; font-size: 11px; }

.passo__testo {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(6px, 1.4vh, 14px);
  padding: clamp(16px, 5vh, 56px) clamp(16px, 5vw, 64px) 0;
}
.testata {
  margin: 0 0 clamp(4px, 2vh, 26px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: clamp(9px, min(2.6vw, 1.8vh), 12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--avorio-tenue);
  border-bottom: 1px solid var(--filo);
  padding-bottom: clamp(6px, 1.2vh, 12px);
}
.passo__titolo {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-size: clamp(34px, min(11vw, 11vh), 132px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.passo__linea {
  display: block;
  width: clamp(40px, 12vw, 120px);
  height: 1px;
  background: var(--blu);
  box-shadow: 0 0 0 0.5px rgba(0, 64, 138, 0.4);
  transform-origin: left center;
}
.passo__frase {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(12.5px, min(3.7vw, 2.5vh), 19px);
  line-height: 1.45;
  color: var(--avorio-tenue);
}

@media (min-width: 900px) {
  .passo__testo {
    grid-template-columns: 1fr minmax(0, 30ch);
    column-gap: 6vw;
    align-items: end;
  }
  .testata { grid-column: 1 / -1; }
  .passo__linea { grid-column: 1; grid-row: 3; }
  .passo__frase { grid-column: 2; grid-row: 2 / 4; align-self: end; }
}

.chiusura {
  min-height: 100lvh;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 0 16px;
  text-align: center;
  position: relative;
  z-index: 3;
  background: var(--fondo);
}
.chiusura__titolo {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-size: clamp(30px, min(9vw, 9vh), 110px);
  line-height: 1;
}
.chiusura__frase { margin: 0; font-size: clamp(12px, min(3.4vw, 2.2vh), 16px); color: var(--avorio-tenue); }
