emanueledecandia commited on
Commit
7ac28aa
·
verified ·
1 Parent(s): faa3e6d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +807 -556
index.html CHANGED
@@ -1,583 +1,834 @@
1
  <!DOCTYPE html>
2
  <html lang="it">
 
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Calcolatore Prezzi Avanzato - Servizi Digitali</title>
7
- <script src="https://cdn.tailwindcss.com"></script>
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
11
- <style>
12
- :root {
13
- --primary-color: #2563eb; /* Blue 600 */
14
- --primary-hover: #1d4ed8; /* Blue 700 */
15
- --bg-color: #f8fafc;
16
- --text-color: #0f172a;
17
- }
18
-
19
- body {
20
- font-family: 'Inter', sans-serif;
21
- background-color: var(--bg-color);
22
- color: var(--text-color);
23
- scroll-behavior: smooth;
24
- }
25
-
26
- /* Custom Scrollbar */
27
- ::-webkit-scrollbar {
28
- width: 8px;
29
- }
30
- ::-webkit-scrollbar-track {
31
- background: #f1f1f1;
32
- }
33
- ::-webkit-scrollbar-thumb {
34
- background: #cbd5e1;
35
- border-radius: 4px;
36
- }
37
- ::-webkit-scrollbar-thumb:hover {
38
- background: #94a3b8;
39
- }
40
-
41
- /* Card Styles */
42
- .price-card {
43
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
44
- border: 1px solid #e2e8f0;
45
- position: relative;
46
- overflow: hidden;
47
- }
48
-
49
- .price-card:hover {
50
- transform: translateY(-5px);
51
- box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
52
- border-color: #cbd5e1;
53
- }
54
-
55
- .price-card.selected {
56
- border-color: var(--primary-color);
57
- box-shadow: 0 0 0 2px var(--primary-color);
58
- background-color: #eff6ff; /* Blue 50 */
59
- transform: scale(1.02);
60
- z-index: 10;
61
- }
62
-
63
- /* Selection Indicator */
64
- .check-icon {
65
- opacity: 0;
66
- transform: scale(0.5);
67
- transition: all 0.3s ease;
68
- position: absolute;
69
- top: 1rem;
70
- right: 1rem;
71
- background-color: var(--primary-color);
72
- color: white;
73
- border-radius: 50%;
74
- width: 24px;
75
- height: 24px;
76
- display: flex;
77
- align-items: center;
78
- justify-content: center;
79
- font-size: 14px;
80
- }
81
-
82
- .price-card.selected .check-icon {
83
- opacity: 1;
84
- transform: scale(1);
85
- }
86
-
87
- /* Input Styles */
88
- .custom-input {
89
- background-color: #fff;
90
- border: 1px solid #cbd5e1;
91
- border-radius: 0.5rem;
92
- padding: 0.5rem 1rem;
93
- transition: all 0.2s;
94
- width: 100%;
95
- }
96
-
97
- .custom-input:focus {
98
- outline: none;
99
- border-color: var(--primary-color);
100
- box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
101
- }
102
-
103
- /* Range Slider Customization */
104
- input[type=range] {
105
- -webkit-appearance: none;
106
- width: 100%;
107
- background: transparent;
108
- }
109
-
110
- input[type=range]::-webkit-slider-thumb {
111
- -webkit-appearance: none;
112
- height: 24px;
113
- width: 24px;
114
- border-radius: 50%;
115
- background: var(--primary-color);
116
- cursor: pointer;
117
- margin-top: -10px;
118
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
119
- transition: transform 0.1s;
120
- }
121
-
122
- input[type=range]::-webkit-slider-thumb:hover {
123
- transform: scale(1.1);
124
- }
125
-
126
- input[type=range]::-webkit-slider-runnable-track {
127
- width: 100%;
128
- height: 4px;
129
- cursor: pointer;
130
- background: #e2e8f0;
131
- border-radius: 2px;
132
- }
133
-
134
- /* Firefox Slider */
135
- input[type=range]::-moz-range-thumb {
136
- height: 24px;
137
- width: 24px;
138
- border: none;
139
- border-radius: 50%;
140
- background: var(--primary-color);
141
- cursor: pointer;
142
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
143
- }
144
-
145
- input[type=range]::-moz-range-track {
146
- width: 100%;
147
- height: 4px;
148
- cursor: pointer;
149
- background: #e2e8f0;
150
- border-radius: 2px;
151
- }
152
-
153
- /* Feature List Styling */
154
- .feature-list {
155
- list-style: none;
156
- padding: 0;
157
- margin: 0;
158
- }
159
-
160
- .feature-list li {
161
- display: flex;
162
- align-items: flex-start;
163
- margin-bottom: 0.5rem;
164
- font-size: 0.9rem;
165
- line-height: 1.5;
166
- color: #475569;
167
- }
168
-
169
- .feature-list li::before {
170
- content: '✓';
171
- color: var(--primary-color);
172
- font-weight: 700;
173
- margin-right: 0.5rem;
174
- flex-shrink: 0;
175
- font-size: 1rem;
176
- }
177
-
178
- .feature-list li.highlight {
179
- font-weight: 600;
180
- color: #1e293b;
181
- }
182
-
183
- /* Animation for Total Price Update */
184
- .price-update-anim {
185
- animation: pulse-green 0.5s ease-in-out;
186
- }
187
-
188
- @keyframes pulse-green {
189
- 0% { color: inherit; }
190
- 50% { color: #16a34a; } /* Green 600 */
191
- 100% { color: inherit; }
192
- }
193
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  </head>
 
195
  <body class="antialiased selection:bg-blue-100 selection:text-blue-900">
196
-
197
- <!-- Navigation / Branding -->
198
- <nav class="bg-white/80 backdrop-blur-md border-b border-gray-200 sticky top-0 z-50">
199
- <div class="container mx-auto px-6 py-4 flex justify-between items-center">
200
- <div class="flex items-center space-x-2">
201
- <div class="w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center text-white font-bold text-lg">D</div>
202
- <span class="text-xl font-bold text-gray-900 tracking-tight">DigitalGrowth<span class="text-blue-600">Calc</span></span>
203
- </div>
204
- <div class="text-sm font-medium text-gray-500">
205
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="hover:text-blue-600 transition-colors">Built with anycoder</a>
206
- </div>
207
  </div>
208
- </nav>
209
-
210
- <header class="bg-gradient-to-b from-white to-blue-50/50 py-16 md:py-24 border-b border-gray-100">
211
- <div class="container mx-auto px-6 text-center max-w-4xl">
212
- <span class="inline-block py-1 px-3 rounded-full bg-blue-100 text-blue-700 text-xs font-bold tracking-wide uppercase mb-4">Preventivo 2024</span>
213
- <h1 class="text-4xl md:text-6xl font-extrabold text-gray-900 mb-6 leading-tight tracking-tight">
214
- Calcolatore di <span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-indigo-600">Investimento Digitale</span>
215
- </h1>
216
- <p class="text-lg md:text-xl text-gray-600 max-w-2xl mx-auto leading-relaxed">
217
- Configura il tuo piano di crescita su misura. Scegli il pacchetto, stima le performance e ottieni un preventivo istantaneo.
218
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  </div>
220
- </header>
221
-
222
- <main class="container mx-auto px-4 md:px-6 py-12 max-w-7xl">
223
-
224
- <!-- SECTION 1: PACKAGES -->
225
- <section class="mb-20">
226
- <div class="flex flex-col md:flex-row justify-between items-end mb-10 gap-4">
227
- <div>
228
- <h2 class="text-3xl font-bold text-gray-900">1. Scegli il tuo Pacchetto Base</h2>
229
- <p class="text-gray-500 mt-2">Seleziona il livello di servizio adatto alle tue esigenze.</p>
230
- </div>
231
- </div>
232
 
233
- <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
234
-
235
- <!-- STANDARD CARD -->
236
- <div class="price-card bg-white rounded-2xl p-8 cursor-pointer group" onclick="selectPackage('Standard', 2500)">
237
- <div class="check-icon">✓</div>
238
- <div class="mb-6">
239
- <h3 class="text-2xl font-bold text-gray-900">Standard</h3>
240
- <p class="text-gray-500 text-sm mt-1">Per chi inizia la crescita.</p>
241
- </div>
242
- <div class="flex items-baseline mb-8">
243
- <span class="text-4xl font-extrabold text-gray-900">€2.500</span>
244
- <span class="text-gray-500 ml-2 font-medium">una tantum</span>
245
- </div>
246
-
247
- <div class="space-y-4 mb-8">
248
- <div class="h-px bg-gray-100 w-full"></div>
249
- <ul class="feature-list space-y-3 max-h-[400px] overflow-y-auto pr-2 custom-scrollbar">
250
- <li class="highlight">Paid Search Competitor</li>
251
- <li class="highlight">Keyword Analysis & Planner</li>
252
- <li><strong>20-</strong> Editing (Copy/Headline)</li>
253
- <li><strong>4-</strong> Video per campagna</li>
254
- <li>Video Editor & Designer Dedicato</li>
255
- <li><strong>2-</strong> Ad Copy & Graphics</li>
256
- <li>Google Ads (Search & Video)</li>
257
- <li>Performance Max Campaign</li>
258
- <li>Configurazione Account & Analytics</li>
259
- <li>Targeting & Reporting</li>
260
- <li>Gestione Conversioni</li>
261
- <li>Creazione Contenuti Email</li>
262
- <li><strong>2-</strong> Landing Pages Sponsor</li>
263
- <li>Widget Integration (Survey & Form)</li>
264
- <li>Contest & Micro Influencer</li>
265
- <li class="mt-4 font-bold text-blue-800 text-sm uppercase tracking-wide">Performance Price Include:</li>
266
- <li>Demand Generation Campaign</li>
267
- <li>Sales & Customer Agent App</li>
268
- </ul>
269
- </div>
270
- </div>
 
 
 
 
 
 
 
 
 
271
 
272
- <!-- GOLD CARD -->
273
- <div class="price-card bg-white rounded-2xl p-8 cursor-pointer relative border-blue-600 ring-1 ring-blue-600 group" onclick="selectPackage('Gold', 3500)">
274
- <div class="absolute -top-4 left-1/2 -translate-x-1/2">
275
- <span class="bg-blue-600 text-white px-5 py-1.5 rounded-full text-sm font-bold tracking-wide shadow-lg shadow-blue-600/30">Consigliato</span>
276
- </div>
277
- <div class="check-icon"></div>
278
- <div class="mb-6">
279
- <h3 class="text-2xl font-bold text-gray-900">Gold</h3>
280
- <p class="text-gray-500 text-sm mt-1">Per accelerare le performance.</p>
281
- </div>
282
- <div class="flex items-baseline mb-8">
283
- <span class="text-4xl font-extrabold text-gray-900">€3.500</span>
284
- <span class="text-gray-500 ml-2 font-medium">una tantum</span>
285
- </div>
286
-
287
- <div class="space-y-4 mb-8">
288
- <div class="h-px bg-gray-100 w-full"></div>
289
- <ul class="feature-list space-y-3 max-h-[500px] overflow-y-auto pr-2 custom-scrollbar">
290
- <li class="font-bold text-blue-600">Tutto dello Standard, più:</li>
291
- <li><strong>30-</strong> Editing (Copy/Headline)</li>
292
- <li><strong>10-</strong> Video per campagna</li>
293
- <li><strong>3-</strong> Ad Copy & Graphics</li>
294
- <li>Google Shopping</li>
295
- <li>Integrazione Merchant Center</li>
296
- <li>Customer Match (con CRM)</li>
297
- <li>Email Marketing Aziendale</li>
298
- <li><strong>2-</strong> Multi Landing Pages & A/B Test</li>
299
- <li><strong>1-</strong> Store eCommerce Landing</li>
300
- <li>Plugin Loyalty & Referral</li>
301
- <li>Contest + Professional Influencer</li>
302
- <li>CSR: Web Disclosure & Impact</li>
303
- <li class="mt-4 font-bold text-blue-800 text-sm uppercase tracking-wide">Performance Price Include:</li>
304
- <li>ML Analytics Application</li>
305
- <li>Customer Advanced Data Analytics</li>
306
- <li>Market & Competitive Intelligence</li>
307
- <li class="font-semibold text-gray-800">Advanced Program (1 incluso):</li>
308
- <li>a. Referral Martech App</li>
309
- <li>b. Loyalty Program</li>
310
- <li>c. Social Coalition Loyalty</li>
311
- <li>d. Cause Related Marketing</li>
312
- <li>e. Affiliation Management</li>
313
- <li>f. Influencer Management</li>
314
- </ul>
315
- </div>
316
- </div>
 
 
 
 
317
 
318
- <!-- PLATINUM CARD -->
319
- <div class="price-card bg-white rounded-2xl p-8 cursor-pointer group" onclick="selectPackage('Platinum', 5000)">
320
- <div class="check-icon">✓</div>
321
- <div class="mb-6">
322
- <h3 class="text-2xl font-bold text-gray-900">Platinum</h3>
323
- <p class="text-gray-500 text-sm mt-1">Soluzione completa di dominio.</p>
324
- </div>
325
- <div class="flex items-baseline mb-8">
326
- <span class="text-4xl font-extrabold text-gray-900">€5.000</span>
327
- <span class="text-gray-500 ml-2 font-medium">una tantum</span>
328
- </div>
329
-
330
- <div class="space-y-4 mb-8">
331
- <div class="h-px bg-gray-100 w-full"></div>
332
- <ul class="feature-list space-y-3 max-h-[500px] overflow-y-auto pr-2 custom-scrollbar">
333
- <li class="font-bold text-blue-600">Tutto del Gold, più:</li>
334
- <li><strong>50-</strong> Editing (Copy/Headline)</li>
335
- <li><strong>20-</strong> Video per campagna</li>
336
- <li><strong>5-</strong> Ad Copy & Graphics</li>
337
- <li>Integrazione Piattaforme Multiple</li>
338
- <li>Campagne Asset Affiliati</li>
339
- <li>Tools Campagne Avanzate</li>
340
- <li>Co-Marketing Multichannel</li>
341
- <li><strong>2-</strong> Landing Pages Evento</li>
342
- <li><strong>5-</strong> Multi Landing Pages & A/B Test</li>
343
- <li><strong>2-</strong> Store eCommerce Landing</li>
344
- <li>CSR: Metodo Cultural Impact</li>
345
- <li>CSR: Media Relations</li>
346
- <li>Generative AI App (inclusa)</li>
347
- <li class="font-semibold text-gray-800">Advanced Program (2 inclusi):</li>
348
- <li>a. Referral Martech App</li>
349
- <li>b. Loyalty Program</li>
350
- <li>c. Social Coalition Loyalty</li>
351
- <li>d. Cause Related Marketing</li>
352
- <li>e. Affiliation Management</li>
353
- <li>f. Influencer Management</li>
354
- </ul>
355
- </div>
356
  </div>
 
 
 
357
  </div>
358
- </section>
359
-
360
- <!-- SECTION 2: PERFORMANCE CALCULATOR -->
361
- <section class="mb-20">
362
- <div class="bg-white border border-gray-200 rounded-2xl p-8 md:p-12 shadow-sm">
363
- <div class="text-center mb-10">
364
- <h2 class="text-3xl font-bold text-gray-900 mb-2">2. Aggiungi Servizi a Performance</h2>
365
- <p class="text-gray-600">Paga solo per i risultati. Definisci tu il valore dei tuoi clienti.</p>
366
- </div>
367
-
368
- <div class="grid md:grid-cols-2 gap-8 items-start">
369
- <!-- Inputs Grid -->
370
- <div class="grid md:grid-cols-2 gap-6">
371
- <div>
372
- <label for="clvInput" class="block text-sm font-semibold text-gray-700 mb-2 uppercase tracking-wide">Customer Lifetime Value (CLV)</label>
373
- <div class="relative">
374
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
375
- <span class="text-gray-500 sm:text-sm">€</span>
376
- </div>
377
- <input type="number" id="clvInput" placeholder="Es. 300" class="custom-input pl-7" oninput="calculateTotal()">
378
- </div>
379
- <p class="text-xs text-gray-400 mt-1">Valore medio di un cliente nel tempo</p>
380
- </div>
381
-
382
- <div>
383
- <label for="percentageInput" class="block text-sm font-semibold text-gray-700 mb-2 uppercase tracking-wide">Percentuale a Performance</label>
384
- <div class="relative">
385
- <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
386
- <span class="text-gray-500 sm:text-sm">%</span>
387
- </div>
388
- <input type="number" id="percentageInput" placeholder="Es. 25" class="custom-input pr-7" oninput="calculateTotal()">
389
- </div>
390
- <p class="text-xs text-gray-400 mt-1">La tua fee sul valore generato</p>
391
- </div>
392
- </div>
393
-
394
- <!-- Cost Per Client Display -->
395
- <div class="bg-gray-50 rounded-xl p-6 border border-gray-100 flex flex-col justify-center items-center h-full md:h-auto">
396
- <div class="text-sm font-medium text-gray-500 mb-1">Costo per Nuovo Cliente</div>
397
- <div class="text-4xl font-extrabold text-blue-600" id="costPerClient">€0.00</div>
398
- <div class="text-xs text-gray-400 mt-2">Calcolato come (CLV × %)</div>
399
- </div>
400
- </div>
401
 
402
- <div class="mt-10 pt-8 border-t border-gray-100">
403
- <div class="flex justify-between items-end mb-4">
404
- <label for="clientsInput" class="block text-sm font-semibold text-gray-700 uppercase tracking-wide">Nuovi Clienti Acquisiti (Simulazione)</label>
405
- <span id="clientsValue" class="text-2xl font-bold text-gray-900 bg-white px-3 py-1 rounded border border-gray-200 shadow-sm">0</span>
406
- </div>
407
- <input type="range" id="clientsInput" min="0" max="500" value="0" step="1" oninput="calculateTotal()">
408
- <div class="flex justify-between text-xs text-gray-400 mt-2 font-medium">
409
- <span>0</span>
410
- <span>100</span>
411
- <span>250</span>
412
- <span>500+</span>
413
- </div>
414
  </div>
 
 
 
415
  </div>
416
- </section>
417
-
418
- <!-- SECTION 3: SUMMARY -->
419
- <section class="mb-20">
420
- <div class="bg-slate-900 text-white rounded-3xl p-8 md:p-12 shadow-2xl overflow-hidden relative">
421
- <!-- Decorative background elements -->
422
- <div class="absolute top-0 right-0 w-64 h-64 bg-blue-600 rounded-full mix-blend-multiply filter blur-3xl opacity-20 -translate-y-1/2 translate-x-1/2"></div>
423
- <div class="absolute bottom-0 left-0 w-64 h-64 bg-indigo-600 rounded-full mix-blend-multiply filter blur-3xl opacity-20 translate-y-1/2 -translate-x-1/2"></div>
424
-
425
- <h3 class="text-2xl md:text-3xl font-bold mb-8 text-center relative z-10">Riepilogo del Tuo Investimento</h3>
426
-
427
- <div class="grid md:grid-cols-3 gap-8 text-center relative z-10 divide-y md:divide-y-0 md:divide-x divide-slate-700">
428
- <div class="p-4">
429
- <div class="text-slate-400 text-sm uppercase tracking-wider mb-2">Pacchetto Base</div>
430
- <div class="text-2xl font-bold text-white" id="selectedPackageDisplay">Nessuno</div>
431
- </div>
432
- <div class="p-4">
433
- <div class="text-slate-400 text-sm uppercase tracking-wider mb-2">Costo a Performance</div>
434
- <div class="text-2xl font-bold text-blue-400" id="performanceTotal">€0</div>
435
- </div>
436
- <div class="p-4 md:pl-8">
437
- <div class="text-slate-400 text-sm uppercase tracking-wider mb-2">Investimento Totale Stimato</div>
438
- <div class="text-4xl md:text-5xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-emerald-400" id="totalCost">€0</div>
439
- </div>
440
- </div>
441
 
442
- <div class="text-center mt-12 relative z-10">
443
- <button class="group relative inline-flex items-center justify-center px-8 py-4 text-base font-bold text-white transition-all duration-200 bg-blue-600 rounded-full hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-600 focus:ring-offset-slate-900" onclick="generateQuote()">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  <span class="mr-2">📋</span>
445
  Copia Preventivo Personalizzato
446
  <div class="absolute inset-0 rounded-full ring-2 ring-white/20 group-hover:ring-white/40 transition-all duration-200"></div>
447
  </button>
448
- <p class="text-slate-500 text-sm mt-4">Il preventivo verrà copiato negli appunti per essere incollato su WhatsApp o Email.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
449
  </div>
 
 
 
 
 
450
  </div>
451
- </section>
452
- </main>
453
-
454
- <footer class="bg-white border-t border-gray-200 py-8">
455
- <div class="container mx-auto px-6 text-center text-gray-500 text-sm">
456
- <p>&copy; 2024 Digital Growth Calculator. All rights reserved.</p>
457
- <div class="mt-2">
458
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="text-blue-600 hover:underline">Built with anycoder</a>
459
  </div>
 
460
  </div>
461
- </footer>
462
 
463
- <script>
464
- let selectedPackageName = null;
465
- let packageCost = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
 
467
- // Format Currency Helper
468
- const formatMoney = (amount) => {
469
- return new Intl.NumberFormat('it-IT', { style: 'currency', currency: 'EUR', maximumFractionDigits: 0 }).format(amount);
470
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
 
472
- const formatMoneyDetailed = (amount) => {
473
- return new Intl.NumberFormat('it-IT', { style: 'currency', currency: 'EUR', minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(amount);
474
- };
475
-
476
- function selectPackage(name, cost) {
477
- // Remove selected class from all cards
478
- document.querySelectorAll('.price-card').forEach(card => card.classList.remove('selected'));
479
-
480
- // Add selected class to clicked card
481
- event.currentTarget.classList.add('selected');
482
-
483
- // Update State
484
- selectedPackageName = name;
485
- packageCost = cost;
486
-
487
- // Update UI
488
- document.getElementById('selectedPackageDisplay').textContent = `${name} (${formatMoney(cost)})`;
489
-
490
- // Trigger animation on total cost
491
- const totalEl = document.getElementById('totalCost');
492
- totalEl.classList.remove('price-update-anim');
493
- void totalEl.offsetWidth; // trigger reflow
494
- totalEl.classList.add('price-update-anim');
495
-
496
- calculateTotal();
497
- }
498
-
499
- function calculateTotal() {
500
- // Read inputs
501
- const clv = parseFloat(document.getElementById('clvInput').value) || 0;
502
- const percentage = parseFloat(document.getElementById('percentageInput').value) || 0;
503
- const clients = parseInt(document.getElementById('clientsInput').value, 10);
504
-
505
- // Update slider display
506
- document.getElementById('clientsValue').textContent = clients;
507
-
508
- // Calculate Cost Per Client
509
- const costPerClient = clv * (percentage / 100);
510
- document.getElementById('costPerClient').textContent = formatMoneyDetailed(costPerClient);
511
-
512
- // Calculate Total Performance Cost
513
- const performanceCost = clients * costPerClient;
514
- document.getElementById('performanceTotal').textContent = formatMoney(performanceCost);
515
-
516
- // Calculate Grand Total
517
- const total = packageCost + performanceCost;
518
- document.getElementById('totalCost').textContent = formatMoney(total);
519
- }
520
-
521
- function generateQuote() {
522
- if (!selectedPackageName) {
523
- alert('Per favore, seleziona prima un pacchetto base.');
524
- // Scroll to top section
525
- document.querySelector('.grid.md\\:grid-cols-3').scrollIntoView({ behavior: 'smooth' });
526
- return;
527
- }
528
-
529
- const clv = document.getElementById('clvInput').value || 'N/D';
530
- const percentage = document.getElementById('percentageInput').value || 'N/D';
531
- const clients = document.getElementById('clientsInput').value;
532
-
533
- const costPerClient = (parseFloat(clv) || 0) * ((parseFloat(percentage) || 0) / 100);
534
- const performanceCost = costPerClient * parseInt(clients, 10);
535
- const total = packageCost + performanceCost;
536
-
537
- // Construct Quote String
538
- let quote = `--- PREVENTIVO SERVIZI DIGITALI ---\n\n`;
539
- quote += `PACCHETTO BASE SELEZIONATO: ${selectedPackageName.toUpperCase()}\n`;
540
- quote += `• Costo Una Tantum: ${formatMoney(packageCost)}\n\n`;
541
-
542
- if (performanceCost > 0) {
543
- quote += `SIMULAZIONE SERVIZI A PERFORMANCE\n`;
544
- quote += `• CLV Stimato: €${clv}\n`;
545
- quote += `• Fee a Performance: ${percentage}%\n`;
546
- quote += `• Costo per Nuovo Cliente: ${formatMoneyDetailed(costPerClient)}\n`;
547
- quote += `• Nuovi Clienti Acquisiti: ${clients}\n`;
548
- quote += `• Costo Totale Performance: ${formatMoney(performanceCost)}\n\n`;
549
- } else {
550
- quote += `NESSUN COSTO A PERFORMANCE CALCOLATO\n\n`;
551
- }
552
-
553
- quote += `--- RIEPILOGO INVESTIMENTO ---\n`;
554
- quote += `TOTALE PREVISTO: ${formatMoney(total)}\n\n`;
555
- quote += `Preventivo generato il ${new Date().toLocaleDateString('it-IT', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })}.\n`;
556
- quote += `Calcolato tramite DigitalGrowthCalc.`;
557
-
558
- // Copy to clipboard
559
- navigator.clipboard.writeText(quote).then(() => {
560
- const btn = document.querySelector('button[onclick="generateQuote()"]');
561
- const originalText = btn.innerHTML;
562
- btn.innerHTML = '<span class="mr-2">✅</span> Copiato!';
563
- btn.classList.add('bg-green-600', 'hover:bg-green-700');
564
- btn.classList.remove('bg-blue-600', 'hover:bg-blue-700');
565
-
566
- setTimeout(() => {
567
- btn.innerHTML = originalText;
568
- btn.classList.remove('bg-green-600', 'hover:bg-green-700');
569
- btn.classList.add('bg-blue-600', 'hover:bg-blue-700');
570
- }, 2000);
571
- }, (err) => {
572
- console.error('Errore copia: ', err);
573
- alert('Errore nella copia del preventivo. Riprova.');
574
- });
575
- }
576
-
577
- // Initialize on load
578
- document.addEventListener('DOMContentLoaded', () => {
579
- calculateTotal();
580
- });
581
- </script>
582
- </body>
583
- </html>
 
1
  <!DOCTYPE html>
2
  <html lang="it">
3
+
4
  <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Calcolatore Prezzi Avanzato - Servizi Digitali</title>
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap"
12
+ rel="stylesheet">
13
+ <style>
14
+ :root {
15
+ --primary-color: #2563eb;
16
+ --primary-hover: #1d4ed8;
17
+ --bg-color: #f8fafc;
18
+ --text-color: #0f172a;
19
+ }
20
+
21
+ body {
22
+ font-family: 'Inter', sans-serif;
23
+ background-color: var(--bg-color);
24
+ color: var(--text-color);
25
+ scroll-behavior: smooth;
26
+ }
27
+
28
+ ::-webkit-scrollbar {
29
+ width: 8px;
30
+ }
31
+
32
+ ::-webkit-scrollbar-track {
33
+ background: #f1f1f1;
34
+ }
35
+
36
+ ::-webkit-scrollbar-thumb {
37
+ background: #cbd5e1;
38
+ border-radius: 4px;
39
+ }
40
+
41
+ ::-webkit-scrollbar-thumb:hover {
42
+ background: #94a3b8;
43
+ }
44
+
45
+ .price-card {
46
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
47
+ border: 1px solid #e2e8f0;
48
+ position: relative;
49
+ overflow: hidden;
50
+ }
51
+
52
+ .price-card:hover {
53
+ transform: translateY(-5px);
54
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
55
+ border-color: #cbd5e1;
56
+ }
57
+
58
+ .price-card.selected {
59
+ border-color: var(--primary-color);
60
+ box-shadow: 0 0 0 2px var(--primary-color);
61
+ background-color: #eff6ff;
62
+ transform: scale(1.02);
63
+ z-index: 10;
64
+ }
65
+
66
+ .check-icon {
67
+ opacity: 0;
68
+ transform: scale(0.5);
69
+ transition: all 0.3s ease;
70
+ position: absolute;
71
+ top: 1rem;
72
+ right: 1rem;
73
+ background-color: var(--primary-color);
74
+ color: white;
75
+ border-radius: 50%;
76
+ width: 24px;
77
+ height: 24px;
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ font-size: 14px;
82
+ }
83
+
84
+ .price-card.selected .check-icon {
85
+ opacity: 1;
86
+ transform: scale(1);
87
+ }
88
+
89
+ .custom-input {
90
+ background-color: #fff;
91
+ border: 1px solid #cbd5e1;
92
+ border-radius: 0.5rem;
93
+ padding: 0.5rem 1rem;
94
+ transition: all 0.2s;
95
+ width: 100%;
96
+ }
97
+
98
+ .custom-input:focus {
99
+ outline: none;
100
+ border-color: var(--primary-color);
101
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
102
+ }
103
+
104
+ input[type=range] {
105
+ -webkit-appearance: none;
106
+ width: 100%;
107
+ background: transparent;
108
+ }
109
+
110
+ input[type=range]::-webkit-slider-thumb {
111
+ -webkit-appearance: none;
112
+ height: 24px;
113
+ width: 24px;
114
+ border-radius: 50%;
115
+ background: var(--primary-color);
116
+ cursor: pointer;
117
+ margin-top: -10px;
118
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
119
+ transition: transform 0.1s;
120
+ }
121
+
122
+ input[type=range]::-webkit-slider-thumb:hover {
123
+ transform: scale(1.1);
124
+ }
125
+
126
+ input[type=range]::-webkit-slider-runnable-track {
127
+ width: 100%;
128
+ height: 4px;
129
+ cursor: pointer;
130
+ background: #e2e8f0;
131
+ border-radius: 2px;
132
+ }
133
+
134
+ input[type=range]::-moz-range-thumb {
135
+ height: 24px;
136
+ width: 24px;
137
+ border: none;
138
+ border-radius: 50%;
139
+ background: var(--primary-color);
140
+ cursor: pointer;
141
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
142
+ }
143
+
144
+ input[type=range]::-moz-range-track {
145
+ width: 100%;
146
+ height: 4px;
147
+ cursor: pointer;
148
+ background: #e2e8f0;
149
+ border-radius: 2px;
150
+ }
151
+
152
+ .feature-list {
153
+ list-style: none;
154
+ padding: 0;
155
+ margin: 0;
156
+ }
157
+
158
+ .feature-list li {
159
+ display: flex;
160
+ align-items: flex-start;
161
+ margin-bottom: 0.5rem;
162
+ font-size: 0.9rem;
163
+ line-height: 1.5;
164
+ color: #475569;
165
+ }
166
+
167
+ .feature-list li::before {
168
+ content: '✓';
169
+ color: var(--primary-color);
170
+ font-weight: 700;
171
+ margin-right: 0.5rem;
172
+ flex-shrink: 0;
173
+ font-size: 1rem;
174
+ }
175
+
176
+ .feature-list li.highlight {
177
+ font-weight: 600;
178
+ color: #1e293b;
179
+ }
180
+
181
+ .price-update-anim {
182
+ animation: pulse-green 0.5s ease-in-out;
183
+ }
184
+
185
+ @keyframes pulse-green {
186
+ 0% { color: inherit; }
187
+ 50% { color: #16a34a; }
188
+ 100% { color: inherit; }
189
+ }
190
+
191
+ /* Simulator Styles */
192
+ .simulator-card {
193
+ background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
194
+ border-radius: 1.5rem;
195
+ overflow: hidden;
196
+ position: relative;
197
+ }
198
+
199
+ .simulator-card::before {
200
+ content: '';
201
+ position: absolute;
202
+ top: 0;
203
+ left: 0;
204
+ right: 0;
205
+ height: 4px;
206
+ background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
207
+ }
208
+
209
+ .stat-card {
210
+ background: rgba(255, 255, 255, 0.05);
211
+ border: 1px solid rgba(255, 255, 255, 0.1);
212
+ border-radius: 1rem;
213
+ backdrop-filter: blur(10px);
214
+ transition: all 0.3s ease;
215
+ }
216
+
217
+ .stat-card:hover {
218
+ background: rgba(255, 255, 255, 0.08);
219
+ transform: translateY(-2px);
220
+ }
221
+
222
+ .progress-ring {
223
+ transform: rotate(-90deg);
224
+ }
225
+
226
+ .progress-ring-circle {
227
+ transition: stroke-dashoffset 0.5s ease;
228
+ }
229
+
230
+ .timeline-bar {
231
+ height: 8px;
232
+ border-radius: 4px;
233
+ background: #e2e8f0;
234
+ overflow: hidden;
235
+ }
236
+
237
+ .timeline-progress {
238
+ height: 100%;
239
+ border-radius: 4px;
240
+ background: linear-gradient(90deg, #3b82f6, #8b5cf6);
241
+ transition: width 0.5s ease;
242
+ }
243
+
244
+ .growth-indicator {
245
+ animation: float 3s ease-in-out infinite;
246
+ }
247
+
248
+ @keyframes float {
249
+ 0%, 100% { transform: translateY(0); }
250
+ 50% { transform: translateY(-10px); }
251
+ }
252
+
253
+ .pulse-dot {
254
+ animation: pulse 2s infinite;
255
+ }
256
+
257
+ @keyframes pulse {
258
+ 0%, 100% { transform: scale(1); opacity: 1; }
259
+ 50% { transform: scale(1.5); opacity: 0.5; }
260
+ }
261
+
262
+ .chart-bar {
263
+ transition: height 0.5s ease;
264
+ }
265
+
266
+ .fade-in {
267
+ animation: fadeIn 0.5s ease forwards;
268
+ }
269
+
270
+ @keyframes fadeIn {
271
+ from { opacity: 0; transform: translateY(20px); }
272
+ to { opacity: 1; transform: translateY(0); }
273
+ }
274
+
275
+ .stagger-1 { animation-delay: 0.1s; }
276
+ .stagger-2 { animation-delay: 0.2s; }
277
+ .stagger-3 { animation-delay: 0.3s; }
278
+ .stagger-4 { animation-delay: 0.4s; }
279
+ </style>
280
  </head>
281
+
282
  <body class="antialiased selection:bg-blue-100 selection:text-blue-900">
283
+
284
+ <!-- Navigation / Branding -->
285
+ <nav class="bg-white/80 backdrop-blur-md border-b border-gray-200 sticky top-0 z-50">
286
+ <div class="container mx-auto px-6 py-4 flex justify-between items-center">
287
+ <div class="flex items-center space-x-2">
288
+ <div class="w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center text-white font-bold text-lg">D
 
 
 
 
 
289
  </div>
290
+ <span class="text-xl font-bold text-gray-900 tracking-tight">DigitalGrowth<span class="text-blue-600">Calc</span></span>
291
+ </div>
292
+ <div class="text-sm font-medium text-gray-500">
293
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank"
294
+ class="hover:text-blue-600 transition-colors">Built with anycoder</a>
295
+ </div>
296
+ </div>
297
+ </nav>
298
+
299
+ <header class="bg-gradient-to-b from-white to-blue-50/50 py-16 md:py-24 border-b border-gray-100">
300
+ <div class="container mx-auto px-6 text-center max-w-4xl">
301
+ <span class="inline-block py-1 px-3 rounded-full bg-blue-100 text-blue-700 text-xs font-bold tracking-wide uppercase mb-4">Preventivo 2024</span>
302
+ <h1 class="text-4xl md:text-6xl font-extrabold text-gray-900 mb-6 leading-tight tracking-tight">
303
+ Calcolatore di
304
+ <span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-indigo-600">Investimento Digitale</span>
305
+ </h1>
306
+ <p class="text-lg md:text-xl text-gray-600 max-w-2xl mx-auto leading-relaxed">
307
+ Configura il tuo piano di crescita su misura. Scegli il pacchetto, stima le performance e ottieni un preventivo
308
+ istantaneo.
309
+ </p>
310
+ </div>
311
+ </header>
312
+
313
+ <main class="container mx-auto px-4 md:px-6 py-12 max-w-7xl">
314
+
315
+ <!-- SECTION 1: PACKAGES -->
316
+ <section class="mb-20">
317
+ <div class="flex flex-col md:flex-row justify-between items-end mb-10 gap-4">
318
+ <div>
319
+ <h2 class="text-3xl font-bold text-gray-900">1. Scegli il tuo Pacchetto Base</h2>
320
+ <p class="text-gray-500 mt-2">Seleziona il livello di servizio adatto alle tue esigenze.</p>
321
+ </div>
322
+ </div>
323
+
324
+ <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
325
+
326
+ <!-- STANDARD CARD -->
327
+ <div class="price-card bg-white rounded-2xl p-8 cursor-pointer group" onclick="selectPackage('Standard', 2500)">
328
+ <div class="check-icon">✓</div>
329
+ <div class="mb-6">
330
+ <h3 class="text-2xl font-bold text-gray-900">Standard</h3>
331
+ <p class="text-gray-500 text-sm mt-1">Per chi inizia la crescita.</p>
332
+ </div>
333
+ <div class="flex items-baseline mb-8">
334
+ <span class="text-4xl font-extrabold text-gray-900">€2.500</span>
335
+ <span class="text-gray-500 ml-2 font-medium">una tantum</span>
336
+ </div>
337
+
338
+ <div class="space-y-4 mb-8">
339
+ <div class="h-px bg-gray-100 w-full"></div>
340
+ <ul class="feature-list space-y-3 max-h-[400px] overflow-y-auto pr-2 custom-scrollbar">
341
+ <li class="highlight">Paid Search Competitor</li>
342
+ <li class="highlight">Keyword Analysis & Planner</li>
343
+ <li><strong>20-</strong> Editing (Copy/Headline)</li>
344
+ <li><strong>4-</strong> Video per campagna</li>
345
+ <li>Video Editor & Designer Dedicato</li>
346
+ <li><strong>2-</strong> Ad Copy & Graphics</li>
347
+ <li>Google Ads (Search & Video)</li>
348
+ <li>Performance Max Campaign</li>
349
+ <li>Configurazione Account & Analytics</li>
350
+ <li>Targeting & Reporting</li>
351
+ <li>Gestione Conversioni</li>
352
+ <li>Creazione Contenuti Email</li>
353
+ <li><strong>2-</strong> Landing Pages Sponsor</li>
354
+ <li>Widget Integration (Survey & Form)</li>
355
+ <li>Contest & Micro Influencer</li>
356
+ <li class="mt-4 font-bold text-blue-800 text-sm uppercase tracking-wide">Performance Price Include:</li>
357
+ <li>Demand Generation Campaign</li>
358
+ <li>Sales & Customer Agent App</li>
359
+ </ul>
360
+ </div>
361
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
362
 
363
+ <!-- GOLD CARD -->
364
+ <div
365
+ class="price-card bg-white rounded-2xl p-8 cursor-pointer relative border-blue-600 ring-1 ring-blue-600 group"
366
+ onclick="selectPackage('Gold', 3500)">
367
+ <div class="absolute -top-4 left-1/2 -translate-x-1/2">
368
+ <span class="bg-blue-600 text-white px-5 py-1.5 rounded-full text-sm font-bold tracking-wide shadow-lg shadow-blue-600/30">Consigliato</span>
369
+ </div>
370
+ <div class="check-icon"></div>
371
+ <div class="mb-6">
372
+ <h3 class="text-2xl font-bold text-gray-900">Gold</h3>
373
+ <p class="text-gray-500 text-sm mt-1">Per accelerare le performance.</p>
374
+ </div>
375
+ <div class="flex items-baseline mb-8">
376
+ <span class="text-4xl font-extrabold text-gray-900">€3.500</span>
377
+ <span class="text-gray-500 ml-2 font-medium">una tantum</span>
378
+ </div>
379
+
380
+ <div class="space-y-4 mb-8">
381
+ <div class="h-px bg-gray-100 w-full"></div>
382
+ <ul class="feature-list space-y-3 max-h-[500px] overflow-y-auto pr-2 custom-scrollbar">
383
+ <li class="font-bold text-blue-600">Tutto dello Standard, più:</li>
384
+ <li><strong>30-</strong> Editing (Copy/Headline)</li>
385
+ <li><strong>10-</strong> Video per campagna</li>
386
+ <li><strong>3-</strong> Ad Copy & Graphics</li>
387
+ <li>Google Shopping</li>
388
+ <li>Integrazione Merchant Center</li>
389
+ <li>Customer Match (con CRM)</li>
390
+ <li>Email Marketing Aziendale</li>
391
+ <li><strong>2-</strong> Multi Landing Pages & A/B Test</li>
392
+ <li><strong>1-</strong> Store eCommerce Landing</li>
393
+ <li>Plugin Loyalty & Referral</li>
394
+ <li>Contest + Professional Influencer</li>
395
+ <li>CSR: Web Disclosure & Impact</li>
396
+ <li class="mt-4 font-bold text-blue-800 text-sm uppercase tracking-wide">Performance Price Include:</li>
397
+ <li>ML Analytics Application</li>
398
+ <li>Customer Advanced Data Analytics</li>
399
+ <li>Market & Competitive Intelligence</li>
400
+ <li class="font-semibold text-gray-800">Advanced Program (1 incluso):</li>
401
+ <li>a. Referral Martech App</li>
402
+ <li>b. Loyalty Program</li>
403
+ <li>c. Social Coalition Loyalty</li>
404
+ <li>d. Cause Related Marketing</li>
405
+ <li>e. Affiliation Management</li>
406
+ <li>f. Influencer Management</li>
407
+ </ul>
408
+ </div>
409
+ </div>
410
 
411
+ <!-- PLATINUM CARD -->
412
+ <div class="price-card bg-white rounded-2xl p-8 cursor-pointer group" onclick="selectPackage('Platinum', 5000)">
413
+ <div class="check-icon">✓</div>
414
+ <div class="mb-6">
415
+ <h3 class="text-2xl font-bold text-gray-900">Platinum</h3>
416
+ <p class="text-gray-500 text-sm mt-1">Soluzione completa di dominio.</p>
417
+ </div>
418
+ <div class="flex items-baseline mb-8">
419
+ <span class="text-4xl font-extrabold text-gray-900">€5.000</span>
420
+ <span class="text-gray-500 ml-2 font-medium">una tantum</span>
421
+ </div>
422
+
423
+ <div class="space-y-4 mb-8">
424
+ <div class="h-px bg-gray-100 w-full"></div>
425
+ <ul class="feature-list space-y-3 max-h-[500px] overflow-y-auto pr-2 custom-scrollbar">
426
+ <li class="font-bold text-blue-600">Tutto del Gold, più:</li>
427
+ <li><strong>50-</strong> Editing (Copy/Headline)</li>
428
+ <li><strong>20-</strong> Video per campagna</li>
429
+ <li><strong>5-</strong> Ad Copy & Graphics</li>
430
+ <li>Integrazione Piattaforme Multiple</li>
431
+ <li>Campagne Asset Affiliati</li>
432
+ <li>Tools Campagne Avanzate</li>
433
+ <li>Co-Marketing Multichannel</li>
434
+ <li><strong>2-</strong> Landing Pages Evento</li>
435
+ <li><strong>5-</strong> Multi Landing Pages & A/B Test</li>
436
+ <li><strong>2-</strong> Store eCommerce Landing</li>
437
+ <li>CSR: Metodo Cultural Impact</li>
438
+ <li>CSR: Media Relations</li>
439
+ <li>Generative AI App (inclusa)</li>
440
+ <li class="font-semibold text-gray-800">Advanced Program (2 inclusi):</li>
441
+ <li>a. Referral Martech App</li>
442
+ <li>b. Loyalty Program</li>
443
+ <li>c. Social Coalition Loyalty</li>
444
+ <li>d. Cause Related Marketing</li>
445
+ <li>e. Affiliation Management</li>
446
+ <li>f. Influencer Management</li>
447
+ </ul>
448
+ </div>
449
+ </div>
450
+ </div>
451
+ </section>
452
+
453
+ <!-- SECTION 2: PERFORMANCE CALCULATOR -->
454
+ <section class="mb-20">
455
+ <div class="bg-white border border-gray-200 rounded-2xl p-8 md:p-12 shadow-sm">
456
+ <div class="text-center mb-10">
457
+ <h2 class="text-3xl font-bold text-gray-900 mb-2">2. Aggiungi Servizi a Performance</h2>
458
+ <p class="text-gray-600">Paga solo per i risultati. Definisci tu il valore dei tuoi clienti.</p>
459
+ </div>
460
 
461
+ <div class="grid md:grid-cols-2 gap-8 items-start">
462
+ <!-- Inputs Grid -->
463
+ <div class="grid md:grid-cols-2 gap-6">
464
+ <div>
465
+ <label for="clvInput" class="block text-sm font-semibold text-gray-700 mb-2 uppercase tracking-wide">Customer Lifetime Value (CLV)</label>
466
+ <div class="relative">
467
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
468
+ <span class="text-gray-500 sm:text-sm">€</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
  </div>
470
+ <input type="number" id="clvInput" placeholder="Es. 300" class="custom-input pl-7" oninput="calculateTotal()">
471
+ </div>
472
+ <p class="text-xs text-gray-400 mt-1">Valore medio di un cliente nel tempo</p>
473
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474
 
475
+ <div>
476
+ <label for="percentageInput" class="block text-sm font-semibold text-gray-700 mb-2 uppercase tracking-wide">Percentuale a Performance</label>
477
+ <div class="relative">
478
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
479
+ <span class="text-gray-500 sm:text-sm">%</span>
 
 
 
 
 
 
 
480
  </div>
481
+ <input type="number" id="percentageInput" placeholder="Es. 25" class="custom-input pr-7" oninput="calculateTotal()">
482
+ </div>
483
+ <p class="text-xs text-gray-400 mt-1">La tua fee sul valore generato</p>
484
  </div>
485
+ </div>
486
+
487
+ <!-- Cost Per Client Display -->
488
+ <div
489
+ class="bg-gray-50 rounded-xl p-6 border border-gray-100 flex flex-col justify-center items-center h-full md:h-auto">
490
+ <div class="text-sm font-medium text-gray-500 mb-1">Costo per Nuovo Cliente</div>
491
+ <div class="text-4xl font-extrabold text-blue-600" id="costPerClient">€0.00</div>
492
+ <div class="text-xs text-gray-400 mt-2">Calcolato come (CLV × %)</div>
493
+ </div>
494
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
 
496
+ <div class="mt-10 pt-8 border-t border-gray-100">
497
+ <div class="flex justify-between items-end mb-4">
498
+ <label for="clientsInput" class="block text-sm font-semibold text-gray-700 uppercase tracking-wide">Nuovi Clienti Acquisiti (Simulazione)</label>
499
+ <span id="clientsValue" class="text-2xl font-bold text-gray-900 bg-white px-3 py-1 rounded border border-gray-200 shadow-sm">0</span>
500
+ </div>
501
+ <input type="range" id="clientsInput" min="0" max="500" value="0" step="1" oninput="calculateTotal()">
502
+ <div class="flex justify-between text-xs text-gray-400 mt-2 font-medium">
503
+ <span>0</span>
504
+ <span>100</span>
505
+ <span>250</span>
506
+ <span>500+</span>
507
+ </div>
508
+ </div>
509
+ </div>
510
+ </section>
511
+
512
+ <!-- SECTION 3: SUMMARY -->
513
+ <section class="mb-20">
514
+ <div class="bg-slate-900 text-white rounded-3xl p-8 md:p-12 shadow-2xl overflow-hidden relative">
515
+ <!-- Decorative background elements -->
516
+ <div
517
+ class="absolute top-0 right-0 w-64 h-64 bg-blue-600 rounded-full mix-blend-multiply filter blur-3xl opacity-20 -translate-y-1/2 translate-x-1/2">
518
+ </div>
519
+ <div
520
+ class="absolute bottom-0 left-0 w-64 h-64 bg-indigo-600 rounded-full mix-blend-multiply filter blur-3xl opacity-20 translate-y-1/2 -translate-x-1/2">
521
+ </div>
522
+
523
+ <h3 class="text-2xl md:text-3xl font-bold mb-8 text-center relative z-10">Riepilogo del Tuo Investimento</h3>
524
+
525
+ <div
526
+ class="grid md:grid-cols-3 gap-8 text-center relative z-10 divide-y md:divide-y-0 md:divide-x divide-slate-700">
527
+ <div class="p-4">
528
+ <div class="text-slate-400 text-sm uppercase tracking-wider mb-2">Pacchetto Base</div>
529
+ <div class="text-2xl font-bold text-white" id="selectedPackageDisplay">Nessuno</div>
530
+ </div>
531
+ <div class="p-4">
532
+ <div class="text-slate-400 text-sm uppercase tracking-wider mb-2">Costo a Performance</div>
533
+ <div class="text-2xl font-bold text-blue-400" id="performanceTotal">€0</div>
534
+ </div>
535
+ <div class="p-4 md:pl-8">
536
+ <div class="text-slate-400 text-sm uppercase tracking-wider mb-2">Investimento Totale Stimato</div>
537
+ <div
538
+ class="text-4xl md:text-5xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-emerald-400"
539
+ id="totalCost">€0</div>
540
+ </div>
541
+ </div>
542
+
543
+ <div class="text-center mt-12 relative z-10">
544
+ <button class="group relative inline-flex items-center justify-center px-8 py-4 text-base font-bold text-white transition-all duration-200 bg-blue-600 rounded-full hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-600 focus:ring-offset-slate-900" onclick="generateQuote()">
545
  <span class="mr-2">📋</span>
546
  Copia Preventivo Personalizzato
547
  <div class="absolute inset-0 rounded-full ring-2 ring-white/20 group-hover:ring-white/40 transition-all duration-200"></div>
548
  </button>
549
+ <p class="text-slate-500 text-sm mt-4">Il preventivo verrà copiato negli appunti per essere incollato su
550
+ WhatsApp o Email.</p>
551
+ </div>
552
+ </div>
553
+ </section>
554
+
555
+ <!-- SECTION 4: ROI SIMULATOR -->
556
+ <section class="mb-20">
557
+ <div class="simulator-card p-8 md:p-12">
558
+ <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8 gap-4">
559
+ <div>
560
+ <div class="flex items-center gap-3 mb-2">
561
+ <span class="p-2 bg-white/10 rounded-lg">
562
+ <svg class="w-6 h-6 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
563
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"></path>
564
+ </svg>
565
+ </span>
566
+ <h2 class="text-3xl font-bold text-white">3. Simulatore ROI & Crescita</h2>
567
+ </div>
568
+ <p class="text-slate-400">Proiezione dei ritorni sull'investimento e timeline di crescita</p>
569
+ </div>
570
+ <div class="flex items-center gap-2 bg-white/10 px-4 py-2 rounded-full">
571
+ <span class="pulse-dot w-2 h-2 bg-green-400 rounded-full"></span>
572
+ <span class="text-sm text-slate-300">Simulazione in tempo reale</span>
573
+ </div>
574
+ </div>
575
+
576
+ <!-- Simulator Inputs -->
577
+ <div class="grid md:grid-cols-3 gap-6 mb-10">
578
+ <div class="stat-card p-5">
579
+ <label class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-3">Durata Campagna (Mesi)</label>
580
+ <input type="range" id="campaignMonths" min="3" max="24" value="6" class="w-full mb-2" oninput="calculateROI()">
581
+ <div class="flex justify-between items-center">
582
+ <span class="text-2xl font-bold text-white" id="monthsValue">6</span>
583
+ <span class="text-sm text-slate-400">mesi</span>
584
+ </div>
585
+ </div>
586
+
587
+ <div class="stat-card p-5">
588
+ <label class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-3">Tasso Conversione (%)</label>
589
+ <input type="range" id="conversionRate" min="1" max="15" value="3" step="0.5" class="w-full mb-2" oninput="calculateROI()">
590
+ <div class="flex justify-between items-center">
591
+ <span class="text-2xl font-bold text-white" id="conversionValue">3</span>
592
+ <span class="text-sm text-slate-400">%</span>
593
+ </div>
594
+ </div>
595
+
596
+ <div class="stat-card p-5">
597
+ <label class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-3">Valore Medio Ordine (€)</label>
598
+ <input type="number" id="avgOrderValue" placeholder="Es. 150" value="150" class="custom-input bg-white/5 border-white/10 text-white placeholder-slate-500" oninput="calculateROI()">
599
+ </div>
600
+ </div>
601
+
602
+ <!-- ROI Results Grid -->
603
+ <div class="grid md:grid-cols-4 gap-4 mb-10">
604
+ <div class="stat-card p-6 text-center fade-in stagger-1">
605
+ <div class="text-slate-400 text-xs uppercase tracking-wider mb-2">Ritorno Investimento</div>
606
+ <div class="text-3xl font-bold text-emerald-400" id="roiPercent">0%</div>
607
+ <div class="text-xs text-slate-500 mt-1">ROI totale</div>
608
+ </div>
609
+
610
+ <div class="stat-card p-6 text-center fade-in stagger-2">
611
+ <div class="text-slate-400 text-xs uppercase tracking-wider mb-2">Ricavi Stimati</div>
612
+ <div class="text-3xl font-bold text-blue-400" id="projectedRevenue">€0</div>
613
+ <div class="text-xs text-slate-500 mt-1">12 mesi</div>
614
+ </div>
615
+
616
+ <div class="stat-card p-6 text-center fade-in stagger-3">
617
+ <div class="text-slate-400 text-xs uppercase tracking-wider mb-2">Break-even</div>
618
+ <div class="text-3xl font-bold text-purple-400" id="breakEven">0</div>
619
+ <div class="text-xs text-slate-500 mt-1">nuovi clienti</div>
620
+ </div>
621
+
622
+ <div class="stat-card p-6 text-center fade-in stagger-4">
623
+ <div class="text-slate-400 text-xs uppercase tracking-wider mb-2">Cliente Netto</div>
624
+ <div class="text-3xl font-bold text-amber-400" id="netPerClient">€0</div>
625
+ <div class="text-xs text-slate-500 mt-1">dopo costi</div>
626
+ </div>
627
+ </div>
628
+
629
+ <!-- Visual Timeline & Charts -->
630
+ <div class="grid md:grid-cols-2 gap-8">
631
+ <!-- Growth Timeline -->
632
+ <div class="stat-card p-6">
633
+ <h4 class="text-white font-semibold mb-6 flex items-center gap-2">
634
+ <svg class="w-5 h-5 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
635
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
636
+ </svg>
637
+ Timeline Crescita Mensile
638
+ </h4>
639
+ <div class="space-y-3" id="timelineBars">
640
+ <!-- Bars will be generated by JS -->
641
+ </div>
642
+ </div>
643
+
644
+ <!-- Funnel Visualization -->
645
+ <div class="stat-card p-6">
646
+ <h4 class="text-white font-semibold mb-6 flex items-center gap-2">
647
+ <svg class="w-5 h-5 text-purple-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
648
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"></path>
649
+ </svg>
650
+ Funnel Conversione
651
+ </h4>
652
+ <div class="flex items-center justify-center gap-2">
653
+ <div class="flex-1 text-center">
654
+ <div class="bg-blue-500/20 rounded-t-lg p-4 border border-blue-500/30">
655
+ <div class="text-2xl font-bold text-white" id="impressions">0</div>
656
+ <div class="text-xs text-slate-400">Impression</div>
657
+ </div>
658
+ <div class="bg-blue-500/30 p-3 border-x border-b border-blue-500/30">
659
+ <div class="text-lg font-bold text-blue-300" id="clicks">0</div>
660
+ <div class="text-xs text-slate-400">Clic</div>
661
+ </div>
662
+ <div class="bg-blue-500/40 p-3 border-x border-b border-blue-500/30">
663
+ <div class="text-lg font-bold text-blue-200" id="leads">0</div>
664
+ <div class="text-xs text-slate-400">Lead</div>
665
  </div>
666
+ <div class="bg-emerald-500/50 rounded-b-lg p-4 border border-emerald-500/30">
667
+ <div class="text-2xl font-bold text-emerald-300" id="customers">0</div>
668
+ <div class="text-xs text-slate-400">Clienti</div>
669
+ </div>
670
+ </div>
671
  </div>
672
+ <div class="mt-4 text-center text-xs text-slate-500">
673
+ Basato su <span id="totalVisits">0</span> visite mensili stimate
 
 
 
 
 
 
674
  </div>
675
+ </div>
676
  </div>
 
677
 
678
+ <!-- Summary Comparison -->
679
+ <div class="mt-8 p-6 bg-white/5 rounded-xl border border-white/10">
680
+ <h4 class="text-white font-semibold mb-4 flex items-center gap-2">
681
+ <svg class="w-5 h-5 text-amber-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
682
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path>
683
+ </svg>
684
+ Confronto Investimento vs Ritorno
685
+ </h4>
686
+ <div class="grid md:grid-cols-2 gap-8">
687
+ <div>
688
+ <div class="flex justify-between mb-2">
689
+ <span class="text-slate-400 text-sm">Investimento Totale</span>
690
+ <span class="text-white font-semibold" id="investmentCompare">€0</span>
691
+ </div>
692
+ <div class="timeline-bar">
693
+ <div class="timeline-progress bg-red-500/50" style="width: 30%"></div>
694
+ </div>
695
+ </div>
696
+ <div>
697
+ <div class="flex justify-between mb-2">
698
+ <span class="text-slate-400 text-sm">Ritorno Stimato (12 mesi)</span>
699
+ <span class="text-emerald-400 font-semibold" id="returnCompare">€0</span>
700
+ </div>
701
+ <div class="timeline-bar">
702
+ <div class="timeline-progress" style="width: 70%"></div>
703
+ </div>
704
+ </div>
705
+ </div>
706
+ <div class="mt-4 p-3 bg-emerald-500/10 rounded-lg border border-emerald-500/20 text-center">
707
+ <span class="text-emerald-400 font-semibold">Rapporto Rischio/Ritorno: </span>
708
+ <span class="text-white" id="riskReward">1 : 0</span>
709
+ </div>
710
+ </div>
711
+ </div>
712
+ </section>
713
+
714
+ </main>
715
+
716
+ <footer class="bg-white border-t border-gray-200 py-8">
717
+ <div class="container mx-auto px-6 text-center text-gray-500 text-sm">
718
+ <p>&copy; 2024 Digital Growth Calculator. All rights reserved.</p>
719
+ <div class="mt-2">
720
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank"
721
+ class="text-blue-600 hover:underline">Built with anycoder</a>
722
+ </div>
723
+ </div>
724
+ </footer>
725
+
726
+ <script>
727
+ let selectedPackageName = null;
728
+ let packageCost = 0;
729
+
730
+ // Format Currency Helper
731
+ const formatMoney = (amount) => {
732
+ return new Intl.NumberFormat('it-IT', { style: 'currency', currency: 'EUR', maximumFractionDigits: 0 }).format(amount);
733
+ };
734
+
735
+ const formatMoneyDetailed = (amount) => {
736
+ return new Intl.NumberFormat('it-IT', { style: 'currency', currency: 'EUR', minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(amount);
737
+ };
738
 
739
+ function selectPackage(name, cost) {
740
+ // Remove selected class from all cards
741
+ document.querySelectorAll('.price-card').forEach(card => card.classList.remove('selected'));
742
+
743
+ // Add selected class to clicked card
744
+ event.currentTarget.classList.add('selected');
745
+
746
+ // Update State
747
+ selectedPackageName = name;
748
+ packageCost = cost;
749
+
750
+ // Update UI
751
+ document.getElementById('selectedPackageDisplay').textContent = `${name} (${formatMoney(cost)})`;
752
+
753
+ // Trigger animation on total cost
754
+ const totalEl = document.getElementById('totalCost');
755
+ totalEl.classList.remove('price-update-anim');
756
+ void totalEl.offsetWidth; // trigger reflow
757
+ totalEl.classList.add('price-update-anim');
758
+
759
+ calculateTotal();
760
+ calculateROI();
761
+ }
762
+
763
+ function calculateTotal() {
764
+ // Read inputs
765
+ const clv = parseFloat(document.getElementById('clvInput').value) || 0;
766
+ const percentage = parseFloat(document.getElementById('percentageInput').value) || 0;
767
+ const clients = parseInt(document.getElementById('clientsInput').value, 10);
768
+
769
+ // Update slider display
770
+ document.getElementById('clientsValue').textContent = clients;
771
+
772
+ // Calculate Cost Per Client
773
+ const costPerClient = clv * (percentage / 100);
774
+ document.getElementById('costPerClient').textContent = formatMoneyDetailed(costPerClient);
775
+
776
+ // Calculate Total Performance Cost
777
+ const performanceCost = clients * costPerClient;
778
+ document.getElementById('performanceTotal').textContent = formatMoney(performanceCost);
779
+
780
+ // Calculate Grand Total
781
+ const total = packageCost + performanceCost;
782
+ document.getElementById('totalCost').textContent = formatMoney(total);
783
+
784
+ // Update ROI calculator
785
+ calculateROI();
786
+ }
787
+
788
+ function calculateROI() {
789
+ // Get simulator inputs
790
+ const months = parseInt(document.getElementById('campaignMonths').value, 10);
791
+ const conversionRate = parseFloat(document.getElementById('conversionRate').value);
792
+ const avgOrderValue = parseFloat(document.getElementById('avgOrderValue').value) || 0;
793
+
794
+ // Get main calculator values
795
+ const clv = parseFloat(document.getElementById('clvInput').value) || 150;
796
+ const performancePercent = parseFloat(document.getElementById('percentageInput').value) || 25;
797
+ const clientsAcquired = parseInt(document.getElementById('clientsInput').value, 10) || 10;
798
+
799
+ // Update display values
800
+ document.getElementById('monthsValue').textContent = months;
801
+ document.getElementById('conversionValue').textContent = conversionRate;
802
+
803
+ // Calculate projected revenue (monthly clients * CLV * months)
804
+ const monthlyRevenue = clientsAcquired * clv;
805
+ const totalRevenue = monthlyRevenue * months;
806
+
807
+ // Calculate investment
808
+ const performanceCost = clientsAcquired * (clv * (performancePercent / 100));
809
+ const totalInvestment = packageCost + performanceCost;
810
+
811
+ // Calculate ROI
812
+ const roi = totalInvestment > 0 ? ((totalRevenue - totalInvestment) / totalInvestment) * 100 : 0;
813
 
814
+ // Calculate break-even (how many clients needed to cover investment)
815
+ const costPerClientAcquired = clv * (performancePercent / 100);
816
+ const breakEvenClients = costPerClientAcquired > 0 ? Math.ceil(totalInvestment / costPerClientAcquired) : 0;
817
+
818
+ // Net per client after costs
819
+ const netPerClient = clv - costPerClientAcquired;
820
+
821
+ // Funnel calculations
822
+ const totalVisits = Math.round(clientsAcquired * (100 / conversionRate));
823
+ const impressions = Math.round(totalVisits * 10);
824
+ const clicks = Math.round(impressions * 0.05); // 5% CTR
825
+ const leads = Math.round(clicks * 0.15); // 15% lead rate
826
+
827
+ // Update UI
828
+ document.getElementById('roiPercent').textContent = `${roi.toFixed(0)}%`;
829
+ document.getElementById('projectedRevenue').textContent = formatMoney(totalRevenue);
830
+ document.getElementById('breakEven').textContent = breakEvenClients;
831
+ document.getElementById('netPerClient').textContent = formatMoney(netPerClient);
832
+
833
+ // Update funnel
834
+ document