/* ---------- Font (self-hosted) ----------
   Space Grotesk e Inter erano caricati da fonts.googleapis.com: unica
   richiesta a terzi della pagina, e quindi l'IP di ogni visitatore mandato
   a Google. Qui sono serviti da assets/fonts/ — stesse famiglie, nessuna
   dipendenza di rete esterna. Entrambe sono SIL Open Font License 1.1
   (testo in assets/fonts/OFL-*.txt).
   Sono font *variabili*: un solo file per famiglia copre l'intero
   intervallo 400-700, dichiarato qui sotto come `font-weight: 400 700`.
   Aggiungere un peso NON richiede un file nuovo. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/inter-variable.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --green: #3ecf6e;
  --teal: #2bb6a3;
  --blue: #2f8fe0;
  --ink: #0b1220;
  --ink-soft: #3a4657;
  --bg: #ffffff;
  --bg-soft: #f4f8f7;
  --border: #e4ece9;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(11, 18, 32, 0.15);
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --grad: linear-gradient(135deg, var(--green), var(--teal) 55%, var(--blue));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.5em; }
p { line-height: 1.65; color: var(--ink-soft); margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-tag {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--teal);
  margin-bottom: 0.6em;
}
.section-lead {
  max-width: 620px;
  margin: 0.5em auto 2.5em;
}
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(43, 182, 163, 0.55);
}
.btn-primary:hover { box-shadow: 0 12px 28px -8px rgba(43, 182, 163, 0.65); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-accent {
  background: var(--grad);
  color: #ffffff;
  box-shadow: 0 0 0 0 rgba(43, 182, 163, 0.45);
  animation: pulse-glow 2.4s ease-in-out infinite;
}
.btn-accent:hover { animation-play-state: paused; }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 182, 163, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(43, 182, 163, 0); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark-full { height: 52px; width: auto; object-fit: contain; }
.brand-mark-footer { height: 40px; }

.main-nav {
  display: flex;
  gap: 32px;
  margin: 0 auto;
}
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at top right, #eafff2 0%, #ffffff 55%);
  padding: 110px 0 90px;
}
#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-inner { position: relative; max-width: 780px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 24px;
}
.hero-lead {
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- About ---------- */
.about { padding: 110px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.about h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.about-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0.9;
}
.about-visual { display: flex; justify-content: center; }
.orbit-card {
  width: 320px;
  aspect-ratio: 1;
  border-radius: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  position: relative;
}
.orbit-card::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 1px dashed #c9dcd6;
  animation: spin 26s linear infinite;
}
.orbit-logo { width: 72%; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Services ---------- */
.services { padding: 110px 0; background: var(--bg-soft); }
.services h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 640px; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  font-size: 1.5rem;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--bg-soft);
  margin-bottom: 16px;
}
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { font-size: 0.95rem; margin: 0; }

/* ---------- Approach ---------- */
.approach { padding: 110px 0; }
.approach h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 700px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 50px;
}
.step {
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}
.step-num {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  background: var(--grad);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: 0.92rem; margin: 0; }

/* ---------- Contact ---------- */
.contact { padding: 110px 0; background: var(--bg-soft); }
/* Una colonna sola: la seconda ospitava il form contatti, rimosso perché
   non inviava niente a nessuno (mostrava "Grazie!" e svuotava i campi).
   Il contatto è il link mailto costruito da js/main.js. */
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  gap: 60px;
  align-items: start;
}
.contact-copy h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); }
.contact-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--teal);
}
/* Con il form rimosso, il mailto è l'unico contatto in pagina: va letto
   come tale, non come una nota a piè di sezione. */
.contact-links .contact-link { font-size: 1.15rem; }
.contact-link:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-footer { flex-shrink: 0; }
.footer-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--teal); }
.footer-copy {
  width: 100%;
  margin: 0;
  font-size: 0.82rem;
  color: #9aa8a3;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
  .orbit-card { width: 220px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 32px; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
  }
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .header-actions .btn-primary.btn-sm { display: none; }
}
