/* Cargobike Italia — foglio di stile unico */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --alt: #f1ece3;
  --ink: #1d2a28;
  --muted: #56645f;
  --line: #e3dccf;
  --brand: #1f5e55;
  --brand-dark: #16453e;
  --brand-soft: #e3efeb;
  --accent: #e3a33b;
  --accent-dark: #c9892a;
  --good: #2f7d5b;
  --bad: #b5483a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 42, 40, .06), 0 8px 24px rgba(29, 42, 40, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 247, 242, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.1rem; }
.brand strong { color: var(--brand); }
.brand-mark { width: 34px; height: 34px; fill: none; stroke: var(--brand); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.main-nav a:hover { color: var(--brand); }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-sm { padding: 8px 16px; font-size: .92rem; }
.btn-block { display: block; width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #2a1d06; }
.btn-accent:hover { background: var(--accent-dark); color: #2a1d06; }
.btn-ghost { border-color: var(--brand); color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: 14px; }
.eyebrow-light { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow);
}
.summary-title { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 12px; }
.summary ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.summary li { counter-increment: s; position: relative; padding: 10px 0 10px 40px; border-top: 1px solid var(--line); }
.summary li:first-child { border-top: 0; }
.summary li::before {
  content: counter(s); position: absolute; left: 0; top: 9px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: .85rem; display: grid; place-items: center;
}

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--alt); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.criterion {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; position: relative;
}
.criterion .num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.criterion p { color: var(--muted); }
.criterion .tip {
  color: var(--ink); background: var(--brand-soft); border-radius: 10px;
  padding: 10px 14px; margin: 0; font-size: .95rem;
}

/* Motor */
.motor-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.points { list-style: none; padding: 0; margin: 0; }
.points li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); }
.points li strong { color: var(--ink); }
.diagram { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { color: var(--muted); font-size: .93rem; padding: 8px 6px 2px; }
.dg-bike { fill: none; stroke: #9aa7a2; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.dg-bike .dg-rack { stroke: #7d8a85; stroke-width: 9; }
.dg-child { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 4; }
.dg-bad circle { fill: #f6dcd8; stroke: var(--bad); stroke-width: 4; }
.dg-bad path { stroke: var(--bad); stroke-width: 5; stroke-linecap: round; fill: none; }
.dg-good circle { fill: #d7ecdf; stroke: var(--good); stroke-width: 4; }
.dg-good path { stroke: var(--good); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.dg-lead { stroke: #b9c3bf; stroke-width: 2; stroke-dasharray: 4 5; fill: none; }
.dg-label text { font: 600 19px var(--sans); }
.dg-t-bad { fill: var(--bad); }
.dg-t-good { fill: var(--good); }

/* Italia */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mini { border-top: 3px solid var(--brand); padding-top: 16px; }
.mini p { color: var(--muted); font-size: .97rem; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: c; }
.checklist li {
  counter-increment: c; position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px 62px; margin-bottom: 10px;
}
.checklist li::before {
  content: counter(c); position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--brand); color: var(--brand);
  font-weight: 700; display: grid; place-items: center; font-size: .9rem;
}

/* Types */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.type { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.type-sub { color: var(--brand); font-weight: 600; font-size: .95rem; margin-top: -4px; }
.type ul { padding-left: 1.1em; color: var(--muted); margin: 0 0 16px; }
.type li { margin-bottom: 6px; }
.fit { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .97rem; }
.aside-link { margin-top: 28px; color: var(--muted); max-width: 760px; }

/* CTA */
.cta { background: var(--brand-dark); color: #e8f1ee; }
.cta h2 { color: #fff; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.cta-copy p { color: #cfe0db; font-size: 1.08rem; }
.trust { list-style: none; padding: 0; margin: 22px 0 0; }
.trust li { padding: 8px 0 8px 30px; position: relative; color: #e8f1ee; }
.trust li::before {
  content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}

.lead-form { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 5px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 12px 14px; font: 1rem var(--sans); color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input.invalid { border-color: var(--bad); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin: 6px 0 18px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg { margin: 12px 0 0; font-size: .93rem; min-height: 1.2em; }
.form-msg.error { color: var(--bad); }
.lead-form button[disabled] { opacity: .7; cursor: wait; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--brand); font-weight: 400;
}
details[open] summary::after { content: "–"; }
details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: .93rem; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row p { margin: 0; max-width: 640px; }

/* Link "approfondisci" nelle card */
.more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .95rem; text-decoration: none; }
.more::after { content: " →"; }

/* Articoli */
.article { padding: 40px 0 64px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; }
.article h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); }
.byline { font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.article h2 { margin-top: 2.2em; scroll-margin-top: 80px; }
.article h3 { margin-top: 1.6em; }
.article ul, .article ol:not(.checklist) { padding-left: 1.3em; }
.article li { margin-bottom: .55em; }
.article .checklist { margin-top: 18px; }
.note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 14px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0 8px; }
.toc-t { font-weight: 700; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { text-decoration: none; }
.table-wrap { overflow-x: auto; margin: 18px 0 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--alt); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.good { color: var(--good); font-weight: 600; }
td.bad { color: var(--bad); font-weight: 600; }

/* Glossario */
.gloss { margin: 16px 0 8px; }
.gloss dt { font-weight: 700; font-family: var(--serif); font-size: 1.08rem; margin-top: 18px; }
.gloss dd { margin: 4px 0 0; padding-left: 14px; border-left: 3px solid var(--brand-soft); color: var(--muted); }

/* Card correlati / indice guide */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 36px; }
.rel-card {
  display: flex; flex-direction: column; gap: 8px; padding: 22px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s;
}
.rel-card:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--ink); }
.rel-card strong { font-family: var(--serif); font-size: 1.12rem; line-height: 1.3; }
.rel-k { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.rel-d { font-size: .93rem; color: var(--muted); }
.related h2 { margin-bottom: 22px; }

/* Banner consenso cookie */
.cc {
  position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 560px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(29, 42, 40, .22); padding: 22px 22px 18px; font-size: .93rem;
}
.cc-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.cc-t { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 6px; }
.cc-p { color: var(--muted); margin: 0 0 14px; }
.cc-prefs { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 14px; }
.cc-prefs[hidden] { display: none; }
.cc-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.cc-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.cc-b { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-btn {
  flex: 1 1 auto; padding: 10px 14px; border-radius: 999px; border: 2px solid var(--brand);
  background: var(--surface); color: var(--brand); font: 600 .92rem var(--sans); cursor: pointer;
}
.cc-btn[data-a="accept"], .cc-btn[data-a="reject"] { background: var(--brand); color: #fff; }
.cc-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

/* Thank-you page */
.thanks { padding: 110px 0; text-align: center; }
.thanks .lead { margin: 0 auto 28px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .motor-grid, .cta-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .header-row .btn { margin-left: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0; }
  .section { padding: 52px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .criteria { grid-template-columns: 1fr; }
  .lead-form { padding: 22px 18px; }
  .toc ol { columns: 1; }
  th, td { padding: 10px 12px; }
  .brand span { font-size: 1rem; }
}
