:root {
  --fondo: #ffffff;
  --inchiostro: #0a0a0b;
  --grigio: #6b6b73;
  --linea: rgba(10, 10, 11, 0.08);
  --tinta: #6d28d9;
  --tinta-fondo: rgba(109, 40, 217, 0.1);
  --tinta-bordo: rgba(109, 40, 217, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

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

.stage {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 16px;
}

/* a faint wash of the pill's colour behind the headline, which follows the word */
.stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(760px, 120vw);
  height: min(380px, 62vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--tinta-fondo), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
  transition: background 0.8s ease;
}

.hero {
  position: relative;
  width: min(780px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(10px, 2.8vh, 24px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--linea);
  background: #fff;
  box-shadow: 0 1px 2px rgba(10, 10, 11, 0.04), 0 6px 18px -10px rgba(10, 10, 11, 0.18);
  color: var(--inchiostro);
  text-decoration: none;
  font-size: clamp(11px, 1.6vh, 13px);
  font-weight: 500;
}
.pill__tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--inchiostro);
  color: #fff;
  font-weight: 600;
  font-size: 0.92em;
}
.pill__text { color: var(--grigio); }
.pill__arrow {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--grigio);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@media (hover: hover) {
  .pill:hover .pill__arrow { transform: translateX(2px); }
}

.title {
  font-size: clamp(26px, min(8.4vw, 9.4vh), 72px);
  line-height: 1.12;
  font-weight: 640;
  font-stretch: 104%;
  letter-spacing: -0.035em;
}
.title__line { display: block; white-space: nowrap; }

/* the tinted pill around the rotating word: GSAP sets its width, the track inside holds the letters */
.rotor {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  height: 1.12em;
  margin-left: 0.06em;
  border-radius: 0.28em;
  background: var(--tinta-fondo);
  box-shadow: inset 0 0 0 1px var(--tinta-bordo), 0 10px 24px -16px var(--tinta);
  color: var(--tinta);
  overflow: hidden;
  outline: none;
  cursor: pointer;
  transition: background 0.6s ease, color 0.6s ease, box-shadow 0.6s ease;
}
.rotor:focus-visible { box-shadow: inset 0 0 0 1px var(--tinta-bordo), 0 0 0 3px var(--tinta-bordo); }
.rotor__track {
  position: absolute;
  left: 0.22em;
  top: 0;
  height: 100%;
  white-space: nowrap;
}
.parola {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  height: 100%;
  align-items: center;
}
.lettera {
  display: inline-block;
  white-space: pre;
  will-change: transform;
}
/* a thin line along the bottom of the pill that fills up until the next word */
.rotor__time {
  position: absolute;
  left: 0.22em;
  right: 0.22em;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--tinta);
  opacity: 0.28;
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* the hidden twin of the headline, used to measure each word at the real size */
.misura {
  position: absolute;
  left: -9999px;
  top: 0;
  visibility: hidden;
  white-space: nowrap;
}

.sub {
  max-width: 33em;
  color: var(--grigio);
  font-size: clamp(13px, min(3.6vw, 2.4vh), 18px);
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(36px, 5.6vh, 44px);
  padding: 0 clamp(14px, 2.4vh, 20px);
  border-radius: 999px;
  font-size: clamp(13px, 1.9vh, 15px);
  font-weight: 560;
  text-decoration: none;
}
.btn--primary {
  background: var(--inchiostro);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 10px 22px -12px rgba(10, 10, 11, 0.55);
}
.btn--ghost {
  background: #fff;
  color: var(--inchiostro);
  box-shadow: inset 0 0 0 1px var(--linea);
}
.btn__arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
