/* Il ragazzo al centro — pagina pubblica */
:root {
  --bg: #fbfaf6;
  --band: #f1efe6;
  --ink: #18231d;
  --muted: #55615a;
  --line: #d9d5c7;
  --green: #1d5c3f;
  --green-deep: #123a28;
  --green-soft: #e2efe7;
  --chalk: #ffffff;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--green); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid #e7c96b; outline-offset: 2px; }

/* Testata */
.hero { background: var(--green-deep); color: #fff; position: relative; overflow: hidden; }
.hero::after { /* linee del campo */
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 620px; height: 620px;
  border: 2px solid rgba(255,255,255,.12); border-radius: 50%; pointer-events: none;
}
.topnav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 19px; }
.topnav ul { list-style: none; display: flex; gap: 4px 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.topnav a { color: #fff; opacity: .85; text-decoration: none; font-size: 15px; padding: 6px 0; display: inline-block; }
.topnav a:hover { opacity: 1; text-decoration: underline; }
.hero-body { padding-top: 48px; padding-bottom: 72px; position: relative; z-index: 1; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; opacity: .8; margin: 0 0 10px; max-width: 640px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 76px); line-height: 1.05; margin: 0 0 20px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); max-width: 720px; margin: 0 0 28px; opacity: .95; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 20px; border-radius: 8px; background: #fff; color: var(--green-deep); font-weight: 600; text-decoration: none; border: 1px solid #fff; }
.btn.ghost { background: transparent; color: #fff; }

/* Sezioni */
.section { padding-top: 64px; padding-bottom: 64px; }
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 20px; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.intro { color: var(--muted); max-width: 760px; margin: -6px 0 28px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 40px; }
.cols p { margin: 0 0 12px; }
.note { color: var(--muted); max-width: 820px; margin: 24px 0 0; font-size: 16px; }

/* Carta */
.carta { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.sezione { background: var(--chalk); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.sezione h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin-bottom: 14px; }
.sezione h3 span { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 2px; }
.sezione dl { margin: 0; }
.sezione dt { font-weight: 700; margin-top: 14px; }
.sezione dt:first-child { margin-top: 0; }
.sezione dd { margin: 4px 0 0; color: #2c3a32; }

/* Schede */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--chalk); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.card p { margin: 0; color: #2c3a32; font-size: 16px; }
.band .card { background: var(--chalk); }

/* Tabelle */
.table-wrap { overflow-x: auto; background: var(--chalk); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 600px; }
caption { caption-side: bottom; text-align: left; padding: 10px 16px; color: var(--muted); font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #faf9f4; }
tbody th { font-weight: 600; }
tbody th small { display: block; font-weight: 400; color: var(--muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* Famiglie */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 0 0 16px 32px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }
.figure { background: var(--green-soft); border-radius: 12px; padding: 24px; }
.figure-k { margin: 0; font-weight: 600; }
.figure-k small { font-weight: 400; color: var(--muted); }
.figure-n { font-family: var(--serif); font-size: 64px; line-height: 1; margin: 16px 0 4px; color: var(--green-deep); }
.figure-l { margin: 0 0 16px; }
.figure-note { margin: 0; font-size: 14px; color: var(--muted); }

/* Percorso */
.livelli { list-style: none; counter-reset: liv; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.livelli li { counter-increment: liv; background: var(--chalk); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.livelli li::before { content: counter(liv); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; margin-bottom: 10px; }
.livelli p { margin: 0; font-size: 16px; color: #2c3a32; }
.sub { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 44px 0 16px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.timeline li { border-top: 4px solid var(--line); padding-top: 12px; }
.timeline li:nth-child(3), .timeline li:nth-child(4) { border-top-color: var(--green); }
.t-date { display: block; font-size: 13px; color: var(--muted); }
.t-name { display: block; font-weight: 700; margin: 2px 0 4px; }
.t-desc { display: block; font-size: 15px; color: #2c3a32; }

/* Piede */
.footer { background: var(--green-deep); color: #e8efe9; padding: 32px 0; font-size: 15px; }
.footer p { margin: 0 0 8px; max-width: 820px; }
.footer .small { opacity: .8; font-size: 14px; }
.footer a { color: #fff; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline li { border-top: 0; border-left: 4px solid var(--line); padding: 0 0 0 14px; }
  .timeline li:nth-child(3), .timeline li:nth-child(4) { border-left-color: var(--green); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .topnav ul { gap: 2px 14px; }
  .hero-body { padding-top: 24px; padding-bottom: 52px; }
  .carta, .cards, .livelli { grid-template-columns: 1fr; }
}
@media print {
  .hero { background: none; color: var(--ink); }
  .topnav, .cta, .skip { display: none; }
  .band { background: none; }
}
