/* Stile delle pagine di contenuto di smart81.com.
 *
 * Le pagine generate da `scripts/build-smart81-pages.mjs` sono HTML statico:
 * non passano dalla SPA e non caricano JavaScript. Per questo il foglio di
 * stile è uno solo, scritto a mano, e il font è quello già self-hosted della
 * vetrina. I colori sono gli stessi token di `landing.css`, così la pagina di
 * contenuto e la home sembrano la stessa cosa. */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/smart81-assets/fonts/nunito-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --y: #ffd400;
  --y-deep: #a88800;
  --ink: #1f2430;
  --ink-2: #4a5160;
  --ink-3: #666d7a;
  --blue: #163e7a;
  --blue-2: #1a457f;
  --line: #e3e6ec;
  --bg: #f6f7f9;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue-2); }

.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }
.wrap-narrow { width: min(820px, 100% - 32px); margin: 0 auto; }

/* --- intestazione ------------------------------------------------------- */

.site-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark em {
  font-style: normal;
  display: inline-block;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--y);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 700;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current='page'] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--y); }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid transparent;
  font-size: 0.95rem;
}

.btn-primary { background: var(--y); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }

/* --- percorsi e testata ------------------------------------------------- */

.crumbs {
  width: min(820px, 100% - 32px);
  margin: 22px auto 0;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: #b9bfc9; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.page-head { padding: 22px 0 0; }

.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b5a00;
  background: #fff4bf;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lead { font-size: 1.14rem; color: var(--ink-2); margin: 0 0 8px; }

/* --- corpo -------------------------------------------------------------- */

main { display: block; }

.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 44px);
  margin: 26px auto 40px;
}

.article h2 {
  margin: 38px 0 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 900;
  letter-spacing: -0.015em;
}

.article h2:first-of-type { margin-top: 8px; }

.article h3 { margin: 24px 0 6px; font-size: 1.06rem; font-weight: 800; }

.article p, .article li { color: var(--ink-2); }

.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }

.article strong { color: var(--ink); }

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.95rem;
}

.article th, .article td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--ink-2);
}

.article th { background: #fafbfc; font-weight: 800; color: var(--ink); }

.callout {
  background: #fffbeb;
  border-left: 5px solid var(--y);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 20px 0;
}

.callout strong { display: block; margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }
.callout p:first-child { margin-top: 0; }

/* --- schede ------------------------------------------------------------- */

.cards {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.cards li {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0;
}

.cards strong { display: block; margin-bottom: 4px; }
.cards p { margin: 0; font-size: 0.95rem; }
.cards a { font-weight: 800; text-decoration: none; }
.cards a:hover { text-decoration: underline; }

/* --- domande frequenti -------------------------------------------------- */

.faq { margin: 18px 0 0; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 18px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  padding: 14px 0;
  list-style: none;
  color: var(--ink);
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--y-deep); font-weight: 900; }
.faq details[open] summary::after { content: '–'; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq p { margin: 12px 0 16px; }

/* --- rimandi ------------------------------------------------------------ */

.related {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 22px;
}

.related h2 { margin-top: 0; font-size: 1.1rem; }

.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }

.related a { font-weight: 700; text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* --- invito ------------------------------------------------------------- */

.cta {
  background: var(--ink);
  color: #fff;
  border-radius: 18px;
  padding: clamp(22px, 4vw, 34px);
  margin: 0 auto 46px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cta h2 { margin: 0 0 6px; font-size: 1.35rem; color: #fff; }
.cta p { margin: 0; color: #d7dae1; max-width: 60ch; }
.cta .btn-primary { white-space: nowrap; }

/* --- piede -------------------------------------------------------------- */

.site-foot {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 34px 0 42px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

.site-foot .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.site-foot h3 { margin: 0 0 8px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .legal { border-top: 1px solid var(--line); padding-top: 16px; display: flex; gap: 14px; flex-wrap: wrap; }

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--y);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
  font-weight: 800;
}

@media (max-width: 620px) {
  .site-nav { font-size: 0.9rem; gap: 12px; }
  .cta { flex-direction: column; align-items: flex-start; }
}
