/* ============================================================
   AI ROBOTS LANDING — STILI CSS
   Design: Modern Clarity (Navy + Teal + Warm White)
   Target: 35-65+ Italia, mobile-first responsive
   ============================================================ */

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

:root {
  --navy: #0F2942;
  --navy-light: #1a3a5c;
  --teal: #2DD4BF;
  --teal-light: #5eead4;
  --teal-bg: rgba(45, 212, 191, 0.1);
  --warm-white: #FAFAF7;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(15, 41, 66, 0.06), 0 8px 24px rgba(15, 41, 66, 0.04);
  --shadow-lg: 0 4px 16px rgba(15, 41, 66, 0.08), 0 16px 48px rgba(15, 41, 66, 0.06);
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--warm-white);
  color: var(--gray-800);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--navy);
}

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

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

ul {
  list-style: none;
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  section { padding: 6rem 0; }
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--navy-light);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline:hover {
  background-color: rgba(15, 41, 66, 0.05);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* === HEADER === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  color: var(--gray-500);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-desktop a:hover {
  color: var(--navy);
}

.nav-cta-desktop {
  display: none;
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  color: var(--navy);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  background: var(--warm-white);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  color: var(--gray-500);
  font-weight: 500;
  font-size: 1.125rem;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .nav-cta-desktop { display: inline-flex; }
  .mobile-menu-btn { display: none; }
  .nav-mobile { display: none !important; }
}

/* === HERO === */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(at 20% 20%, rgba(45, 212, 191, 0.08) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(15, 41, 66, 0.06) 0px, transparent 50%);
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--teal-bg);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 3rem; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 3.75rem; }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--gray-500);
  margin-bottom: 2rem;
  max-width: 36rem;
}

@media (min-width: 768px) {
  .hero-subtitle { font-size: 1.25rem; }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-buttons { flex-direction: row; }
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
}

.hero-trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
  flex-shrink: 0;
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-stat-card {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  display: none;
}

@media (min-width: 640px) {
  .hero-stat-card { display: flex; align-items: center; gap: 0.75rem; }
}

.hero-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-stat-icon svg {
  width: 24px;
  height: 24px;
  color: var(--teal);
}

.hero-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* === SECTIONS === */
.section-title {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 4rem;
}

.section-title h2 {
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .section-title h2 { font-size: 2.5rem; }
}

.section-title p {
  font-size: 1.125rem;
  color: var(--gray-500);
}

@media (min-width: 768px) {
  .section-title p { font-size: 1.25rem; }
}

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: rgba(15, 41, 66, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--navy);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--gray-500);
}

/* === GRID === */
.grid-3 {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* === FEATURE CARDS WITH IMAGES === */
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.feature-card:hover img {
  transform: scale(1.05);
}

.feature-card-body {
  padding: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--gray-500);
}

/* === VANTAGGI (DARK SECTION) === */
.section-dark {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
}

.section-dark h2 {
  color: var(--white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.7);
}

.vantaggio-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.vantaggio-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.vantaggio-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: rgba(45, 212, 191, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vantaggio-icon svg {
  width: 28px;
  height: 28px;
  color: var(--teal);
}

.vantaggio-card h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.vantaggio-card p {
  color: rgba(255, 255, 255, 0.7);
}

/* === HOW IT WORKS === */
.step-card {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.step-number {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(45, 212, 191, 0.3);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.step-card p {
  color: var(--gray-500);
}

/* === CONTACT SECTION === */
.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-info-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(15, 41, 66, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-icon svg {
  width: 20px;
  height: 20px;
  color: var(--navy);
}

.contact-info-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

.contact-details {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  font-size: 0.875rem;
}

.contact-details .label {
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.contact-details .value {
  color: var(--navy);
  font-weight: 500;
}

/* === FORM === */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .form-card { padding: 2rem; }
}

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

@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.form-input,
.form-textarea {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.form-textarea {
  height: auto;
  min-height: 120px;
  padding: 0.75rem 1rem;
  resize: vertical;
}

.form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.form-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.form-checkbox-label a {
  color: var(--navy);
  text-decoration: underline;
}

.form-submit {
  width: 100%;
  height: 48px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s var(--ease-out);
}

.form-submit:hover {
  background: var(--navy-light);
}

.form-submit:active {
  transform: scale(0.97);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: 0.75rem;
}

.form-toast {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 200;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.3s var(--ease-out);
  max-width: 90vw;
}

.form-toast.show {
  transform: translateX(0);
}

.form-toast.success {
  background: var(--teal);
  color: var(--navy);
}

.form-toast.error {
  background: #ef4444;
  color: var(--white);
}

/* === FOOTER === */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .footer { padding: 4rem 0; }
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--white);
}

.footer-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer ul li a:hover {
  color: var(--teal);
}

.footer-contact {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: grid;
  gap: 1rem;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .footer-contact { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .footer-contact { grid-template-columns: 1fr 1fr 1fr; }
}

.footer-contact .label {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.footer-contact .value {
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact .value a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact .value a:hover {
  color: var(--teal);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

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

.footer-gdpr svg {
  width: 16px;
  height: 16px;
  color: var(--teal);
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 1rem;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
  }
}

.cookie-banner-text {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
}

.cookie-banner-text svg {
  width: 20px;
  height: 20px;
  color: var(--navy);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.cookie-banner-text p {
  font-size: 0.875rem;
  color: var(--gray-800);
  line-height: 1.5;
}

.cookie-banner-text a {
  color: var(--navy);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-banner-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-banner-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--gray-500);
}

.cookie-banner-close svg {
  width: 16px;
  height: 16px;
}

/* === LEGAL PAGES === */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.legal-main {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .legal-main { padding: 4rem 0; }
}

.legal-content {
  max-width: 48rem;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 1.875rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .legal-content h1 { font-size: 2.5rem; }
}

.legal-updated {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.legal-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ul li {
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.legal-content a {
  color: var(--navy);
  text-decoration: underline;
}

.legal-content strong {
  font-weight: 600;
  color: var(--navy);
}

.legal-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
  padding: 2rem 0;
}

.legal-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 640px) {
  .legal-footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.legal-footer-links {
  display: flex;
  gap: 1.5rem;
}

.legal-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.legal-footer-links a:hover {
  color: var(--teal);
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}
