/* Monitile — foglio di stile condiviso da tutte le pagine (IT ed EN).
   Nessun framework, nessun build step: si carica così com'è. */

:root {
  --brand: #3B5BDB;
  --brand-light: #5C7CFA;
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --text: #14181f;
  --text-soft: #57606f;
  --border: #e2e6ef;
  --ok: #2b8a3e;
  --no: #adb5bd;
  --radius: 14px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --bg-soft: #161b23;
    --text: #e8ecf3;
    --text-soft: #9aa4b5;
    --border: #262d38;
    --brand: #6b8afd;
    --brand-light: #8aa3ff;
    --ok: #51cf66;
    --no: #5a6472;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Inter, -apple-system, BlinkMacSystemFont, Roboto, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--brand); }

/* ---------- header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

header.site .logo { display: flex; align-items: center; color: var(--text); text-decoration: none; }
header.site .logo img { height: 34px; width: auto; display: block; }

header.site nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
header.site nav a { color: var(--text-soft); text-decoration: none; font-size: 15px; }
header.site nav a:hover { color: var(--text); }

.lang { font-size: 14px; color: var(--text-soft); white-space: nowrap; }
.lang a { text-decoration: none; }
.lang .current { color: var(--text); font-weight: 600; }

/* ---------- bottoni ---------- */

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-light); }

.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- sezioni ---------- */

section { padding: 76px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }

h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

h3 { font-size: 19px; margin: 0 0 8px; }

.lead { font-size: 19px; color: var(--text-soft); max-width: 62ch; margin: 0 0 30px; }
.sub { color: var(--text-soft); max-width: 62ch; margin: 0 0 34px; }

/* ---------- hero ---------- */

.hero { padding: 84px 0 64px; text-align: center; }
.hero .lead { margin-left: auto; margin-right: auto; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .meta { margin-top: 22px; color: var(--text-soft); font-size: 15px; }

/* ---------- demo ---------- */

.demo { background: var(--bg-soft); }
.demo figure { margin: 0; }
.demo-item + .demo-item { margin-top: 54px; padding-top: 54px; border-top: 1px solid var(--border); }
.demo-label { font-weight: 600; font-size: 18px; margin: 0 0 16px; }
.demo-label span { color: var(--text-soft); font-weight: 400; }
.demo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.demo figcaption { margin-top: 16px; color: var(--text-soft); font-size: 15px; text-align: center; }

/* ---------- griglie ---------- */

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card p { color: var(--text-soft); margin: 0; }

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

/* ---------- tabella confronto ---------- */

.table-scroll { overflow-x: auto; }

table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 16px;
}
table.compare th, table.compare td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
table.compare thead th { font-size: 15px; color: var(--text-soft); font-weight: 600; }
table.compare tbody th { font-weight: 500; }
table.compare td { text-align: center; width: 22%; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--no); }

/* ---------- prezzi ---------- */

.price-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.plan {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.plan.highlight { border-color: var(--brand); border-width: 2px; }
.plan .amount { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 4px; }
.plan .note { color: var(--text-soft); font-size: 15px; margin: 0 0 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; }
.plan li { padding: 7px 0 7px 26px; position: relative; color: var(--text-soft); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.plan .btn { margin-top: auto; text-align: center; }

/* ---------- faq ---------- */

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq details p { color: var(--text-soft); margin: 12px 0 0; }

/* ---------- pagine di documentazione ---------- */

.doc-head { padding: 56px 0 34px; border-bottom: 1px solid var(--border); }
.doc-head h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 12px; }
.doc-head p { color: var(--text-soft); max-width: 66ch; margin: 0; }

.doc-layout {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 56px;
  align-items: start;
  padding: 44px 0 80px;
}

.doc-nav { position: sticky; top: 92px; font-size: 15px; }
.doc-nav p { font-weight: 600; margin: 0 0 10px; font-size: 14px; text-transform: uppercase;
             letter-spacing: 0.06em; color: var(--text-soft); }
.doc-nav ol { list-style: none; padding: 0; margin: 0; }
.doc-nav li { padding: 4px 0; }
.doc-nav a { color: var(--text-soft); text-decoration: none; }
.doc-nav a:hover { color: var(--brand); }

.doc { max-width: 74ch; }
.doc > section { padding: 0; border: 0; margin-bottom: 52px; }
.doc > section:last-child { margin-bottom: 0; }
.doc h2 { scroll-margin-top: 88px; margin-bottom: 16px; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 7px 0; }
.doc kbd {
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 7px;
  font-family: inherit;
  font-size: 0.88em;
  font-weight: 600;
  background: var(--bg-soft);
  white-space: nowrap;
}
.doc code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.88em;
  word-break: break-word;
}
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 16px; }
.doc th, .doc td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc thead th { color: var(--text-soft); font-size: 15px; font-weight: 600; }
.doc td code { white-space: nowrap; }

/* Scoped a .doc: fuori dalla documentazione ".note" è già usata dalle card dei prezzi. */
.doc .note {
  border-left: 3px solid var(--brand);
  background: var(--bg-soft);
  padding: 15px 18px;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
}
.doc .note p:last-child { margin-bottom: 0; }
.doc .note.warn { border-left-color: #d97706; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .doc-nav { position: static; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
  .doc-nav ol { columns: 2; }
}

/* ---------- footer ---------- */

footer.site {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 46px 0;
  font-size: 15px;
  color: var(--text-soft);
}
footer.site .cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: var(--text-soft); text-decoration: none; }
footer.site a:hover { color: var(--brand); }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { padding: 4px 0; }
footer.site .legal { margin-top: 30px; font-size: 14px; }

@media (max-width: 640px) {
  header.site nav a.hide-sm { display: none; }
  section { padding: 56px 0; }
}
