.hero {
  --home-hero-height: calc(100vh - var(--topbar-h, 0px));
  --home-hero-height: calc(100svh - var(--topbar-h, 0px));
  position: relative;
  overflow: hidden;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-header) 100%);
  background-position: top center;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  z-index: 1;
  min-height: var(--home-hero-height);
}

.hero__bg {
  position: absolute;
  top: -160px;
  left: 0;
  right: 0;
  bottom: -100px;
  height: auto;
  background: url("../../media/home/hero-verande-verande.webp") center/cover no-repeat;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
  pointer-events: none;
  z-index: 0;
  display: block;
}

.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,48,117,0.7) 0%, rgba(13,48,117,0.45) 38%, rgba(13,48,117,0.1) 72%, rgba(13,48,117,0) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: var(--home-hero-height);
  padding-block: calc(var(--hero-safety-top) + var(--space-4)) var(--space-10);
}

.hero__inner > div {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.hero__title {
  color: var(--color-white);
  font-size: var(--fs-h1);
  line-height: 1.12;
  letter-spacing: var(--ls-h1);
  max-width: 22ch;
  margin-bottom: var(--space-3);
  font-weight: var(--fw-bold);
  text-align: center;
  margin-inline: auto;
}

.hero__lead {
  color: rgba(255,255,255,0.86);
  max-width: 56ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  margin-bottom: var(--space-6);
  text-align: center;
  margin-inline: auto;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Titolo, sottotitolo e CTA sono centrati in orizzontale e allineati in alto su tutti i dispositivi (regole di base sopra) */
@media (max-width: 960px) {
  /* Immagine verticale dedicata al mobile (1080x1920) */
  .hero__bg { background-image: url("../../media/home/hero-verande-verande-mobile.webp"); }
  .hero__inner > div { max-width: 100%; }
}

/* Senza parallasse JS o con reduced-motion lo sfondo resta fermo */
@media (prefers-reduced-motion: reduce) {
  .hero__bg { transform: translate3d(0, 0, 0) !important; top: 0; height: 100%; will-change: auto; }
}
