@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
    --ink: #12161D;
    --surface: #1B212B;
    --surface-2: #232A35;
    --line: rgba(201, 168, 106, 0.22);
    --brass: #C9A86A;
    --brass-soft: rgba(201, 168, 106, 0.14);
    --steel: #6E86A8;
    --text: #EAEDF2;
    --text-muted: #97A1AF;
    --error: #C96A5B;
}

* { box-sizing: border-box; }

html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1, h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 0.5em;
    color: #F5F1E8;
}

.wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px 96px;
}

.brand {
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    margin-bottom: 64px;
}

/* --- Landing / thank-you --- */

.hero { max-width: 560px; }
.hero--centered { text-align: left; }

.kicker {
    font-size: 15px;
    color: var(--brass);
    margin: 0 0 12px;
}

.hero h1 { font-size: 44px; }

.lede {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 46ch;
}

.stat-row {
    display: flex;
    gap: 40px;
    margin: 40px 0 44px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.stat { display: flex; flex-direction: column; }

.stat__num {
    font-family: 'Fraunces', serif;
    font-size: 40px;
    font-weight: 600;
    color: var(--brass);
}

.stat__label {
    font-size: 14px;
    color: var(--text-muted);
}

.cta {
    display: inline-block;
    background: var(--brass);
    color: #1A1408;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 30px;
    border-radius: 3px;
}

.cta:hover { background: #D8BA82; }

.divider {
    height: 1px;
    background: var(--line);
    margin: 48px 0 28px;
}

.fine-print {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 54ch;
}

/* --- Test / stepper --- */

.wrap--test { padding-top: max(24px, env(safe-area-inset-top, 0px)); }

.progress {
    height: 3px;
    background: var(--surface-2);
    border-radius: 2px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    width: 0;
    background: var(--brass);
    transition: width 0.3s ease;
}

.step h2 { font-size: 26px; }

.step-eyebrow {
    font-size: 14px;
    color: var(--steel);
    margin: 0 0 8px;
}

.step-intro {
    color: var(--text-muted);
    margin-bottom: 28px;
}

label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

input[type="text"], input[type="email"], input[type="tel"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}

input:focus {
    outline: 2px solid var(--brass);
    outline-offset: 1px;
}

.field--error { outline: 2px solid var(--error); }

.question {
    border: none;
    padding: 0;
    margin: 0 0 32px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.question--error {
    background: rgba(201, 106, 91, 0.08);
    padding: 12px;
    margin: 0 -12px 32px;
}

.question legend {
    font-size: 17px;
    color: var(--text);
    padding: 0;
    margin-bottom: 14px;
}

.scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scale--scelta { gap: 8px; }

.scale__opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    margin: 0;
}

.scale__opt:has(input:checked) {
    border-color: var(--brass);
    background: var(--brass-soft);
}

.scale__opt input { accent-color: var(--brass); }

.nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.btn {
    background: var(--brass);
    color: #1A1408;
    border: none;
    font-weight: 600;
    font-size: 15px;
    padding: 13px 26px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--line);
}

@media (max-width: 480px) {
    .hero h1 { font-size: 34px; }
    .stat-row { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .progress__bar { transition: none; }
}
