/* Stile condiviso da index.html (quiz + optin) e grazie.html.
   Token e font identici a Rigenera Post-Estate (Geologica self-hosted, niente Google Fonts). */
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geologica-latin.woff2) format('woff2');
}

:root {
  --canvas: #FAF8F4;
  --ink: #14100D;
  --ink-soft: #6E6A64;
  --ink-faint: #A7A29A;
  --line: #E8E2D8;
  --card: #FFFFFF;
  --teal: #0FA39E;
  --teal-deep: #0A7A76;
  --frost: #4E8FCB;
  --clay: #B23A26;
  --wa: #25D366;
  --font: 'Geologica', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.5, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; }
html, body { background: var(--canvas); color: var(--ink); font-family: var(--font); }
body { min-height: 100dvh; overflow-x: hidden; }

.atmos { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.atmos i { position: absolute; border-radius: 50%; filter: blur(70px); }
.atmos .b1 { width: 70vw; height: 70vw; left: -25vw; top: -20vw; background: var(--teal); opacity: .14; }
.atmos .b2 { width: 60vw; height: 60vw; right: -20vw; bottom: -20vw; background: var(--frost); opacity: .12; }

.wrap { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; min-height: 100dvh; display: flex; flex-direction: column; }

/* Header: indietro + logo + progresso */
.top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 44px; }
.logo { display: block; width: 92px; height: auto; margin: 0 auto; }
.back { width: 44px; height: 44px; border: none; background: none; border-radius: 50%; color: var(--ink); cursor: pointer; display: grid; place-items: center; font: inherit; }
.back svg { width: 22px; height: 22px; }
.back[hidden] { display: grid; visibility: hidden; }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 14px 0 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 4px; transition: width .4s var(--ease); }
.step-lbl { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

/* Schermate */
.screen { display: none; padding-top: 26px; animation: in .35s var(--ease); }
.screen.on { display: block; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .bar > i { transition: none; } }

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
h1, h2 { font-weight: 400; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: clamp(27px, 7vw, 38px); }
h2 { font-size: clamp(24px, 6.4vw, 32px); }
h1 em, h2 em { font-style: normal; font-weight: 600; color: var(--teal-deep); }
.lede { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin-top: 12px; }
.lede b { color: var(--ink); font-weight: 600; }
.lede p + p { margin-top: 10px; }

/* Schermata domande: titolo del test grande, poi intro (solo domanda 1), poi domanda e risposte */
.kicker { font-size: clamp(26px, 7vw, 34px); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; color: var(--teal-deep); }
.q { font-size: clamp(21px, 5.6vw, 26px); font-weight: 500; line-height: 1.25; margin-top: 22px; }

/* Foto di Luigi nell'intro della prima domanda: cerchio, testo che ci scorre accanto */
.intro { display: flow-root; }
.intro[hidden] { display: none; }
.avatar { float: left; width: 72px; height: 72px; margin: 3px 16px 6px 0; border-radius: 50%; object-fit: cover; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--frost), 0 8px 18px -8px rgba(20, 16, 13, .35); }

/* Opzioni a tap */
.opts { display: grid; gap: 10px; margin-top: 24px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 14px 18px; text-align: left; background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: 16px; font: 500 16px/1.35 var(--font); cursor: pointer; transition: border-color .2s, background .2s, transform .15s; -webkit-tap-highlight-color: transparent; }
.opt::after { content: ''; margin-left: auto; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); transition: all .2s; }
.opt:active { transform: scale(.985); }
.opt.sel { border-color: var(--teal); background: #F0FAF9; }
.opt.sel::after { border-color: var(--teal); background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
@media (hover: hover) { .opt:hover { border-color: var(--ink-faint); } }

/* Form */
.form { margin-top: 22px; display: grid; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input { width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 400 16px var(--font); outline: none; transition: border-color .2s; }
.input:focus { border-color: var(--teal); }
.field.err .input { border-color: var(--clay); }
.msg { display: none; font-size: 12.5px; color: var(--clay); margin-top: 6px; }
.field.err .msg, .check.err .msg { display: block; }
.phone { display: grid; grid-template-columns: 84px 1fr; gap: 8px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--teal); cursor: pointer; }
.check a { color: var(--teal-deep); font-weight: 600; }
.check .msg { grid-column: 2; margin-top: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-err { display: none; font-size: 14px; color: var(--clay); text-align: center; }
.form-err.on { display: block; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 14px 24px; border: none; border-radius: 100px; font: 600 16px/1.3 var(--font); text-decoration: none; text-align: center; cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 14px 30px -12px rgba(20, 16, 13, .6); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 14px 30px -12px var(--wa); }
.btn svg { width: 24px; height: 24px; flex: none; }
.note { font-size: 12px; line-height: 1.5; color: var(--ink-faint); text-align: center; margin-top: 10px; }
.note.reply { font-size: 13px; color: var(--ink-soft); margin-top: 16px; }

/* Thank you */
.ty { text-align: center; padding-top: 34px; }
.pharma { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin: 26px 0 22px; }
.pharma img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none; }
.pharma b { display: block; font-size: 16px; }
.pharma span { font-size: 13px; color: var(--ink-soft); }

/* Footer legale (identico a Rigenera Post-Estate), sotto la piega */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 30px 16px 36px; text-align: center; }
.site-footer .legal-links { display: flex; gap: 12px 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 13px; }
.site-footer .legal-links a { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; transition: color .25s var(--ease); }
.site-footer .legal-links a:hover { color: var(--ink); }
.site-footer .company { max-width: 540px; margin: 0 auto; font-size: 11.5px; line-height: 1.75; color: var(--ink-faint); letter-spacing: .01em; }
.disclaimer { font-size: 11px; line-height: 1.5; color: var(--ink-faint); text-align: center; margin-top: 18px; }
