html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-corpo);
  color: var(--colore-testo-chiaro);
  background: var(--colore-sfondo);
  /* Gradiente di fallback: visibile finché/se il canvas Three.js non parte
     (WebGL assente, disabilitato, o ancora in caricamento). */
  background-image: radial-gradient(
    ellipse at 50% 20%,
    color-mix(in srgb, var(--colore-primario) 60%, black) 0%,
    var(--colore-sfondo) 70%
  );
}

/* Canvas dello sfondo Three.js: sempre dietro a tutto, fisso */
#scena-sfondo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scroller {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.sezione {
  position: relative;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: calc(2.5rem + var(--safe-top)) 1.5rem calc(2.5rem + var(--safe-bottom));
  text-align: center;
}

.sezione__contenuto {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 32rem;
  width: 100%;
}

.indicatore-scroll {
  position: absolute;
  bottom: calc(1.5rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.75;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.indicatore-scroll__freccia {
  width: 1.1rem;
  height: 1.1rem;
  border-right: 2px solid var(--colore-secondario);
  border-bottom: 2px solid var(--colore-secondario);
  transform: rotate(45deg);
  animation: rimbalzo-scroll 1.8s ease-in-out infinite;
}

@keyframes rimbalzo-scroll {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(0.35rem, 0.35rem); }
}

.solo-a-schermo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
