/* Neon headings: a dark page of release notes; the headings light up like neon, then settle into plain type */
:root {
  --night: #0f0f10;
  --text: #f3f0ea;
  --muted: #8c887f;
  --cyan: #4cc7f0;
  /* the elastic curve of the button: it overshoots, then settles */
  --bounce: cubic-bezier(0.34, 1.9, 0.45, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  padding: 0 clamp(20px, 5vw, 64px);
}

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(18px, 3.4vh, 30px) clamp(20px, 4vw, 48px);
}

.brand {
  margin: 0;
  font-size: 20px;
  font-weight: 760;
  font-stretch: 112%;
  letter-spacing: -0.03em;
}

.top__line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.label {
  margin: 0 0 26px;
  color: var(--cyan);
  font-family: 'JetBrains Mono Variable', ui-monospace, monospace;
  font-size: 13px;
}

.hero {
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding: 110px 0 70px;
}

.part {
  display: grid;
  align-content: center;
  min-height: 80svh;
  padding: 60px 0;
}

.part--last {
  min-height: 100svh;
}

/* until the script has split them */
.neon-wait [data-neon] {
  opacity: 0;
}

.heading {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(36px, 5.6vw, 82px);
  font-weight: 540;
  font-stretch: 104%;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.heading--big {
  max-width: 14ch;
  font-size: clamp(44px, 8vw, 128px);
  line-height: 0.98;
}

.text {
  max-width: 38ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.hint {
  color: var(--muted);
  font-family: 'JetBrains Mono Variable', ui-monospace, monospace;
  font-size: 12px;
}

/* ------------------------------------------------------------------ the button: an elastic pill
   With the pointer over it the words widen along the typeface's width axis and the pill swells with an overshoot;
   pressed, it squashes. The fill is a layer of its own and the wide words already have their room. */
.replay {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--night);
  font: inherit;
  font-size: 16px;
  font-weight: 640;
  font-stretch: 100%;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.replay::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--text);
  transition: inset 0.6s var(--bounce), transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.replay__text {
  display: inline-block;
  text-align: center;
  transition: font-stretch 0.6s var(--bounce);
}

/* the words at their widest, invisible and zero tall: they keep the room */
.replay__text::before {
  content: attr(data-text);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-stretch: 125%;
}

.replay__icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #1596c4;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.6s var(--bounce);
}

@media (hover: hover) and (pointer: fine) {
  .replay:hover::before {
    inset: -2px -7px;
  }

  .replay:hover .replay__text {
    font-stretch: 125%;
  }

  .replay:hover .replay__icon {
    transform: translateX(3px) rotate(-40deg);
  }
}

.replay:active::before {
  transform: scale(1.03, 0.88);
}

.replay:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
  .replay::before,
  .replay__text,
  .replay__icon {
    transition: none;
  }
}

/* sugli schermi bassi (la casella dell'anteprima sul telefono, 341 per 410) l'apertura sta tutta nella finestra:
   etichetta, titolo, testo e pulsante; sotto restano le sezioni da scorrere */
@media (max-height: 520px) {
  .top {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero {
    min-height: 100vh;
    padding: 58px 0 22px;
  }

  .label {
    margin-bottom: 12px;
  }

  .heading--big {
    font-size: clamp(36px, 11vw, 64px);
  }

  .hero .text {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.42;
  }

  .actions {
    margin-top: 18px;
  }

  .replay {
    min-height: 46px;
  }
}
