/* The arch and its keystone: a made-up firm of stonemasons, Masonry, in the minimal style. A warm white page, black
   ink and hairlines, one vermilion for the keystone and the measure. The piers, the centring and the stones are drawn
   by the script in one SVG; the captions are plain HTML laid over it. */
:root {
  --carta: #f3f0e8;        /* the warm white of the page, and of the stones */
  --inchiostro: #141414;   /* the outlines, the letters, the text */
  --tenue: #8d887e;        /* the small text */
  --sottile: #bdb6a8;      /* the dashed centring */
  --accento: #e2432a;      /* the keystone and the measure */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Archivo Variable', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ------------------------------------------------------------ the opening and the end */
.apertura {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 92vh;
  padding: 80px clamp(16px, 5vw, 72px);
}

.apertura--fine {
  min-height: 70vh;
}

.piccolo {
  margin: 0;
  font-size: 13px;
  font-variation-settings: 'wght' 500, 'wdth' 100;
  letter-spacing: 0.01em;
}

.piccolo--tenue {
  color: var(--tenue);
}

.titolo {
  margin: 0;
  font-size: clamp(42px, 7.6vw, 116px);
  font-variation-settings: 'wght' 300, 'wdth' 82;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.titolo--medio {
  font-size: clamp(36px, 5.6vw, 84px);
}

/* ------------------------------------------------------------ the stage */
.racconto {
  position: relative;
  height: 640lvh;
}

.palco {
  position: sticky;
  top: 0;
  height: 100lvh;
  overflow: hidden;
}

.tavola {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.testa {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 26px clamp(16px, 5vw, 72px);
}

.marchio {
  margin: 0;
  font-size: 17px;
  font-variation-settings: 'wght' 720, 'wdth' 118;
  letter-spacing: 0.01em;
}

/* the drawing */
.terra,
.pilastro {
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.centina {
  fill: none;
  stroke: var(--sottile);
  stroke-width: 1;
  stroke-dasharray: 5 4;
}

.concio {
  fill: var(--carta);
  stroke: var(--inchiostro);
  stroke-width: 1;
  stroke-linejoin: round;
}

.concio--chiave {
  fill: var(--accento);
  stroke: var(--accento);
}

.lettera {
  fill: var(--inchiostro);
  font-family: 'Archivo Variable', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}

.concio--chiave + .lettera {
  fill: var(--carta);
}

.quota {
  fill: none;
  stroke: var(--accento);
  stroke-width: 1;
}

.quota__testo {
  fill: var(--accento);
  font-size: 13px;
  font-variation-settings: 'wght' 560, 'wdth' 100;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* one line at a time, each one slides up out of a window */
.didascalia {
  position: absolute;
  left: clamp(16px, 5vw, 72px);
  bottom: 28px;
  z-index: 2;
  display: grid;
  margin: 0;
  overflow: hidden;
  padding: 3px 0;
}

.didascalia__riga {
  grid-area: 1 / 1;
  font-size: clamp(17px, 1.6vw, 23px);
  font-variation-settings: 'wght' 440, 'wdth' var(--wd, 100);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ------------------------------------------------------------ phone: the same, with smaller measures */
@media (max-width: 640px) {
  .quota__testo {
    font-size: 12px;
  }

  .didascalia {
    bottom: 22px;
  }
}
