:root {
  --bg: #0b1020;
  --bg-2: #121a33;
  --text: #e8ecf8;
  --muted: #9aa6c7;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sfondo animato a blob */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(ellipse at top, var(--bg-2), var(--bg));
}
.bg-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 18s ease-in-out infinite;
}
.bg-blobs span:nth-child(1) { width: 420px; height: 420px; background: var(--accent); top: -100px; left: -80px; }
.bg-blobs span:nth-child(2) { width: 360px; height: 360px; background: var(--accent-2); bottom: -120px; right: -60px; animation-delay: -6s; }
.bg-blobs span:nth-child(3) { width: 280px; height: 280px; background: var(--accent-3); top: 40%; left: 55%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-40px, 50px) scale(0.95); }
}

/* Navbar */
nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 6vw;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.55);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent);
}
nav ul { list-style: none; display: flex; gap: 8px; }
nav a.link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all .25s;
}
nav a.link:hover { color: var(--text); background: var(--card); }
nav a.link.active { color: var(--text); background: linear-gradient(135deg, var(--accent), #5b3df5); }

/* Hero */
.hero {
  min-height: 80vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 60px 6vw;
}
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--accent-2);
  font-size: .85rem;
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 540px; margin-bottom: 32px; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
  margin-right: 12px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: white;
  box-shadow: 0 10px 30px rgba(124, 92, 255, .4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(124, 92, 255, .6); }
.btn-ghost { color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--card); }

/* Illustrazione */
.illustration { display: flex; justify-content: center; }
.illustration svg { width: 100%; max-width: 440px; filter: drop-shadow(0 20px 50px rgba(34, 211, 238, .25)); }
.orbit { transform-origin: 200px 200px; animation: spin 20s linear infinite; }
.orbit.rev { animation-direction: reverse; animation-duration: 30s; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 3s ease-in-out infinite; transform-origin: 200px 200px; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* Sezioni */
section { padding: 80px 6vw; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 10px; }
.section-title p { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  transition: transform .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); }
.card .icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(124,92,255,.3), rgba(34,211,238,.3));
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }

/* Statistiche */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: 2.6rem;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { color: var(--muted); }

/* Timeline (pagina 2) */
.timeline { max-width: 760px; margin: 0 auto; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2), var(--accent-3));
}
.step { position: relative; padding-left: 60px; margin-bottom: 40px; }
.step::before {
  content: ""; position: absolute; left: 9px; top: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent-2);
  box-shadow: 0 0 14px var(--accent-2);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); }

/* Form contatti */
.contact-box {
  max-width: 620px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; padding: 40px;
}
.contact-box label { display: block; margin: 16px 0 6px; color: var(--muted); font-size: .9rem; }
.contact-box input, .contact-box textarea {
  width: 100%; padding: 14px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(0,0,0,.25);
  color: var(--text); font: inherit;
}
.contact-box input:focus, .contact-box textarea:focus { outline: none; border-color: var(--accent); }
.contact-box button { margin-top: 24px; border: none; cursor: pointer; font: inherit; }

/* CTA */
.cta {
  margin: 0 6vw 80px;
  padding: 60px 40px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(244,114,182,.25));
  border: 1px solid var(--border);
}
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.cta p { color: var(--muted); margin-bottom: 26px; }

footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: .9rem;
}

/* Animazioni di entrata */
.reveal { opacity: 0; transform: translateY(30px); transition: all .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .illustration { order: -1; }
  .illustration svg { max-width: 280px; }
  nav { padding: 14px 16px; }
  nav a.link { padding: 6px 12px; font-size: .9rem; }
  section { padding: 60px 16px; }
  .cta { margin: 0 16px 60px; padding: 40px 20px; }
  .contact-box { padding: 26px; }
  .btn { margin: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
