/* ============================================
   DESIGN SYSTEM — 8 wave Agent Studio
   ============================================ */
:root {
  --background: 0 0% 100%;
  --background-secondary: 239 28% 94%;
  --foreground: 210 11% 10%;
  --card: 0 0% 100%;
  --card-foreground: 210 11% 10%;

  /* Primary = #898bc4 — pervinca desaturato, per icone, bordi, badge, decorazioni */
  --primary: 239 28% 66%;
  --primary-foreground: 0 0% 100%;

  /* Primary-text = #5b5d9a — versione scura per testo colorato (WCAG AA) */
  --primary-text: 239 28% 46%;

  /* Accent = viola elettrico — solo per bottoni CTA */
  --accent: 261 100% 70%;
  --accent-foreground: 0 0% 100%;

  --secondary: 239 28% 66%;
  --secondary-foreground: 0 0% 100%;
  --muted: 239 28% 94%;
  --muted-foreground: 210 5% 45%;
  --border: 239 20% 88%;
  --radius: 0.75rem;

  /* Ombre tinte sull'hue del primary (#898bc4) */
  --shadow-sm: 0 1px 3px 0 hsl(239 28% 40% / 0.08), 0 1px 2px -1px hsl(239 28% 40% / 0.06);
  --shadow-md: 0 4px 6px -1px hsl(239 28% 40% / 0.1), 0 2px 4px -2px hsl(239 28% 40% / 0.08);
  --shadow-lg: 0 10px 15px -3px hsl(239 28% 40% / 0.12), 0 4px 6px -4px hsl(239 28% 40% / 0.08);
  --shadow-xl: 0 20px 25px -5px hsl(239 28% 40% / 0.14), 0 8px 10px -6px hsl(239 28% 40% / 0.08);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: hsl(var(--background-secondary));
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

.text-muted {
  color: hsl(var(--muted-foreground));
}

.text-center { text-align: center; }

.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--accent));
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  max-width: 640px;
  margin: 1rem auto 0;
  line-height: 1.7;
}

.highlight {
  color: hsl(var(--accent));
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease-out;
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}
.btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px hsl(261 60% 50% / 0.25);
}
.btn--primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

/* CTA shimmer */
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  animation: btn-shimmer 3.5s ease-in-out infinite;
}

.btn--secondary {
  background-color: transparent;
  color: hsl(var(--accent));
  border: 2px solid hsl(var(--accent));
}
.btn--secondary:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  transform: translateY(-2px);
}
.btn--secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn--small {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: hsla(var(--background) / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  transition: box-shadow 0.3s;
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 88px;
  min-height: 88px;
}

.navbar__logo {
  display: flex;
  align-items: center;
}
.navbar__logo-img {
  height: 36px;
  width: auto;
  max-width: 180px;
  display: block;
}

.navbar__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
}
.navbar__links a {
  font-size: 1.125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s;
}
.navbar__links a:hover {
  color: hsl(var(--primary-text));
}

.navbar__cta-wrapper {
  display: none;
  justify-content: flex-end;
}

.navbar__cta {
  color: hsl(var(--primary-foreground)) !important;
  padding: 8px 24px;
  border-radius: 40px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.375rem;
}

.navbar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.navbar__hamburger svg {
  width: 24px;
  height: 24px;
  stroke: hsl(var(--foreground));
}

@media (max-width: 768px) {
  .navbar__inner {
    display: flex;
    justify-content: space-between;
  }
  .navbar__links { display: none; }
  .navbar__hamburger { display: block; }
  .navbar__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    padding: 1.5rem;
    gap: 1rem;
  }
}

@media (min-width: 769px) {
  .navbar__cta-wrapper { display: flex; }
}

/* ============================================
   HERO — DARK
   ============================================ */
.hero {
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(12, 12, 20, 0.85) 0%, rgba(12, 12, 20, 0.7) 100%),
    url('../img/hero-bg.jpg') center / cover no-repeat;
  background-color: #0c0c14;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, hsl(var(--primary) / 0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -35%;
  left: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, hsl(var(--primary) / 0.08) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid hsl(var(--primary) / 0.25);
}
.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: hsl(var(--primary));
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.hero__subtitle {
  font-size: 1.2rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero .btn--secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.hero .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.hero__trust {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.hero__trust-item svg {
  width: 18px;
  height: 18px;
  stroke: hsl(var(--accent));
  flex-shrink: 0;
}

.hero__visual {
  position: relative;
}

.hero__video-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 16/9;
  background: #1a1a2e;
}
.hero__video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .hero { padding: 6rem 0 3rem; }
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ============================================
   SOCIAL PROOF BAR
   ============================================ */
.social-proof {
  padding: 3rem 0;
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}

.social-proof__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-bottom: 2rem;
}

.social-proof__logos {
  display: block !important;
  overflow: hidden;
  position: relative;
}
.social-proof__logos::before,
.social-proof__logos::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.social-proof__logos::before {
  left: 0;
  background: linear-gradient(to right, hsl(var(--background)), transparent);
}
.social-proof__logos::after {
  right: 0;
  background: linear-gradient(to left, hsl(var(--background)), transparent);
}

.social-proof__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

.social-proof__logo img {
  height: 36px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: opacity 0.3s, filter 0.3s;
}
.social-proof__logo img:hover {
  opacity: 0.8;
  filter: grayscale(60%);
}

/* Marquee infinito */
.marquee-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: marquee-scroll 20s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
.marquee-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================
   PAIN POINTS
   ============================================ */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.pain-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease-out;
}
.pain-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pain-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--primary) / 0.04) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease-out, background 0.3s;
}
.pain-card:hover .pain-card__icon {
  transform: scale(1.1) rotate(-3deg);
  background: linear-gradient(135deg, hsl(var(--primary) / 0.18) 0%, hsl(var(--primary) / 0.08) 100%);
}
.pain-card__icon svg {
  width: 26px;
  height: 26px;
  stroke: hsl(var(--accent));
  transition: stroke-width 0.3s;
}
.pain-card:hover .pain-card__icon svg {
  stroke-width: 2.5;
}

.pain-card h3 {
  margin-bottom: 0.75rem;
}

.pain-card p {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .pain-grid { grid-template-columns: 1fr; }
}

/* ============================================
   HOW IT WORKS (3 pillars)
   ============================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.pillar {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: all 0.3s ease-out;
}
.pillar:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.pillar__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(261 100% 60%) 100%);
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 15px hsl(var(--primary) / 0.3);
  transition: transform 0.3s ease-out, box-shadow 0.3s;
}
.pillar:hover .pillar__number {
  transform: scale(1.1);
  box-shadow: 0 6px 20px hsl(var(--primary) / 0.4);
}

.pillar h3 {
  margin-bottom: 0.75rem;
}

.pillar p {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ============================================
   USE CASES
   ============================================ */
.usecases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.usecase {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease-out;
  display: flex;
  flex-direction: column;
}
.usecase:hover {
  box-shadow: var(--shadow-md);
  border-color: hsl(var(--primary) / 0.3);
  transform: translateY(-2px);
}

.usecase__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--primary) / 0.04) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.3s ease-out, background 0.3s;
  flex-shrink: 0;
}
.usecase:hover .usecase__icon {
  transform: scale(1.1) rotate(-3deg);
  background: linear-gradient(135deg, hsl(var(--primary) / 0.18) 0%, hsl(var(--primary) / 0.08) 100%);
}
.usecase__icon svg {
  width: 22px;
  height: 22px;
  stroke: hsl(var(--accent));
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.usecase h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.usecase p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.usecase__kpi {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--primary-text));
  background: hsl(var(--primary) / 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-top: auto;
  align-self: flex-start;
}

@media (max-width: 1024px) {
  .usecases { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .usecases { grid-template-columns: 1fr; }
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison {
  margin-top: 3rem;
  overflow-x: auto;
}

.comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison th,
.comparison td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
}

.comparison thead th {
  font-weight: 700;
  font-size: 0.95rem;
  background: hsl(var(--background-secondary));
}

.comparison thead th:nth-child(2) {
  color: hsl(var(--primary-text));
  background: hsl(var(--primary) / 0.08);
}

.comparison thead {
  position: sticky;
  top: 4rem;
  z-index: 10;
  background: hsl(var(--background-secondary));
}

.comparison thead th {
  border-bottom: 2px solid hsl(var(--border));
}

.comparison tbody td:nth-child(2) {
  font-weight: 600;
  background: hsl(var(--primary) / 0.03);
}

.comparison tbody tr {
  transition: background-color 0.15s ease-out;
  cursor: default;
}
.comparison tbody tr:hover {
  background-color: hsl(var(--primary) / 0.04);
}
.comparison tbody tr:hover td:nth-child(2) {
  background: hsl(var(--primary) / 0.08);
}

.check { color: #22c55e; font-weight: 700; }
.cross { color: hsl(var(--muted-foreground)); }
.partial { color: #f59e0b; font-weight: 700; }

/* ============================================
   TESTIMONIAL
   ============================================ */
.testimonial-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 720px;
  margin: 3rem auto 0;
  text-align: center;
}

.testimonial-card blockquote {
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.7;
  color: hsl(var(--foreground));
  margin-bottom: 1.5rem;
}

.testimonial-card__author {
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-card__role {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
}

/* ============================================
   LEAD MAGNET — DARK
   ============================================ */
.lead-magnet-section {
  background: #0c0c14;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.lead-magnet-section::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, hsl(var(--primary) / 0.1) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.lead-magnet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.lead-magnet .section-eyebrow {
  color: hsl(var(--primary));
}

.lead-magnet h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.lead-magnet p {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.lead-magnet ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.lead-magnet li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lead-magnet li::before {
  content: '✓';
  color: hsl(var(--primary));
  font-weight: 700;
}

.lead-magnet__form {
  display: flex;
  gap: 0.75rem;
}

.lead-magnet__form input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.lead-magnet__form input:focus {
  border-color: hsl(var(--primary));
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}
.lead-magnet__form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.lead-magnet__note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .lead-magnet { grid-template-columns: 1fr; gap: 2rem; }
  .lead-magnet__form { flex-direction: column; }
}

/* ============================================
   CONTACT / DEMO FORM
   ============================================ */
.form-section {
  padding: 5rem 0;
}

.form-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.form-benefits h2 {
  margin-bottom: 1.5rem;
}

.form-benefits p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  line-height: 1.7;
}

.form-benefits__list {
  list-style: none;
}

.form-benefits__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.95rem;
  color: hsl(var(--foreground));
}
.form-benefits__list li svg {
  width: 20px;
  height: 20px;
  stroke: hsl(var(--accent));
  flex-shrink: 0;
  margin-top: 2px;
}

.demo-form {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.demo-form h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.demo-form__subtitle {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: hsl(var(--foreground));
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  font-family: inherit;
  font-size: 0.95rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1.25rem 0;
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}
.form-privacy input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: hsl(var(--primary));
  flex-shrink: 0;
}

.form-privacy a {
  color: hsl(var(--primary-text));
  text-decoration: underline;
}

.demo-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .form-wrapper { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================
   URGENCY BANNER
   ============================================ */
.urgency-banner {
  background: hsl(var(--accent));
  color: white;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}
.urgency-banner strong {
  font-weight: 700;
}

/* ============================================
   FAQ
   ============================================ */
.faq-list {
  max-width: 720px;
  margin: 3rem auto 0;
}

.faq-item {
  border-bottom: 1px solid hsl(var(--border));
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question:hover {
  color: hsl(var(--primary-text));
}
.faq-question::after {
  content: none;
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: hsl(var(--muted-foreground));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.2s;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  stroke: hsl(var(--primary));
}
.faq-question:hover .faq-chevron {
  stroke: hsl(var(--primary));
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}

.faq-answer__inner {
  padding: 0 0 1.25rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: hsl(210 11% 10%);
  color: hsl(210 5% 65%);
  padding: 3.5rem 0 0;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 2.5rem;
}

.footer__brand-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__logo svg {
  width: 40px;
  height: 40px;
}

.footer__powered-by {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1rem;
}

.footer__company-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-top: 0.1rem;
}

.footer__address {
  font-size: 0.85rem;
  line-height: 1.7;
  color: hsl(210 5% 55%);
}
.footer__address a {
  color: hsl(210 5% 55%);
  transition: color 0.2s;
}
.footer__address a:hover {
  color: white;
}

.footer__center {
  text-align: center;
  padding-top: 0.5rem;
}

.footer__back-to-top {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: hsl(210 5% 65%);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.2s;
}
.footer__back-to-top:hover {
  color: white;
}
.footer__back-to-top svg {
  width: 20px;
  height: 20px;
}

.footer__social-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.footer__social-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: hsl(210 5% 65%);
  transition: color 0.2s;
}
.footer__social-link:hover {
  color: white;
}

.footer__bottom {
  border-top: 1px solid hsl(210 11% 18%);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer__bottom a {
  font-size: 0.85rem;
  color: hsl(210 5% 55%);
  transition: color 0.2s;
}
.footer__bottom a:hover {
  color: white;
}

.footer__copy {
  font-size: 0.8rem;
  color: hsl(210 5% 45%);
}

/* Nasconde il bottone Iubenda iniettato da GTM */
#iubenda-cs-banner,
#iubenda-cs-preferences-link-text,
.iubenda-cs-preferences-link,
[class*="iubenda"],
[id*="iubenda"] {
  display: none !important;
}

@media (max-width: 768px) {
  .footer__top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .footer__brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer__logo {
    justify-content: center;
  }
  .footer__center {
    order: 3;
  }
  .footer__social-col {
    align-items: center;
    order: 2;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

/* ============================================
   IMAGE BREAK — PARALLAX DIVIDER
   ============================================ */
.image-break {
  height: 360px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}
.image-break::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(210 11% 10% / 0.5) 100%);
}
.image-break__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
}
.image-break__content h2 {
  color: white;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  max-width: 640px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.image-break__content p {
  margin: 1rem auto 0;
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 480px;
}

@media (max-width: 768px) {
  .image-break {
    height: 280px;
    background-attachment: scroll;
  }
}

/* ============================================
   SECTION ILLUSTRATION
   ============================================ */
.section-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.section-with-image--reverse {
  direction: rtl;
}
.section-with-image--reverse > * {
  direction: ltr;
}
.section-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.section-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease-out;
}
.section-image:hover img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .section-with-image,
  .section-with-image--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 2rem;
  }
}

/* ============================================
   ARCH BLOCK
   ============================================ */
.arch-block {
  margin-top: 3rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  background: hsl(var(--background-secondary));
}

.arch-block__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2.5rem;
}

.arch-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
  line-height: 1.6;
}

.arch-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .arch-grid { grid-template-columns: 1fr; }
  .arch-block { padding: 1.5rem; }
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(261 100% 85%));
  z-index: 2000;
  transition: width 0.1s linear;
  transform-origin: left;
}

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   VIDEO SKELETON LOADER
   ============================================ */
.video-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: opacity 0.4s ease-out;
}
.video-skeleton.hidden {
  opacity: 0;
  pointer-events: none;
}
.video-skeleton__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-skeleton__icon svg {
  width: 24px;
  height: 24px;
  fill: rgba(255,255,255,0.4);
}

/* ============================================
   MOBILE STICKY CTA
   ============================================ */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 5rem; /* lascia spazio al chatbot bubble (~72px) */
  z-index: 900;
  background: transparent;
  border-top: none;
  padding: 0;
  box-shadow: none;
  transform: translateY(calc(100% + 1rem));
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sticky-cta.visible {
  transform: translateY(0);
}
.sticky-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: hsl(var(--accent));
  color: white;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.2s;
  box-shadow: 0 4px 20px hsl(261 60% 50% / 0.35);
}
.sticky-cta a:active {
  opacity: 0.85;
}
@media (max-width: 768px) {
  .sticky-cta { display: block; }
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.kpi-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ============================================
   GRAIN / NOISE OVERLAY
   Rompe la piattezza digitale su sezioni chiave
   ============================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ============================================
   STAGGER DELAY — carte e griglie
   ============================================ */
.stagger-item:nth-child(1) { transition-delay: 0ms; }
.stagger-item:nth-child(2) { transition-delay: 80ms; }
.stagger-item:nth-child(3) { transition-delay: 160ms; }
.stagger-item:nth-child(4) { transition-delay: 240ms; }
.stagger-item:nth-child(5) { transition-delay: 320ms; }
.stagger-item:nth-child(6) { transition-delay: 400ms; }
.stagger-item:nth-child(7) { transition-delay: 480ms; }
.stagger-item:nth-child(8) { transition-delay: 560ms; }

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes btn-shimmer {
  0%   { left: -100%; }
  35%  { left: 130%; }
  100% { left: 130%; }
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   REDUCED MOTION — rispetta preferenze utente
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .btn--primary::after { animation: none; }
  .video-skeleton { animation: none; }
  .animate-on-scroll,
  .stagger-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__badge::before { animation: none; }
}
