/* Home del sito: impaginazione. Colori, caratteri, sfondi e movimento dal design system unico (ds/quadriamo.css). */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-size: 17px; }
.site-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0; }
section.site-wrap { padding: 56px 16px; }
.alt { background: transparent; }
h1 { font-size: clamp(40px, 8vw, 72px); line-height: 1.02; margin: 10px 0 16px; }
h1 em { font-style: normal; color: var(--b1); }
h2 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 12px; }
.lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 34em; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 600; color: var(--b1); margin: 0; }

/* intestazione */
.site-head { position: sticky; top: 0; z-index: 10; background: var(--glass); -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
  border-bottom: 1px solid var(--glass-line); }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.site-nav { display: flex; gap: 18px; margin-left: 12px; }
.site-nav a, .link-login { color: var(--text); text-decoration: none; font-size: 15px; }
.site-nav a:hover, .link-login:hover { color: var(--b1); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-select { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; min-height: 36px; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
@media (max-width: 760px) { .site-nav { display: none; } .link-login { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 32px; align-items: center; padding-top: 40px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .phone { margin: 0 auto; } }

/* telefono di esempio */
.c1 { background: var(--b1); } .c2 { background: var(--b2); } .c3 { background: var(--b3); } .c4 { background: var(--b4); }
.c1t { color: var(--b1); } .c2t { color: var(--b2); } .c3t { color: var(--b3); } .c4t { color: var(--b4); }

/* regola */
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.rule-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 4px; }
.rule-item b { font-weight: 600; letter-spacing: -.03em; font-size: 40px; line-height: 1; }
.rule-item span { font-weight: 600; }
.rule-item small { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .rule-grid { grid-template-columns: repeat(2, 1fr); } }

/* passi */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 6px; counter-increment: s; margin: 0; }
.steps li::before { content: counter(s); font-weight: 600; letter-spacing: -.03em; font-size: 36px; color: var(--b1); line-height: 1; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* punti chiave e QR nella prima schermata */
.hero-points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.hero-points li { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; }
.hero-points .ico { flex-shrink: 0; width: 32px; height: 32px; font-size: 16px; }
.hero-get { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 24px 0 10px; }
.hero-get .cta-row { margin: 0; }
.hero-qr { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px 10px 10px; }
.hero-qr img { width: 150px; height: 150px; background: #fff; border-radius: 10px; padding: 5px; flex-shrink: 0; }
.hero-qr div { display: grid; gap: 2px; max-width: 13em; line-height: 1.35; }
.hide-desktop { display: none; }
/* sul telefono il QR non serve: al suo posto il pulsante per installarla */
@media (max-width: 820px), (hover: none) and (pointer: coarse) { .hero-qr { display: none; } .hide-desktop { display: inline-flex; } }

/* funzioni: in breve, i dettagli nel pop-up */
.feat-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.feat-chip { font: inherit; font-weight: 600; font-size: 15px; color: var(--text); text-align: left; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; min-width: 0; }
.feat-chip:hover { border-color: var(--b1); }
.feat-chip .ico { flex-shrink: 0; width: 32px; height: 32px; font-size: 16px; }
@media (max-width: 900px) { .feat-chips { grid-template-columns: repeat(2, 1fr); } }
.link-more { font: inherit; background: none; border: 0; color: var(--b1); font-weight: 600; padding: 14px 0 0; cursor: pointer; }
#feat-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg); color: var(--text); padding: 22px; }
#feat-dialog::backdrop { background: rgba(20, 23, 27, .55); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: -22px; background: var(--bg); padding: 4px 0 8px; margin: 0; }
.dlg-head h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.dlg-close { font: inherit; font-weight: 600; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; min-height: 40px; padding: 0 14px; cursor: pointer; }
.feat-grid article.hl { border-color: var(--b1); }
.feat-grid article { transition: border-color .3s; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.feat-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.feat-grid h3 { margin: 8px 0 4px; font-size: 17px; }
.feat-grid p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--alt); color: var(--b1); font-size: 18px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
#feat-dialog .feat-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { #feat-dialog .feat-grid { grid-template-columns: 1fr; } #feat-dialog { padding: 16px; } }
@media (max-width: 520px) { .feat-grid { grid-template-columns: 1fr; } }

/* privacy, accesso */
.privacy-band, .login-band { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 760px) { .privacy-band, .login-band { grid-template-columns: 1fr; } }
.checks-list { list-style: none; padding: 0; margin: 0; }
.checks-list li { padding-left: 28px; position: relative; }
.checks-list li::before { content: "✓"; position: absolute; left: 0; color: var(--b1); font-weight: 600; }
.login-card { display: grid; gap: 10px; justify-items: start; }
.login-card h3 { margin: 0; }

/* scarica */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; }
.qr-card { display: grid; justify-items: center; text-align: center; max-width: 220px; }
.qr-card img { background: #fff; border-radius: 10px; padding: 6px; }
@media (max-width: 760px) { .dl-grid { grid-template-columns: 1fr; } .qr-card { max-width: none; } }

/* prezzi */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.price-tag { font-weight: 600; letter-spacing: -.03em; font-size: 34px; margin: 4px 0; }
.price.soon { opacity: .8; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }

/* faq */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

/* piè di pagina */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--text); }

/* schermi molto stretti */
.hero > * { min-width: 0; }
.head-row { gap: 10px; }
.btn-small { white-space: nowrap; }
@media (max-width: 420px) {
  .head-actions { gap: 6px; }
  .lang-select { padding: 4px; min-height: 32px; }
  .btn-small { min-height: 36px; padding: 0 10px; font-size: 14px; }
  .head-row .logo { font-size: 22px; }
}
@media (max-width: 340px) { .head-row .logo { font-size: 19px; } .btn-small { padding: 0 8px; } }
.rule-item, .steps li, .feat-grid article, .card { min-width: 0; }
@media (max-width: 420px) { .rule-grid { grid-template-columns: 1fr; } }

/* feedback dal sito */
.fb-band { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .fb-band { grid-template-columns: 1fr; } }
.fb-form { display: grid; gap: 8px; }
.fb-form fieldset { border: 0; padding: 0; margin: 0; }
.fb-label { font-weight: 600; font-size: 15px; padding: 0; }
.fb-form textarea, .fb-form input[type="email"] { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.fb-form input[type="email"]:disabled { opacity: .5; }
.stars-row { display: flex; gap: 6px; margin-top: 4px; }
.stars-row button { font-size: 30px; line-height: 1; background: none; border: 0; color: var(--line); cursor: pointer; padding: 2px; transition: transform .15s, color .15s; }
.stars-row button.on { color: var(--b1); }
.stars-row button:hover { transform: scale(1.15); }
.fb-check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.fb-check input { width: 18px; height: 18px; }
.fb-form .btn { justify-self: start; margin-top: 4px; }
.fb-msg { margin: 4px 0 0; font-weight: 600; font-size: 15px; }
.fb-msg.ok { color: var(--good); } .fb-msg.bad { color: var(--bad); }

/* interfaccia ferma come un'app: niente zoom con il doppio tocco, niente rimbalzo della pagina, testo che non si ingrandisce
   da solo; campi da 16px perché su iPhone quelli più piccoli fanno ingrandire la pagina quando li tocchi */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overscroll-behavior: none; }
input, select, textarea { font-size: max(16px, 1em); }

/* scarica: un riquadro per dispositivo */
.dl-grid4 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 14px; }
@media (max-width: 900px) { .dl-grid4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .dl-grid4 { grid-template-columns: repeat(2, 1fr); } }
.dev-tile { display: grid; gap: 4px; justify-items: start; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.dev-tile:hover { border-color: var(--b1); }
.dt-ico { font-size: 28px; }
.dev-tile b { font-size: 18px; }
.dev-tile small { color: var(--muted); font-size: 14px; }

/* ---------- calcolatore ---------- */
.calc { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; gap: 24px; } }
.calc-who { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--muted) 14%, transparent); margin: 8px 0 18px; }
.calc-who button { border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); padding: 10px 16px; border-radius: 9px; cursor: pointer; }
.calc-who button.on { background: var(--surface); color: var(--text); }
.calc-field { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; margin: 0 0 18px; font-weight: 600; }
.calc-field output { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-field input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--b1); height: 28px; }
.calc-out { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.calc-label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--b1); }
.calc-big { margin: 4px 0 2px; font-weight: 600; letter-spacing: -.03em; font-size: clamp(48px, 9vw, 72px); line-height: 1; font-variant-numeric: tabular-nums; }
.calc-week { margin: 0 0 20px; color: var(--muted); }
.calc-week b { color: var(--text); font-variant-numeric: tabular-nums; }
.calc-parts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.calc-parts li { display: grid; grid-template-columns: 12px 1fr auto; gap: 4px 10px; align-items: center; font-size: 15px; transition: opacity .3s; }
.calc-parts li.off { opacity: .35; }
.calc-parts i { width: 12px; height: 12px; border-radius: 4px; }
.calc-parts b { font-variant-numeric: tabular-nums; }
.calc-bar { grid-column: 2 / -1; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 14%, transparent); overflow: hidden; }
.calc-bar span { display: block; height: 100%; border-radius: inherit; background: currentColor; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.calc-parts li:nth-child(1) { color: var(--b1); } .calc-parts li:nth-child(2) { color: var(--b2); } .calc-parts li:nth-child(3) { color: var(--b3); } .calc-parts li:nth-child(4) { color: var(--b4); }
.calc-parts li > span, .calc-parts li > b { color: var(--text); }
.calc-parts i.c1 { background: var(--b1); } .calc-parts i.c2 { background: var(--b2); } .calc-parts i.c3 { background: var(--b3); } .calc-parts i.c4 { background: var(--b4); }
.calc-warn { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; margin: 0 0 16px; }
.calc-cta { width: 100%; justify-content: center; }

/* ---------- demo a scorrimento ---------- */
.story-head { text-align: center; margin-bottom: 24px; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
/* stati */
.story-steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.story-steps li { min-height: 62vh; display: grid; align-content: center; gap: 6px; counter-increment: st; opacity: .35; transition: opacity .35s; }
.story-steps li::before { content: counter(st); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: var(--b1); }
.story-steps li.on { opacity: 1; }
.story-steps b { font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -.03em; }
.story-steps span { color: var(--muted); font-size: 18px; max-width: 26em; }
@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-phone { top: 76px; width: 200px; border-radius: 32px; padding: 6px; z-index: 2; }
  .story-steps li { min-height: 55vh; text-align: center; justify-items: center; }
  .story-steps li:first-child { margin-top: 20px; }
}

/* ---------- numeri ---------- */
.data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
@media (max-width: 760px) { .data-grid { grid-template-columns: 1fr; } }
.data-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 6px; align-content: start; }
.data-n { font-weight: 600; letter-spacing: -.03em; font-size: 48px; line-height: 1; color: var(--b1); }
.data-n small { font-size: 22px; color: var(--muted); }
.data-card p { margin: 0; font-weight: 600; }
.data-card a { font-size: 13px; color: var(--muted); }
.data-punch { font-size: 19px; max-width: 40em; }
.calc-parts li:nth-child(1) .calc-bar span { background: var(--b1); } .calc-parts li:nth-child(2) .calc-bar span { background: var(--b2); }
.calc-parts li:nth-child(3) .calc-bar span { background: var(--b3); } .calc-parts li:nth-child(4) .calc-bar span { background: var(--b4); }
#calcola, #demo, #numeri { scroll-margin-top: 72px; }
@media (max-width: 860px) {
  .story-phone { width: 180px; top: 70px; }
  .story-steps li { min-height: 70vh; align-content: end; padding-bottom: 8vh; }
  .story-steps li > * { background: color-mix(in srgb, var(--bg) 88%, transparent); border-radius: 12px; padding: 2px 8px; }
  .story-steps li::before { padding: 0; }
}

/* telefono con una schermata vera dell'app: cornice sottile, nessuna ombra */
.phone, .story-phone { width: 270px; border-radius: 42px; background: #0F1012; padding: 8px; }
.shot { display: block; width: 100%; height: auto; aspect-ratio: 540 / 1170; border-radius: 34px; background: #0F1012; }
.story-phone { position: sticky; top: 96px; justify-self: center; display: grid; }
.story-phone .shot { grid-area: 1 / 1; opacity: 0; transition: opacity .45s ease; }
.story-phone[data-step="1"] [data-for="1"], .story-phone[data-step="2"] [data-for="2"], .story-phone[data-step="3"] [data-for="3"],
.story-phone[data-step="4"] [data-for="4"], .story-phone[data-step="5"] [data-for="5"], .story-phone[data-step="6"] [data-for="6"], .story-phone[data-step="7"] [data-for="7"] { opacity: 1; }
@media (max-width: 760px) { .story-phone { top: 76px; width: 200px; border-radius: 32px; padding: 6px; } .story-phone .shot { border-radius: 26px; } }

/* «Fatto bene»: tre prove vere sotto le funzioni, separate da una linea */
.proof { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; align-items: start; }
.proof h3 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.proof p { margin: 0; grid-column: 1; }
.proof .checks-list { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 760px) { .proof { grid-template-columns: 1fr; } .proof .checks-list { grid-column: 1; grid-row: auto; } }
