/* FuocoPlan - homepage. Colori del logo: blu #1f244a e rosso #e01d16. */
:root {
    --fp-navy: #1f244a;
    --fp-navy-2: #2a3160;
    --fp-navy-line: #3b4375;
    --fp-red: #e01d16;       /* bianco su questo rosso: 4,8:1, supera AA */
    --fp-red-hover: #b9150f;
    --fp-red-bright: #f2574f; /* dettagli e testo su fondo blu notte */
    --fp-gray: #f2f3f8;
    --fp-ink: #1f244a;
    --fp-muted: #4a5072;
    --fp-line: #e3e5ef;
    --fp-white: #ffffff;
    --fp-radius: 6px;
    --fp-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --fp-font-head: 'Barlow', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body.fp { margin: 0; font-family: var(--fp-font); font-size: 17px; line-height: 1.6; color: var(--fp-ink); background: var(--fp-white); -webkit-font-smoothing: antialiased; }
:where(.fp) :is(h1, h2, h3) { font-family: var(--fp-font-head); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
:where(.fp) p { margin: 0; }
:where(.fp) a { color: inherit; }
:where(.fp) img { max-width: 100%; height: auto; }
.fp :focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; border-radius: 3px; }

.fp-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fp-white); color: var(--fp-ink); padding: 10px 16px; border-radius: var(--fp-radius); font-weight: 600; }
.fp-skip:focus { top: 12px; }

.fp-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---- header ---- */
.fp-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); color: var(--fp-ink); border-bottom: 1px solid var(--fp-line); }
.fp-header .fp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.fp-brand { display: inline-flex; align-items: center; text-decoration: none; }
.fp-brand img { display: block; height: 44px; width: auto; }
.fp-nav { display: none; align-items: center; gap: 4px; }
.fp-nav a { text-decoration: none; padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--fp-ink); border-radius: var(--fp-radius); }
.fp-nav a:hover { background: var(--fp-gray); }
.fp-nav .fp-login { margin-left: 8px; border: 1px solid #b7bbd0; color: var(--fp-ink); }
.fp-nav .fp-login:hover { border-color: var(--fp-ink); }
.fp-menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; background: transparent; border: 1px solid #b7bbd0; border-radius: var(--fp-radius); cursor: pointer; }
.fp-menu-btn span { display: block; height: 2px; background: var(--fp-ink); }
@media (max-width: 991px) {
    .fp-header.is-open .fp-nav { display: flex; flex-direction: column; align-items: stretch; position: absolute; left: 0; right: 0; top: 100%; background: var(--fp-white); padding: 12px 20px 20px; border-bottom: 1px solid var(--fp-line); box-shadow: 0 12px 24px rgba(31, 36, 74, .12); }
    .fp-header.is-open .fp-nav a { padding: 14px 8px; font-size: 17px; }
    .fp-header.is-open .fp-nav .fp-login { margin: 8px 0 0; text-align: center; }
    .fp-header .fp-btn { padding: 10px 18px; font-size: 15px; }
    .fp-header.is-open .fp-nav .fp-btn { margin-top: 8px; padding: 14px 18px; text-align: center; }
}

@media (min-width: 992px) {
    .fp-menu-btn { display: none; }
    .fp-nav { display: flex; }
}

/* ---- bottoni ---- */
.fp-btn { display: inline-block; font-family: var(--fp-font); font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center; padding: 15px 26px; border-radius: var(--fp-radius); border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.fp .fp-btn-primary { background: var(--fp-red); color: var(--fp-white); border-color: var(--fp-red); }
.fp .fp-btn-primary:hover { background: var(--fp-red-hover); border-color: var(--fp-red-hover); }
.fp .fp-btn-ghost { background: transparent; color: var(--fp-white); border-color: #6b7280; }
.fp .fp-btn-ghost:hover { border-color: var(--fp-white); }
.fp .fp-btn-ghost-dark { background: transparent; color: var(--fp-ink); border-color: #9ca3af; }
.fp .fp-btn-ghost-dark:hover { border-color: var(--fp-ink); }
.fp .fp-btn[disabled] { opacity: .65; cursor: wait; }

/* ---- sezioni ---- */
.fp-section { padding: 72px 0; }
.fp-section-gray { background: var(--fp-gray); }
.fp-section-dark { background: var(--fp-navy); color: var(--fp-white); }
.fp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fp-red); margin-bottom: 14px; }
.fp-section-dark .fp-eyebrow, .fp-hero .fp-eyebrow { color: #f87171; }
.fp-h2 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 700; max-width: 22ch; }
.fp-lead { margin-top: 18px; max-width: 62ch; color: var(--fp-muted); font-size: 18px; }
.fp-section-dark .fp-lead { color: #d1d5db; }
.fp-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.fp-link { display: inline-block; margin-top: 28px; font-weight: 600; color: var(--fp-red); text-decoration: underline; text-underline-offset: 4px; }
.fp-section-dark .fp-link { color: #f87171; }

/* ---- hero ---- */
.fp-hero { background: var(--fp-navy); color: var(--fp-white); padding: 56px 0 72px; }
.fp-hero-grid { display: grid; gap: 40px; align-items: center; }
.fp-hero h1 { font-size: clamp(36px, 6.2vw, 62px); font-weight: 700; max-width: 16ch; }
.fp-hero .fp-lead { color: #d1d5db; }
.fp-micro { margin-top: 18px; font-size: 15px; color: #9ca3af; }
.fp-hero-visual { border-radius: 10px; border: 1px solid var(--fp-navy-line); overflow: hidden; background: var(--fp-navy-2); }
.fp-hero-visual img { display: block; width: 100%; height: auto; }
.fp-panel { padding: 44px 32px; min-height: 260px; display: flex; flex-direction: column; justify-content: center; gap: 22px; background: linear-gradient(160deg, var(--fp-navy-2), var(--fp-navy)); }
.fp-panel-mark { width: 56px; height: 4px; background: var(--fp-red-bright); border-radius: 2px; }
.fp-panel-payoff { font-family: var(--fp-font-head); font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; }
.fp-panel-payoff span { display: block; }
.fp-panel-payoff span:nth-child(2) { color: #d1d5db; }
.fp-panel-payoff span:nth-child(3) { color: #f87171; }
@media (min-width: 992px) {
    .fp-hero { padding: 88px 0 96px; }
    .fp-hero-grid { grid-template-columns: 1.05fr .95fr; gap: 64px; }
}

/* ---- card ---- */
.fp-cards { margin-top: 40px; display: grid; gap: 20px; }
.fp-card { background: var(--fp-white); border: 1px solid var(--fp-line); border-radius: var(--fp-radius); padding: 26px 24px; }
.fp-card h3 { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.fp-card p { color: var(--fp-muted); font-size: 16px; }
.fp-section-gray .fp-card { border-color: transparent; }
@media (min-width: 700px) { .fp-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .fp-cards-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---- come funziona ---- */
.fp-steps { margin: 40px 0 0; padding: 0; list-style: none; display: grid; gap: 20px; counter-reset: passo; }
.fp-steps li { counter-increment: passo; background: var(--fp-navy-2); border: 1px solid var(--fp-navy-line); border-radius: var(--fp-radius); padding: 24px; font-size: 18px; }
.fp-steps li::before { content: counter(passo); display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%; background: var(--fp-red); color: var(--fp-white); font-weight: 700; font-size: 16px; }
.fp-steps li span { display: block; }
@media (min-width: 992px) { .fp-steps { grid-template-columns: repeat(3, 1fr); } }

/* ---- split (destinatari / multi-azienda) ---- */
.fp-split { display: grid; gap: 28px; }
@media (min-width: 992px) { .fp-split { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }

/* ---- demo ---- */
.fp-demo-grid { display: grid; gap: 40px; }
@media (min-width: 992px) { .fp-demo-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; } }
.fp-form { background: var(--fp-white); border: 1px solid var(--fp-line); border-radius: 10px; padding: 28px 24px; display: grid; gap: 18px; }
@media (min-width: 560px) { .fp-form { padding: 32px; } }
.fp-field label, .fp-field .fp-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.fp-field .fp-opt { font-weight: 400; color: var(--fp-muted); }
.fp-field input[type=text], .fp-field input[type=email], .fp-field input[type=tel], .fp-field textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; color: var(--fp-ink); background: var(--fp-white); border: 1px solid #9ca3af; border-radius: var(--fp-radius); }
.fp-field textarea { min-height: 110px; resize: vertical; }
.fp-field input:focus, .fp-field textarea:focus { outline: 3px solid #f59e0b; outline-offset: 1px; border-color: var(--fp-ink); }
.fp-field [aria-invalid=true] { border-color: #b9150f; }
.fp-error { margin-top: 6px; font-size: 14px; color: #b9150f; font-weight: 500; }
.fp-error:empty { display: none; }
.fp-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.fp-check input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--fp-red); }
.fp-check a { color: var(--fp-red); font-weight: 600; }
.fp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fp-status { padding: 14px 16px; border-radius: var(--fp-radius); font-weight: 500; font-size: 16px; }
.fp-status[hidden] { display: none; }
.fp-status.is-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.fp-status.is-ko { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---- faq ---- */
.fp-faq { margin-top: 36px; max-width: 820px; border-top: 1px solid var(--fp-line); }
.fp-faq details { border-bottom: 1px solid var(--fp-line); }
.fp-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 4px; font-size: 18px; font-weight: 600; }
.fp-faq summary::-webkit-details-marker { display: none; }
.fp-faq summary::after { content: '+'; flex: none; font-size: 26px; line-height: 1; color: var(--fp-red); font-weight: 400; }
.fp-faq details[open] summary::after { content: '\2212'; }
.fp-faq .fp-answer { padding: 0 4px 22px; max-width: 64ch; color: var(--fp-muted); }

/* ---- cta finale ---- */
.fp-final { text-align: center; }
.fp-final .fp-h2 { margin: 0 auto; max-width: 20ch; }
.fp-final .fp-lead { margin-left: auto; margin-right: auto; }
.fp-final .fp-actions { justify-content: center; }

/* ---- footer ---- */
.fp-footer { background: var(--fp-navy); color: #d1d5db; padding: 52px 0 36px; font-size: 15px; border-top: 1px solid var(--fp-navy-line); }
.fp-footer-grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .fp-footer-grid { grid-template-columns: 1.2fr 1fr; } }
.fp-footer h2 { font-size: 22px; color: var(--fp-white); margin-bottom: 10px; }
.fp-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.fp-footer a { color: #e5e7eb; text-underline-offset: 3px; }
.fp-footer a:hover { color: var(--fp-white); }
.fp-legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--fp-navy-line); font-size: 14px; color: #9ca3af; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fp-btn { transition: none; }
}
