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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0f172a;
  background: #f3f4f6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem; /* margini orizzontali chiari anche su mobile */
}


.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #e5e7eb;
}

.logo-image {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  margin-left: auto; /* spinge il menu a destra su desktop */
}


.main-nav a {
  color: #e5e7eb;
  opacity: 0.9;
}

.main-nav a:hover {
  opacity: 1;
}

.main-nav a.is-active,
.main-nav a.nav-cta.is-active {
  opacity: 1;
  font-weight: 600;
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #818cf8);
  color: #f9fafb;
  font-weight: 500;
}

/* Mobile menu */

.mobile-menu-toggle {
  display: none;              /* di base nascosto, compare solo su mobile */
  border: none;
  background: transparent;
  padding: 0;
  margin-left: auto;
  cursor: pointer;
  width: 32px;
  height: 32px;

  /* QUI il fix: imposta lo stack verticale delle barrette */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;                   /* spazio verticale tra le barrette */
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

/* NON serve più il margin-top qui, lo fa il gap
.mobile-menu-toggle span + span {
  margin-top: 4px;
}
*/

.mobile-menu-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  background: #020617;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.mobile-nav .container {
  padding: 0.75rem 1.5rem 1rem; /* più respiro orizzontale e verticale */
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mobile-nav a {
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.mobile-nav a.nav-cta {
  margin-top: 0.6rem;
  padding: 0.55rem 1.2rem;   /* più spazio orizzontale */
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;       /* evita che il testo vada a capo */
}

/* Hero */

.hero {
  padding: 4rem 0 4.5rem;
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.22), transparent 60%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.22), transparent 55%),
    #020617;
  color: #e5e7eb;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 2.9vw, 2.9rem);
  line-height: 1.1;
  margin: 0.75rem 0 1rem;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0;
  font-size: 1rem;
  max-width: 34rem;
  color: #cbd5f5;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.75rem;
  color: #e5e7eb;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.75rem 0 0.9rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #f9fafb;
  box-shadow: 0 15px 40px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.45);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.9);
}

.btn-full {
  width: 100%;
}

/* Hero panel */

.hero-panel {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.5);
  overflow: hidden;
}

.hero-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.45), rgba(15, 23, 42, 0.95));
}

.dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 4px;
  background: #475569;
}

.dots span:nth-child(1) { background: #f97373; }
.dots span:nth-child(2) { background: #facc15; }
.dots span:nth-child(3) { background: #22c55e; }

.hero-panel-title {
  font-size: 0.8rem;
  color: #e5e7eb;
}

.hero-panel-body {
  padding: 1rem 1.1rem 1.2rem;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.kpi-card {
  padding: 0.7rem 0.75rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.25), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(82, 101, 143, 0.8);
}

.kpi-label {
  font-size: 0.7rem;
  color: #9ca3af;
}

.kpi-value {
  display: block;
  margin-top: 0.1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e5e7eb;
}

.kpi-trend {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: #9ca3af;
}

.kpi-up {
  color: #4ade80;
}

.hero-table {
  margin-top: 0.4rem;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 0.9rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  overflow: hidden;
  font-size: 0.78rem;
}

.hero-table-header,
.hero-table-row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.1fr 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0.8rem;
}

.hero-table-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  color: #9ca3af;
}

.hero-table-row:nth-child(odd) {
  background: rgba(15, 23, 42, 0.8);
}

.hero-table-row:nth-child(even) {
  background: rgba(15, 23, 42, 0.9);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.badge-warning {
  background: rgba(234, 179, 8, 0.1);
  color: #fde047;
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.hero-caption {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Sections */

.section {
  padding: 4rem 0;
  background: #f3f4f6;
}

.section-soft {
  background: #e5e7eb;
}

.section-accent {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), rgba(15, 23, 42, 0.96));
  color: #e5e7eb;
}

.section-cta {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.14), #111827);
  color: #e5e7eb;
}

.section-cta .section-header {
  max-width: none;
  margin-bottom: 0;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
}

.cta-text {
  max-width: 560px;
}

.cta-text h2 {
  margin: 0 0 0.45rem;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.cta-text p {
  margin: 0;
  font-size: 0.95rem;
  color: #d1d5db;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}


.section-header {
  text-align: left;
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-header h2,
.section-header h1 {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: #4b5563;
}

.section-accent .section-header p {
  color: #d1d5db;
}

/* Cards & grids */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background: #f9fafb;
  border-radius: 1rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.section-soft .card {
  background: #f9fafb;
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: #4b5563;
}

.card-compact ul {
  margin: 0.1rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.card-compact li + li {
  margin-top: 0.2rem;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.step {
  position: relative;
  padding: 1.3rem 1.3rem 1.4rem;
  border-radius: 1rem;
  background: #f9fafb;
  border: 1px dashed #cbd5e1;
}

.step-number {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

/* Pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  background: #f9fafb;
  border-radius: 1.1rem;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.pricing-card-featured {
  border-color: #4f46e5;
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.25);
  position: relative;
}

.pricing-label {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.pricing-price {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #111827;
}

.pricing-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.pricing-card ul li + li {
  margin-top: 0.2rem;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: flex-start;
}

.contact-points {
  margin: 1.1rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.contact-points li + li {
  margin-top: 0.25rem;
}

.contact-form {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 1.2rem;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
}

.field {
  margin-bottom: 0.9rem;
}

.field-inline {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #e5e7eb;
}

input,
textarea {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  font-size: 0.85rem;
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.7);
}

textarea {
  resize: vertical;
}

.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #e5e7eb;
}

.checkbox input {
  width: auto;
  margin-top: 0.15rem;
}

.form-note {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Illustrazioni di sezione */

.section-illustration {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.section-illustration img {
  max-width: 520px;
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
  object-fit: cover;
}

.section-illustration.section-illustration-dark img {
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

/* Page transition loader */

.page-transition-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.22), rgba(15, 23, 42, 0.98));
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.page-transition-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.page-transition-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.page-transition-loader span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
  animation: luna-dot 0.6s infinite alternate;
  opacity: 0.6;
}

.page-transition-loader span:nth-child(2) {
  animation-delay: 0.12s;
}

.page-transition-loader span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes luna-dot {
  from {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
  to {
    transform: translateY(-4px) scale(1.3);
    opacity: 1;
  }
}


.site-footer {
  padding: 1.6rem 0;
  background: #020617;
  color: #9ca3af;
  border-top: 1px solid #111827;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.8rem;
  font-size: 0.8rem;
}

.footer-col {
  flex: 1 1 0;
  min-width: 200px;
}

.footer-brand-col {
  max-width: 260px;
}

.footer-logo {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.footer-text {
  font-size: 0.8rem;
  color: #9ca3af;
}

.footer-links-col {
  display: flex;
  justify-content: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  justify-content: center;
}

.footer-nav a {
  color: #9ca3af;
}

.footer-nav a:hover {
  color: #e5e7eb;
}

.footer-legal-col {
  max-width: 320px;
}

.footer-legal {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #9ca3af;
}

.footer-legal .footer-ip {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: #9ca3af;
}

.legal-text {
  font-size: 0.9rem;
  color: #374151;
}

.section-accent .legal-text {
  color: #e5e7eb;
}

.legal-text h2 {
  margin-top: 1.8rem;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.legal-text p {
  margin: 0.3rem 0;
}

.legal-text ul {
  margin: 0.3rem 0;
  padding-left: 1.2rem;
}

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 960px;
  background: #020617;
  color: #e5e7eb;
  border-radius: 0.9rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.65);
  border: 1px solid #111827;
  padding: 0.75rem 1rem;
  z-index: 50;
  display: none; /* mostrato via JS solo se serve */
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.cookie-banner p {
  margin: 0;
  max-width: 640px;
  color: #e5e7eb;
}

.cookie-banner a {
  color: #a5b4fc;
  text-decoration: underline;
}

.cookie-banner a:hover {
  color: #c7d2fe;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-cookie {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-cookie-primary {
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #f9fafb;
}

.btn-cookie-secondary {
  border: 1px solid #4b5563;
  background: transparent;
  color: #e5e7eb;
}

@media (max-width: 640px) {
  .cookie-banner {
    bottom: 0.75rem;
    padding: 0.75rem 0.9rem;
  }

  .cookie-banner-inner {
    align-items: flex-start;
  }
}



/* Responsive */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }

  .grid-3,
  .steps,
  .pricing-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-nav.is-open {
    display: block;
  }
	  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
	  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links-col {
    justify-content: flex-start;
  }

}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 0 3.5rem;
  }
  .hero-text h1 {
    font-size: 2rem;
  }
  .section {
    padding: 3rem 0;
  }
  .hero-panel {
    margin-top: 1.2rem;
  }
}
