/* The golden rectangle that draws itself: a made-up architecture studio, Aurel. The stage sticks while you scroll; the
   lines, the spiral and the measures are placed by the script on every frame, their colours come from the variables
   below. */
:root {
  --carta: #f3f0e8;          /* the page */
  --inchiostro: #141414;     /* the lines, the name */
  --tenue: #8a857a;          /* the measures and the small text */
  --accento: #e5432a;        /* the spiral */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Archivo Variable', 'Archivo', 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;
}

.linee,
.quote,
.spirale {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linee {
  stroke: var(--inchiostro);
}

.quote {
  stroke: var(--tenue);
}

.spirale {
  stroke: var(--accento);
}

.velo {
  fill: var(--inchiostro);
}

/* ---------------------------------------------------------------- the measures */
.misure {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.misura {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 15px;
  line-height: 1;
  font-weight: 460;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--tenue);
  white-space: nowrap;
  opacity: 0;
}

/* the two outer measures sit on their dimension line, which breaks around them */
.misura--quota {
  padding: 2px 6px;
  background: var(--carta);
}

/* ---------------------------------------------------------------- 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: 30px;
  height: 20px;
  overflow: visible;
}

.marchio__segno path {
  fill: none;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.marchio__bordo {
  stroke: var(--inchiostro);
}

.marchio__arco {
  stroke: var(--accento);
  stroke-width: 1.5 !important;
}

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

.voce,
.nota,
.cenno {
  margin: 0;
  font-size: 13px;
  font-weight: 480;
  font-stretch: 92%;
  letter-spacing: 0.01em;
  color: var(--tenue);
}

/* ---------------------------------------------------------------- the small text at the bottom */
.nota,
.cenno {
  position: absolute;
  bottom: clamp(20px, 4lvh, 36px);
}

.nota {
  left: clamp(16px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nota__valore {
  color: var(--inchiostro);
  font-size: 15px;
  font-weight: 560;
  font-stretch: 108%;
  font-variant-numeric: tabular-nums;
}

.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 name in the eye of the spiral */
.nome {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  font-size: 160px; /* the script sets the real size */
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transform-origin: 50% 50%;
  pointer-events: none;
}

.nome .lettera {
  display: inline-block;
  font-variation-settings: 'wght' 600, 'wdth' 112;
  pointer-events: auto;
}

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

.sotto__dentro {
  display: inline-block;
}

@media (max-width: 640px) {
  .voce {
    max-width: 44vw;
    text-align: right;
  }
  .misura {
    font-size: 13px;
  }
}
