/* Layout: colonna di lettura stretta, bande a tutta larghezza; l'ottotipo (righe di lettere decrescenti) è il motivo ricorrente. */
:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --ink: #13263b;
  --muted: #4d6073;
  --line: #d8e0e8;
  --accent: #1d4ec4;
  --accent-ink: #ffffff;
  --soft: #e8eefa;
  --fix: #d6452b;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 72rem;
  --read: 42rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1722; --surface: #13212f; --ink: #e6edf4; --muted: #a3b3c3; --line: #263849;
    --accent: #7ea2ff; --accent-ink: #0d1722; --soft: #1a2c44; --fix: #ff7a5e; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1722; --surface: #13212f; --ink: #e6edf4; --muted: #a3b3c3; --line: #263849;
  --accent: #7ea2ff; --accent-ink: #0d1722; --soft: #1a2c44; --fix: #ff7a5e; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--f-data); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 1rem; padding-block: 0.7rem; flex-wrap: wrap; }
.brand { min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand b { font-family: var(--f-display); font-size: 1.15rem; font-weight: 750; }
.brand span { font-size: 0.82rem; color: var(--muted); }
.nav { order: 2; display: flex; gap: 0.2rem 0.85rem; flex-wrap: wrap; font-size: 0.9rem; }
@media (min-width: 861px) { .site-head .wrap { flex-wrap: nowrap; } .site-head .btn-primary { white-space: nowrap; } }
.nav a { color: var(--ink); text-decoration: none; padding-block: 0.25rem; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--accent); }
.menu-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.72rem 1.15rem;
  border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 1.5px solid var(--accent); line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { color: var(--accent); background: transparent; }
.site-head .btn-primary { order: 3; }
.menu-toggle { order: 4; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; padding-block: 3.5rem 2.5rem; }
.hero-text { display: grid; gap: 1.2rem; min-width: 0; }
.hero-text .lead { font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.hero figure { margin: 0; position: relative; }
.hero figure img { border-radius: 14px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.hero figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; }

/* Ottotipo */
.optotype { display: flex; align-items: baseline; justify-content: center; gap: clamp(0.6rem, 2vw, 1.6rem);
  font-family: var(--f-display); font-weight: 800; color: var(--ink); opacity: 0.88; padding-block: 1.2rem; overflow: hidden; }
.optotype span:nth-of-type(1) { font-size: 2.6rem; }
.optotype span:nth-of-type(2) { font-size: 2rem; }
.optotype span:nth-of-type(3) { font-size: 1.55rem; }
.optotype span:nth-of-type(4) { font-size: 1.2rem; }
.optotype span:nth-of-type(5) { font-size: 0.95rem; }
.optotype span:nth-of-type(6) { font-size: 0.6rem; }
.optotype span { white-space: nowrap; }
.optotype i { width: 9px; height: 9px; border-radius: 50%; background: var(--fix); display: inline-block; align-self: center; }
.band-line { border-block: 1px solid var(--line); background: var(--surface); }

/* Numeri */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.figures div { background: var(--surface); padding: 1.3rem 1.2rem; display: grid; gap: 0.3rem; }
.figures b { font-family: var(--f-data); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.figures span { font-size: 0.92rem; color: var(--muted); }

/* Sezioni */
.section { padding-block: 3.5rem; }
.section-head { display: grid; gap: 0.6rem; margin-bottom: 1.8rem; max-width: var(--read); }
.section-head p { color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem; display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.tile p { color: var(--muted); }
.tile a.more { font-weight: 600; text-decoration: none; }
.tile a.more::after { content: " →"; }

/* Pagine interne */
.page-head { padding-block: 3rem 1.5rem; }
.page-head .wrap { display: grid; gap: 0.9rem; }
.page-head .lead { font-size: 1.18rem; color: var(--muted); max-width: var(--read); }
.prose { max-width: var(--read); display: grid; gap: 1rem; }
.prose h2 { margin-top: 1.6rem; }
.prose h3 { margin-top: 0.8rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.35rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; align-items: start; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem; display: grid; gap: 0.8rem; position: sticky; top: 6rem; }
.side-card img { border-radius: 8px; }
.side-card p { font-size: 0.95rem; color: var(--muted); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-data); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }

.note { background: var(--soft); border-radius: 10px; padding: 1rem 1.2rem; font-size: 0.98rem; }

details { border-bottom: 1px solid var(--line); padding-block: 0.9rem; }
details summary { cursor: pointer; font-weight: 650; font-family: var(--f-display); font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details summary::after { content: "+"; font-family: var(--f-data); color: var(--accent); }
details[open] summary::after { content: "–"; }
details p { margin-top: 0.6rem; color: var(--muted); }

/* CTA banda */
.cta-band { background: var(--ink); color: var(--bg); }
.cta-band .wrap { padding-block: 2.6rem; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band h2 { color: var(--bg); }
.cta-band p { color: var(--bg); opacity: 0.8; }
.cta-band .btn-primary { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.cta-band .btn-ghost { color: var(--bg); border-color: var(--bg); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); font-size: 0.93rem; }
.site-foot .wrap { padding-block: 2.5rem; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-foot h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.site-foot p { color: var(--muted); }
.legal { border-top: 1px solid var(--line); }
.legal .wrap { padding-block: 1rem; font-size: 0.82rem; color: var(--muted); display: block; }

.tel { font-family: var(--f-data); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 860px) {
  .hero .wrap, .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .hero figure { max-width: 26rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .optotype span:nth-of-type(5), .optotype span:nth-of-type(6) { display: none; }
  .brand span { font-size: 0.75rem; }
  .brand { flex: 1 1 0; }
  .brand b { font-size: 1.02rem; }
  .site-head .wrap { gap: 0.5rem; }
  .nav { order: 5; display: none; width: 100%; flex-direction: column; padding-block: 0.5rem; }
  .nav.open { display: flex; }
  .menu-toggle { display: inline-flex; background: none; border: 1.5px solid var(--line); color: var(--ink); border-radius: 999px; padding: 0.45rem 0.9rem; font: inherit; font-size: 0.92rem; cursor: pointer; }
  .site-head .btn-primary { padding: 0.5rem 0.9rem; font-size: 0.92rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: background-color .15s, border-color .15s, color .15s; }
}

/* Recensioni */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.review { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem; display: grid; gap: 0.8rem; align-content: space-between; }
.review blockquote { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.review blockquote::before { content: "★★★★★"; display: block; color: var(--accent); letter-spacing: 0.15em; font-size: 0.85rem; margin-bottom: 0.5rem; }
.review figcaption { font-family: var(--f-data); font-size: 0.8rem; color: var(--muted); }
.review-wide { grid-column: span 3; background: var(--soft); border-color: transparent; }
.review-wide blockquote { font-family: var(--f-display); font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 650; line-height: 1.35; }
@media (max-width: 860px) { .reviews { grid-template-columns: 1fr; } .review-wide { grid-column: auto; } }
