/* ----- Watermark logo sfumato ----- */
.hero-watermark { display: none;

  position: absolute;
  top: -2%;
  left: 50%;
  transform: translateX(-50%);
  width: 850px;
  height: 850px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 38%, black 20%, rgba(0,0,0,0.6) 50%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 38%, black 20%, rgba(0,0,0,0.6) 50%, transparent 72%);
}
.hero-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.12;
  filter: none;
}

/* ============================================================
   HERO — Sfondo navy coerente con navbar, testo centrato
   ============================================================ */

.hero {
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(8rem, 14vh, 11rem);
  padding-left: 8%; padding-right: 8%;
  position: relative;
  background: var(--navy);
  text-align: center;
}

/* ----- Sfondo: stesso navy della navbar con bagliore rosso subtile ----- */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
          radial-gradient(ellipse 90% 70% at 50% 120%, rgba(15,32,68,0.95) 0%, transparent 65%),
          linear-gradient(180deg, var(--navy) 0%, var(--deep-blue) 55%, var(--navy) 100%);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 45% at 80% 90%, rgba(228,47,53,0.07) 0%, transparent 60%);
}

/* ----- Contenuto centrato ----- */
.hero-content {
  position: relative; z-index: 3;
  max-width: 900px;
  display: flex; flex-direction: column; align-items: center;
}

/* ----- Badge ----- */
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  font-size: 0.74rem; font-weight: 600;
  color: rgba(255,255,255,0.65); letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 1.8rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s 0.3s forwards;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ----- Titolo ----- */
.hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(3.2rem, 6.5vw, 5.4rem);
  font-weight: 700; line-height: 1.1;
  color: #ffffff;
  margin-bottom: 2.8rem;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.8s 0.5s forwards;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- Descrizioni ----- */
.hero-desc {
  font-size: 1.18rem; line-height: 1.75;
  color: rgba(203,213,225,0.75);
  max-width: 720px;
  margin-bottom: 1rem;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.8s 0.7s forwards;
}
.hero-desc-2 {
  font-size: 1.02rem; line-height: 1.8;
  color: rgba(148,163,184,0.5);
  max-width: 740px;
  margin-bottom: 3.6rem;
  animation-delay: 0.85s;
}

/* ----- CTA ----- */
.hero-actions {
  display: flex; gap: 1rem; align-items: center;
  justify-content: center;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.8s 1.05s forwards;
}
.hero .btn-secondary {
  color: rgba(203,213,225,0.8);
  border-color: rgba(255,255,255,0.18);
  background: transparent;
}
.hero .btn-secondary:hover {
  border-color: var(--accent-light);
  color: #fff;
  background: rgba(255,255,255,0.05);
}

/* ----- Keyframes ----- */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse  { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ----- Nasconde elementi vecchi non più usati ----- */
.hero-visual { display: none; }
.code-scroll { display: none; }

/* ----- Canvas onde (JS) ----- */
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}

@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
    height: auto;
    padding-top: clamp(9.5rem, 26vw, 12rem);
    padding-left: 6%;
    padding-right: 6%;
    padding-bottom: 3.5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-badge {
    margin-bottom: 1.2rem;
    padding: 0.38rem 0.9rem;
    font-size: 0.64rem;
    letter-spacing: 1.2px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 11vw, 3.7rem);
    margin-bottom: 1.35rem;
    line-height: 1.04;
  }

  .hero-desc {
    font-size: 1rem;
    line-height: 1.68;
    margin-bottom: 0.85rem;
  }

  .hero-desc-2 {
    font-size: 0.93rem;
    line-height: 1.65;
    margin-bottom: 2rem;
  }

  .hero-actions {
    width: 100%;
    gap: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 9rem;
    padding-left: 5%;
    padding-right: 5%;
    padding-bottom: 3rem;
  }

  .hero-badge {
    max-width: 100%;
    text-align: center;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-desc-2 {
    font-size: 0.88rem;
    margin-bottom: 1.7rem;
  }
}

/* ----- Landscape mobile: viewport basso ----- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100svh;
    padding-top: 5rem;
    padding-bottom: 2rem;
  }

  .hero-badge {
    margin-bottom: 0.8rem;
    font-size: 0.6rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    margin-bottom: 0.8rem;
  }

  .hero-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }

  .hero-desc-2 {
    font-size: 0.78rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
  }

  .hero-actions {
    flex-direction: row;
    gap: 0.7rem;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: auto;
    padding: 0.65rem 1.4rem;
    font-size: 0.82rem;
  }
}