﻿/* ── Tokens ─────────────────────────────────────────────── */
:root { --atg-dark: #3c3c3b; --atg-off-white: #f7f6f5; --atg-gray-100: #f2f1f0; --atg-gray-200: #e0dedc; --atg-gray-300: #c8c5c2; --atg-gray-400: #a6a3a1; --atg-gray-500: #8a8785; --atg-gray-600: #6c6d6d; --c1: #617686; /* SW – Qualità dati */ --c2: #6b947d; /* RPA – Persone & cultura */ --c3: #6c6d6d; /* BI – Processi */ --c4: #b5a65e; /* AI – Visione & strategia */ --c5: #825565; /* CR – Valore & applicabilità */ --c1t: #eef1f3; --c2t: #edf3f0; --c3t: #f0eeec; --c4t: #f7f4e8; --c5t: #f3eef0; --font-display: 'Playfair Display', Georgia, serif; --font-body: 'Roboto', Arial, sans-serif; --radius: 8px; --shadow: 0 2px 10px rgba(60,60,59,.08); }

/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: var(--font-body); background: var(--atg-off-white); color: var(--atg-dark); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* ── Header ──────────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 26px 60px; background-color: #3d3c3f; gap: 24px; flex-wrap: wrap; }
.logo-mark { display: flex; align-items: center; flex-shrink: 0; }
    .logo-mark img { width: 100px; height: auto; display: block; }
.logo-name-block { flex: 1; min-width: 0; }
.logo-name { font-family: 'Roboto Condensed', 'Roboto', sans-serif; font-weight: 200; font-size: 28px; color: #fff; line-height: 1.2; letter-spacing: -.01em; }
.logo-sub { font-size: 16px; color: #fff; margin-top: 2px; font-weight: 400; }
.header-pill { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 12px 24px; border-radius: 20px; background: #514f55; border: 1px solid #6f6f6f; color: #ffffff; white-space: nowrap; flex-shrink: 0; }
.page-footer { text-align: center; padding: 18px 16px; font-size: 12px; color: var(--atg-gray-500); border-top: 1px solid var(--atg-gray-200); background: #ffffff; margin-top: 40px; }

/* ── Container ───────────────────────────────────────── */
.container { max-width: 860px; margin: 0 auto; padding: 36px 24px 60px; }

/* ── Anagrafica card ─────────────────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin-bottom: 24px; }
.card-title { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--atg-gray-400); margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }
    .field label { font-size: 12px; font-weight: 500; color: var(--atg-dark); letter-spacing: .04em; }
    .field input { font-family: var(--font-body); font-size: 14px; color: var(--atg-dark); background: #fff; border: 1.5px solid var(--atg-gray-200); border-radius: 4px; padding: 9px 12px; width: 100%; transition: border-color 180ms, box-shadow 180ms; outline: none; }
        .field input:focus { border-color: var(--c4); box-shadow: 0 0 0 3px rgba(181,166,94,.15); }
        .field input.input-error { border-color: #c62828 !important; background: #fff5f5; }
        .field input::placeholder { color: var(--atg-gray-300); }

/* ── Instructions banner ─────────────────────────────── */
.instructions { background: var(--c4t); border-left: 3px solid var(--c4); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 20px; margin-bottom: 28px; font-size: 13.5px; color: var(--atg-gray-600); line-height: 1.55; }
    .instructions strong { color: var(--atg-dark); }

/* ── Section card ────────────────────────────────────── */
.section-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.section-header { display: flex; align-items: center; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--atg-gray-100); }
.section-num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.section-title-block { flex: 1; }
.section-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--atg-gray-400); margin-bottom: 1px; }
.section-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--atg-dark); letter-spacing: -.01em; line-height: 1.2; }
.section-avg-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--atg-gray-400); background: var(--atg-gray-100); border-radius: 20px; padding: 4px 12px; transition: all 200ms; white-space: nowrap; }
    .section-avg-badge.has-score { color: #fff; }

/* ── Questions ───────────────────────────────────────── */
.questions-body { padding: 4px 28px 20px; }
.question-row { padding: 18px 0; border-bottom: 1px solid var(--atg-gray-100); }
    .question-row:last-child { border-bottom: none; }
.question-text { font-size: 14px; color: var(--atg-dark); line-height: 1.5; margin-bottom: 14px; font-weight: 400; }
    .question-text .q-num { font-weight: 700; margin-right: 4px; color: var(--atg-gray-400); font-size: 12px; }

/* ── Score selector ──────────────────────────────────── */
.score-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.score-option input[type="radio"] { display: none; }
.score-option .score-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; padding: 8px 4px; border: 1.5px solid var(--atg-gray-200); border-radius: 6px; cursor: pointer; transition: all 150ms ease; background: #fff; user-select: none; }
    .score-option .score-btn:hover { border-color: var(--section-color); background: var(--section-tint); }
.score-option input:checked + .score-btn { background: var(--section-color); border-color: var(--section-color); color: #fff; }
.score-num { font-size: 18px; font-weight: 700; line-height: 1.1; }
.score-label { font-size: 9.5px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; margin-top: 3px; text-align: center; }
.score-option input:checked + .score-btn .score-num,
.score-option input:checked + .score-btn .score-label { color: #fff; }
.score-option .score-btn .score-num { color: var(--atg-dark); }
.score-option .score-btn .score-label { color: var(--atg-gray-400); }

/* Section color vars applied per section */
.s1 { --section-color: var(--c1); --section-tint: var(--c1t); }
.s2 { --section-color: var(--c2); --section-tint: var(--c2t); }
.s3 { --section-color: var(--c3); --section-tint: var(--c3t); }
.s4 { --section-color: var(--c4); --section-tint: var(--c4t); }
.s5 { --section-color: var(--c5); --section-tint: var(--c5t); }

/* ── Results card ────────────────────────────────────── */
.results-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 28px; overflow: hidden; }
.results-header { background: var(--atg-dark); padding: 20px 28px; display: flex; align-items: center; gap: 16px; }
    .results-header h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -.01em; }
    .results-header .gold-dot { width: 10px; height: 10px; background: var(--c4); border-radius: 50%; flex-shrink: 0; }
.results-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.radar-col { padding: 28px 24px 28px 28px; border-right: 1px solid var(--atg-gray-100); }
    .radar-col canvas { max-width: 100%; }
.scores-col { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
    .scores-col h3 { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--atg-gray-400); margin-bottom: 16px; }
.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.score-row-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.score-row-label { font-size: 13px; color: var(--atg-dark); flex: 1; line-height: 1.3; }
.score-row-bar-wrap { width: 80px; height: 5px; background: var(--atg-gray-100); border-radius: 99px; overflow: hidden; flex-shrink: 0; }
.score-row-bar { height: 100%; border-radius: 99px; transition: width 400ms ease; }
.score-row-val { font-size: 13px; font-weight: 700; color: var(--atg-dark); width: 28px; text-align: right; flex-shrink: 0; }

/* ── Maturity level ──────────────────────────────────── */
.maturity-panel { border-top: 1px solid var(--atg-gray-100); padding: 20px 28px; display: flex; align-items: center; gap: 20px; }
.maturity-tag { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--atg-gray-400); background: var(--atg-gray-100); padding: 3px 10px; border-radius: 3px; flex-shrink: 0; }
.maturity-label { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--atg-dark); flex-shrink: 0; }
.maturity-desc { font-size: 12.5px; color: var(--atg-gray-500); line-height: 1.5; border-left: 1px solid var(--atg-gray-200); padding-left: 20px; }
.maturity-pending { font-size: 13px; color: var(--atg-gray-400); font-style: italic; }

/* ── CTA bar ─────────────────────────────────────────── */
.cta-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 8px; }
.btn { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: none; border-radius: 4px; padding: 11px 24px; cursor: pointer; transition: all 150ms; display: flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--atg-dark); color: #fff; }
    .btn-primary:hover { background: #525251; }
.btn-secondary { background: var(--atg-gray-100); color: var(--atg-gray-600); }
    .btn-secondary:hover { background: var(--atg-gray-200); }

/* ── Progress bar ────────────────────────────────────── */
.progress-bar-wrap { height: 3px; background: var(--atg-gray-100); border-radius: 99px; margin-bottom: 28px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--c4); border-radius: 99px; transition: width 300ms ease; }
.progress-label { font-size: 11px; color: var(--atg-gray-400); text-align: right; margin-bottom: 6px; letter-spacing: .04em; }

.privacy-box { max-height:150px; overflow:auto; }
/* ── Print styles ────────────────────────────────────── */
@media print { body { background: #fff; font-size: 13px; }
    .page-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 14px 24px; }
    .logo-name { font-size: 20px; }
    .logo-sub { font-size: 13px; }
    .header-pill { padding: 8px 16px; font-size: 11px; }
    .container { padding: 20px 16px 40px; }
    .section-card, .card, .results-card { box-shadow: none; border: 1px solid var(--atg-gray-200); margin-bottom: 14px; }
    .cta-bar, .progress-bar-wrap, .progress-label { display: none !important; }
    .score-option .score-btn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .score-option input:checked + .score-btn { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .section-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .section-avg-badge.has-score { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .results-card { page-break-inside: avoid; }
    .results-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .section-card { page-break-inside: avoid; }
    .score-row-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .maturity-tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    canvas { max-width: 100% !important; }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
    .page-header { padding: 18px 20px; gap: 14px; }
    .logo-mark img { width: 70px; }
    .logo-name { font-size: 20px; }
    .logo-sub { font-size: 13px; }
    .header-pill { padding: 8px 14px; font-size: 10.5px; }
    .container { padding: 20px 12px 48px; }
    .card { padding: 20px; }
    .grid-2 { grid-template-columns: 1fr; }
    .section-header { padding: 14px 18px; }
    .questions-body { padding: 4px 18px 16px; }
    .results-body { grid-template-columns: 1fr; }
    .radar-col { border-right: none; border-bottom: 1px solid var(--atg-gray-100); padding: 20px; }
    .scores-col { padding: 20px; }
    .maturity-panel { flex-direction: column; align-items: flex-start; gap: 10px; }
    .maturity-desc { border-left: none; padding-left: 0; border-top: 1px solid var(--atg-gray-200); padding-top: 10px; }
    .score-option .score-btn { width: 58px; padding: 7px 2px; }
    .score-num { font-size: 15px; }
    .cta-bar { flex-direction: column-reverse; }
    .btn { width: 100%; justify-content: center; }
}
