/* Design tokens CaptureDocs - palette, typography, components */
:root {
  --color-primary: #3B2CFF;
  --color-primary-light: #6366f1;
  --color-primary-gradient-from: #C058FF;
  --color-primary-gradient-to: #3B2CFF;
  --color-secondary: #0d9488;
  --color-secondary-light: #14b8a6;
  --color-accent: #0d9488;
  --color-neutral-900: #0f172a;
  --color-neutral-800: #1e293b;
  --color-neutral-600: #475569;
  --color-neutral-500: #64748b;
  --color-neutral-100: #f1f5f9;
  --color-neutral-50: #f8fafc;
  --color-success: #059669;
  --color-warning: #d97706;
  --color-primary-hex: #3B2CFF;
  --color-accent-hex: #C058FF;
  --color-link: var(--color-secondary);
  --color-bg-page: #f1f5f9;
  --color-bg-section-alt: #f8fafc;
  --color-border: #e2e8f0;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-card-hover: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --radius-card: 1rem;
  --radius-button: 9999px;
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg-page);
  color: var(--color-neutral-900);
}

.section-container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.section-container--narrow {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.section-py { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.section-py--lg { padding-top: 5rem; padding-bottom: 5rem; }

.badge-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid color-mix(in oklab, var(--color-accent-hex) 30%, transparent);
  background: color-mix(in oklab, var(--color-accent-hex) 20%, transparent);
  color: var(--color-accent-hex);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-neutral {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-neutral-600);
  font-size: 0.75rem;
  font-weight: 500;
}
.link-primary { color: var(--color-link); text-decoration: underline; }
.link-primary:hover { color: #0f766e; }

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
[x-cloak] { display: none !important; }
.faq-item { border-bottom: 1px solid rgba(148, 163, 184, 0.2); }
.faq-question { cursor: pointer; transition: all 0.3s ease; }
.faq-question:hover { color: #60a5fa; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  padding-top: 0;
  padding-bottom: 0;
}
.faq-answer.open { max-height: 1000px; padding-top: 1rem; padding-bottom: 1rem; }
.faq-icon { transition: transform 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(180deg); }

/* Display headings */
.heading-1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.heading-2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.heading-3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
}

/* Accent colore per parole chiave nei titoli */
.title-accent {
  color: var(--color-primary-gradient-from);
}

/* Hover accent coerente sui titoli cliccabili */
.title-accent-hover:hover {
  color: var(--color-primary-gradient-from);
}

/* Primary CTA - solo per azione principale */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-gradient-from), var(--color-primary-gradient-to));
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-button);
  box-shadow: 0 4px 14px 0 rgb(59 44 255 / 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgb(59 44 255 / 0.4);
}

/* Secondary CTA - outline, non gradient */
.btn-secondary {
  background: transparent;
  color: var(--color-secondary);
  font-weight: 600;
  border: 2px solid var(--color-secondary);
  border-radius: 0.75rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-secondary:hover {
  background: rgba(13, 148, 136, 0.08);
  color: #0f766e;
}

/* Card hover consistente */
.card-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Reveal per scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger reveal per gruppi di card - delay scalato per figlio */
.reveal-group > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-group > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-group > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-group > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-group > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-group > .reveal:nth-child(6) { transition-delay: 400ms; }

/* Pulse sottile CTA hero - attira attenzione senza distrarre */
@keyframes cta-hero-pulse {
  0%, 100% { box-shadow: 0 4px 14px 0 rgb(59 44 255 / 0.35); }
  50% { box-shadow: 0 4px 28px 0 rgb(192 88 255 / 0.55); }
}

.btn-primary--pulse {
  animation: cta-hero-pulse 2.8s ease-in-out infinite;
}

.btn-primary--pulse:hover {
  animation: none;
}

/* Eyebrow hero con dot pulsante "live" */
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 6px;
  vertical-align: middle;
  animation: dot-pulse 1.8s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Timeline step - linea connettore che cresce all'entrata */
.timeline-line {
  transform-origin: top center;
  transform: scaleY(0);
  transition: transform 0.4s ease 0.3s;
}

.reveal.revealed .timeline-line {
  transform: scaleY(1);
}

/* Hamburger -> X quando menu aperto */
.hamburger-btn.is-open .hamburger-line:nth-child(1) {
  transform: translateY(0.375rem) rotate(45deg);
}
.hamburger-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-0.375rem) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn-primary--pulse,
  .hero-eyebrow::before,
  .badge-primary--animated {
    animation: none;
  }

  .timeline-line {
    transform: scaleY(1);
    transition: none;
  }
}
