/* The quote that parts for the medallion: minimal. Ivory paper, a warm ink for the words, and one accent, the brushed
   gold of the medallion. A display serif that fills the screen. */
:root {
  --fondo: #f3f0ed;        /* the paper */
  --inchiostro: #2a2420;   /* the words of the quote */
  --tenue: #8c8178;        /* the brand, the signature, the small text */
  --oro: #c9a467;          /* the gold of the medallion */
  --oro-scuro: #7a5a2c;    /* the shadowed gold and the engraving */
  --ombra: 42, 30, 18;     /* the colour of the medallion's shadow on the paper (r, g, b) */
  --schermo: 100vh;
}

@supports (height: 100lvh) {
  :root {
    --schermo: 100lvh;
  }
}

* {
  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;
}

/* the run of scroll: the stage holds still while the medallion comes down */
.corsa {
  position: relative;
  height: 300vh;
}

.palco {
  position: sticky;
  top: 0;
  height: var(--schermo);
  overflow: hidden;
  background: var(--fondo);
}

/* a faint paper grain and a soft light from the top */
.carta {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%),
    radial-gradient(140% 100% at 50% 100%, rgba(120, 96, 70, 0.07), rgba(120, 96, 70, 0) 55%);
  pointer-events: none;
}

.carta::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.32;
  mix-blend-mode: multiply;
  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 0.45 0 0 0 0 0.38 0 0 0 0 0.3 0 0 0 0.35 0'/></filter><rect width='160' height='160' filter='url(%23g)'/></svg>");
}

.marchio {
  position: absolute;
  top: clamp(14px, 3.2vh, 32px);
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: clamp(9px, min(1.1vw, 1.6vh), 13px);
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tenue);
}

.citazione {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.righe {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  transform: translateY(-2%);
}

/* every line is two copies of itself, each clipped at the middle of the screen: the halves move apart */
.riga {
  position: relative;
  display: block;
  height: 1.02em;
  font-family: 'Fraunces Variable', 'Fraunces', Georgia, serif;
  font-size: min(8.8vw, 8.2vh);
  font-weight: 340;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  letter-spacing: -0.025em;
  line-height: 1.02;
  white-space: nowrap;
  color: var(--inchiostro);
}

.riga:nth-child(odd) {
  font-style: italic;
  font-weight: 300;
}

.meta {
  position: absolute;
  inset: 0;
  text-align: center;
  will-change: transform;
}

.meta--sx {
  clip-path: inset(-0.2em 50% -0.2em -50vw);
}

.meta--dx {
  clip-path: inset(-0.2em -50vw -0.2em 50%);
}

/* the signature: a name on the left, the date on the right, the medallion's way kept clear between them */
.riga.riga--firma {
  margin-top: min(4.2vh, 3.6vw);
  height: 1.4em;
  font-family: 'Instrument Sans Variable', 'Instrument Sans', system-ui, sans-serif;
  font-size: clamp(10px, min(1.3vw, 2vh), 15px);
  font-style: normal;
  font-weight: 500;
  font-stretch: 108%;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tenue);
}

.riga--firma .meta--sx {
  padding-right: calc(50% + var(--varco, 60px));
  text-align: right;
}

.riga--firma .meta--dx {
  padding-left: calc(50% + var(--varco, 60px));
  text-align: left;
}

.medaglione {
  position: absolute;
  left: 50%;
  top: 0;
  pointer-events: none;
  will-change: transform;
}

.fine {
  display: grid;
  place-items: center;
  height: 34vh;
  color: var(--tenue);
  font-family: 'Fraunces Variable', 'Fraunces', Georgia, serif;
  font-size: clamp(14px, 1.3vw, 19px);
  font-style: italic;
}

.fine p {
  margin: 0;
}
