/* Palette e font ripresi dall'app AI Visibility Audit: carta, inchiostro, un solo accento teal. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #edf1ea;
  --surface: #f8faf6;
  --ink: #1b2723;
  --ink-2: #3a4741;
  --muted: #56615b;
  --line: #d5ddd2;
  --line-strong: #aab8a8;
  --accent: #0d6e62;
  --accent-hover: #0a554b;
  --on-accent: #ffffff;
  --link: #0d6e62;
  --danger: #a3271c;
  --band: #16302a;
  --band-ink: #f4f5f2;
  --band-muted: #b6c7bf;
  --band-line: rgba(255, 255, 255, 0.14);
  --radius: 10px;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101314;
    --surface: #171b1c;
    --ink: #eef3ef;
    --ink-2: #cfd6d1;
    --muted: #a6adaa;
    --line: #2a3031;
    --line-strong: #4a5354;
    --accent: #0f7d6f;
    --accent-hover: #128a78;
    --link: #62d3bd;
    --danger: #ff9c8f;
    --band: #171b1c;
    --band-ink: #eef3ef;
    --band-muted: #a6adaa;
    --band-line: rgba(255, 255, 255, 0.11);
  }
}

* { box-sizing: border-box; }
/* le regole con display esplicito (es. .check) vincerebbero sull'attributo hidden */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { font-stretch: 112%; letter-spacing: -0.015em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* barra in alto */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { font-weight: 700; font-stretch: 112%; color: var(--ink); text-decoration: none; white-space: nowrap; }
.top nav { display: flex; gap: 24px; font-size: 15px; }
.top nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }

/* hero: testo a sinistra, form a destra */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 56px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 72px;
}
.hero h1 { font-size: clamp(32px, 3.8vw, 46px); font-weight: 700; }
.hero .lead { margin-top: 20px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 30em; }

/* form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 15px; font-weight: 600; }
.field input[type="text"], .field input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: 14px; color: var(--muted); }
.error { font-size: 14px; color: var(--danger); font-weight: 600; }
.error:empty { display: none; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin-bottom: 12px; font-size: 15px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; }

.button {
  display: inline-block;
  width: 100%;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}
.button:hover { background: var(--accent-hover); }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button.inline { width: auto; }
.form-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.notice { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--danger); border-radius: var(--radius); font-size: 15px; color: var(--danger); }
.notice[hidden] { display: none; }
.done h2 { font-size: 24px; }
.done p { margin-top: 12px; color: var(--ink-2); }

/* sezioni */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; max-width: 22em; }
.section .intro { margin-top: 14px; color: var(--ink-2); max-width: 38em; }

figure { margin: 36px 0 0; }
figure img { border: 1px solid var(--line); border-radius: var(--radius); background: #f8faf6; }
figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 56px; margin: 40px 0 0; padding: 0; list-style: none; }
.items h3 { font-size: 19px; font-weight: 700; }
.items p { margin-top: 6px; color: var(--ink-2); }

.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.split figure { margin: 0; }

.steps { margin: 36px 0 0; padding: 0; list-style: none; counter-reset: step; max-width: 44em; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 8px 20px; padding: 22px 0; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); font-size: 34px; font-weight: 700; font-stretch: 112%; line-height: 1; color: var(--accent); }
.steps h3 { font-size: 19px; font-weight: 700; }
.steps p { grid-column: 2; color: var(--ink-2); }

/* banda scura: l'unica della pagina */
.band { background: var(--band); color: var(--band-ink); padding: 72px 0; }
.band h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.band dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 36px 0 0; }
.band dt { font-size: 19px; font-weight: 700; padding-top: 18px; border-top: 1px solid var(--band-line); }
.band dd { margin: 8px 0 0; color: var(--band-muted); }

.faq { max-width: 46em; margin-top: 28px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-size: 18px; font-weight: 700; cursor: pointer; }
.faq p { margin-top: 10px; color: var(--ink-2); }
.closing { margin-top: 44px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
footer button { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* testo lungo (privacy) */
.prose { max-width: 46em; padding: 56px 24px 72px; }
.prose h1 { font-size: clamp(30px, 4vw, 42px); }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose p, .prose ul, .prose table { margin-top: 12px; color: var(--ink-2); }
.prose ul { padding-left: 22px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
.scroll-x { overflow-x: auto; }

/* banner cookie */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10; max-width: 460px; margin: 0 auto 0 0; padding: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(22, 48, 42, 0.18); font-size: 15px; }
.cookie h2 { font-size: 18px; }
.cookie p { margin-top: 8px; color: var(--ink-2); }
.cookie .choices { margin-top: 12px; display: grid; gap: 8px; }
.cookie .choices[hidden] { display: none; }
.cookie .actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.cookie .actions button { padding: 11px 10px; font: inherit; font-weight: 700; white-space: nowrap; color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: var(--radius); cursor: pointer; }
.cookie .actions button:hover { background: var(--line); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; padding-bottom: 48px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .items, .band dl { grid-template-columns: 1fr; gap: 24px; }
  .section, .band { padding: 52px 0; }
  .top nav { display: none; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .form-card { padding: 20px; }
  /* Rifiuta e Accetta sulla stessa riga, con lo stesso peso; Personalizza sotto */
  .cookie .actions { grid-template-columns: 1fr 1fr; }
  .cookie .actions [data-act="custom"] { grid-column: 1 / -1; order: 3; }
}
