-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1076 lines (1076 loc) · 66.5 KB
/
Copy pathindex.html
File metadata and controls
1076 lines (1076 loc) · 66.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Nerdio + Recast — Better Together</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
'primary-text': '#0A1C60',
'secondary-text': '#4A5568',
'accent': '#0070F3',
'accent-hover': '#005AD0',
'bg-main': '#F7F9FB',
'bg-card': '#FFFFFF',
'border': '#E2E8F0',
'nerdio-from': '#34D399',
'nerdio-via': '#22D3EE',
'nerdio-to': '#38BDF8',
'recast-from': '#0A1C60',
'recast-via': '#0070F3',
'recast-to': '#60A5FA',
'grey-tile': '#4A5568',
'brand-orange': '#F05928',
},
animation: {
'tile-pulse': 'tilePulse 1s ease-in-out forwards',
'bar-grow': 'barGrow 0.9s ease forwards',
'bolt-drop': 'boltDrop 0.9s ease forwards',
'app-pop': 'appPop 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards',
'badge-drop': 'badgeDrop 0.8s ease-out forwards',
'dot-on': 'dotOn 0.9s ease forwards',
},
keyframes: {
tilePulse: {
'0%': { transform: 'scale(0.7)', backgroundColor: '#4A5568', opacity: '0.4' },
'60%': { transform: 'scale(1)', backgroundColor: '#0070F3', opacity: '1' },
'100%': { transform: 'scale(1)', backgroundColor: '#4A5568', opacity: '0.9' },
},
barGrow: {
'0%': { transform: 'scaleX(0)' },
'100%': { transform: 'scaleX(1)' },
},
boltDrop: {
'0%': { transform: 'scaleY(0)' },
'100%': { transform: 'scaleY(1)' },
},
appPop: {
'0%': { transform: 'scale(0.85)', filter: 'saturate(0.4)', opacity: '0.65' },
'60%': { transform: 'scale(1.05)', filter: 'saturate(1)', opacity: '1' },
'100%': { transform: 'scale(1)', filter: 'saturate(1)', opacity: '1' },
},
badgeDrop: {
'0%': { opacity: '0', transform: 'translateY(-6px) scale(0.9)' },
'100%': { opacity: '1', transform: 'translateY(0) scale(1)' },
},
dotOn: {
'0%': { transform: 'scale(0.7)', opacity: '0.4' },
'60%': { transform: 'scale(1.2)', opacity: '1', backgroundColor: '#0070F3' },
'100%': { transform: 'scale(1)', opacity: '0.9', backgroundColor: '#0070F3' },
},
},
}
}
}
</script>
<script src="https://unpkg.com/lucide@latest"></script>
</head>
<body class="min-h-screen bg-bg-main text-primary-text antialiased font-['Inter']">
<div id="app" class="min-h-screen"></div>
<script>
const DEFAULT_INPUTS = {
users: 5000,
apps: 250,
costPerHour: 75,
azureCostAnnual: 1000000,
subscriptionAnnual: 350000,
hoursPerAppSaved: 8,
adminHoursPer100PerMonth: 60,
endUserMinsPerUserPerMonth: 5,
azureReductionPct: 20
};
const DEFAULT_WHY_SECTIONS = {
change: {
subtitle: 'The problem isn’t hardware anymore — it’s application drag.',
intro: '',
bullets: [
'Networks are fast, endpoints are reliable, but IT teams are buried keeping thousands of apps updated and secure with the same headcount.',
'That friction blocks every big initiative — whether it’s moving from Citrix to AVD, SCCM to Intune, or piloting new hardware.',
'It’s not that teams can’t modernize — they’re just stuck maintaining what already exists.'
],
conclusion: ''
},
now: {
subtitle: 'The math has stopped working.',
intro: '',
bullets: [
'Workloads have doubled, but teams haven’t.',
'Renewals are rising, security risks grow with every delayed update, and users expect everything to “just work” from anywhere.',
'Every month you wait makes modernization harder — but in six weeks, you can prove there’s a faster, safer way forward.'
],
conclusion: ''
},
better: {
subtitle: 'Nerdio + Recast remove the three blockers to change — cost, risk, and time.',
intro: '',
bullets: [
'Nerdio automates Azure Virtual Desktop and Intune — fast, scalable desktop orchestration.',
'Recast automates application installs, updates, and access — across AVD, ConfigMgr, and Intune.'
],
conclusion: 'Together, they deliver one workspace for every app and every user, no matter the platform.\n\nIT moves from months of packaging and patching to minutes.\n\nEnd users never notice the shift — everything just works.\n\nModernization without the chaos.'
}
};
const STATE = {
tab: 'current',
showLabelsRecast: false,
showLabelsNerdio: false,
advancedOpen: false,
copied: false,
activeModal: null,
whySections: null,
inputs: { ...DEFAULT_INPUTS }
};
function loadState() {
const saved = localStorage.getItem('roiInputs');
if (saved) {
STATE.inputs = { ...DEFAULT_INPUTS, ...JSON.parse(saved) };
}
const savedWhy = localStorage.getItem('whySections');
if (savedWhy) {
STATE.whySections = JSON.parse(savedWhy);
} else {
STATE.whySections = { ...DEFAULT_WHY_SECTIONS };
}
}
function saveState() {
localStorage.setItem('roiInputs', JSON.stringify(STATE.inputs));
}
function saveWhyToStorage() {
localStorage.setItem('whySections', JSON.stringify(STATE.whySections));
}
function render() {
const root = document.getElementById('app');
root.innerHTML = `
<header class="relative overflow-hidden">
<div aria-hidden="true" class="absolute inset-0">
<div class="absolute -top-36 -left-28 h-[420px] w-[420px] blur-[110px] rounded-full bg-gradient-to-br from-accent/25 via-primary-text/20 to-accent-hover/30"></div>
<div class="absolute -bottom-28 right-0 h-[320px] w-[320px] blur-[110px] rounded-full bg-gradient-to-tr from-accent/20 via-accent-hover/20 to-accent/25"></div>
</div>
<div class="relative mx-auto max-w-6xl px-4 pt-8 pb-6">
<h1 class="text-3xl sm:text-4xl font-bold">Nerdio + Recast — Better Together</h1>
<p class="mt-2 max-w-3xl text-secondary-text">
According to Gartner’s Magic Quadrant 2025, over the past three years Microsoft’s leadership position has accelerated while legacy and niche VDI vendors have steadily declined in both vision and execution
</p>
<nav class="mt-5 flex w-full flex-wrap gap-2 rounded-full bg-bg-card p-1 border border-border shadow-sm" role="tablist" aria-label="Primary">
${tabBtn('current','Current State','alert-circle')}
${tabBtn('approach','Approach (Nerdio+Recast)','workflow')}
${tabBtn('outcomes','ROI & Outcomes','bar-chart-3')}
${STATE.tab==='approach' ? `
<div class="ml-auto flex items-center gap-2">
<button type="button" class="rounded-full bg-accent px-3 py-1.5 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="start">Start</button>
<button type="button" class="rounded-full border border-border bg-bg-card px-3 py-1.5 text-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="reset">Reset</button>
</div>` : ''}
${STATE.tab==='current' ? `
<div class="ml-auto flex items-center gap-2">
<button type="button" class="rounded-full border border-border bg-bg-card px-3 py-1.5 text-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="open-modal" data-id="edit-why">+</button>
</div>` : ''}
</nav>
${STATE.tab==='approach' ? `
<div class="mt-4 flex flex-wrap gap-3 justify-end">
${modalBtn('better','Better Together')}
${modalBtn('onboarding','Fast Onboarding')}
${modalBtn('proven','Proven & Trusted')}
</div>
` : ''}
</div>
</header>
<main class="mx-auto max-w-6xl px-4 pb-16" role="main">
${STATE.tab==='current'?renderCurrent():''}
${STATE.tab==='approach'?renderApproach():''}
${STATE.tab==='outcomes'?renderOutcomes():''}
</main>
`;
if(STATE.activeModal){
root.innerHTML += STATE.activeModal === 'edit-why' ? renderEditWhyModal() : renderModal(STATE.activeModal);
}
if (window.lucide?.createIcons) { try { window.lucide.createIcons(); } catch{} }
attachEvents();
if (STATE.tab==='approach'){ buildNerdio(); buildRecast(); }
const modalContent = document.querySelector('[data-modal-content]');
if (modalContent) setTimeout(() => modalContent.classList.add('scale-100', 'opacity-100'), 0);
}
function tabBtn(id,label,icon){
const active=STATE.tab===id;
return `<button type="button" class="${active?'bg-accent text-white':'text-secondary-text hover:bg-gray-100'} inline-flex items-center gap-2 rounded-full px-3.5 py-1.5 text-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="tab" data-id="${id}" aria-selected="${active}" aria-controls="panel-${id}">
<i data-lucide="${icon}" class="w-4 h-4" aria-hidden="true"></i><span>${label}</span>
</button>`;
}
function renderCurrent(){
return `
<section id="panel-current" class="space-y-4" aria-label="Current State">
<div class="bg-bg-card rounded-2xl border border-border shadow-md p-4">
<div class="flex flex-wrap items-center gap-2 text-xs">
<span class="inline-flex items-center gap-2 rounded-full bg-gray-100 px-2.5 py-1 border border-border">
<span class="grid h-4 w-4 place-items-center rounded-md bg-gradient-to-br from-nerdio-from via-nerdio-via to-nerdio-to text-white text-[10px] font-black">N</span>
<span>Nerdio — <span class="font-medium">Desktop Automation</span></span>
</span>
<span class="inline-flex items-center gap-2 rounded-full bg-gray-100 px-2.5 py-1 border border-border">
<span class="grid h-4 w-4 place-items-center rounded-md bg-gradient-to-br from-recast-from via-recast-via to-recast-to text-white text-[10px] font-black">R</span>
<span>Recast — <span class="font-medium">Application Management</span></span>
</span>
</div>
</div>
<div class="grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-4">
${problemTile('Transition Complexity','layout-grid','Image sprawl across AVD/Windows 365 and on-prem extends change windows and multiplies policy drift; teams need a governed, identity-driven approach to land cleanly in Azure.')}
${problemTile('App Readiness Bottleneck','boxes','Third-party apps and line-of-business packages consume 5–10 hours each when done manually; Recast’s curated catalog, staged deployment, and self-service shrink this critical path.')}
${problemTile('Day-0 to Day-2 Compliance Pressure','shield-alert','Integrated release & patch management plus SSO (Access Manager) keep apps current and access contextual as users shift from legacy brokers to AVD.')}
${problemTile('Azure Cost Confidence','gauge','Autoscale, right-sizing, and image hygiene reduce idle capacity; application-level control prevents unnecessary sessions and duplicate images that inflate spend (Nerdio’s orchestration + Recast’s app governance).')}
</div>
<div class="flex justify-end mb-2 sm:hidden">
<button type="button" class="text-sm text-accent underline" data-action="toggle-all-accordions">Expand All</button>
</div>
<div class="space-y-3">
${accordion('why-change', 'Why Change', 'circle-help', renderWhyContent('change'))}
${accordion('why-now', 'Why Now', 'alarm-clock', renderWhyContent('now'))}
${accordion('why-better', 'Why Better Together', 'sparkles', renderWhyContent('better'))}
</div>
</section>
`;
}
function renderWhyContent(key) {
const sec = STATE.whySections[key];
return `
<h4 class="text-base font-semibold mt-2">${sec.subtitle}</h4>
<p class="mt-2 text-sm text-secondary-text">${sec.intro.replace(/\n/g, '<br>')}</p>
<ul class="mt-2 list-disc pl-5 text-sm text-secondary-text">${sec.bullets.map(li => `<li>${li}</li>`).join('')}</ul>
<p class="mt-2 text-sm text-secondary-text">${sec.conclusion.replace(/\n/g, '<br>')}</p>
`;
}
function accordion(id, title, icon, body) {
return `
<article class="bg-bg-card rounded-xl border border-border p-4 transition-shadow shadow-md">
<button class="accordion-header flex items-center justify-between w-full text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-id="${id}" aria-expanded="false" aria-controls="${id}-content">
<div class="flex items-center gap-2">
<i data-lucide="${icon}" class="h-5 w-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">${title}</h3>
</div>
<i data-lucide="chevron-down" class="chevron w-5 h-5 text-secondary-text transition-transform duration-150 ease-[cubic-bezier(0.2,0.8,0.2,1)]"></i>
</button>
<div id="${id}-content" class="accordion-content max-h-0 overflow-hidden transition-[max-height] duration-150 ease-[cubic-bezier(0.2,0.8,0.2,1)] pt-2">
${body}
</div>
</article>
`;
}
function problemTile(title,icon,body){
return `
<article class="bg-bg-card rounded-xl border border-border p-4 transition hover:shadow-lg hover:-translate-y-1">
<div class="flex items-center gap-2">
<i data-lucide="${icon}" class="w-5 h-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">${title}</h3>
</div>
<p class="mt-1 text-sm text-secondary-text">${body}</p>
</article>
`;
}
function renderApproach(){
return `
<section id="panel-approach" class="space-y-4" aria-label="Approach">
<div class="grid grid-cols-1 gap-3 lg:grid-cols-2">
${renderNerdio()}
${renderRecast()}
</div>
</section>
`;
}
function renderNerdio(){
return `
<section class="bg-bg-card rounded-2xl border border-border shadow-md p-4" aria-label="Nerdio Orchestration">
<div class="flex items-center justify-between">
<div class="flex items-center gap-2">
<div class="h-6 w-6 rounded-lg bg-gradient-to-br from-nerdio-from via-nerdio-via to-nerdio-to grid place-items-center" aria-hidden="true"><span class="text-white font-black">N</span></div>
<div>
<h3 class="text-base font-semibold">Nerdio — Desktop Orchestration</h3>
<div class="text-xs text-secondary-text">Provision • Autoscale • Policy via Intune</div>
</div>
</div>
<button type="button" class="rounded-full border border-border bg-bg-card px-2.5 py-1 text-xs" data-action="toggle-labels-nerdio" aria-pressed="${STATE.showLabelsNerdio}">${STATE.showLabelsNerdio?'Hide':'Show'} labels</button>
</div>
<div id="nerdioCard" class="mt-3 bg-bg-card rounded-xl border border-border p-3">
<div class="grid grid-cols-1 gap-3" role="region" aria-label="Animated orchestration">
<div class="rounded-xl border border-border p-3">
<div class="flex items-center justify-between">
<div class="text-sm font-medium">Cloud PC Pools</div>
<div class="text-xs text-secondary-text">Windows 365</div>
</div>
<div class="mt-2 grid grid-cols-6 gap-2" id="poolA"></div>
<div class="mt-2 h-2 rounded-full overflow-hidden bg-gray-100"><div class="bar h-full bg-gradient-to-r from-nerdio-from via-nerdio-via to-nerdio-to scale-x-0 origin-left [animation-delay:var(--d)]" style="--d:0.2s"></div></div>
</div>
<div class="rounded-xl border border-border p-3">
<div class="flex items-center justify-between">
<div class="text-sm font-medium">AVD Host Pools</div>
<div class="text-xs text-secondary-text">Autoscale</div>
</div>
<div class="mt-2 grid grid-cols-6 gap-2" id="poolB"></div>
<div class="mt-2 h-2 rounded-full overflow-hidden bg-gray-100"><div class="bar h-full bg-gradient-to-r from-nerdio-from via-nerdio-via to-nerdio-to scale-x-0 origin-left [animation-delay:var(--d)]" style="--d:0.5s"></div></div>
</div>
<div class="rounded-xl border border-border p-3">
<div class="text-sm font-medium">Policy via Intune</div>
<div class="mt-2 grid grid-cols-10 gap-1.5" id="policyDots"></div>
</div>
<div class="rounded-xl border border-border p-3">
<div class="flex items-center gap-2 text-sm"><i data-lucide="chart-no-axes-combined" class="w-4 h-4 text-accent" aria-hidden="true"></i><span>Insights</span></div>
<div class="mt-2 h-2 rounded-full overflow-hidden bg-gray-100"><div class="bar h-full bg-gradient-to-r from-recast-from via-recast-via to-recast-to scale-x-0 origin-left [animation-delay:var(--d)]" style="--d:0.9s"></div></div>
</div>
<div class="rounded-xl border border-border p-3">
<div class="flex items-center gap-2 text-sm"><i data-lucide="user-check" class="w-4 h-4 text-accent" aria-hidden="true"></i><span>Identity-driven Workspace</span></div>
<div class="mt-2 user-beam h-[0.38rem] rounded-[0.38rem] bg-gradient-to-r from-nerdio-from via-nerdio-via to-nerdio-to scale-x-0 origin-left [animation-delay:var(--d)]" style="--d:1.2s"></div>
<div class="mt-2 text-xs text-secondary-text">Desktop is ready and right-sized before apps arrive.</div>
</div>
</div>
</div>
</section>
`;
}
function renderRecast(){
return `
<section class="bg-bg-card rounded-2xl border border-border shadow-md p-4" aria-label="Recast Application Workspace">
<div class="flex items-center justify-between">
<div class="flex items-center gap-2">
<span class="text-base font-bold"><span class="text-accent">Re</span><span class="text-primary-text">cast</span></span>
<div>
<h3 class="text-base font-semibold"> — Application Workspace</h3>
<div class="text-xs text-secondary-text"> Built on Azure | World's Largest App Catalog </div>
</div>
</div>
<div class="flex items-center gap-2 text-xs text-secondary-text">
<button type="button" class="rounded-full border border-border bg-bg-card px-2.5 py-1" data-action="toggle-labels-recast" aria-pressed="${STATE.showLabelsRecast}">${STATE.showLabelsRecast?'Hide':'Show'} labels</button>
</div>
</div>
<div id="recastCard" class="mt-3 bg-bg-card rounded-xl border border-border p-3" role="region" aria-label="Animated catalog">
<div class="space-y-2">
${CATALOG.map(s=>`
<div class="grid grid-cols-[15ch_1fr] gap-2 items-center">
<div class="text-xs uppercase text-secondary-text">${s.title}</div>
<div id="${s.id}" class="flex flex-wrap gap-2"></div>
</div>
`).join('')}
</div>
<div class="mt-3 grid grid-cols-3 gap-2" aria-hidden="true">
${['Existing Platforms','Staged Rings','Access & Policy'].map((t,i)=>`
<div class="bg-bg-card rounded-lg border border-border p-2">
<div class="text-xs text-secondary-text">${t}</div>
<div id="flowConn${'ABC'[i]}" class="mt-1 grid grid-cols-10 gap-1.5"></div>
<div class="flow-bar mt-1 h-[0.22rem] rounded-[0.25rem] bg-gradient-to-r from-recast-from via-recast-via to-recast-to scale-x-0 origin-left [animation-delay:var(--d)]" style="--d:${0.55 + 0.12*i}s"></div>
</div>
`).join('')}
</div>
<div class="mt-3 grid grid-cols-3 gap-2" aria-hidden="true">
${['Business Unit','Subsidiary','Region'].map((t,i)=>`
<div class="bg-bg-card rounded-lg border border-border p-2">
<div class="text-xs text-secondary-text">${t}</div>
<div id="flowGrp${'ABC'[i]}" class="mt-1 grid grid-cols-8 gap-1.5"></div>
<div class="bolt-line mx-auto mt-1 w-[0.22rem] h-16 rounded-[0.25rem] bg-gradient-to-b from-recast-from via-white to-recast-to scale-y-0 origin-top [animation-delay:var(--d)]" style="--d:${1 + 0.15*i}s"></div>
</div>
`).join('')}
</div>
<div class="mt-3 grid grid-cols-3 gap-2" aria-hidden="true">
${['Windows & macOS','VDI / Web','Mobile'].map((t,i)=>`
<div class="bg-bg-card rounded-lg border border-border p-2 text-center">
<i data-lucide="${['monitor-smartphone','laptop','smartphone'][i]}" class="h-5 w-5 opacity-80" aria-hidden="true"></i>
<div id="flowDev${'ABC'[i]}" class="mt-1 grid grid-cols-6 gap-1.5"></div>
<div class="mt-1 text-[11px] text-secondary-text">${t}</div>
</div>
`).join('')}
</div>
<div class="mt-3">
<div id="endUserCard" class="bg-bg-card rounded-xl border border-border p-3">
<div class="flex items-center gap-3">
<div id="endUserAvatar" class="h-9 w-9 rounded-full bg-brand-orange/90 grid place-items-center font-semibold" aria-hidden="true">U</div>
<div class="text-sm">
<div class="font-medium text-primary-text">End user</div>
<div class="text-secondary-text">Apps on demand — no waiting, no tickets.</div>
</div>
</div>
<div class="user-beam mt-3 h-[0.38rem] rounded-[0.38rem] bg-gradient-to-r from-recast-from via-recast-via to-recast-to scale-x-0 origin-left [animation-delay:var(--d)]" style="--d:2.1s"></div>
<div class="relative mt-2 rounded-lg border border-border bg-gray-50 p-4">
<i data-lucide="laptop" class="h-5 w-5 opacity-80" aria-hidden="true"></i>
<div id="endUserBadge" class="badge absolute right-2 top-2 w-[1.15rem] h-[1.15rem] rounded-[0.3rem] opacity-0 translate-y-[-6px] scale-90 bg-brand-orange text-white grid place-items-center font-bold [animation-delay:var(--d)]" style="--d:2.4s">!</div>
<div class="mt-1 text-[11px] text-secondary-text">Workspace launches the correct app instantly</div>
</div>
</div>
<div id="flowSuccess" class="mt-2 hidden text-accent text-[13px] inline-flex items-center gap-1"><i data-lucide="sparkles" class="h-4 h-4" aria-hidden="true"></i><span>Desktop + apps delivered together with identity and rings.</span></div>
</div>
</div>
</section>
`;
}
function renderOutcomes() {
const calc = computeROI();
return `
<section id="panel-outcomes" class="space-y-4" aria-label="ROI & Outcomes">
<div class="bg-bg-card rounded-2xl border border-border shadow-md p-4">
<div class="-mx-4 -mt-4 h-1 rounded-t-2xl bg-gradient-to-r from-accent/30 via-accent to-accent/30"></div>
<div class="mt-3">
<h2 class="text-2xl md:text-3xl font-extrabold text-primary-text">ROI — Nerdio + Recast (Better Together)</h2>
<p class="mt-1 text-secondary-text">From desktop orchestration to application governance — one flow, measurable return.</p>
</div>
<div class="mt-5 grid grid-cols-1 md:grid-cols-3 gap-6">
<article class="bg-white rounded-xl border border-border p-4 shadow-sm">
<div class="flex items-center gap-2">
<i data-lucide="percent" class="w-5 h-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">Net ROI</h3>
</div>
<div class="mt-2">
<div class="text-5xl font-extrabold text-accent leading-none">${Math.round(calc.netROI)}%</div>
<p class="mt-1 text-sm text-secondary-text">Calculated as (Total savings − subscription) ÷ subscription</p>
</div>
</article>
<article class="bg-white rounded-xl border border-border p-4 shadow-sm">
<div class="flex items-center gap-2">
<i data-lucide="banknote" class="w-5 h-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">Total Annual Savings</h3>
</div>
<div class="mt-2">
<div class="text-4xl font-bold text-accent leading-none">${fmtCurrencyShort(calc.totalAnnualSavings)}</div>
<p class="mt-1 text-sm text-secondary-text">Labor + Azure autoscale savings</p>
</div>
</article>
<article class="bg-white rounded-xl border border-border p-4 shadow-sm">
<div class="flex items-center gap-2">
<i data-lucide="timer" class="w-5 h-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">Payback (months)</h3>
</div>
<div class="mt-2">
<div class="text-4xl font-bold text-accent leading-none">${isFinite(calc.paybackMonths) ? `~${calc.paybackMonths.toFixed(1)}` : 'N/A'}</div>
<p class="mt-1 text-sm text-secondary-text">Months to recoup subscription via savings</p>
</div>
</article>
</div>
<div class="mt-6 pt-6 border-t border-border">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<article class="bg-white rounded-xl border border-border p-4 shadow-sm">
<div class="flex items-center gap-2">
<i data-lucide="users" class="w-5 h-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">Productivity</h3>
</div>
<div class="mt-2">
<div class="text-3xl font-bold text-accent leading-none">${fmtNumberShort(calc.totalHoursSavedAnnual)} hrs / yr</div>
<p class="text-sm text-secondary-text">(≈ ${Math.round(calc.equivalentFTEs)} FTEs)</p>
</div>
</article>
<article class="bg-white rounded-xl border border-border p-4 shadow-sm">
<div class="flex items-center gap-2">
<i data-lucide="trending-down" class="w-5 h-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">Cost Efficiency</h3>
</div>
<div class="mt-2">
<div class="text-3xl font-bold text-accent leading-none">${fmtCurrencyShort(calc.azureSavingsAnnual)}</div>
<p class="text-sm text-secondary-text">Azure savings / yr</p>
</div>
</article>
<article class="bg-white rounded-xl border border-border p-4 shadow-sm">
<div class="flex items-center gap-2">
<i data-lucide="shield-check" class="w-5 h-5 text-accent" aria-hidden="true"></i>
<h3 class="font-semibold">Compliance Readiness</h3>
</div>
<div class="mt-2">
<div class="text-3xl font-bold text-accent leading-none">>95%</div>
<p class="text-sm text-secondary-text">patch compliance maintained</p>
</div>
</article>
</div>
</div>
<div class="mt-8 grid grid-cols-1 lg:grid-cols-2 gap-6">
<section aria-label="Required Inputs" class="rounded-xl border border-border p-4 bg-white">
<h3 class="font-semibold flex items-center gap-2"><i data-lucide="sliders-horizontal" class="w-5 h-5 text-accent" aria-hidden="true"></i>Required Assumptions</h3>
<div class="mt-3 grid grid-cols-1 md:grid-cols-2 gap-3">
${numberInput('Users', 'users', STATE.inputs.users, 100, 200000, 100, 'Total AVD users in scope')}
${numberInput('Unique applications', 'apps', STATE.inputs.apps, 20, 5000, 10, 'Apps that need packaging/governance')}
${moneyInput('Avg loaded cost / hour', 'costPerHour', STATE.inputs.costPerHour, 30, 200, 1, 'Fully burdened IT cost (USD)')}
${moneyInput('Azure infra cost / year', 'azureCostAnnual', STATE.inputs.azureCostAnnual, 50000, 20000000, 10000, 'Eligible for autoscale savings')}
${moneyInput('Combined subscription / year', 'subscriptionAnnual', STATE.inputs.subscriptionAnnual, 100000, 2000000, 10000, 'Nerdio + Recast combined (editable)')}
</div>
</section>
<section aria-label="Advanced Assumptions" class="rounded-xl border border-border p-4 bg-gray-50">
<button type="button" class="w-full flex items-center justify-between rounded-lg border border-border bg-bg-card px-4 py-2 text-sm font-semibold focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="toggle-advanced">
Advanced Assumptions
<i data-lucide="${STATE.advancedOpen ? 'chevron-up' : 'chevron-down'}" class="w-5 h-5" aria-hidden="true"></i>
</button>
<div class="${STATE.advancedOpen ? 'block' : 'hidden'} mt-3 grid grid-cols-1 md:grid-cols-2 gap-3">
${numberInput('Packaging hours avoided per app', 'hoursPerAppSaved', STATE.inputs.hoursPerAppSaved, 2, 12, 0.5, 'Time saved using curated catalog + automation')}
${numberInput('Admin hours saved / 100 users / month', 'adminHoursPer100PerMonth', STATE.inputs.adminHoursPer100PerMonth, 10, 80, 1, 'Automation across imaging, policy, approvals')}
${numberInput('End-user minutes saved / user / month', 'endUserMinsPerUserPerMonth', STATE.inputs.endUserMinsPerUserPerMonth, 0, 15, 1, 'Faster access + self-service')}
${percentInput('Azure cost reduction (%)', 'azureReductionPct', STATE.inputs.azureReductionPct, 5, 50, 1, 'Autoscale & hygiene')}
<div class="flex flex-wrap gap-2">
<button type="button" class="rounded-full border border-border bg-bg-card px-3 py-1.5 text-sm" data-action="preset" data-preset="conservative">Conservative</button>
<button type="button" class="rounded-full border border-border bg-bg-card px-3 py-1.5 text-sm" data-action="preset" data-preset="benchmark">Benchmark</button>
<button type="button" class="rounded-full border border-border bg-bg-card px-3 py-1.5 text-sm" data-action="preset" data-preset="aggressive">Aggressive</button>
</div>
</div>
</section>
</div>
<div class="mt-6 rounded-lg border border-border bg-gray-50 p-4">
<details>
<summary class="cursor-pointer font-semibold text-sm select-none">Methodology</summary>
<p class="mt-2 text-sm text-secondary-text">Calculations based on industry benchmarks for automation impact. Labor savings from packaging, admin, and end-user productivity. Azure savings via autoscale and optimization. Complete the Microsoft workspace — Nerdio orchestrates desktops; Recast governs applications and access. Contact us for customized analysis.</p>
<button type="button" class="mt-3 rounded-full border border-border bg-bg-card px-4 py-2 text-sm" data-action="reset-benchmarks">Reset to Benchmarks</button>
</details>
</div>
<button type="button" class="mt-4 rounded-full bg-accent px-4 py-2 text-sm font-semibold text-white inline-flex items-center gap-2" data-action="copy">
<i data-lucide="clipboard" class="w-4 h-4" aria-hidden="true"></i>${STATE.copied ? 'Copied!' : 'Copy Summary'}
</button>
</div>
</section>
`;
}
function numberInput(label, key, value, min, max, step, help) {
return `
<label class="block">
<span class="text-xs text-secondary-text">${label}</span>
<input type="number" inputmode="numeric" class="mt-1 w-full rounded-lg bg-gray-50 px-3 py-2 border border-border focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent"
value="${value}" min="${min}" max="${max}" step="${step}" data-action="number" data-key="${key}" aria-describedby="${key}-help">
<span id="${key}-help" class="text-[11px] text-secondary-text">${help||''}</span>
</label>
`;
}
function moneyInput(label, key, value, min, max, step, help) {
return `
<label class="block">
<span class="text-xs text-secondary-text">${label}</span>
<div class="mt-1 relative">
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-secondary-text">$</span>
<input type="number" inputmode="numeric" class="w-full rounded-lg bg-gray-50 pl-7 pr-3 py-2 border border-border focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent"
value="${value}" min="${min}" max="${max}" step="${step}" data-action="number" data-key="${key}" aria-describedby="${key}-help">
</div>
<span id="${key}-help" class="text-[11px] text-secondary-text">${help||''}</span>
</label>
`;
}
function percentInput(label, key, value, min, max, step, help) {
return `
<label class="block">
<span class="text-xs text-secondary-text">${label}</span>
<div class="mt-1 relative">
<input type="number" inputmode="numeric" class="w-full rounded-lg bg-gray-50 pr-7 pl-3 py-2 border border-border focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent"
value="${value}" min="${min}" max="${max}" step="${step}" data-action="number" data-key="${key}" aria-describedby="${key}-help">
<span class="absolute right-3 top-1/2 -translate-y-1/2 text-secondary-text">%</span>
</div>
<span id="${key}-help" class="text-[11px] text-secondary-text">${help||''}</span>
</label>
`;
}
function computeROI() {
const i = sanitizeInputs(STATE.inputs);
const groupsOf100 = Math.min(i.users / 100, 1000);
const hoursSavedPackaging = i.apps * i.hoursPerAppSaved;
const hoursSavedAdminAnnual = i.adminHoursPer100PerMonth * groupsOf100 * 12;
const hoursSavedEndUserAnnual = (i.endUserMinsPerUserPerMonth / 60) * i.users * 12;
const totalHoursSavedAnnual = hoursSavedPackaging + hoursSavedAdminAnnual + hoursSavedEndUserAnnual;
const laborSavingsAnnual = totalHoursSavedAnnual * i.costPerHour;
const azureSavingsAnnual = i.azureCostAnnual * (i.azureReductionPct / 100);
const totalAnnualSavings = laborSavingsAnnual + azureSavingsAnnual;
const net = totalAnnualSavings - i.subscriptionAnnual;
const netROI = i.subscriptionAnnual > 0 && net > 0 ? (net / i.subscriptionAnnual) * 100 : 0;
const paybackMonths = totalAnnualSavings > 0 && i.subscriptionAnnual > 0 ? i.subscriptionAnnual / (totalAnnualSavings / 12) : Infinity;
const equivalentFTEs = totalHoursSavedAnnual / 2080;
return {
totalHoursSavedAnnual,
azureSavingsAnnual,
totalAnnualSavings,
netROI,
paybackMonths,
equivalentFTEs,
summary: buildSummary(i, { netROI, totalAnnualSavings, paybackMonths, totalHoursSavedAnnual, equivalentFTEs, azureSavingsAnnual })
};
}
function buildSummary(i, c) {
return `Net ROI: ${Math.round(c.netROI)}% | Total Annual Savings: ~${fmtCurrencyShort(c.totalAnnualSavings)} | Payback: ~${isFinite(c.paybackMonths) ? c.paybackMonths.toFixed(1) : 'N/A'} months.
Drivers: ${fmtNumberShort(c.totalHoursSavedAnnual)} hrs/yr saved (≈${Math.round(c.equivalentFTEs)} FTEs), ${fmtCurrencyShort(c.azureSavingsAnnual)} Azure autoscale savings, >95% patch compliance maintained.
Assumptions: ${fmtNumberShort(i.users)} users, ${i.apps} apps, $${i.costPerHour}/hr, $${fmtShort(i.azureCostAnnual)} Azure cost, ${i.azureReductionPct}% autoscale, ${i.hoursPerAppSaved} hrs/app, ${i.adminHoursPer100PerMonth} admin hrs/100 users/mo, ${i.endUserMinsPerUserPerMonth} min/user/mo.`;
}
function sanitizeInputs(inp) {
const o = {};
Object.keys(DEFAULT_INPUTS).forEach(k => {
let v = Number(inp[k]);
o[k] = isFinite(v) ? v : DEFAULT_INPUTS[k];
});
o.users = clamp(o.users, 100, 200000);
o.apps = clamp(o.apps, 20, 5000);
o.costPerHour = clamp(o.costPerHour, 30, 200);
o.azureCostAnnual = clamp(o.azureCostAnnual, 50000, 20000000);
o.subscriptionAnnual = clamp(o.subscriptionAnnual, 100000, 2000000);
o.hoursPerAppSaved = clamp(o.hoursPerAppSaved, 2, 12);
o.adminHoursPer100PerMonth = clamp(o.adminHoursPer100PerMonth, 10, 80);
o.endUserMinsPerUserPerMonth = clamp(o.endUserMinsPerUserPerMonth, 0, 15);
o.azureReductionPct = clamp(o.azureReductionPct, 5, 50);
return o;
}
function clamp(v, min, max) {
return Math.max(min, Math.min(max, v));
}
function fmtNumber(n, dec=0) {
return Number(n).toLocaleString(undefined, {maximumFractionDigits: dec, minimumFractionDigits: dec});
}
function fmtShort(n) {
if (n >= 1e6) return (n / 1e6).toFixed(1) + 'M';
if (n >= 1e3) return (n / 1e3).toFixed(0) + 'k';
return fmtNumber(n, 0);
}
function fmtNumberShort(n) {
return fmtShort(n);
}
function fmtCurrencyShort(n) {
return '$' + fmtShort(n);
}
function buildNerdio(){
const a = document.getElementById('poolA');
const b = document.getElementById('poolB');
const p = document.getElementById('policyDots');
if(a){ a.innerHTML=''; for(let i=0;i<12;i++){ a.appendChild(poolVM(i,0.15+i*0.05,'nerdio')); } }
if(b){ b.innerHTML=''; for(let i=0;i<12;i++){ b.appendChild(poolVM(i,0.4+i*0.05,'nerdio')); } }
if(p){ p.innerHTML=''; for(let i=0;i<24;i++){ const d=document.createElement('div'); d.className='policy-dot w-2 h-2 rounded-full bg-grey-tile opacity-90 [animation-delay:var(--d)]'; d.style.setProperty('--d', (0.8 + i*0.05)+'s'); p.appendChild(d); } }
}
function poolVM(i,delay,tone){
const d=document.createElement('div');
d.className='h-6 rounded-md bg-gray-100 relative border border-border';
const bar=document.createElement('div');
bar.className='bar absolute left-0 top-0 h-full w-full bg-gradient-to-r from-nerdio-from via-nerdio-via to-nerdio-to scale-x-0 origin-left [animation-delay:var(--d)]';
bar.style.setProperty('--d', delay+'s');
d.appendChild(bar);
if(STATE.showLabelsNerdio){
const t=document.createElement('span');
t.textContent='VM';
t.className='absolute inset-0 grid place-items-center text-[10px] text-primary-text/80';
d.appendChild(t);
}
return d;
}
function buildRecast(){
let base=0;
CATALOG.forEach(section=>{
const mount=document.getElementById(section.id); if(!mount) return;
mount.innerHTML='';
section.items.forEach((itm,idx)=>{
const wrap=document.createElement('div');
wrap.className='flex items-center gap-1';
const ring=document.createElement('div');
ring.className='logo-ring w-[2.1rem] h-[2.1rem] rounded-full grid place-items-center bg-bg-main ring-1 ring-inset ring-border [animation-delay:var(--d)]';
ring.innerHTML=itm.svg;
ring.title=itm.name;
ring.setAttribute('role','img');
ring.setAttribute('aria-label',itm.name);
ring.style.setProperty('--d',(base+idx*0.06).toFixed(2)+'s');
mount.appendChild(wrap);
wrap.appendChild(ring);
if(STATE.showLabelsRecast){
const label=document.createElement('span');
label.className='text-xs text-secondary-text whitespace-nowrap';
label.textContent=itm.name;
wrap.appendChild(label);
}
});
base+=0.25;
});
buildTiles(document.getElementById('flowConnA'), 14, 0.5);
buildTiles(document.getElementById('flowConnB'), 14, 0.56);
buildTiles(document.getElementById('flowConnC'), 14, 0.62);
buildTiles(document.getElementById('flowGrpA'), 18, 0.95);
buildTiles(document.getElementById('flowGrpB'), 18, 1.0);
buildTiles(document.getElementById('flowGrpC'), 18, 1.05);
buildTiles(document.getElementById('flowDevA'), 10, 1.5);
buildTiles(document.getElementById('flowDevB'), 10, 1.55);
buildTiles(document.getElementById('flowDevC'), 10, 1.6);
const avatar=document.getElementById('endUserAvatar');
const badge=document.getElementById('endUserBadge');
if(avatar){ avatar.classList.add('bg-brand-orange/90'); }
if(badge){ badge.classList.add('bg-brand-orange'); badge.textContent='!'; }
}
function buildTiles(container,count,baseDelay){
if(!container) return; container.innerHTML='';
for(let i=0;i<count;i++){
const d=document.createElement('div');
d.className='tile w-[0.45rem] h-[0.45rem] rounded bg-grey-tile opacity-90 [animation-delay:var(--d)]';
d.style.setProperty('--d',(baseDelay+i*0.04).toFixed(2)+'s');
container.appendChild(d);
}
}
const CATALOG=[
{title:'CORE PRODUCTIVITY',id:'cat-core',items:[
logo('Microsoft Word','W','#185ABD'),
logo('Microsoft Excel','X','#107C41'),
logo('PowerPoint','P','#D24726'),
logo('Outlook','O','#106EBE'),
logo('Microsoft Teams','T','#5B53D6'),
logo('Google Docs','Dc','#1A73E8'),
logo('Google Sheets','Sh','#1E8E3E'),
logo('Google Slides','Sl','#F9AB00')
]},
{title:'MESSAGING & MEETINGS',id:'cat-collab',items:[
multiLogo('Slack',['#36C5F0','#2EB67D','#E01E5A','#ECB22E']),
logo('Zoom','Z','#0B5CFF'),
logo('Gmail','G','#EA4335'),
logo('Google Meet','GM','#0F9D58')
]},
{title:'WEB BROWSERS',id:'cat-browsers',items:[
triLogo('Google Chrome','#EA4335','#FBBC05','#34A853','#4285F4'),
ringLogo('Microsoft Edge','#0C8EC5','#0AA0A3'),
flameLogo('Mozilla Firefox','#FF7139','#FFCC00')
]},
{title:'ENTERPRISE APPS',id:'cat-enterprise',items:[
logo('Salesforce','SF','#00A1E0'),
logo('Workday','WD','#1F5BFF'),
logo('ServiceNow','SN','#81B29A'),
logo('SAP','SAP','#0A6ED1'),
logo('Oracle NetSuite','NS','#C74634')
]},
{title:'SECURITY & ACCESS',id:'cat-security',items:[
logo('Duo','D','#3CB371'),
logo('Okta','O','#007DC1'),
logo('Ping Identity','P','#C0172C'),
logo('Cisco AnyConnect','AC','#00B5AD'),
logo('Microsoft Defender','MD','#0067B8'),
logo('CrowdStrike Falcon','CS','#D61F26')
]},
{title:'STORAGE & CREATIVE',id:'cat-storage',items:[
logo('Adobe Acrobat','A','#ED2224'),
logo('Dropbox','DB','#0061FF'),
logo('Box','BX','#0061D5'),
logo('OneDrive','OD','#0A5BD5'),
logo('ZoomIt / Sysinternals','ZI','#58595B')
]}
];
function logo(name,letter,color){ return { name, svg: mark(letter,color) }; }
function mark(letter,color){
return `
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="24" height="24" role="img" aria-label="${letter}">
<defs><linearGradient id="g${letter.replace(/\W/g,'')}" x1="0" x2="1"><stop offset="0" stop-color="${shade(color,0.9)}"/><stop offset="1" stop-color="${shade(color,1.1)}"/></linearGradient></defs>
<rect x="1.5" y="1.5" width="45" height="45" rx="12" fill="url(#g${letter.replace(/\W/g,'')})" stroke="#E2E8F0"/>
<text x="50%" y="56%" text-anchor="middle" font-size="22" font-family="Inter,Segoe UI,Arial" font-weight="800" fill="white">${letter}</text>
</svg>`;
}
function multiLogo(name,colors){
const slices=colors.map((c,i)=>`<rect x="${4+i*9}" y="8" width="7" height="32" rx="4" fill="${c}"></rect>`).join('');
return { name, svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="24" height="24" role="img" aria-label="${name}"><rect x="1.5" y="1.5" width="45" height="45" rx="12" fill="#F3F4F6" stroke="#E2E8F0"/>${slices}</svg>` };
}
function triLogo(name,r1,r2,r3,r4){
return { name, svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="24" height="24" aria-label="${name}"><rect x="1.5" y="1.5" width="45" height="45" rx="12" fill="#F3F4F6" stroke="#E2E8F0"/><circle cx="24" cy="24" r="12" fill="${r4}"/><path d="M24 12 A12 12 0 0 1 36 24 L24 24 Z" fill="${r1}"/><path d="M36 24 A12 12 0 0 1 24 36 L24 24 Z" fill="${r2}"/><path d="M24 36 A12 12 0 0 1 24 12 L24 24 Z" fill="${r3}"/></svg>` };
}
function ringLogo(name,c1,c2){
return { name, svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="24" height="24" aria-label="${name}"><rect x="1.5" y="1.5" width="45" height="45" rx="12" fill="#F3F4F6" stroke="#E2E8F0"/><circle cx="24" cy="24" r="11" fill="${c1}"/><circle cx="20" cy="20" r="8" fill="${c2}"/></svg>` };
}
function flameLogo(name,c1,c2){
return { name, svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="24" height="24" aria-label="${name}"><rect x="1.5" y="1.5" width="45" height="45" rx="12" fill="#F3F4F6" stroke="#E2E8F0"/><path d="M24 12c5 7-2 9 3 14 3 3 2 9-3 11-5-2-6-8-3-11 5-5-3-7 3-14z" fill="${c1}"/><circle cx="26" cy="28" r="4" fill="${c2}"/></svg>` };
}
function shade(hex,m){ const c=hex.replace('#',''); const n=[0,1,2].map(i=>parseInt(c.slice(i*2,i*2+2),16)); const s=n.map(v=>Math.max(0,Math.min(255,Math.round(v*m)))); return '#'+s.map(v=>v.toString(16).padStart(2,'0')).join(''); }
function modalBtn(id,label){
return `<button type="button" class="rounded-lg bg-bg-card border border-border shadow-sm px-4 py-2 text-sm font-medium text-primary-text hover:bg-gray-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="open-modal" data-id="${id}">${label}</button>`;
}
function renderModal(id){
let title = '';
let content = '';
if(id==='better'){
title = 'Better Together: Microsoft + Recast + Nerdio';
content = `
<p class="mt-2 text-sm text-secondary-text">Microsoft provides the trusted foundation — Intune and Azure handle security, device management, and compliance.</p>
<p class="mt-2 text-sm text-secondary-text">Recast adds the power layer — one workspace to package, deploy, update, and retire apps across Intune, SCCM, Citrix, Omnissa, and Azure.</p>
<ul class="mt-2 list-disc pl-5 text-sm text-secondary-text space-y-1">
<li>8,000+ pre-tested enterprise apps ready to go</li>
<li>Automated patching, validation, and compliance</li>
<li>Unified dashboard for full visibility</li>
<li>Policy-driven automation that cuts manual work by 60%+</li>
<li>End users get the right app instantly — no tickets, no waiting</li>
</ul>
<p class="mt-2 text-sm text-secondary-text">Configured once — delivered everywhere.</p>
<p class="mt-2 text-sm text-secondary-text">Nerdio completes the story — giving partners and customers the front-end workspace experience that brings Recast’s automation and Microsoft’s infrastructure together in a single, easy-to-use platform.</p>
`;
} else if(id==='onboarding'){
title = 'Fast, Guided Onboarding';
content = `
<ul class="mt-2 list-disc pl-5 text-sm text-secondary-text space-y-1">
<li>Standard rollout: 4–6 weeks (Kickoff → Implementation → UAT → Launch → Enablement)</li>
<li>Works with existing Intune/Azure setup — no new infrastructure</li>
<li>Guided setup with a Customer Success Manager</li>
<li>Only 1–2 IT engineers needed part-time</li>
<li>Includes training, certification, and success planning</li>
</ul>
<p class="mt-2 text-sm text-secondary-text">From first call to production in weeks, not months.</p>
`;
} else if(id==='proven'){
title = 'Proven and Trusted';
content = `
<ul class="mt-2 list-disc pl-5 text-sm text-secondary-text space-y-1">
<li>60M+ endpoints, 70K+ customers, 130+ countries</li>
<li>Trusted by global brands and public sector leaders</li>
<li>87 CSAT — highest in the industry</li>
<li>SOC 2 and ISO 27001 certified</li>
</ul>
<p class="mt-2 text-sm text-secondary-text">Trusted by organizations that can’t afford downtime.</p>
`;
}
return `
<div class="fixed inset-0 bg-black/30 flex items-center justify-center z-50" data-action="close-modal-bg">
<div class="bg-bg-card rounded-2xl shadow-xl p-6 max-w-md w-full mx-4 scale-95 opacity-0 transition-all duration-300 ease-[cubic-bezier(0.2,0.8,0.2,1)]" data-modal-content>
<div class="flex justify-between items-start">
<div>
<h2 id="modal-title" class="text-lg font-bold">${title}</h2>
${content}
</div>
<button type="button" class="text-secondary-text hover:text-primary-text focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="close-modal"><i data-lucide="x" class="w-5 h-5"></i></button>
</div>
</div>
</div>
`;
}
function renderEditWhyModal() {
return `
<div class="fixed inset-0 bg-black/30 flex items-center justify-center z-50" data-action="close-modal-bg">
<div class="bg-bg-card rounded-2xl shadow-xl p-6 max-w-5xl w-full h-[90vh] overflow-auto mx-4 scale-95 opacity-0 transition-all duration-300 ease-[cubic-bezier(0.2,0.8,0.2,1)]" data-modal-content>
<div class="flex justify-between items-start">
<h2 class="text-lg font-bold">Edit Why Sections</h2>
<button type="button" class="text-secondary-text hover:text-primary-text focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent" data-action="close-modal"><i data-lucide="x" class="w-5 h-5"></i></button>
</div>
<div class="mt-4 space-y-6">
<div>
<h3 class="font-medium">Why Change</h3>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Subtitle</span>
<input id="why-change-subtitle" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent" value="${STATE.whySections.change.subtitle}">
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Intro (use \\n for line breaks)</span>
<textarea id="why-change-intro" rows="3" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.change.intro}</textarea>
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Bullets (one per line)</span>
<textarea id="why-change-bullets" rows="5" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.change.bullets.join('\n')}</textarea>
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Conclusion</span>
<textarea id="why-change-conclusion" rows="2" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.change.conclusion}</textarea>
</label>
</div>
<div>
<h3 class="font-medium">Why Now</h3>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Subtitle</span>
<input id="why-now-subtitle" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent" value="${STATE.whySections.now.subtitle}">
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Intro (use \\n for line breaks)</span>
<textarea id="why-now-intro" rows="3" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.now.intro}</textarea>
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Bullets (one per line)</span>
<textarea id="why-now-bullets" rows="5" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.now.bullets.join('\n')}</textarea>
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Conclusion</span>
<textarea id="why-now-conclusion" rows="2" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.now.conclusion}</textarea>
</label>
</div>
<div>
<h3 class="font-medium">Why Better Together</h3>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Subtitle</span>
<input id="why-better-subtitle" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent" value="${STATE.whySections.better.subtitle}">
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Intro (use \\n for line breaks)</span>
<textarea id="why-better-intro" rows="3" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.better.intro}</textarea>
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Bullets (one per line)</span>
<textarea id="why-better-bullets" rows="5" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.better.bullets.join('\n')}</textarea>
</label>
<label class="block mt-2">
<span class="text-sm text-secondary-text">Conclusion</span>
<textarea id="why-better-conclusion" rows="2" class="mt-1 w-full rounded-lg border border-border p-2 focus:border-accent focus:ring-accent">${STATE.whySections.better.conclusion}</textarea>
</label>
</div>
</div>
<div class="mt-6 flex justify-end gap-3">
<button type="button" class="rounded-full border border-border bg-bg-card px-4 py-2 text-sm" data-action="close-modal">Cancel</button>
<button type="button" class="rounded-full border border-border bg-bg-card px-4 py-2 text-sm" data-action="reset-why">Reset to Default</button>
<button type="button" class="rounded-full bg-accent px-4 py-2 text-sm font-semibold text-white" data-action="save-why">Save</button>
</div>
</div>
</div>
`;
}
function attachEvents(){
const root=document.getElementById('app');
root.querySelectorAll('[data-action="tab"]').forEach(b=>b.addEventListener('click',e=>{ STATE.tab=e.currentTarget.getAttribute('data-id'); render(); }));
root.querySelector('[data-action="toggle-labels-recast"]')?.addEventListener('click',()=>{ STATE.showLabelsRecast=!STATE.showLabelsRecast; render(); });
root.querySelector('[data-action="toggle-labels-nerdio"]')?.addEventListener('click',()=>{ STATE.showLabelsNerdio=!STATE.showLabelsNerdio; render(); });
root.querySelectorAll('[data-action="number"]').forEach(n=>n.addEventListener('input',e=>{
const key=e.currentTarget.getAttribute('data-key'); const v=Number(e.target.value); if(isFinite(v)) STATE.inputs[key]=v; saveState(); render();
}));
root.querySelector('[data-action="copy"]')?.addEventListener('click', async ()=>{
const calc = computeROI();
try { await navigator.clipboard.writeText(calc.summary); } catch {
const ta=document.createElement('textarea'); ta.value=calc.summary; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta);
}
STATE.copied=true; render(); setTimeout(()=>{ STATE.copied=false; render(); }, 1200);
});
root.querySelector('[data-action="toggle-advanced"]')?.addEventListener('click', () => { STATE.advancedOpen = !STATE.advancedOpen; render(); });
root.querySelectorAll('[data-action="preset"]').forEach(b=>b.addEventListener('click',e=>{
const preset = e.currentTarget.getAttribute('data-preset');
let vals;
if(preset === 'conservative') vals = {adminHoursPer100PerMonth:40, endUserMinsPerUserPerMonth:3, azureReductionPct:10};
else if(preset === 'benchmark') vals = {adminHoursPer100PerMonth:60, endUserMinsPerUserPerMonth:5, azureReductionPct:20};
else if(preset === 'aggressive') vals = {adminHoursPer100PerMonth:70, endUserMinsPerUserPerMonth:8, azureReductionPct:25};
if(vals) { Object.assign(STATE.inputs, vals); saveState(); render(); }
}));
root.querySelector('[data-action="reset-benchmarks"]')?.addEventListener('click', () => { STATE.inputs = { ...DEFAULT_INPUTS }; saveState(); render(); });
root.querySelector('[data-action="start"]')?.addEventListener('click', startAll);
root.querySelector('[data-action="reset"]')?.addEventListener('click', resetAll);
root.querySelectorAll('[data-action="open-modal"]').forEach(b=>b.addEventListener('click',e=>{ STATE.activeModal=e.currentTarget.getAttribute('data-id'); render(); }));
root.querySelector('[data-action="close-modal-bg"]')?.addEventListener('click',e=>{ if(e.target===e.currentTarget){ STATE.activeModal=null; render(); } });
root.querySelectorAll('[data-action="close-modal"]').forEach(b=>b.addEventListener('click',()=>{ STATE.activeModal=null; render(); }));
root.querySelector('[data-action="save-why"]')?.addEventListener('click', () => {
STATE.whySections.change.subtitle = document.getElementById('why-change-subtitle').value.trim();
STATE.whySections.change.intro = document.getElementById('why-change-intro').value.trim();
STATE.whySections.change.bullets = document.getElementById('why-change-bullets').value.split('\n').map(s => s.trim()).filter(Boolean);
STATE.whySections.change.conclusion = document.getElementById('why-change-conclusion').value.trim();
STATE.whySections.now.subtitle = document.getElementById('why-now-subtitle').value.trim();
STATE.whySections.now.intro = document.getElementById('why-now-intro').value.trim();
STATE.whySections.now.bullets = document.getElementById('why-now-bullets').value.split('\n').map(s => s.trim()).filter(Boolean);
STATE.whySections.now.conclusion = document.getElementById('why-now-conclusion').value.trim();
STATE.whySections.better.subtitle = document.getElementById('why-better-subtitle').value.trim();
STATE.whySections.better.intro = document.getElementById('why-better-intro').value.trim();
STATE.whySections.better.bullets = document.getElementById('why-better-bullets').value.split('\n').map(s => s.trim()).filter(Boolean);
STATE.whySections.better.conclusion = document.getElementById('why-better-conclusion').value.trim();
saveWhyToStorage();
STATE.activeModal = null;
render();
});
root.querySelector('[data-action="reset-why"]')?.addEventListener('click', () => {
STATE.whySections = { ...DEFAULT_WHY_SECTIONS };
saveWhyToStorage();
STATE.activeModal = null;
render();
});
document.querySelectorAll('.accordion-header').forEach(header => {
header.addEventListener('click', toggleAccordion);
header.addEventListener('keydown', accordionKeydown);
});
root.querySelector('[data-action="toggle-all-accordions"]')?.addEventListener('click', () => {
const headers = document.querySelectorAll('.accordion-header');
const allOpen = [...headers].every(h => h.getAttribute('aria-expanded') === 'true');
headers.forEach(header => {
const e = { currentTarget: header };
if (allOpen) {
if (header.getAttribute('aria-expanded') === 'true') toggleAccordion(e);
} else {
if (header.getAttribute('aria-expanded') === 'false') toggleAccordion(e);
}
});
const btn = document.querySelector('[data-action="toggle-all-accordions"]');
if (btn) btn.textContent = allOpen ? 'Expand All' : 'Collapse All';
});
document.addEventListener('keydown', e=>{if(e.key==='Escape' && STATE.activeModal){ STATE.activeModal=null; render(); }});
}
function toggleAccordion(e) {
const header = e.currentTarget;
const content = header.nextElementSibling;
const isOpen = header.getAttribute('aria-expanded') === 'true';
header.setAttribute('aria-expanded', `${!isOpen}`);
const chevron = header.querySelector('.chevron');
if (isOpen) {
chevron.classList.remove('rotate-180');
content.style.maxHeight = '0px';
header.parentElement.classList.remove('border-l-4', 'border-accent');
} else {
chevron.classList.add('rotate-180');
content.style.maxHeight = `${content.scrollHeight}px`;
header.parentElement.classList.add('border-l-4', 'border-accent');
header.scrollIntoView({behavior: 'smooth', block: 'nearest'});
}
}
function accordionKeydown(e) {
if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {
e.preventDefault();
const headers = [...document.querySelectorAll('.accordion-header')];
let idx = headers.indexOf(e.currentTarget);
if (e.key === 'ArrowDown') idx = (idx + 1) % headers.length;
else if (e.key === 'ArrowUp') idx = (idx - 1 + headers.length) % headers.length;
else if (e.key === 'Home') idx = 0;
else if (e.key === 'End') idx = headers.length - 1;
headers[idx].focus();
} else if (['Enter', ' '].includes(e.key)) {
e.preventDefault();