:root {
  --fondo: #fafafa;
  --vetro: 255, 255, 255;        /* the frosted pill, as r, g, b */
  --inchiostro: #111113;
  --grigio: #6f6f77;
  --grigio-chiaro: #a1a1aa;
  --linea: rgba(17, 17, 19, 0.08);
  --segnaposto: #ececee;
  --evidenza: rgba(17, 17, 19, 0.06);
  --accento: #4f46e5;
  --bianco: #ffffff;
}

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

html { background: var(--fondo); }

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

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- the header */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* the one shape: the script sets its width, height, place and corners every frame, and --p (0 wide, 1 pill) */
.nav__shape {
  --p: 0;
  --s: 0;
  pointer-events: auto;
  width: 100%;
  height: 64px;
  border-radius: 0;
  background: rgba(var(--vetro), calc(0.55 + var(--p) * 0.2));
  -webkit-backdrop-filter: blur(calc(var(--p) * 14px)) saturate(calc(100% + var(--p) * 60%));
  backdrop-filter: blur(calc(var(--p) * 14px)) saturate(calc(100% + var(--p) * 60%));
  border: 1px solid rgba(17, 17, 19, calc(var(--p) * 0.09));
  box-shadow:
    0 calc(2px + var(--s) * 10px) calc(6px + var(--s) * 30px) rgba(17, 17, 19, calc(var(--p) * (0.04 + var(--s) * 0.07))),
    inset 0 1px 0 rgba(255, 255, 255, calc(var(--p) * 0.9));
  will-change: width, height, transform;
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 var(--pad, 24px);
}

/* the brand: the symbol stays, the wordmark folds away behind it */
.brand {
  display: flex;
  align-items: center;
  flex: none;
  height: 34px;
  border-radius: 10px;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.brand__mark rect { fill: var(--inchiostro); stroke: none; }
.brand__mark path { stroke: var(--bianco); }

.brand__word {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  padding-left: 8px;
}

.brand__text {
  display: inline-block;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* the links, with the soft pill that slides under the one you point at */
.links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.links__hl {
  position: absolute;
  top: 50%;
  left: 0;
  height: 32px;
  margin-top: -16px;
  border-radius: 999px;
  background: var(--evidenza);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.03);
  pointer-events: none;
}

.link {
  position: relative;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--grigio);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.link.is-active,
.link.is-on { color: var(--inchiostro); }

/* the button: Get started, that shortens to Start as the bar becomes a pill */
.cta {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 14px 0 16px;
  border-radius: 999px;
  background: var(--inchiostro);
  color: var(--bianco);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(17, 17, 19, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* the labels box: the script sets its width between the long and the short label */
.cta__labels { position: relative; display: block; height: 18px; }
.cta__label { position: absolute; left: 0; top: 0; line-height: 18px; white-space: nowrap; }
.cta__label--short { opacity: 0; }

.cta__arrow {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .link:hover { color: var(--inchiostro); }
  .brand:hover .brand__mark rect { fill: var(--accento); transition: fill 0.25s ease; }
}

.cta:focus-visible, .link:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accento);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- the page underneath */
.page { padding: 0 clamp(16px, 6vw, 72px); }

.hero {
  min-height: min(100vh, 760px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(10px, 2.2vh, 18px);
  padding-top: 64px;
}

.hero__tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accento);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
}

.hero__title {
  font-size: clamp(28px, min(7vw, 9vh), 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 650;
  max-width: 13ch;
}

.hero__sub {
  font-size: clamp(13px, min(1.9vw, 2.6vh), 17px);
  color: var(--grigio);
  max-width: 44ch;
  line-height: 1.45;
}

.hero__ctas { display: flex; gap: 10px; }

.ghost {
  display: block;
  width: 108px;
  height: 36px;
  border-radius: 999px;
  background: var(--segnaposto);
}

.ghost--dark { background: var(--inchiostro); opacity: 0.88; }

.hero__hint { font-size: 12px; color: var(--grigio-chiaro); margin-top: clamp(4px, 2vh, 18px); }

.block {
  min-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 3vh, 28px);
  max-width: 980px;
  margin: 0 auto;
}

.lines { display: grid; gap: 10px; }
.lines span { display: block; height: 12px; width: var(--w); border-radius: 6px; background: var(--segnaposto); }
.lines span:first-child { height: 22px; background: #e2e2e5; }
.lines--centre { justify-items: center; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 18px);
}

.card {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: clamp(12px, 2vw, 20px);
  min-height: min(26vh, 200px);
  border-radius: 16px;
  background: var(--bianco);
  border: 1px solid var(--linea);
}

.card__icon { width: 28px; height: 28px; border-radius: 8px; background: #eef0ff; margin-bottom: 6px; }
.card__line { display: block; height: 9px; width: var(--w); border-radius: 5px; background: var(--segnaposto); }

.panel {
  display: grid;
  gap: 12px;
  padding: clamp(14px, 2.4vw, 24px);
  border-radius: 18px;
  background: var(--bianco);
  border: 1px solid var(--linea);
  min-height: min(34vh, 260px);
  align-content: start;
}

.panel__bar { display: block; height: 28px; border-radius: 9px; background: #f4f4f5; margin-bottom: 4px; }
.panel__row { display: block; height: 10px; width: var(--w); border-radius: 5px; background: var(--segnaposto); }

.block--end { align-items: center; text-align: center; min-height: min(70vh, 520px); }
.end__title { font-size: clamp(22px, min(4.6vw, 6vh), 44px); font-weight: 650; letter-spacing: -0.03em; }

/* the phone: two links, and the button already short */
@media (max-width: 520px) {
  .nav__inner { gap: 4px; }
  .link { padding: 6px 9px; font-size: 13px; }
  .link--wide { display: none; }
  .brand__text { font-size: 15px; }
  .cta { padding: 0 12px 0 14px; font-size: 13px; height: 34px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { display: none; }
}
