@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --teal: #14b8a6;
  --teal-light: #2dd4bf;
  --teal-dark: #0d9488;
  --bg: #070b14;
  --white: #ffffff;
  --gray: #9ca3af;
  --glass: rgba(255, 255, 255, 0.04);
  --border: rgba(20, 184, 166, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #070b14;
  background-image:
    radial-gradient(ellipse 80% 50% at 70% 30%, rgba(20, 184, 166, 0.15), transparent),
    linear-gradient(135deg, transparent 30%, rgba(30, 64, 175, 0.15) 50%, transparent 70%);
  color: var(--white);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAVBAR ── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 4rem;
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 50;
}

.logo { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.logo-zero { color: var(--white); }
.logo-pensieri {
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-siti { color: var(--white); font-weight: 800; }

.nav-links {
  display: flex;
  gap: 2.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}
.nav-links a { text-decoration: none; color: inherit; transition: color 0.2s; }
.nav-links a:hover { color: var(--teal-light); }

.btn-free {
  background: linear-gradient(90deg, var(--teal-dark), var(--teal));
  color: var(--white);
  padding: 0.65rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(20, 184, 166, 0.45);
  border: 1px solid rgba(45, 212, 191, 0.4);
}

/* ── HERO ── */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4rem 4rem 5rem;
  max-width: 1440px;
  margin: 0 auto;
  gap: 3rem;
  position: relative;
  min-height: calc(100vh - 80px);
}

.hero-glow-left {
  position: absolute;
  left: -5%;
  top: 35%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-text {
  flex: 1;
  max-width: 620px;
  position: relative;
  z-index: 2;
  padding-top: 1rem;
}

.kicker {
  color: var(--gray);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.3em;
  margin: 0 0 1.5rem;
  letter-spacing: -1px;
  line-height: 1.1;
  white-space: nowrap;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
}

.title-zero {
  font-weight: 800;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(20, 184, 166, 0.35));
}

.title-rest {
  font-weight: 800;
  color: var(--white);
}

.hero-desc {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 2.25rem;
  max-width: 480px;
}

/* ── BOTTONI ── */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--teal-dark), var(--teal));
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(45, 212, 191, 0.55);
  box-shadow:
    0 0 40px 10px rgba(20, 184, 166, 0.35),
    0 0 80px 20px rgba(20, 184, 166, 0.15);
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover {
  box-shadow:
    0 0 50px 14px rgba(20, 184, 166, 0.45),
    0 0 90px 24px rgba(20, 184, 166, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(20, 184, 166, 0.55);
  box-shadow: 0 0 24px rgba(20, 184, 166, 0.2);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.btn-secondary:hover {
  border-color: var(--teal-light);
  box-shadow: 0 0 32px rgba(20, 184, 166, 0.35);
}

/* ── FEATURE CARDS ── */
.features-row {
  display: flex;
  gap: 1rem;
}

.feature-card {
  flex: 1;
  padding: 1.5rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.8rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.12);
}
.f-icon { font-size: 1.15rem; flex-shrink: 0; }
.f-text { font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); line-height: 1.3; }

/* ── HERO VISUAL (rete sotto, numeri sopra) ── */
.hero-visual {
  position: relative;
  flex: 0 0 400px;
  width: 400px;
  height: 420px;
  z-index: 2;
  padding-top: 1rem;
}

.network-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 120%;
  height: 120%;
  z-index: 0;
  pointer-events: none;
}

.stats-card {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.stat-item { margin-bottom: 2.5rem; }
.stat-item:last-child { margin-bottom: 0; }

.s-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.35rem;
  letter-spacing: -1px;
  text-shadow: 0 0 30px rgba(20, 184, 166, 0.4);
}

.s-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  opacity: 0.9;
}

/* ── CHAT WIDGET ── */
.chat-launcher {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid rgba(45, 212, 191, 0.5);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal));
  color: var(--white);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(20, 184, 166, 0.5);
  transition: transform 0.15s, box-shadow 0.15s;
}
.chat-launcher:hover {
  transform: scale(1.04);
  box-shadow: 0 0 45px rgba(20, 184, 166, 0.65);
}

.chat-sparkle {
  position: absolute;
  top: -6px;
  left: 10px;
  font-size: 0.85rem;
  color: var(--white);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.chat-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  z-index: 201;
  width: min(380px, calc(100vw - 2rem));
  height: min(520px, calc(100vh - 7rem));
  background: rgba(7, 11, 20, 0.96);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.chat-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chat-header strong { display: block; font-size: 0.95rem; }
.chat-header span { font-size: 0.75rem; color: var(--gray); }
.chat-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.msg {
  max-width: 88%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.msg-bot {
  align-self: flex-start;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.msg-user {
  align-self: flex-end;
  background: var(--teal);
  color: var(--white);
}
.msg-typing {
  align-self: flex-start;
  color: var(--gray);
  font-style: italic;
  font-size: 0.85rem;
}
.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.chat-form input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  background: rgba(7, 11, 20, 0.9);
  color: var(--white);
}
.chat-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.chat-form .btn-sm {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
}

@media (max-width: 1100px) {
  .navbar { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .hero {
    flex-direction: column;
    padding: 2.5rem 1.5rem 4rem;
    min-height: auto;
  }
  .hero-text { max-width: 100%; }
  .hero-visual {
    width: 100%;
    max-width: 400px;
    height: 380px;
    margin: 0 auto;
  }
  .features-row { flex-direction: column; }
  .cta-group { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    white-space: normal;
    flex-wrap: wrap;
  }
  .chat-launcher span:not(.chat-sparkle) { display: none; }
  .chat-panel { right: 1rem; width: calc(100vw - 2rem); }
}
