/* AssessmentManager — sito pubblico
   Mondo visivo: quello del prodotto (Deep Navy). Materiale della pagina: il contrasto
   fra la fotocopia e la piattaforma. Nessun indigo, nessun violetto: vedi PRODUCT.md
   del repo di prodotto, sezione Anti-references. */

/* ---------- Token ---------- */

:root {
  --navy: #294c74;
  --navy-light: #426794;
  --navy-deep: #1e3a5f;
  --navy-tint: #dbe6f3;
  --band: #223449;             /* piu' profondo di --chrome-band (#304155) del prodotto:
                                  qui non c'e' branding per organizzazione, e la banda
                                  della prova deve reggere il testo bianco */

  --canvas: #f2f5f8;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: #dae0e7;
  --border: #e5e7eb;

  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #5b6879;            /* 5,2:1 su canvas e su surface-2 */
  --on-dark: #ffffff;
  --on-dark-2: #b9c7d8;

  --coral: #e35f1a;            /* solo il segno grafico */
  --coral-ink: #b8460f;        /* 4,6:1 sulla carta: il corallo usato come testo */
  --success: #22c55e;

  /* materiale "carta": fotocopia fredda, non pergamena */
  --paper: #eceff3;
  --paper-2: #e2e7ee;
  --paper-line: #c6cedb;
  --graphite: #55627a;

  --r-container: 16px;
  --r-control: 8px;
  --r-chip: 12px;

  --shadow-rest: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);

  --measure: 68ch;
  --gutter: clamp(20px, 5vw, 48px);
  --max: 1160px;

  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; }

p { text-wrap: pretty; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-light); }
img, svg { display: block; max-width: 100%; }
strong { color: var(--ink); font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Sul navy profondo l'anello navy sparisce (1,3:1): sulle superfici scure diventa bianco. */
.closer :focus-visible,
.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.lede { font-size: 1.1875rem; line-height: 1.55; max-width: 46ch; }
.measure { max-width: var(--measure); }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: 0 0 var(--r-control) 0; z-index: 100;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- Controlli ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: .9375rem; font-weight: 600;
  padding: 11px 20px; border-radius: var(--r-control);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--border); }
.btn-secondary:hover { color: var(--navy); border-color: var(--navy-tint); background: var(--surface); }
.btn-on-dark { background: #fff; color: var(--navy-deep); }
.btn-on-dark:hover { background: var(--navy-tint); color: var(--navy-deep); }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.34); }
.btn-ghost-dark:hover { color: #fff; border-color: rgba(255,255,255,.7); }

/* ---------- Intestazione ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem;
  color: var(--ink); letter-spacing: -0.02em;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: .9375rem; font-weight: 500; color: var(--ink-2);
  text-decoration: none; padding: 8px 12px; border-radius: var(--r-control);
}
.nav a:hover { color: var(--navy); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }
/* `.nav a` batte `.btn-primary` per specificità: senza questa riga il testo del
   pulsante Accedi resta grigio su fondo navy. */
.nav a.btn-primary { color: #fff; background: var(--navy); }
.nav a.btn-primary:hover { color: #fff; background: var(--navy-light); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 42px; height: 42px; border-radius: var(--r-control);
    background: var(--surface); border: 1px solid var(--border); cursor: pointer; color: var(--ink);
  }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 20px; margin: 0;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 12px; font-size: 1rem; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Sezioni ---------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.section-canvas { background: var(--canvas); }
.section-dark { background: var(--band); color: var(--on-dark-2); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { max-width: 58ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { margin-top: 16px; font-size: 1.0625rem; }
.section-dark .section-head p { color: var(--on-dark-2); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(44px, 6vw, 80px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero-grid {
  display: grid; gap: clamp(36px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

/* Nell'hero i due riquadri stanno sempre uno sopra l'altro: affiancati dentro una mezza
   colonna ciascuno avrebbe ~190px, e le righe del pannello andrebbero a capo. */
.hero .swap { grid-template-columns: 1fr; }
.hero .swap-bridge { padding: 16px 0; transform: rotate(90deg); }

.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 22px; color: var(--ink-2); }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 28px 40px;
}
.proof-item { min-width: 0; }
.proof-n {
  font-family: var(--font-display); font-size: 1.75rem; font-weight: 800;
  color: var(--ink); letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.proof-l { display: block; margin-top: 6px; font-size: .875rem; color: var(--ink-3); }

/* ---------- Il dispositivo: carta a fianco di piattaforma ---------- */

.swap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
@media (max-width: 1040px) { .swap { grid-template-columns: 1fr; } }

.swap-side { min-width: 0; display: flex; flex-direction: column; }
.swap-label {
  font-size: .875rem; font-weight: 500; color: var(--ink-3); margin-bottom: 12px;
}
.section-dark .swap-label { color: var(--on-dark-2); }

/* — il foglio — */
.sheet {
  position: relative; flex: 1;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  padding: 22px 22px 26px;
  box-shadow: var(--shadow-rest);
  color: var(--graphite);
  font-size: .9375rem;
}
.sheet::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: -7px; height: 7px;
  background: var(--paper-2); border: 1px solid var(--paper-line); border-top: 0;
  border-radius: 0 0 4px 4px; z-index: -1;
}
.sheet h4 {
  font-family: var(--font-display); font-size: .9375rem; font-weight: 700;
  color: #33405a; letter-spacing: 0; margin-bottom: 14px;
}
.sheet-rule { border-top: 1px dashed var(--paper-line); margin-block: 14px; }
.sheet-field { margin-bottom: 14px; }
.sheet-field span {
  display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: #5f6b7d; margin-bottom: 7px;
}
.sheet-line { height: 1px; background: var(--paper-line); margin-bottom: 9px; }
.sheet-line.short { width: 62%; }
.sheet-line.medium { width: 84%; }
.sheet-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-box {
  width: 15px; height: 15px; flex: none; border: 1px solid var(--paper-line);
  border-radius: 2px; background: #fff;
}
.sheet-note {
  font-size: .8125rem; color: var(--coral-ink); border-left: 1px solid var(--coral-ink);
  padding-left: 10px; margin-top: 16px;
}

/* — il transito — */
.swap-bridge {
  display: flex; align-items: center; justify-content: center;
  padding-inline: clamp(16px, 3vw, 40px); color: var(--navy);
}
.swap-bridge svg { width: 26px; height: 26px; }
@media (max-width: 1040px) {
  .swap-bridge { padding: 18px 0; transform: rotate(90deg); }
}

/* — la piattaforma — */
.panel {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-container); box-shadow: var(--shadow-rest);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.panel-head .dot { width: 9px; height: 9px; border-radius: 999px; background: var(--success); flex: none; }
.panel-head h4 { font-family: var(--font-display); font-size: .9375rem; font-weight: 700; color: var(--ink); }
.panel-body { padding: 18px; }
.panel-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .9375rem;
}
.panel-row:last-child { border-bottom: 0; padding-bottom: 0; }
.panel-row span:first-child { color: var(--ink); }
.panel-meta { color: var(--ink-3); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: var(--r-chip);
  background: var(--navy-tint); color: var(--navy-deep);
}
.chip-quiet { background: var(--surface-2); color: var(--ink-3); }

/* ---------- Righe prima/dopo ---------- */

.swap-row { padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--border); }
.swap-row:first-of-type { border-top: 0; }
.swap-row-head { max-width: 62ch; margin-bottom: 28px; }
.swap-row-head h3 { font-size: 1.375rem; }
.swap-row-head p { margin-top: 10px; }

/* ---------- La schermata del prodotto ---------- */

.shot { margin: 0; }
.shot img {
  width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--r-container);
  box-shadow: var(--shadow-rest);
}
.shot figcaption { margin-top: 14px; font-size: .875rem; color: var(--ink-3); max-width: 62ch; }

/* ---------- Prova ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.14); }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--band); padding: 26px 22px; }
.stat b {
  display: block; font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 10px; font-size: .9375rem; color: var(--on-dark-2); }

.clients { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 900px) { .clients { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .clients { grid-template-columns: 1fr; } }
.client {
  padding: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-container);
  background: rgba(255,255,255,.04);
}
.client b { display: block; color: #fff; font-weight: 600; font-size: .9375rem; }
.client span { display: block; margin-top: 8px; font-size: .875rem; color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.note-dark { margin-top: 24px; font-size: .875rem; color: var(--on-dark-2); max-width: 62ch; }

/* ---------- Caso ---------- */

.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 940px) { .case { grid-template-columns: 1fr; } }
.case-steps { list-style: none; padding: 0; }
.case-steps li { position: relative; padding: 0 0 22px 30px; border-left: 1px solid var(--border); }
.case-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.case-steps li::before {
  content: ""; position: absolute; left: -5px; top: 7px; width: 9px; height: 9px;
  border-radius: 999px; background: var(--navy);
}
.case-steps b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.case-figure { padding: 26px; background: var(--canvas); border: 1px solid var(--border); border-radius: var(--r-container); }
.case-figure dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; align-items: baseline; }
.case-figure dt { font-size: .875rem; color: var(--ink-3); }
.case-figure dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Elenchi di sostanza ---------- */

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.cols h3 { margin-bottom: 10px; }

.types { display: flex; flex-wrap: wrap; gap: 10px; }
.type {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--r-chip);
  background: var(--surface); font-size: .9375rem; color: var(--ink);
}
.type b { font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 700; }

/* ---------- Prezzi ---------- */

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 900px; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 30px; border: 1px solid var(--border); border-radius: var(--r-container); background: var(--surface); display: flex; flex-direction: column; }
.plan-navy { border-color: var(--navy); }
.plan h3 { font-size: 1.25rem; }
.plan-price { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; }
.plan-price b { font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.plan-price span { color: var(--ink-3); font-size: .9375rem; }
.plan > p { margin-top: 12px; font-size: .9375rem; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; font-size: .9375rem; }
.plan li svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--navy); }
.plan .btn { margin-top: auto; justify-content: center; }

.cmp { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.cmp caption { text-align: left; color: var(--ink-3); font-size: .875rem; padding-bottom: 14px; }
.cmp th, .cmp td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.cmp thead th { font-size: .8125rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.cmp tbody th { font-weight: 500; color: var(--ink-2); }
.cmp td { color: var(--ink); }
.cmp .no { color: var(--ink-3); }

/* ---------- Modulo ---------- */

.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-control);
  background: var(--surface); width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.field-hint { font-size: .8125rem; color: var(--ink-3); }
.form .btn { justify-self: start; }

/* ---------- Chiusura ---------- */

.closer { background: var(--navy-deep); color: var(--on-dark-2); }
.closer .wrap {
  display: grid; grid-template-columns: minmax(0, 1.3fr) auto;
  gap: clamp(28px, 5vw, 64px); align-items: end;
}
@media (max-width: 820px) { .closer .wrap { grid-template-columns: 1fr; align-items: start; } }
.closer h2 { color: #fff; max-width: 22ch; }
.closer p { margin-top: 16px; max-width: 54ch; }
.closer .hero-actions { margin-top: 0; }
@media (max-width: 820px) { .closer .hero-actions { margin-top: 28px; } }

/* ---------- Piede ---------- */

.site-footer { background: var(--band); color: var(--on-dark-2); padding-block: 56px 40px; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand-name { color: #fff; }
.site-footer h4 { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; margin-bottom: 14px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--on-dark-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-note {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  font-size: .875rem;
}

/* ---------- Un solo momento di movimento ---------- */

.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); }
  .js .reveal.in {
    opacity: 1; transform: none;
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  }
  .js .reveal.in .swap-bridge svg { animation: bridge .9s cubic-bezier(.16,1,.3,1) .15s both; }
  @keyframes bridge {
    from { transform: translateX(-10px); opacity: 0; }
    to   { transform: none; opacity: 1; }
  }
}
