body {
  background: linear-gradient(#000000 10px, #1a0000 5%, #4d0000 20%, #730000 50%, #8B0000 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  cursor: none;
  transform-origin: top center;
  margin: 0;
  overflow-x: hidden;
}

.fine-pagina {
  height: 100px;
}

#canvas {
  width: 1440px;
  max-width: 100vw;
  margin: 0 auto;
  transform-origin: left;
  display: block;
  position: relative;
}

.blocco-bianco {
  position: absolute;
  width: clamp(600px, 100%, 1500px);
  height: clamp(500px, 70vw, 1200px);
  background-color: #E0E0E0;
  margin-top: calc(clamp(500px, 74vw, 1100px) * 1);
  left: 0px;
  z-index: -3;
}

.logo {
  position: fixed;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px;
  border-radius: 120px;
  backdrop-filter: blur(5px);
  z-index: 4;
}

.logo img {
  width: clamp(60px, 12vw, 170px);
  height: auto;
  border-radius: 50%;
}

.filo {
  position: absolute;
  margin-top: calc(clamp(145px, 55vw, 650px) * 1);
  margin-left: min(clamp(-110px, -55vw, -1000px), 95vw);
  width: clamp(1700px, 95vw, 1750px);
  height: clamp(1700px, 60vw, 2750px);
  z-index: -2;
}

#penna {
  z-index: -3;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: 1;
  filter: blur(0px);
  transition: 1.8s ease, filter 1.8s ease;
  pointer-events: none;
}

#foto {
  position: absolute;
  right: 0px;
  top: calc(clamp(100px, 38vw, 450px) * 1);
  width: clamp(300px, 45vw, 650px);
  max-width: 100%;
  height: clamp(400px, 60vw, 750px);
  z-index: -2;
  border-radius: 2cm 0 0cm 0;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 2s ease;
}

#foto.visible {
  opacity: 1;
}

#striscia {
  position: absolute;
  left: clamp(-400px, 35vw, -400px);
  top: clamp(200px, 35vw, 650px);
  width: min(clamp(600px, 250vw, 1500px), 120vw);
  height: clamp(400px, 60vw, 900px);
  z-index: -1;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.2s linear, transform 0.2s linear;
}

#striscia.visible {
  opacity: 1;
  transform: translateY(0);
}

.tenebre {
  position: absolute;
  width: clamp(200px, 43vw, 800px);
  height: clamp(250px, 49vw, 900px);
  margin-top: clamp(200px, 94vw, 1600px);
  margin-left: clamp(10px, 4vw, 100px);
  z-index: -2;
}

del {
  position: relative;
  text-decoration: none;
  color: white;
}

del::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(50% + 3px);
  height: 2px;
  width: 0%;
  background: red;
  transition: width 0.8s ease;
}

del.cancellato::after {
  width: 100%;
}

mark {
  color: #FFFFFF;
  background: linear-gradient(to right, #FFD700 100%, transparent 0);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 1s ease, color 1s ease;
}

mark.attivo {
  background-size: 100% 100%;
  color: #000000;
}

.cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 150ms ease-in-out;
  border: 2px solid white;
  mix-blend-mode: difference;
}

.linea {
  position: absolute;
  width: clamp(1400px, 90vw, 2300px);
  height: clamp(8px, 1vw, 20px);
  margin-top: calc(clamp(26px, 7vw, 58px) * 1);
  background: linear-gradient(to right, transparent, #E0E0E0, transparent);
  transform: scaleX(0);
  transform-origin: center;
}

.linea.expand {
  animation: expandWidth 2s forwards;
}

@keyframes expandWidth {
  to {
      transform: scaleX(1);
  }
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 10vh;
}

#subheadline {
  color: #FFD700;
  text-align: center;
  font-size: 30px;
  margin-top: 30px;
  opacity: 0;
  transition: opacity 2.5s ease;
}

#subheadline.visible {
  opacity: 1;
}

#transazione {
  opacity: 0;
  transition: opacity 2.5s ease;
}

#transazione.visible {
  opacity: 1;
}

#final-text {
  font-size: 80px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  font-family: 'Story Script';
  text-align: center;
  color: #FFFFFF;
  margin-top: 2px;
  position: relative;
  margin-bottom: clamp(95px, 27vw, 210px);
}

#changing-text {
  position: relative;
  display: block;
  min-width: 12ch;
  text-align: center;
  white-space: nowrap;
  color: #FFFFFF;
  font-family: "Story Script";
  font-size: clamp(40px, 8vw, 100px);
  transform: translateY(100px);
}

#attenzione {
  color: #FFFFFF;
  margin-top: 10px;
  font-size: 50px;
  text-align: center;
  font-family: 'Story Script';
}

#attenzione-testo {
  font-size: 25px;
  color: #FFFFFF;
  line-height: 2;
  margin-top: 150px;
}

.contenitore {
  width: 60%;
  max-width: 60%;
  margin-top: 110px;
}

#problema {
  font-size: clamp(20px, 3vw, 40px);
  margin-top: max(min(calc(clamp(76px, 20vw, 210px) * 1), 60vw), 10vw);
  width: clamp(250px, 55vw, 800px);
  max-width: 55%;
  font-family: 'Fraunces';
  line-height: 2;
}

#problematesto {
  font-size: clamp(8px, 2vw, 25px);
  margin-top: calc(clamp(0px, 2vw, 0px) * 1);
}

.contenitore-2 {
  position: absolute;
  top: clamp(600px, 150vw, 1470px);
  left: 58%;
  width: 35%;
  line-height: 2;
}

#soluzione {
  font-size: clamp(22px, 5vw, 54px);
  color: #4B1037;
  transform: translateX(-10%);
}

.contenitore-3 {
  position: absolute;
  line-height: 2;
  transform: translateX(-40%);
}

#soluzione-testo {
  font-size: clamp(8px, 2vw, 25px);
  color: #eaeaea;
  text-align: center;
}

#soluzionegrande {
  font-size: clamp(10px, 3vw, 30px);
  color: #eaeaea;
  text-align: center;
}

#importante {
  font-family: "Story Script";
  text-align: center;
  font-size: clamp(12px, 4vw, 32px);
}

.blocco-viola {
  background: linear-gradient(180deg, #6d3a99 0%, #3a145f 25%, #2a0e45 55%, #12061f 100%);
  transform: translate(-20%, 10%);
  color: #eaeaea;
  padding: 10px 5px;
  margin: 80px auto;
  max-width: 450px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  max-height: 600px;
}

ul {
  list-style-position: inside;
  padding-left: 0;
}

.blocco-blu {
  background: linear-gradient(#000814 0%, #001d3d 25%, #003566 55%, #005f73 100%);
  transform: translate(-120%, -60%);
  color: #eaeaea;
  padding: 15px 20px;
  margin: 80px auto;
  max-width: 700px;
  width: 110%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  line-height: 2;
}

#copywriter {
  font-size: clamp(8px, 2vw, 25px);
  text-align: center;
  line-height: 2;
  color: #eaeaea;
}

#copywriter2 {
  font-size: clamp(10px, 3vw, 32px);
  text-align: center;
  line-height: 2;
  color: #eaeaea;
}

#copywriterspazio {
  font-size: clamp(8px, 2vw, 25px);
  text-align: center;
  line-height: 6;
  color: #eaeaea;
}

.blocco-verde {
  background: linear-gradient(180deg, #011302 0%, #071b11 20%, #0d2f20 45%, #0e2e1f 70%, #0a492d 100%);
  padding: 15px 20px;
  margin: 80px auto;
  max-width: 700px;
  width: 110%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  line-height: 2;
  transform: translate(-10%, -130%);
}

#mano {
  position: absolute;
  height: 650px;
  transform: translate(950px, -70px);
  z-index: 4;
  opacity: 0;
  transition: opacity 2s ease;
}

#mano.visible {
  opacity: 1;
}

#biglietto {
  position: absolute;
  height: 215px;
  width: 136px;
  transform: translate(1150px, 44px) rotate(9deg);
  z-index: 3;
  border-radius: 0.2cm;
  opacity: 0;
  transition: opacity 2s ease;
}

#biglietto.visible {
  opacity: 1;
}

/* stato normale biglietto */
#biglietto {
  transition:
    transform 1.6s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.8s ease;
  transform-origin: center center;
  will-change: transform;
  cursor: pointer;
}

/* stato attivo */
#biglietto.attivo {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 20;

  transform:
    translate(-50%, -180%)
    rotate(360deg)
    scale(3);

  opacity: 1;
}


#perchecopywriter {
  color: #eaeaea;
  text-align: center;
  font-size: clamp(8px, 2vw, 25px);
}

.blocco-nero {
  background-color: #111111;
  width: 105vw;
  position: relative;
  height: 350px;
  margin-left: calc(-70vw + 50%);
  transform: translate(-6%, -220%);
}

.spazio-nero {
  height: -100px;
}

.btn {
  padding: 25px 38px;
  font-size: 20px;
  font-family: inherit;
  color: #ffffff;
  background-color: #8B0000;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  transform: translate(640px, 60px);
}

.btn:hover {
  transform: translate(645px, 60px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  filter: brightness(1.15);
}

#azienda {
  color: #eaeaea;
  transform: translate(450px, 100px);
}
