/* The plug that lights the sentence: a made-up studio of hand-made lamps, Halden, in the minimal style. The stage
   sticks while you scroll; the cable, the plug and the socket are drawn by the script, their colours come from the
   variables below. */
:root {
  --notte: #0e0e0d;          /* the page */
  --filo: #e8e4da;           /* the cable, the plug and the socket */
  --spento: #3b3a36;         /* the words before the lamp is on */
  --acceso: #f6f1e6;         /* the words once the lamp is on */
  --tenue: #8b877d;          /* the small text */
  --accento: #f2a33a;        /* the current: one colour only */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--notte);
  color: var(--acceso);
  font-family: 'Hanken Grotesk Variable', 'Helvetica Neue', Arial, 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: 340lvh; /* the script sets the real height from RIDE */
}

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

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

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

.filo-corrente {
  fill: none;
  stroke: var(--accento);
  stroke-width: 1;
  stroke-linecap: round;
}

.spina__corpo {
  fill: var(--notte);
  stroke: var(--filo);
  stroke-width: 1.3;
}

.spina__rebbio {
  fill: none;
  stroke: var(--filo);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.spina__riga,
.spina__collo {
  fill: none;
  stroke: var(--filo);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}

.presa__corpo {
  fill: var(--notte);
  stroke: var(--filo);
  stroke-width: 1.3;
}

.presa__fessura {
  fill: none;
  stroke: var(--filo);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.7;
}

.presa__spia {
  fill: none;
  stroke: var(--spento);
  stroke-width: 1.4;
  stroke-linecap: round;
}

/* ---------------------------------------------------------------- the sentence */
.frase {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: min(92vw, 15em);
  font-size: min(9.4vw, 8.6vh, 96px);
  text-align: center;
  transform: translateX(-50%);
}

.titolo {
  margin: 0;
  font-size: 1em;
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.parola {
  display: inline-block;
  color: var(--spento);
  white-space: nowrap;
}

.sotto {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: min(24em, calc(100% - 32px));
  margin: 0;
  color: var(--tenue);
  font-size: clamp(14px, 1.2vw, 17px);
  text-align: center;
  transform: translateX(-50%);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  opacity: 0;
}

/* ---------------------------------------------------------------- the small text */
.testa {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: clamp(18px, 3vw, 34px) clamp(16px, 4.4vw, 60px);
}

.marchio {
  color: var(--acceso);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.testa__nota {
  margin: 0;
  color: var(--tenue);
  font-size: 14px;
}

.cenno,
.stato {
  position: absolute;
  bottom: clamp(18px, 4vh, 36px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--tenue);
  font-size: 13px;
}

.cenno {
  left: clamp(16px, 4.4vw, 60px);
}

.stato {
  right: clamp(16px, 4.4vw, 60px);
}

.stato__parola {
  display: inline-block;
  min-width: 2em;
  color: var(--filo);
}

.stato__parola.acceso {
  color: var(--accento);
}

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

/* ---------------------------------------------------------------- after the stage */
.piede {
  display: grid;
  place-items: center;
  min-height: 60lvh;
  padding: 48px clamp(16px, 4.4vw, 60px);
  border-top: 1px solid rgba(232, 228, 218, 0.1);
}

.piede p {
  max-width: 26em;
  margin: 0;
  color: var(--tenue);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 560px) {
  .testa__nota {
    font-size: 12px;
  }
}
