/* ============================================================================
   TuttoChiaro — Landing page (tuttochiaro.app)
   Stack: vanilla HTML/CSS, zero build, mobile-first.
   Riusa colori e wordmark dell'app (vedi /style.css per coerenza design system).
   ============================================================================ */

/* ─── Variabili design system (allineate con app/style.css :root) ─── */
:root {
  --primary:      #007AFF;
  --primary-2:    #1FA86A;        /* verde scurito per leggibilità su bianco */
  --success:      #34C759;
  --navy:         #1A3A5C;
  --warning:      #FF9500;
  --danger:       #FF3B30;
  --text:         #0F172A;
  --text-2:       #475569;
  --text-3:       #94A3B8;
  --bg:           #FFFFFF;
  --bg-soft:      #F8FAFC;
  --border:       #E2E8F0;
  --border-soft:  #F1F5F9;

  --r1: 6px;
  --r2: 10px;
  --r3: 16px;
  --r4: 24px;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow:    0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, .10);

  --container: 1140px;
}

/* ─── Reset minimale ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
ul { padding-left: 1.2em; }

/* ─── Container ─── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s5);
}

/* ─── Header ─── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s5);
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: var(--s2);
  font-size: 19px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--text);
}
.brand-icon { width: 32px; height: 32px; border-radius: 7px; }
.lg-tutto  { color: var(--navy); }
.lg-chiaro {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-inline { display: flex; align-items: center; gap: var(--s5); }
.nav-inline a {
  font-size: 14px; font-weight: 500; color: var(--text-2);
}
.nav-inline a:hover { color: var(--text); text-decoration: none; }

/* ─── Bottoni ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--r2);
  border: 1px solid transparent;
  transition: transform .12s, box-shadow .12s, background .12s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 3px rgba(0,122,255,.30);
}
.btn--primary:hover { background: #0066D6; transform: translateY(-1px); text-decoration: none; box-shadow: 0 4px 12px rgba(0,122,255,.35); }
.btn--ghost {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn--lg { padding: 14px 28px; font-size: 16px; }

/* ─── Hero ─── */
.hero {
  padding: var(--s8) 0 var(--s7);
  background: linear-gradient(180deg, #fff 0%, #F0F7FF 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(31,168,106,.10) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero::after {
  content: '';
  position: absolute; bottom: -120px; left: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(0,122,255,.10) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--primary); background: rgba(0,122,255,.08);
  border-radius: 999px;
  margin-bottom: var(--s4);
}
.hero h1 {
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.08; font-weight: 800; letter-spacing: -1.2px;
  margin: 0 0 var(--s4);
  color: var(--text);
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-2);
  max-width: 680px; margin: 0 auto var(--s6);
  line-height: 1.55;
}
.hero-cta { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }
.hero-trust {
  margin-top: var(--s5);
  font-size: 13px; color: var(--text-3);
}

/* ─── Sections generic ─── */
section { padding: var(--s8) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--s7); }
.section-head h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 800; letter-spacing: -0.6px;
  margin: 0 0 var(--s3);
}
.section-head p { color: var(--text-2); font-size: 17px; margin: 0; }

/* ─── Features ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
}
.feature-card {
  padding: var(--s6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(0,122,255,.20);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(0,122,255,.10), rgba(31,168,106,.10));
  margin-bottom: var(--s4);
}
.feature-card h3 {
  font-size: 19px; font-weight: 700; letter-spacing: -0.3px;
  margin: 0 0 var(--s2);
}
.feature-card p {
  font-size: 15px; color: var(--text-2);
  margin: 0;
}

/* ─── Pricing ─── */
.pricing { background: var(--bg-soft); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s5);
  max-width: 820px; margin: 0 auto;
}
.price-card {
  padding: var(--s6);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  position: relative;
}
.price-card--featured {
  border: 2px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0,122,255,.12);
}
.price-badge {
  position: absolute; top: -12px; right: var(--s5);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
}
.price-card h3 {
  font-size: 16px; font-weight: 600; color: var(--text-2);
  margin: 0 0 var(--s3); text-transform: uppercase; letter-spacing: .5px;
}
.price-amount { display: flex; align-items: baseline; gap: 6px; margin-bottom: var(--s4); }
.price-amount .v { font-size: 44px; font-weight: 800; color: var(--text); letter-spacing: -1.5px; }
.price-amount .u { font-size: 16px; color: var(--text-2); }
.price-save {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  color: #1f7a30; background: rgba(52,199,89,.12);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: var(--s4);
}
.price-features { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.price-features li {
  font-size: 14px; color: var(--text-2);
  padding: 6px 0;
  display: flex; align-items: center; gap: var(--s2);
}
.price-features li::before {
  content: '✓';
  color: var(--success); font-weight: 700;
  width: 16px; flex-shrink: 0;
}
.price-card .btn { width: 100%; }

/* ─── FAQ ─── */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--s4) 0;
}
.faq-item summary {
  font-size: 17px; font-weight: 600; color: var(--text);
  cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
  list-style: none;
  padding: var(--s2) 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 24px; color: var(--text-3);
  transition: transform .15s;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--primary); }
.faq-item-body {
  font-size: 15px; color: var(--text-2);
  padding: var(--s3) 0 var(--s2);
  line-height: 1.65;
}
.faq-item-body p { margin: 0 0 var(--s3); }
.faq-item-body p:last-child { margin: 0; }

/* ─── Footer ─── */
.footer {
  background: var(--text);
  color: #CBD5E1;
  padding: var(--s7) 0 var(--s5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s6);
  margin-bottom: var(--s7);
}
.footer-brand {
  display: flex; align-items: center; gap: var(--s2);
  font-size: 18px; font-weight: 800;
  color: #fff;
  margin-bottom: var(--s3);
}
.footer-brand .lg-tutto { color: #fff; }
.footer-claim {
  font-size: 14px; color: #94A3B8; max-width: 280px;
  margin-bottom: var(--s4);
}
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: #94A3B8;
  margin: 0 0 var(--s3);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 4px 0; }
.footer-col a {
  font-size: 14px; color: #CBD5E1;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  padding-top: var(--s5);
  border-top: 1px solid #1E293B;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s3);
  font-size: 13px; color: #64748B;
}

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s5); }
  section { padding: var(--s7) 0; }
  .hero { padding: var(--s7) 0 var(--s6); }
  .nav-inline { gap: var(--s3); }
  .nav-inline a:not(.btn) { display: none; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 var(--s4); }
}
