/* PrestoWeb · stile del sito pubblico (prestoweb.it). Token in tokens.css, niente framework. */
@import url("tokens.css");

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--background); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand-20); outline-offset: 2px; }

/* Layout */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: var(--section-y) 0; } }
.section-surface { background: var(--surface); }
.section-dark { background: var(--dark-section); color: #fff; }
.section-dark .lead, .section-dark p { color: var(--dark-text); }
.section-head { max-width: 42rem; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 1rem; }
.eyebrow { margin-bottom: .75rem; }
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.muted { color: var(--ink-muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: .75rem; padding: .875rem 1.5rem; font-weight: 700; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 20px 25px -5px var(--brand-20); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; border-color: var(--hairline); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-muted); }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost-dark { border-color: rgba(255,255,255,.3); color: #fff; }
.btn-sm { padding: .55rem 1rem; font-size: .875rem; }
.btn-block { width: 100%; }

/* Navbar */
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .875rem; padding-bottom: .875rem; }
.brand-logo img { height: 36px; width: auto; }
.nav-links { display: none; align-items: center; gap: 1.75rem; list-style: none; font-size: .9rem; font-weight: 500; color: var(--ink-muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: none; align-items: center; gap: 1rem; font-size: .9rem; font-weight: 600; }
.nav-actions a.login { text-decoration: none; color: var(--ink-muted); }
.nav-actions a.login:hover { color: var(--ink); }
@media (min-width: 960px) { .nav-links, .nav-actions { display: flex; } .nav-mobile { display: none; } }
.nav-mobile { position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; border: 1px solid var(--hairline); border-radius: .625rem; padding: .45rem .75rem; font-weight: 600; font-size: .875rem; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { background: var(--surface); }
.nav-mobile .panel { position: absolute; right: 0; top: calc(100% + .5rem); width: min(18rem, calc(100vw - 2rem)); background: #fff; border: 1px solid var(--hairline); border-radius: 1rem; padding: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: .25rem; }
.nav-mobile .panel a { text-decoration: none; padding: .55rem .5rem; border-radius: .5rem; font-weight: 500; }
.nav-mobile .panel a:hover { background: var(--surface); }
.nav-mobile .panel .btn { margin-top: .5rem; }

/* Flash */
.flash { background: var(--brand-10); color: var(--brand-dark); border-bottom: 1px solid var(--hairline); padding: .75rem 0; font-weight: 600; font-size: .9rem; }

/* Hero */
.hero { padding: 3.5rem 0 4rem; background: linear-gradient(180deg, var(--surface), #fff); overflow: hidden; }
.hero .container { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 5rem 0 6rem; } .hero .container { grid-template-columns: 1.05fr 1fr; } }
.hero .badge { margin-bottom: 1.5rem; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { margin-top: 1.5rem; max-width: 38rem; }
.hero .actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.checklist { list-style: none; margin-top: 1.75rem; display: grid; gap: .5rem; font-size: .9rem; color: var(--ink-muted); }
.checklist li { display: flex; gap: .5rem; align-items: flex-start; }
.checklist li::before { content: "✓"; color: var(--brand); font-weight: 800; }
.hero-figure { border-radius: 1.25rem; overflow: hidden; border: 1px solid var(--hairline); box-shadow: 0 40px 80px -20px rgba(15,23,43,.25); background: #fff; }

/* Problema */
.problem { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .problem { grid-template-columns: 1fr 1fr; align-items: start; } }
.problem .callout { border: 1px solid rgba(255,255,255,.12); border-radius: 1rem; padding: 1.75rem; background: rgba(255,255,255,.04); }
.problem .callout h3 { color: #fff; font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .75rem; }

/* Step */
.step { position: relative; }
.step .n { font-family: var(--font-display); font-weight: 800; font-size: 2.25rem; color: var(--brand); letter-spacing: -.02em; }
.step h3 { margin-top: .5rem; font-size: 1.125rem; }
.step p { margin-top: .5rem; color: var(--ink-muted); font-size: .95rem; }

/* Card generiche */
.card h3 { font-size: 1.05rem; font-weight: 700; }
.card p { margin-top: .5rem; color: var(--ink-muted); font-size: .925rem; }
.card-icon { width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: var(--brand-10); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 1rem; }

/* Perché */
.why { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .why { grid-template-columns: 1fr 1fr; } }
.why figure { border-radius: 1.25rem; overflow: hidden; }
.why ol { list-style: none; display: grid; gap: 1.5rem; margin-top: 2rem; counter-reset: why; }
.why li { counter-increment: why; display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.why li::before { content: counter(why); width: 2rem; height: 2rem; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.why li h3 { font-size: 1.05rem; }
.why li p { color: var(--ink-muted); margin-top: .25rem; font-size: .95rem; }

/* Template */
.tpl-card { display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 1rem; overflow: hidden; background: #fff; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.tpl-card:hover { box-shadow: 0 20px 40px -15px rgba(15,23,43,.2); transform: translateY(-2px); }
.tpl-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--surface); }
.tpl-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpl-card .body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.tpl-card h3 { font-size: 1.05rem; }
.tpl-card .ex { font-size: .85rem; color: var(--ink-muted); }
.tpl-card ul { list-style: none; font-size: .85rem; color: var(--ink-muted); display: grid; gap: .2rem; margin-top: .25rem; }
.tpl-card ul li::before { content: "· "; color: var(--brand); font-weight: 800; }
.tpl-card .more { margin-top: auto; padding-top: .75rem; color: var(--brand); font-weight: 600; font-size: .9rem; }
.tpl-card.missing { background: var(--brand-10); border-style: dashed; justify-content: center; padding: 1.5rem; }
.note { margin-top: 1.5rem; font-size: .85rem; color: var(--ink-muted); }

/* Prezzi */
.free-box { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; border: 1px solid var(--hairline); border-radius: 1rem; padding: 1.25rem 1.5rem; background: #fff; margin-bottom: 1.5rem; }
.free-box strong { font-family: var(--font-display); font-size: 1.25rem; }
.plan { position: relative; display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 1.25rem; padding: 1.75rem; background: #fff; }
.plan.featured { border-color: var(--brand); box-shadow: 0 25px 50px -20px var(--brand-20); }
.plan .tag { position: absolute; top: -.75rem; left: 1.5rem; background: var(--logo-orange); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .2rem .7rem; }
.plan h3 { font-size: 1.15rem; }
.plan .tagline { color: var(--ink-muted); font-size: .9rem; margin-top: .25rem; }
.plan .price { font-family: var(--font-display); font-weight: 800; font-size: 2.25rem; margin-top: 1.25rem; letter-spacing: -.02em; }
.plan .unit { font-size: .85rem; color: var(--ink-muted); font-weight: 500; margin-left: .25rem; }
.plan .credits { color: var(--brand); font-weight: 700; font-size: .9rem; }
.plan ul { list-style: none; margin: 1.25rem 0 1.5rem; display: grid; gap: .5rem; font-size: .9rem; }
.plan ul li { display: flex; gap: .5rem; }
.plan ul li::before { content: "✓"; color: var(--brand); font-weight: 800; }
.plan .btn { margin-top: auto; }

/* FAQ / trasparenza */
.faq { border-bottom: 1px solid var(--hairline); }
.faq summary { cursor: pointer; list-style: none; padding: 1.25rem 0; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 700; font-size: 1.25rem; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { padding-bottom: 1.25rem; color: var(--ink-muted); }
.qa h3 { color: #fff; font-size: 1.05rem; }
.qa p { margin-top: .5rem; }

/* Testimonianze */
.quote-card blockquote { font-size: 1rem; }
.quote-card cite { display: block; margin-top: 1rem; font-style: normal; font-weight: 600; font-size: .9rem; }

/* Blog */
.post-card { display: flex; flex-direction: column; border: 1px solid var(--hairline); border-radius: 1rem; overflow: hidden; background: #fff; text-decoration: none; transition: box-shadow .2s; }
.post-card:hover { box-shadow: 0 20px 40px -15px rgba(15,23,43,.18); }
.post-card .thumb { aspect-ratio: 16/9; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card h3 { font-size: 1.05rem; line-height: 1.35; }
.post-card p { color: var(--ink-muted); font-size: .9rem; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--ink-muted); }
.meta .cat { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.article-head { padding: 3rem 0 2rem; }
.article-head h1 { margin-top: .75rem; }
.article-cover { border-radius: 1.25rem; overflow: hidden; margin-bottom: 2.5rem; }

/* Prosa (articoli, pagine legali) */
.prose { font-size: 1.05rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -.02em; }
.prose h2 { font-family: var(--font-display); font-size: 1.4rem; margin-top: 2em; letter-spacing: -.01em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--brand); }
.prose section + section { margin-top: 1.5em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--hairline); padding: .5rem .65rem; text-align: left; vertical-align: top; }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--hairline); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }

/* Pagina template */
.tpl-head { padding: 2.5rem 0 2rem; display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .tpl-head { grid-template-columns: 1fr auto; align-items: end; } }
.tpl-head h1 { margin-top: .75rem; }
.tpl-head .features { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tpl-head .features li { background: var(--brand-10); color: var(--brand); border-radius: 999px; padding: .25rem .75rem; font-size: .85rem; font-weight: 600; }
.demo-frame { border: 1px solid var(--hairline); border-radius: 1rem; overflow: hidden; box-shadow: 0 30px 60px -25px rgba(15,23,43,.3); background: #fff; }
.demo-frame .bar { display: flex; align-items: center; gap: .4rem; padding: .6rem .9rem; border-bottom: 1px solid var(--hairline); background: var(--surface); font-size: .8rem; color: var(--ink-muted); }
.demo-frame .bar i { width: .65rem; height: .65rem; border-radius: 999px; background: var(--hairline); display: inline-block; }
.demo-frame iframe { display: block; width: 100%; height: 80vh; min-height: 640px; border: 0; }

/* Form */
.form-card { border: 1px solid var(--hairline); border-radius: 1.25rem; padding: 1.5rem; background: #fff; }
@media (min-width: 768px) { .form-card { padding: 2rem; } }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .875rem; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--hairline); border-radius: .75rem; padding: .75rem 1rem; background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-10); }
.field .err { color: var(--destructive); font-size: .8rem; }
.field.has-error input, .field.has-error textarea { border-color: var(--destructive); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .875rem; color: var(--ink-muted); }
.check input { margin-top: .25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: .75rem; padding: 1rem 1.25rem; font-weight: 600; margin-bottom: 1.25rem; }
.alert-ok { background: #e7f8ee; color: #136c3a; }
.alert-err { background: #fdecec; color: #a3262a; }
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: .9fr 1.1fr; } }
.info-list { list-style: none; display: grid; gap: 1rem; margin-top: 2rem; }
.info-list li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; }
.info-list .ic { width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: var(--brand-10); display: inline-flex; align-items: center; justify-content: center; }
.info-list b { display: block; }
.info-list span { color: var(--ink-muted); font-size: .9rem; }

/* CTA finale */
.cta-final { text-align: center; background: var(--brand); color: #fff; border-radius: 1.5rem; padding: 3.5rem 1.5rem; }
.cta-final .h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,.85); margin-top: 1rem; }
.cta-final .actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.cta-final .note { color: rgba(255,255,255,.75); }
.cta-final a.link { color: #fff; font-weight: 600; }

/* Footer */
.site-footer { background: var(--dark-section); color: var(--dark-text); padding: 3.5rem 0 2.5rem; font-size: .9rem; }
.site-footer .top { display: flex; flex-direction: column; gap: 1.5rem; justify-content: space-between; }
@media (min-width: 768px) { .site-footer .top { flex-direction: row; align-items: center; } }
.site-footer img { height: 34px; width: auto; }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a { text-decoration: none; color: #fff; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* Errori */
.error-page { text-align: center; padding: 6rem 0; }
.error-page .code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; color: var(--brand); line-height: 1; }
.error-page pre { text-align: left; margin-top: 2rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: .75rem; padding: 1rem; overflow: auto; font-size: .8rem; max-height: 50vh; }
