:root {
  --navy: #0A1C30;
  --navy-2: #12263F;
  --navy-3: #1A3150;
  --line-dark: #2A4466;
  --cyan: #22C3E0;
  --cyan-soft: #E8F8FC;
  --orange: #ED9C26;
  --ink: #0A1C30;
  --muted: #4A5A6E;
  --line: #D5DEE8;
  --bg-soft: #F3F6F9;
  --white: #FFFFFF;
  --red: #B42318;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--navy-3); }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.small { font-size: 14px; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 15px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 17px; }
.btn-accent { background: var(--cyan); color: var(--navy); }
.btn-accent:hover { background: #4DD0E8; color: var(--navy); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Testata */
.site-header { background: var(--navy); border-bottom: 1px solid var(--navy-3); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.logo img { display: block; height: 52px; width: auto; }

/* Apertura */
.hero { background: var(--navy); color: var(--white); }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 88px; }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { color: var(--cyan); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 14px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; }
.lead { font-size: 19px; color: #D4DCE6; max-width: 580px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.muted-light { color: #B8C4D2; }

.hero-card { flex: 1 1 360px; max-width: 440px; background: var(--navy-2); border: 1px solid var(--line-dark); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card-label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #B8C4D2; }
.profile-row { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--line-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #C9D3DF; flex-shrink: 0; }
.pname { font-weight: 700; font-size: 17px; }
.pmeta { font-size: 14px; color: #C9D3DF; }
.profile-row .pill { margin-left: auto; }
.qual { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--navy-3); border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 15px; }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill-accent { background: var(--cyan); color: var(--navy); }
.pill-green { background: #1E4D2B; color: #A6E9B4; }
.pill-amber { background: #FFF1D6; color: #7A4F00; }
.pill-red { background: #FDE3E1; color: #8A1C13; }
.pill-grey { background: #E3E9F0; color: #2A4466; }

/* Figure */
.roles { background: var(--bg-soft); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 24px; padding-bottom: 24px; }
.chips span { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; }

/* Sezioni */
.section { padding: 88px 0; }
.section h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; }
.section-lead { font-size: 18px; color: var(--muted); margin-top: 12px; max-width: 700px; }
.section-lead.light { color: #D4DCE6; }
.dark { background: var(--navy); color: var(--white); }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 40px; }
.two-col > * { flex: 1 1 420px; min-width: 0; }
.two-col.align-center { align-items: center; margin-top: 0; gap: 48px; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.panel h3 { font-size: 24px; font-weight: 800; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 18px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; color: var(--muted); }
.steps li strong { color: var(--ink); display: block; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--cyan); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps-accent li::before { background: var(--cyan); color: var(--navy); }
.note { font-size: 14px; font-weight: 600; color: var(--ink); background: var(--cyan-soft); border-radius: 10px; padding: 10px 14px; }

.status-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.status-grid li { background: var(--navy-2); border: 1px solid var(--line-dark); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: #D4DCE6; font-size: 15px; }

/* Modulo */
.form-section { background: var(--bg-soft); }
.form-wrap { max-width: 820px; }
.form { margin-top: 32px; background: var(--white); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 1px 3px rgba(10,28,48,0.08); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding: 0; }
.switch { display: flex; flex-wrap: wrap; gap: 12px; }
.switch legend { width: 100%; }
.switch label { flex: 1 1 200px; display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; font-weight: 700; cursor: pointer; }
.switch label:has(input:checked) { border-color: var(--navy); background: var(--cyan-soft); }
.switch input { width: 20px; height: 20px; accent-color: var(--navy); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field[hidden] { display: none; }
label { font-weight: 600; font-size: 15px; }
.optional, .tag-azienda { font-weight: 500; font-size: 13px; color: var(--muted); }
.is-azienda .tag-azienda { display: none; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea { width: 100%; min-height: 48px; border: 1px solid #B9C6D4; border-radius: 10px; padding: 10px 14px; font-size: 16px; font-family: inherit; color: var(--ink); background: var(--white); }
textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.checks label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-weight: 600; cursor: pointer; min-height: 48px; }
.checks label:has(input:checked) { border-color: var(--navy); background: var(--cyan-soft); }
.checks input, .consent input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--navy); }
.consents { display: flex; flex-direction: column; gap: 12px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--muted); }
.consent input { margin-top: 2px; }
.err { color: var(--red); font-size: 14px; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.form-msg { color: var(--red); font-weight: 700; }
.form-msg:empty { display: none; }
.form .btn-lg { align-self: flex-start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thanks { margin-top: 32px; background: var(--white); border-radius: 16px; padding: 36px; border-top: 6px solid var(--cyan); }
.thanks h3 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.thanks:focus { outline: none; }

/* Piè di pagina */
.site-footer { background: var(--navy); color: #C9D3DF; padding: 40px 0 28px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-logo { height: 40px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: #E3E9F0; }
.legal { margin-top: 24px; font-size: 13px; color: #9FB0C4; border-top: 1px solid var(--navy-3); padding-top: 18px; }

/* Pagine di testo (privacy, grazie, 404) */
.page { max-width: 820px; padding: 56px 24px 88px; }
.page h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; margin-bottom: 18px; }
.page h2 { font-size: 22px; margin: 32px 0 10px; }
.page p, .page li { color: #2A3A4E; margin-bottom: 10px; }
.page ul { padding-left: 22px; }
.draft { background: #FFF1D6; color: #7A4F00; border-radius: 10px; padding: 14px 16px; font-weight: 600; margin-bottom: 24px; }

@media (max-width: 720px) {
  .hero-grid { padding-top: 44px; padding-bottom: 56px; }
  .section { padding: 60px 0; }
  .grid-2, .checks, .status-grid { grid-template-columns: minmax(0, 1fr); }
  .form { padding: 22px; }
  .logo img { height: 40px; }
  .form .btn-lg { align-self: stretch; }
}
