/* GrowthPlan — sito agenzia (landing + form attivazione) */
:root {
  --ink: #03276f;
  --ink-2: #0a3a9c;
  --accent: #2b8cff;
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --line: #e2e8f4;
  --text: #1c2433;
  --muted: #5b6478;
  --ok: #1a8f5a;
  --warn: #b4690e;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(3, 39, 111, 0.08);
  --maxw: 1100px;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; transition: .15s; text-decoration: none;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 20px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .nav .nav-link { display: none; } }

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: 84px 0 64px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin: 0 0 18px; color: var(--ink); letter-spacing: -.02em; }
.hero p.lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); max-width: 680px; margin: 0 auto 30px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.eyebrow { display: inline-block; background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; margin-bottom: 22px; }

/* Sections */
section { padding: 72px 0; }
section h2 { font-size: clamp(26px, 3.5vw, 38px); color: var(--ink); margin: 0 0 14px; letter-spacing: -.02em; }
.section-intro { max-width: 640px; margin: 0 auto 44px; }

/* Service grid */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin: 12px 0 8px; color: var(--ink); font-size: 19px; }
.card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-soft);
  display: grid; place-items: center; font-size: 22px; }

/* Pricing */
.price-box { max-width: 460px; margin: 0 auto; text-align: center; border: 2px solid var(--ink); }
.price { font-size: 56px; font-weight: 800; color: var(--ink); }
.price small { font-size: 18px; font-weight: 600; color: var(--muted); }
.price-box ul { text-align: left; list-style: none; padding: 0; margin: 24px 0; }
.price-box li { padding: 8px 0 8px 30px; position: relative; }
.price-box li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* Steps how-it-works */
.steps { counter-reset: step; }
.steps .card { position: relative; }
.steps .num { font-size: 14px; font-weight: 800; color: var(--accent); }

/* Footer */
.site-footer { background: var(--ink); color: #cfe0ff; padding: 48px 0; }
.site-footer a { color: #fff; }

/* ============== FORM WIZARD ============== */
.form-wrap { background: var(--bg-soft); min-height: 100vh; padding: 32px 0 80px; }
.wizard { max-width: 760px; margin: 0 auto; }
.progress { background: #fff; border: 1px solid var(--line); border-radius: 999px; height: 12px; overflow: hidden; margin-bottom: 8px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--ink)); width: 0; transition: width .3s; }
.progress-label { font-size: 13px; color: var(--muted); margin-bottom: 22px; display: flex; justify-content: space-between; }

.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.step-card h2 { font-size: 24px; margin: 0 0 6px; }
.step-card .step-desc { color: var(--muted); margin: 0 0 26px; }

.field { margin-bottom: 20px; }
.field > label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); margin: -2px 0 8px; }
.field .req { color: #c0392b; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=url], .field input[type=number], .field input[type=time],
.field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--text); background: #fff;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #c0392b; }
.field .err { color: #c0392b; font-size: 13px; margin-top: 5px; display: none; }
.field.invalid .err { display: block; }

.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.choice:hover { border-color: var(--accent); }
.choice input { margin-top: 3px; }
.choice .c-title { font-weight: 700; }
.choice .c-desc { font-size: 13px; color: var(--muted); }
.choice.selected { border-color: var(--ink); background: var(--bg-soft); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

/* repeatable group */
.group { border: 1px dashed var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; position: relative; background: #fcfdff; }
.group .group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.group .group-head b { color: var(--ink); }
.btn-mini { font-size: 13px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; }
.btn-mini:hover { border-color: var(--ink); }
.btn-add { color: var(--ink-2); border-color: var(--ink-2); }
.btn-del { color: #c0392b; border-color: #f0c6c0; }

/* orari */
.orari-day { display: grid; grid-template-columns: 90px 70px 1fr 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.orari-day .dname { font-weight: 700; }
@media (max-width: 560px) { .orari-day { grid-template-columns: 80px 60px 1fr 1fr; } }

.wizard-nav { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }

.summary-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.summary-box h4 { margin: 0 0 8px; color: var(--ink); }
.summary-box pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 280px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 10px; box-shadow: var(--shadow); display: none; }

/* ===== FIX & ADDITIONS (v2) ===== */
/* 1. pulsante header: testo bianco (vinceva .nav a) */
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; text-decoration: none; }

/* icone SVG */
.svg-ico { width: 24px; height: 24px; stroke: var(--ink); stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }
.card .ico { background: var(--bg-soft); }
.card .ico .svg-ico { width: 24px; height: 24px; }

/* ===== sezione FLUSSO (funnel) ===== */
.flow { background: var(--ink); color: #eaf1ff; }
.flow h2 { color: #fff; }
.flow .section-intro p { color: #b9cdf2; }
.flow-grid { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
@media (max-width: 900px) { .flow-grid { grid-template-columns: 1fr; } }
.flow-step { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 28px; text-align: center; }
.flow-step .svg-ico { stroke: #8fb8ff; width: 34px; height: 34px; }
.flow-step h3 { color: #fff; margin: 14px 0 8px; font-size: 19px; }
.flow-step p { color: #c3d4f5; margin: 0; font-size: 15px; }
.flow-arrow { display: grid; place-items: center; color: #5e86d6; padding: 0 6px; }
.flow-arrow .svg-ico { stroke: #5e86d6; }
@media (max-width: 900px) { .flow-arrow { transform: rotate(90deg); padding: 10px 0; } }
.flow-payoff { text-align: center; margin-top: 40px; font-size: clamp(20px,2.6vw,28px); font-weight: 800; color: #fff; }
.flow-payoff span { color: #8fb8ff; }

/* ===== dettaglio servizi ===== */
.svc { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: 0; }
.svc-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--bg-soft); display: grid; place-items: center; }
.svc-ico .svg-ico { width: 28px; height: 28px; }
.svc h3 { margin: 0 0 8px; color: var(--ink); font-size: 21px; }
.svc p { margin: 0 0 12px; color: var(--muted); }
.svc ul { margin: 0; padding-left: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
@media (max-width: 640px) { .svc ul { grid-template-columns: 1fr; } .svc { grid-template-columns: 1fr; } }
.svc li { position: relative; padding-left: 24px; font-size: 14px; }
.svc li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent); }

/* ===== footer completo ===== */
.site-footer { background: var(--ink); color: #b9cdf2; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #b9cdf2; }
.site-footer a:hover { color: #fff; }
.site-footer .f-brand p { color: #93acd9; margin: 12px 0 0; max-width: 320px; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #8ba3cf; }

/* ===== FORM v2: scelte a tessera ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { border: 2px solid var(--line); border-radius: 12px; padding: 18px 16px; cursor: pointer;
  transition: .15s; background: #fff; display: flex; gap: 12px; align-items: flex-start; position: relative; }
.tile:hover { border-color: var(--accent); }
.tile.selected { border-color: var(--ink); background: var(--bg-soft); box-shadow: 0 4px 16px rgba(3,39,111,.08); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .tile-ico { width: 38px; height: 38px; border-radius: 9px; background: var(--bg-soft); display: grid; place-items: center; flex: none; }
.tile.selected .tile-ico { background: #fff; }
.tile .tile-ico .svg-ico { width: 20px; height: 20px; }
.tile .t-title { font-weight: 700; display: block; }
.tile .t-desc { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.tile .t-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center; }
.tile.selected .t-check { background: var(--ink); border-color: var(--ink); }
.tile.selected .t-check::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 800; }

/* ===== FORM v2: orari ridisegnati ===== */
.orari { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.orari-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); }
.orari-row:last-child { border-bottom: 0; }
.orari-row.is-closed { background: var(--bg-soft); }
.orari-row .day-toggle { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #cbd6ea; border-radius: 999px; transition: .2s; }
.switch .track::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .track { background: var(--ink); }
.switch input:checked + .track::before { transform: translateX(18px); }
.orari-times { display: flex; align-items: center; gap: 8px; }
.orari-times input[type=time] { width: auto; }
.orari-times .sep { color: var(--muted); }
.orari-times .closed-label { color: var(--muted); font-size: 14px; }

/* ===== FORM v2: image dropzone ===== */
.imgfield .drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center;
  cursor: pointer; transition: .15s; background: #fcfdff; }
.imgfield .drop:hover { border-color: var(--accent); background: var(--bg-soft); }
.imgfield .drop .svg-ico { stroke: var(--muted); width: 26px; height: 26px; margin-bottom: 6px; }
.imgfield .drop .d-text { font-size: 14px; color: var(--muted); }
.imgfield input[type=file] { display: none; }
.imgfield .preview { display: none; align-items: center; gap: 14px; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; }
.imgfield.has-img .drop { display: none; }
.imgfield.has-img .preview { display: flex; }
.imgfield .preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.imgfield .preview .fname { font-size: 14px; font-weight: 600; word-break: break-all; }
.imgfield .preview .rm { margin-left: auto; }

/* ===== FORM v2: riepilogo user-friendly ===== */
.rev-card { border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 16px; }
.rev-card .rev-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rev-card .rev-h .svg-ico { stroke: var(--ink); }
.rev-card h3 { margin: 0; font-size: 17px; color: var(--ink); }
.rev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
@media (max-width: 560px) { .rev-grid { grid-template-columns: 1fr; } }
.rev-item { font-size: 14px; }
.rev-item .k { color: var(--muted); display: block; font-size: 12px; }
.rev-item .v { font-weight: 600; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); font-weight: 700;
  font-size: 13px; padding: 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.chip .svg-ico { width: 15px; height: 15px; stroke: var(--ink-2); }
details.tech { margin-top: 8px; }
details.tech summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.tech pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 260px; overflow: auto;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 10px; }

/* campi affiancati (half) tramite flex su step-card e group */
.step-card, .group { display: flex; flex-wrap: wrap; gap: 0 18px; align-content: flex-start; }
.step-card > h2, .step-card > .step-desc, .group > .group-head { width: 100%; }
.step-card > .field, .group > .field, .step-card > details { width: 100%; margin-bottom: 18px; }
.step-card > .field.half, .group > .field.half { width: calc(50% - 9px); }
@media (max-width: 560px) { .step-card > .field.half, .group > .field.half { width: 100%; } }
.group > [data-add] { width: auto; }
