/* The line that ties itself: a made-up identity studio, Linework. The stage sticks while you scroll; the line is an
   SVG path rebuilt by the script on every frame, its colour comes from the variables below. */
:root {
  --carta: #f4f1ea;          /* the page */
  --inchiostro: #151412;     /* the title and the button */
  --tenue: #8b867c;          /* the small text */
  --filo: #ff4b1f;           /* the line */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Instrument Sans Variable', 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

/* ---------------------------------------------------------------- the stage */
.corsa {
  position: relative;
  height: 700lvh; /* the script sets the real height from RIDE */
}

.palco {
  position: sticky;
  top: 0;
  height: 100lvh;
  overflow: hidden;
  background: var(--carta);
}

.tela {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.filo {
  fill: none;
  stroke: var(--filo);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- the top bar */
.testa {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(16px, 3vw, 40px);
}

.marchio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--inchiostro);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.marchio__segno {
  width: 34px;
  height: 20px;
  overflow: visible;
}

.marchio__segno path {
  fill: none;
  stroke: var(--filo);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.marchio__nome {
  font-size: 17px;
  font-weight: 600;
  font-stretch: 88%;
  letter-spacing: -0.01em;
}

/* the button: the label stretches on the wdth axis, the background swells with a bounce */
.pillola {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  color: var(--carta);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}

.pillola__fondo {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--inchiostro);
}

.pillola__testo {
  position: relative;
  font-stretch: 84%;
  transition: font-stretch 0.5s cubic-bezier(0.34, 1.6, 0.5, 1), letter-spacing 0.5s;
}

@media (hover: hover) {
  .pillola:hover .pillola__testo {
    font-stretch: 100%;
    letter-spacing: 0.01em;
  }
}

/* ---------------------------------------------------------------- the small text */
.nota,
.cenno {
  position: absolute;
  bottom: clamp(20px, 4lvh, 36px);
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  font-stretch: 90%;
  letter-spacing: 0.01em;
  color: var(--tenue);
}

.nota {
  left: clamp(16px, 3vw, 40px);
  max-width: 46vw;
}

.nota > span {
  display: inline-block;
}

.cenno {
  right: clamp(16px, 3vw, 40px);
}

.cenno__dentro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cenno svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- the title */
.titolo {
  position: absolute;
  left: 50%;
  top: 46%;
  margin: 0;
  transform: translate(-50%, -100%);
  font-size: clamp(64px, 15vw, 210px);
  font-weight: 620;
  font-stretch: 100%;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  /* the letters come up out of the line: the script cuts the box just above the underline (clip-path) */
  padding: 0 0.06em;
}

.titolo--misura {
  visibility: hidden;
  pointer-events: none;
}

.titolo .lettera {
  display: inline-block;
  font-variation-settings: 'wght' 620, 'wdth' 100;
  will-change: transform;
}

.sotto {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(90vw, 420px);
  margin: 0;
  transform: translate(-50%, 0);
  text-align: center;
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 450;
  font-stretch: 92%;
  line-height: 1.45;
  color: var(--tenue);
}

@media (max-width: 640px) {
  .nota {
    max-width: 58vw;
  }
  .titolo {
    font-size: 23vw;
  }
}
