-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html.html
More file actions
1318 lines (1214 loc) · 71.8 KB
/
Copy pathindex.html.html
File metadata and controls
1318 lines (1214 loc) · 71.8 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">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CallMate — A space to be heard | IIT Delhi peer support</title>
<meta name="description" content="CallMate is a free, anonymous voice call service for anyone feeling distressed, lonely, or simply wanting a real conversation. Talk to a real person — no phone number, no video, no account needed. An independent initiative by researchers at IIT Delhi.">
<meta name="keywords" content="CallMate, peer support, anonymous voice call, mental wellbeing, IIT Delhi, talk to someone, emotional support, loneliness, distress support India">
<meta name="robots" content="index, follow">
<meta name="author" content="CallMate — IIT Delhi independent initiative">
<link rel="canonical" href="https://callmateinneed.netlify.app">
<!-- Open Graph (how the link looks when shared on WhatsApp, social media) -->
<meta property="og:title" content="CallMate — A real person. Truly listening.">
<meta property="og:description" content="Feeling distressed or just need to talk? Call a real, anonymous human — free, no account, no phone number. An IIT Delhi independent initiative.">
<meta property="og:url" content="https://callmateinneed.netlify.app">
<meta property="og:type" content="website">
<meta property="og:locale" content="en_IN">
<!-- Twitter / X card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="CallMate — A real person. Truly listening.">
<meta name="twitter:description" content="Free anonymous voice support. Talk to a real human — distress, loneliness, or just a conversation. IIT Delhi independent initiative.">
<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=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap" rel="stylesheet">
<!-- PeerJS for real browser-to-browser voice calls (no backend needed) -->
<script src="https://unpkg.com/peerjs@1.5.4/dist/peerjs.min.js"></script>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--teal-deep: #0A4A3C;
--teal-mid: #1D9E75;
--teal-light: #2ECC9A;
--sage-soft: #E8F5F0;
--sage-pale: #F2FAF7;
--bg: #FAFAF8;
--white: #FFFFFF;
--ink: #1A2B25;
--body: #3D5248;
--muted: #7A9088;
--border: #DDE8E4;
--border-soft:#EEF4F1;
--amber: #F59E0B;
--amber-bg: #FFFBEB;
--red: #EF4444;
--indigo-bg: #EEF0FD;
--indigo: #4F52CC;
--sky-bg: #E6F1FB;
--sky: #0C63AE;
--warm-bg: #FEF9F3;
--warm-accent:#E07B00;
}
body { font-family: 'DM Sans', system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.page { display: none; }
.page.active { display: block; }
/* ===== NAV ===== */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0 40px; height: 58px; background: var(--white); border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 100; }
.nav-left { display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; color: var(--teal-deep); text-decoration: none; letter-spacing: -0.3px; }
.logo-icon { width: 32px; height: 32px; background: var(--teal-mid); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.iit-pill { font-size: 11px; background: var(--sky-bg); color: var(--sky); padding: 3px 10px; border-radius: 20px; font-weight: 500; border: 1px solid #BDD6F0; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--body); padding: 7px 14px; border-radius: 8px; text-decoration: none; font-family: 'DM Sans', sans-serif; transition: background 0.15s, color 0.15s; }
.nav-link:hover { background: var(--sage-soft); color: var(--teal-deep); }
.btn-primary { background: var(--teal-mid); color: #fff; border: none; padding: 9px 20px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif; transition: background 0.15s, transform 0.1s; }
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-outline { background: var(--white); border: 1.5px solid var(--border); padding: 8px 18px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--ink); font-family: 'DM Sans', sans-serif; transition: border-color 0.15s, background 0.15s; }
.btn-outline:hover { border-color: var(--teal-mid); background: var(--sage-soft); }
/* ===== HERO ===== */
.hero-section { padding: 72px 40px 0; text-align: center; position: relative; overflow: hidden; }
.hero-section::before { content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(29,158,117,0.07) 0%, transparent 70%); pointer-events: none; }
.breath-wrap { display: flex; align-items: center; justify-content: center; margin-bottom: 36px; position: relative; height: 72px; }
.breath-ring { position: absolute; border-radius: 50%; border: 1.5px solid var(--teal-mid); animation: breathe 3.5s ease-in-out infinite; opacity: 0; }
.breath-ring:nth-child(1) { width: 48px; height: 48px; animation-delay: 0s; }
.breath-ring:nth-child(2) { width: 48px; height: 48px; animation-delay: 0.8s; }
.breath-ring:nth-child(3) { width: 48px; height: 48px; animation-delay: 1.6s; }
@keyframes breathe { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.8); opacity: 0; } }
.breath-core { width: 48px; height: 48px; background: var(--teal-mid); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; position: relative; z-index: 1; box-shadow: 0 4px 20px rgba(29,158,117,0.3); }
.badge-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 5px 14px; border-radius: 20px; font-weight: 500; }
.b-purple { background: var(--indigo-bg); color: var(--indigo); border: 1px solid #CACEF6; }
.b-teal { background: var(--sage-soft); color: var(--teal-deep); border: 1px solid #B5DDD0; }
.b-warm { background: #FEF3C7; color: #92400E; border: 1px solid #F5D17A; }
.b-sky { background: var(--sky-bg); color: var(--sky); border: 1px solid #BDD6F0; }
.hero-section h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 50px; font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; color: var(--ink); margin-bottom: 20px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-section h1 em { font-style: italic; color: var(--teal-mid); }
.hero-tagline { font-size: 17px; color: var(--body); line-height: 1.8; margin-bottom: 12px; max-width: 500px; margin-left: auto; margin-right: auto; font-weight: 400; }
.hero-sub { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 36px; max-width: 480px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-btns .btn-primary { padding: 14px 32px; font-size: 15px; }
.hero-btns .btn-outline { padding: 13px 28px; font-size: 15px; }
/* Two doors */
.doors-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 640px; margin: 40px auto 0; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--white); box-shadow: 0 2px 16px rgba(10,74,60,0.05); }
.door { padding: 28px 28px 24px; cursor: pointer; transition: background 0.2s; text-align: left; border: none; background: none; font-family: 'DM Sans', sans-serif; width: 100%; }
.door:first-child { border-right: 1px solid var(--border); }
.door:hover { background: var(--sage-pale); }
.door-icon { font-size: 28px; margin-bottom: 10px; }
.door-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.door-desc { font-size: 13px; color: var(--body); line-height: 1.65; }
.door-cta { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--teal-mid); }
/* Trust strip */
.trust-strip { display: flex; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--white); margin-top: 48px; overflow: hidden; }
.trust-item { flex: 1; padding: 20px 16px; text-align: center; border-right: 1px solid var(--border-soft); }
.trust-item:last-child { border-right: none; }
.trust-num { font-size: 24px; font-weight: 700; color: var(--teal-deep); margin-bottom: 3px; font-family: 'Playfair Display', serif; }
.trust-label { font-size: 12px; color: var(--muted); }
/* ===== SECTIONS ===== */
.section-wrap { max-width: 880px; margin: 0 auto; padding: 60px 40px; }
.sec-label { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal-mid); margin-bottom: 10px; }
.sec-title { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.3px; }
.sec-sub { font-size: 14px; color: var(--muted); line-height: 1.7; }
/* ===== AVAILABILITY CARDS ===== */
.avail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
@media (max-width: 640px) {
.avail-grid { grid-template-columns: 1fr; }
.doors-strip { grid-template-columns: 1fr; }
.door:first-child { border-right: none; border-bottom: 1px solid var(--border); }
.hero-section h1 { font-size: 36px; }
.nav { padding: 0 20px; }
.section-wrap { padding: 40px 20px; }
}
.avail-card { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 2px 16px rgba(10,74,60,0.04); transition: box-shadow 0.2s, transform 0.2s; }
.avail-card:hover { box-shadow: 0 8px 28px rgba(10,74,60,0.09); transform: translateY(-2px); }
.avail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.avail-identity { display: flex; align-items: center; gap: 14px; }
.avail-av { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; font-family: 'Playfair Display', serif; flex-shrink: 0; }
.avail-name { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.avail-role { font-size: 12px; color: var(--muted); }
.status-pill { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pill.online { background: var(--sage-soft); color: var(--teal-deep); }
.status-pill.offline { background: var(--amber-bg); color: var(--warm-accent); }
.pulse { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pulse.green { background: var(--teal-mid); animation: pulsate 2s ease-in-out infinite; }
.pulse.amber { background: var(--amber); }
@keyframes pulsate { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.avail-intention { font-size: 13px; color: var(--body); line-height: 1.7; margin-bottom: 14px; font-style: italic; }
.avail-window { font-size: 12px; color: var(--muted); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; }
.avail-window span { color: var(--body); font-weight: 500; }
.call-now-btn { width: 100%; padding: 14px; background: var(--teal-mid); color: #fff; border: none; border-radius: 14px; font-size: 15px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.15s, transform 0.1s; }
.call-now-btn:hover:not(:disabled) { background: var(--teal-deep); transform: translateY(-1px); }
.call-now-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; transform: none; }
.offline-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.6; }
/* ===== FOUNDERS ===== */
.founders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
@media (max-width: 640px) { .founders-grid { grid-template-columns: 1fr; } }
.founder-card { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 2px 16px rgba(10,74,60,0.04); }
.founder-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.founder-av { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; font-family: 'Playfair Display', serif; flex-shrink: 0; }
.founder-name { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.founder-role { font-size: 12px; color: var(--teal-mid); font-weight: 500; }
.founder-bio { font-size: 14px; color: var(--body); line-height: 1.75; margin-bottom: 14px; }
.founder-intention { background: var(--sage-pale); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--body); line-height: 1.65; font-style: italic; }
.founder-intention strong { font-style: normal; color: var(--teal-deep); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 4px; }
/* ===== HOW IT WORKS ===== */
.how-section { background: var(--teal-deep); padding: 60px 40px; }
.how-section .sec-label { color: var(--teal-light); }
.how-section .sec-title { color: #fff; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 32px; max-width: 780px; margin: 36px auto 0; }
.step-num { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.12); color: var(--teal-light); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-family: 'Playfair Display', serif; border: 1px solid rgba(255,255,255,0.15); }
.step h4 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.step p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.65; }
/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 32px; }
.feat-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 24px; transition: box-shadow 0.2s, transform 0.2s; }
.feat-card:hover { box-shadow: 0 6px 24px rgba(10,74,60,0.07); transform: translateY(-2px); }
.feat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 20px; }
.feat-card h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.feat-card p { font-size: 13px; color: var(--body); line-height: 1.65; }
/* ===== HONEST NOTE ===== */
.honest-section { background: var(--warm-bg); border-top: 1px solid #F0E4D0; border-bottom: 1px solid #F0E4D0; padding: 48px 40px; text-align: center; }
.honest-inner { max-width: 560px; margin: 0 auto; }
.honest-section .sec-label { color: var(--warm-accent); }
.honest-section .sec-title { color: var(--ink); font-size: 26px; margin-bottom: 16px; }
.honest-section p { font-size: 15px; color: var(--body); line-height: 1.8; }
.honest-section p + p { margin-top: 12px; }
/* ===== FOOTER ===== */
footer { background: var(--white); border-top: 1px solid var(--border-soft); padding: 24px 40px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer p { font-size: 13px; color: var(--muted); }
/* ===== OVERLAYS ===== */
.overlay { display: none; position: fixed; inset: 0; background: rgba(10,74,60,0.38); backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; }
.overlay.open { display: flex; }
.modal-box { background: var(--white); border-radius: 24px; padding: 36px; max-width: 420px; width: 92%; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,0.15); animation: popIn 0.2s ease-out; }
@keyframes popIn { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-box h2 { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.modal-box > p { font-size: 14px; color: var(--body); margin-bottom: 24px; line-height: 1.7; }
.modal-close { position: absolute; top: 18px; right: 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 16px; cursor: pointer; color: var(--muted); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.modal-close:hover { background: var(--sage-soft); color: var(--teal-deep); }
/* Entry modal */
.modal-steps { display: flex; gap: 6px; margin-bottom: 24px; }
.modal-step-dot { height: 3px; border-radius: 3px; background: var(--border); flex: 1; transition: background 0.2s; }
.modal-step-dot.active { background: var(--teal-mid); }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.mode-opt { padding: 16px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg); cursor: pointer; text-align: left; font-family: 'DM Sans', sans-serif; transition: border-color 0.15s, background 0.15s; }
.mode-opt:hover { border-color: var(--teal-mid); background: var(--sage-pale); }
.mode-opt.selected { border-color: var(--teal-mid); background: var(--sage-soft); }
.mode-icon { font-size: 22px; margin-bottom: 8px; }
.mode-label { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.mode-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.mode-opt.selected .mode-desc { color: var(--body); }
.mood-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.mood-opt { padding: 13px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg); cursor: pointer; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink); font-family: 'DM Sans', sans-serif; transition: border-color 0.15s, background 0.15s; }
.mood-opt:hover { border-color: var(--teal-mid); background: var(--sage-pale); }
.mood-opt.selected { border-color: var(--teal-mid); background: var(--sage-soft); color: var(--teal-deep); }
.mood-opt small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 3px; }
.mood-opt.selected small { color: var(--body); }
/* ===== CALL SCREEN ===== */
.call-screen { display: none; position: fixed; inset: 0; background: var(--teal-deep); z-index: 300; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.call-screen.active { display: flex; }
.call-av-ring { position: relative; width: 110px; height: 110px; margin: 0 auto 24px; }
.call-av-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); animation: ringPulse 2s ease-out infinite; }
.call-av-pulse:nth-child(2) { animation-delay: 0.6s; }
@keyframes ringPulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.7); opacity: 0; } }
.call-av-inner { position: absolute; inset: 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 28px; font-family: 'Playfair Display', serif; }
.call-person-name { font-size: 26px; font-weight: 600; color: #fff; margin-bottom: 6px; font-family: 'Playfair Display', serif; }
.call-status-txt { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 6px; }
.call-timer-txt { font-size: 40px; font-weight: 300; color: #fff; margin-bottom: 10px; letter-spacing: 3px; }
.call-privacy-note { font-size: 12px; color: rgba(255,255,255,0.38); margin-bottom: 52px; }
.call-controls-row { display: flex; gap: 24px; align-items: flex-end; justify-content: center; }
.ctrl-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; background: none; border: none; }
.ctrl-circle { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; transition: transform 0.15s, opacity 0.15s; }
.ctrl-btn:hover .ctrl-circle { transform: scale(1.08); }
.ctrl-label { font-size: 11px; color: rgba(255,255,255,0.5); font-family: 'DM Sans', sans-serif; }
.ctrl-mute .ctrl-circle { background: rgba(255,255,255,0.15); }
.ctrl-mute.muted .ctrl-circle { background: rgba(255,255,255,0.3); }
.ctrl-end .ctrl-circle { background: var(--red); width: 72px; height: 72px; font-size: 26px; }
.ctrl-end:hover .ctrl-circle { background: #dc2626; }
.ctrl-speaker .ctrl-circle { background: rgba(255,255,255,0.15); }
/* ===== WAITING SCREEN (host side) ===== */
.wait-screen { display: none; position: fixed; inset: 0; background: var(--teal-deep); z-index: 300; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.wait-screen.active { display: flex; }
.wait-code-box { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 28px 36px; margin: 28px 0; }
.wait-code { font-size: 44px; font-weight: 700; color: #fff; letter-spacing: 8px; font-family: 'Playfair Display', serif; margin-bottom: 8px; }
.wait-code-label { font-size: 13px; color: rgba(255,255,255,0.55); }
.wait-link-row { display: flex; gap: 10px; align-items: center; max-width: 420px; margin: 0 auto 24px; }
.wait-link-input { flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 10px; padding: 10px 14px; color: #fff; font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none; }
.wait-copy-btn { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); border-radius: 10px; padding: 10px 16px; color: #fff; font-size: 13px; font-family: 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.wait-copy-btn:hover { background: rgba(255,255,255,0.25); }
.wait-status { font-size: 14px; color: rgba(255,255,255,0.65); margin-bottom: 36px; }
.wait-cancel { background: none; border: 1px solid rgba(255,255,255,0.25); border-radius: 10px; padding: 10px 24px; color: rgba(255,255,255,0.7); font-size: 14px; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: background 0.15s; }
.wait-cancel:hover { background: rgba(255,255,255,0.1); }
/* ===== JOIN MODAL ===== */
.join-input { width: 100%; border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 18px; font-size: 22px; font-family: 'Playfair Display', serif; text-align: center; letter-spacing: 6px; text-transform: uppercase; color: var(--ink); background: var(--bg); outline: none; margin-bottom: 8px; transition: border-color 0.15s; }
.join-input:focus { border-color: var(--teal-mid); background: var(--white); }
.join-status { font-size: 13px; color: var(--red); text-align: center; min-height: 20px; margin-bottom: 14px; }
/* ===== TOGGLE LINK PAGE ===== */
.toggle-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px; }
.toggle-card { background: var(--white); border: 1px solid var(--border); border-radius: 24px; padding: 40px; max-width: 400px; width: 100%; text-align: center; box-shadow: 0 8px 32px rgba(10,74,60,0.08); }
.toggle-av { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; font-family: 'Playfair Display', serif; margin: 0 auto 16px; }
.toggle-name { font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.toggle-current { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.toggle-number { font-size: 15px; color: var(--teal-deep); font-weight: 600; letter-spacing: 2px; margin-bottom: 6px; font-family: 'Playfair Display', serif; }
/* ===== DIAL BY NUMBER ===== */
.dial-divider { display: flex; align-items: center; gap: 12px; margin: 32px 0 20px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
.dial-divider::before, .dial-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.dial-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; }
.dial-label { font-size: 13px; color: var(--body); margin-bottom: 12px; font-weight: 500; }
.dial-row { display: flex; gap: 10px; }
.dial-input { flex: 1; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 20px; font-family: 'Playfair Display', serif; text-align: center; letter-spacing: 6px; color: var(--ink); background: var(--bg); outline: none; transition: border-color 0.15s; }
.dial-input:focus { border-color: var(--teal-mid); background: var(--white); }
.dial-status { font-size: 13px; color: var(--red); margin-top: 10px; min-height: 18px; }
.toggle-btn-on { width: 100%; padding: 14px; background: var(--teal-mid); color: #fff; border: none; border-radius: 14px; font-size: 16px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; margin-bottom: 10px; transition: background 0.15s; }
.toggle-btn-on:hover { background: var(--teal-deep); }
.toggle-btn-off { width: 100%; padding: 13px; background: transparent; color: var(--body); border: 1.5px solid var(--border); border-radius: 14px; font-size: 15px; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: border-color 0.15s; }
.toggle-btn-off:hover { border-color: var(--red); color: var(--red); }
.toggle-note { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.6; }
.toggle-confirm { font-size: 15px; color: var(--teal-deep); font-weight: 500; margin-top: 16px; display: none; }
.tgl-listen-status { margin-top: 18px; padding: 10px 16px; background: var(--sage-soft); border: 1px solid #B5DDD0; border-radius: 20px; font-size: 13px; color: var(--teal-deep); font-weight: 600; display: flex; align-items: center; justify-content: center; }
.tgl-incoming { margin-top: 20px; padding: 22px; background: var(--sage-pale); border: 1.5px solid var(--teal-mid); border-radius: 18px; animation: ringPulseSoft 1.4s ease-in-out infinite; }
@keyframes ringPulseSoft { 0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,154,0.35); } 50% { box-shadow: 0 0 0 10px rgba(46,204,154,0); } }
.tgl-incoming-av { font-size: 30px; margin-bottom: 8px; }
.tgl-incoming-txt { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.tgl-incoming-row { display: flex; gap: 10px; }
.tgl-accept-btn { flex: 1; padding: 12px; background: var(--teal-mid); color: #fff; border: none; border-radius: 12px; font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: background 0.15s; }
.tgl-accept-btn:hover { background: var(--teal-deep); }
.tgl-decline-btn { flex: 1; padding: 12px; background: var(--white); color: var(--red); border: 1.5px solid var(--border); border-radius: 12px; font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: border-color 0.15s; }
.tgl-decline-btn:hover { border-color: var(--red); }
@media (prefers-reduced-motion: reduce) { .breath-ring, .pulse.green, .call-av-pulse { animation: none; } * { transition: none !important; } }
</style>
</head>
<body>
<!-- ===== NAVBAR ===== -->
<nav class="nav">
<div class="nav-left">
<a href="#" class="logo" onclick="showPage('landing'); return false;">
<div class="logo-icon">📞</div>
CallMate
</a>
<span class="iit-pill">🎓 An IIT Delhi independent initiative</span>
</div>
<div class="nav-links">
<a href="#" class="nav-link" onclick="showPage('landing'); return false;">Home</a>
<a href="#" class="nav-link" onclick="showPage('landing'); scrollSmoothTo('who'); return false;">Who we are</a>
<a href="#" class="nav-link" onclick="showPage('landing'); scrollSmoothTo('how'); return false;">How it works</a>
<button class="btn-primary" onclick="showPage('app')">📞 Talk now</button>
</div>
</nav>
<!-- ===== LANDING PAGE ===== -->
<div id="landing" class="page active">
<div class="hero-section">
<div class="breath-wrap">
<div class="breath-ring"></div>
<div class="breath-ring"></div>
<div class="breath-ring"></div>
<div class="breath-core">📞</div>
</div>
<div class="badge-row">
<span class="badge b-purple">🕵️ Fully anonymous</span>
<span class="badge b-teal">🎙 Emotional support & conversation</span>
<span class="badge b-warm">🚫 Not a dating app</span>
<span class="badge b-sky">🎓 An IIT Delhi independent initiative</span>
</div>
<h1>Someone to talk to.<br><em>When you need it most.</em></h1>
<p class="hero-tagline">Feeling low, anxious, lonely, or overwhelmed?<br>Or just need a real conversation with no agenda?</p>
<p class="hero-sub">CallMate connects you — by voice, anonymously — with a real human who is genuinely present. No phone numbers. No video. No dating. No judgement. Just a voice and someone who will listen.</p>
<div style="background:#FEF3C7;border:1px solid #F5D17A;border-radius:14px;padding:14px 20px;max-width:520px;margin:0 auto 28px;font-size:13px;color:#92400E;line-height:1.65;text-align:left;">
<strong>⚠️ This is not a helpline or emergency service.</strong> If you or someone else is in immediate danger, please call <strong>iCall: 9152987821</strong> or <strong>Vandrevala Foundation: 1860-2662-345</strong> (24/7, free).
</div>
<div class="hero-btns">
<button class="btn-primary" onclick="showPage('app')">📞 Talk to someone now</button>
<button class="btn-outline" onclick="scrollSmoothTo('who')">Who's listening?</button>
</div>
<div class="doors-strip">
<button class="door" onclick="showPage('app')">
<div class="door-icon">🌊</div>
<div class="door-title">I need to be heard</div>
<div class="door-desc">Something is weighing on you. You want to say it out loud to someone who is genuinely present.</div>
<span class="door-cta">Find presence →</span>
</button>
<button class="door" onclick="showPage('app')">
<div class="door-icon">💡</div>
<div class="door-title">I want to connect</div>
<div class="door-desc">You're curious. You want a fresh perspective, a real conversation beyond your usual circle.</div>
<span class="door-cta">Find connection →</span>
</button>
</div>
<div class="trust-strip">
<div class="trust-item"><div class="trust-num">2</div><div class="trust-label">Real people here</div></div>
<div class="trust-item"><div class="trust-num">Voice</div><div class="trust-label">No video, no text</div></div>
<div class="trust-item"><div class="trust-num">0</div><div class="trust-label">Numbers shared</div></div>
<div class="trust-item"><div class="trust-num">Free</div><div class="trust-label">Always</div></div>
</div>
</div>
<!-- WHO'S HERE NOW -->
<div class="section-wrap" id="who">
<div class="sec-label">Who's here right now</div>
<div class="sec-title">Vaani & Mira</div>
<div class="sec-sub">Two independent researchers. When you call, you speak to one of us — a real voice, genuinely present. We don't share our names publicly, and we don't ask for yours. Anonymity works both ways.</div>
<div class="avail-grid" id="avail-grid-landing"></div>
</div>
<!-- HONEST NOTE -->
<div class="honest-section">
<div class="honest-inner">
<div class="sec-label">A note of honesty</div>
<div class="sec-title">Small, and proud of it</div>
<p>Right now, CallMate is just two people. When you reach out, you speak to one of us — not a trained stranger, not a roster, not a bot. Two real people who chose to be here.</p>
<p>We can't be available around the clock. Check our availability above and call when we're online. We show you our real windows — no "24/7" promises we can't keep.</p>
</div>
</div>
<!-- WHO WE ARE -->
<div class="section-wrap" id="founders">
<div class="sec-label">Who we are</div>
<div class="sec-title">Two people who mean it</div>
<div class="sec-sub">We arrived here from different places but landed in the same one — a genuine interest in what happens when two people truly listen to each other. We are independent researchers at IIT Delhi. This is not an institutional project — it is a personal one.</div>
<div class="founders-grid">
<div class="founder-card">
<div class="founder-top">
<div class="founder-av" style="background:var(--sky-bg);color:var(--sky);">V</div>
<div>
<div class="founder-name">Vaani</div>
<div class="founder-role">💡 Curious conversations</div>
</div>
</div>
<p class="founder-bio">Drawn to the unmappable — what makes people tick, what shapes a belief, what shifts when two people genuinely exchange perspectives from different worlds.</p>
<div class="founder-intention">
<strong>Why I'm here</strong>
"I want to get out of my own restricted thought process. Talking to people from completely different walks of life is how I grow — and I want to offer that same exchange back."
</div>
</div>
<div class="founder-card">
<div class="founder-top">
<div class="founder-av" style="background:#FEF3C7;color:#92400E;">M</div>
<div>
<div class="founder-name">Mira</div>
<div class="founder-role">🌊 Presence & listening</div>
</div>
</div>
<p class="founder-bio">Believes well-being isn't a formula — it emerges between people when one of them shows up fully and without agenda for the other.</p>
<div class="founder-intention">
<strong>Why I'm here</strong>
"I want to be present for people who need it. Not to fix or advise — just to be there, fully, so they feel a little less alone with whatever they're carrying."
</div>
</div>
</div>
</div>
<!-- HOW IT WORKS -->
<div class="how-section" id="how">
<div style="max-width:880px;margin:0 auto;">
<div class="sec-label">How it works</div>
<div class="sec-title">No account. No video. Just a voice.</div>
</div>
<div class="steps">
<div class="step">
<div class="step-num">1</div>
<h4>Check who's available</h4>
<p>See whether Vaani or Mira is online right now and what kind of conversation they're here for today.</p>
</div>
<div class="step">
<div class="step-num">2</div>
<h4>Tell us a little</h4>
<p>One sentence about what's on your mind — just enough to step in. Private, never stored.</p>
</div>
<div class="step">
<div class="step-num">3</div>
<h4>Click and call</h4>
<p>Your browser opens a voice room. No app, no download, no phone number. Just your voice and ours.</p>
</div>
<div class="step">
<div class="step-num">4</div>
<h4>Leave when ready</h4>
<p>No rating, no follow-up unless you want it. The conversation was yours — take what you need from it.</p>
</div>
</div>
</div>
<!-- WHY CALLMATE -->
<div class="section-wrap">
<div class="sec-label">What makes this different</div>
<div class="sec-title">Not therapy. Not social media. A conversation.</div>
<div class="sec-sub">The one you want to have but don't quite have a place for.</div>
<div class="features-grid">
<div class="feat-card">
<div class="feat-icon" style="background:var(--sage-soft);">🎙</div>
<h3>Voice, not video</h3>
<p>No camera anxiety. Just your voice — the most honest, unfiltered thing you have.</p>
</div>
<div class="feat-card">
<div class="feat-icon" style="background:var(--indigo-bg);">🕵️</div>
<h3>Anonymous both ways</h3>
<p>We don't share our names, and we don't ask for yours. No email, no account, no number on either side.</p>
</div>
<div class="feat-card">
<div class="feat-icon" style="background:#FAECE7;">💬</div>
<h3>Any topic, any weight</h3>
<p>Heavy or light, distressed or curious — everything is welcome here. You set the tone entirely.</p>
</div>
<div class="feat-card">
<div class="feat-icon" style="background:#EAF3DE;">🛡</div>
<h3>Honest about limits</h3>
<p>We're not therapists. We don't pretend to be. If you need professional support, we'll say so clearly.</p>
</div>
<div class="feat-card">
<div class="feat-icon" style="background:#FEF3C7;">🌱</div>
<h3>Growing slowly</h3>
<p>We'd rather be fully present for a few people than half-present for many. Quality, always.</p>
</div>
<div class="feat-card">
<div class="feat-icon" style="background:#FCE7F3;">⏰</div>
<h3>Real availability</h3>
<p>We show you when we're actually here. No false promises — just honest windows, clearly shown.</p>
</div>
</div>
</div>
<footer>
<p>© 2026 CallMate — an independent initiative by two researchers</p>
<span class="iit-pill">🎓 An IIT Delhi independent initiative</span>
</footer>
</div><!-- /landing -->
<!-- ===== APP PAGE ===== -->
<div id="app" class="page">
<div style="max-width:780px;margin:0 auto;padding:48px 32px;">
<div style="text-align:center;margin-bottom:36px;">
<div class="sec-label">Who's here</div>
<h2 style="font-family:'Playfair Display',serif;font-size:28px;font-weight:700;color:var(--ink);margin-bottom:8px;">Choose who to call</h2>
<p style="font-size:14px;color:var(--muted);line-height:1.7;max-width:440px;margin:0 auto;">One click opens a private voice room in your browser — no download, no account, no phone number shared on either side.</p>
</div>
<div class="avail-grid" id="avail-grid-app"></div>
<div class="dial-divider"><span>or dial a number directly</span></div>
<div class="dial-card">
<div class="dial-label">Have someone's CallMate number? Dial it here.</div>
<div class="dial-row">
<input class="dial-input" id="dial-code-input" maxlength="6" inputmode="numeric" placeholder="644 821"
oninput="this.value=this.value.replace(/\D/g,'').slice(0,6)"
onkeydown="if(event.key==='Enter') dialByCodeInput()">
<button class="btn-primary" style="padding:12px 22px;white-space:nowrap;" onclick="dialByCodeInput()">📞 Call</button>
</div>
<div class="dial-status" id="dial-status"></div>
</div>
<div style="margin-top:28px;background:var(--white);border:1px solid var(--border);border-radius:16px;padding:20px 24px;display:flex;align-items:flex-start;gap:14px;">
<div style="font-size:20px;flex-shrink:0;margin-top:2px;">🛡</div>
<div>
<div style="font-size:14px;font-weight:600;color:var(--ink);margin-bottom:4px;">Your privacy is fully protected</div>
<div style="font-size:13px;color:var(--muted);line-height:1.65;">The call opens in your browser using encrypted peer-to-peer audio. No phone numbers exchanged. Not recorded. When you leave, there is no trace.</div>
</div>
</div>
</div>
</div><!-- /app -->
<!-- ===== TOGGLE PAGE (private link for Vaani / Mira) ===== -->
<div id="toggle" class="page">
<div class="toggle-page">
<div class="toggle-card">
<div class="toggle-av" id="tgl-av"></div>
<div class="toggle-name" id="tgl-name"></div>
<div class="toggle-number" id="tgl-number"></div>
<div class="toggle-current" id="tgl-current"></div>
<button class="toggle-btn-on" onclick="setStatus('online')">🟢 I'm online — show me as available</button>
<button class="toggle-btn-off" onclick="setStatus('offline')">⚫ I'm stepping away — mark me offline</button>
<div class="toggle-confirm" id="tgl-confirm"></div>
<div class="tgl-listen-status" id="tgl-listen-status" style="display:none;">
<div class="pulse green" style="display:inline-block;margin-right:8px;"></div>
<span id="tgl-listen-txt">🎧 Listening for calls…</span>
</div>
<div class="tgl-incoming" id="tgl-incoming" style="display:none;">
<div class="tgl-incoming-av">👤</div>
<div class="tgl-incoming-txt">Someone is calling you</div>
<div class="tgl-incoming-row">
<button class="tgl-decline-btn" onclick="declineIncoming()">✕ Decline</button>
<button class="tgl-accept-btn" onclick="acceptIncoming()">📞 Accept</button>
</div>
</div>
<div id="tgl-notif-tip" style="margin-top:14px;background:#FEF3C7;border:1px solid #F5D17A;border-radius:12px;padding:12px 14px;font-size:13px;color:#92400E;line-height:1.6;text-align:left;display:none;">
<strong style="display:block;margin-bottom:4px;">🔔 Allow notifications for the best experience</strong>
When your browser asks "Allow notifications from this site?" — tap <strong>Allow</strong>. This lets CallMate ring your phone even when you're in another app. Without it, you'll only see the alert if this tab is open on screen.
</div>
<!-- TEST SECTION -->
<div style="margin-top:20px;border-top:1px solid var(--border);padding-top:18px;">
<p style="font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:0.8px;color:var(--muted);margin-bottom:12px;">Test before going live</p>
<!-- Test ringtone -->
<button onclick="testRingtone()" style="width:100%;padding:12px;background:var(--sage-soft);border:1.5px solid var(--border);border-radius:12px;font-size:14px;font-weight:600;color:var(--teal-deep);font-family:'DM Sans',sans-serif;cursor:pointer;margin-bottom:8px;display:flex;align-items:center;justify-content:center;gap:8px;transition:background 0.15s;">
🔔 Test my ringtone
</button>
<div id="ring-test-result" style="font-size:12px;text-align:center;min-height:18px;margin-bottom:10px;color:var(--muted);"></div>
<!-- Test notification -->
<button onclick="testNotification()" style="width:100%;padding:12px;background:var(--sage-soft);border:1.5px solid var(--border);border-radius:12px;font-size:14px;font-weight:600;color:var(--teal-deep);font-family:'DM Sans',sans-serif;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:background 0.15s;">
📲 Test my notification
</button>
<div id="notif-test-result" style="font-size:12px;text-align:center;min-height:18px;margin-top:6px;color:var(--muted);"></div>
</div>
<p class="toggle-note" style="margin-top:16px;">This page is your private switch. Keep this tab open while online — calls ring here directly, no code needed. Bookmark it on your phone's home screen. No one else can see or use it.</p>
</div>
</div>
</div>
<!-- ===== ENTRY MODAL (2-step before joining call) ===== -->
<div class="overlay" id="entry-overlay">
<div class="modal-box">
<button class="modal-close" onclick="closeEntryModal()">✕</button>
<div id="entry-s1">
<div class="modal-steps"><div class="modal-step-dot active"></div><div class="modal-step-dot"></div></div>
<h2>What brings you here?</h2>
<p>No right answer — just pick what's true right now.</p>
<div class="mode-grid">
<div class="mode-opt" onclick="selectMode(this,'heard')">
<div class="mode-icon">🌊</div>
<div class="mode-label">I need to be heard</div>
<div class="mode-desc">Something is heavy. I want to say it out loud.</div>
</div>
<div class="mode-opt" onclick="selectMode(this,'connect')">
<div class="mode-icon">💡</div>
<div class="mode-label">I want to connect</div>
<div class="mode-desc">I'm curious. I want a real conversation.</div>
</div>
</div>
<button class="btn-primary" style="width:100%;padding:13px;font-size:15px;" onclick="entryStep2()">Continue →</button>
</div>
<div id="entry-s2" style="display:none;">
<div class="modal-steps"><div class="modal-step-dot active"></div><div class="modal-step-dot active"></div></div>
<h2 id="es2-title">What's going on?</h2>
<p id="es2-sub">Choose what fits — helps us be present for you from the first moment.</p>
<div class="mood-grid" id="es2-grid"></div>
<label style="display:flex;align-items:flex-start;gap:10px;margin-bottom:16px;cursor:pointer;text-align:left;">
<input type="checkbox" id="good-faith-check" style="margin-top:3px;accent-color:var(--teal-mid);width:16px;height:16px;flex-shrink:0;">
<span style="font-size:13px;color:var(--body);line-height:1.6;">I confirm I am reaching out in good faith. I understand this is not a dating service, not an emergency helpline, and not a professional therapy service.</span>
</label>
<button class="btn-primary" style="width:100%;padding:13px;font-size:15px;" onclick="proceedToCall()">📞 Connect me now →</button>
<p id="check-warning" style="font-size:12px;color:var(--red);text-align:center;margin-top:8px;display:none;">Please confirm the above before connecting.</p>
</div>
</div>
</div>
<!-- ===== ACTIVE CALL SCREEN ===== -->
<div class="call-screen" id="call-screen">
<div class="call-av-ring">
<div class="call-av-pulse"></div>
<div class="call-av-pulse"></div>
<div class="call-av-inner" id="cs-av"></div>
</div>
<div class="call-person-name" id="cs-name"></div>
<div class="call-status-txt" id="cs-status">Connecting…</div>
<div class="call-timer-txt" id="cs-timer" style="display:none;">00:00</div>
<p class="call-privacy-note">Voice only · No video · No numbers shared · Not recorded</p>
<div class="call-controls-row">
<button class="ctrl-btn ctrl-mute" id="mute-btn" onclick="toggleMute()">
<div class="ctrl-circle">🎙</div>
<span class="ctrl-label">Mute</span>
</button>
<button class="ctrl-btn ctrl-end" onclick="endCall()">
<div class="ctrl-circle">📞</div>
<span class="ctrl-label">End</span>
</button>
<button class="ctrl-btn ctrl-speaker" onclick="toggleSpeaker()">
<div class="ctrl-circle">🔊</div>
<span class="ctrl-label">Speaker</span>
</button>
</div>
</div>
<script>
// ================================================================
// PEOPLE CONFIG
// To change availability windows, edit availText below.
// Status is controlled via the toggle page (see TOGGLE LINKS below).
//
// EACH PERSON HAS A PERMANENT 6-DIGIT NUMBER ("code").
// This is like a phone extension for the site — fixed forever,
// never regenerated per call. Anyone can dial it directly.
// When adding a new person, give them a NEW unique 6-digit code
// (see genUniqueCode() below to help generate one that doesn't clash).
// ================================================================
const PEOPLE = {
vaani: {
id: 'vaani',
name: 'Vaani',
init: 'V',
bg: '#E6F1FB',
color: '#0C63AE',
role: '💡 Curious conversations',
intention: '"I want to talk to people from different walks of life and let their perspectives challenge mine."',
availText: 'Usually available · Evenings IST',
// Permanent 6-digit CallMate number. Fixed forever — this is
// Vaani's "phone number" on the site.
code: '644821',
},
mira: {
id: 'mira',
name: 'Mira',
init: 'M',
bg: '#FEF3C7',
color: '#92400E',
role: '🌊 Presence & listening',
intention: '"I want to be present for people who need it — not to fix, just to be there."',
availText: 'Usually available · Evenings IST',
code: '319057',
},
};
// Derive each person's PeerJS room ID from their fixed 6-digit code,
// and build a reverse lookup so a typed-in number can find its owner.
const CODE_TO_PERSON = {};
Object.values(PEOPLE).forEach(p => {
p.peerId = 'callmate-' + p.code;
CODE_TO_PERSON[p.code] = p.id;
});
// Helper for when you add a NEW person: run genUniqueCode() in the
// console to get a fresh 6-digit code guaranteed not to clash with
// anyone already in PEOPLE, then hardcode the result above.
function genUniqueCode() {
let code;
do {
code = String(Math.floor(100000 + Math.random() * 900000));
} while (CODE_TO_PERSON[code]);
return code;
}
function formatCode(code) {
return code.slice(0, 3) + ' ' + code.slice(3);
}
// ================================================================
// STATUS STORE
// Uses localStorage so status persists across browser sessions
// on the same device. Each person sets their own status via their
// private toggle link.
// ================================================================
function getStatus(id) { return localStorage.getItem('cm_status_' + id) || 'offline'; }
function saveStatus(id, s) { localStorage.setItem('cm_status_' + id, s); }
// ================================================================
// TOGGLE PAGE
// Vaani visits: callmate.html?toggle=vaani
// Mira visits: callmate.html?toggle=mira
// Bookmark these links — they are your personal on/off switch.
// ================================================================
let togglePersonId = null;
function initTogglePage() {
const params = new URLSearchParams(window.location.search);
const who = params.get('toggle');
if (!who || !PEOPLE[who]) return false;
togglePersonId = who;
const p = PEOPLE[who];
const av = document.getElementById('tgl-av');
av.style.background = p.bg;
av.style.color = p.color;
av.textContent = p.init;
document.getElementById('tgl-name').textContent = p.name;
document.getElementById('tgl-number').textContent = '📱 Your CallMate number: ' + formatCode(p.code);
document.getElementById('tgl-current').textContent =
'Current status: ' + (getStatus(who) === 'online' ? '🟢 Online' : '⚫ Offline');
showPage('toggle');
// If you were already marked online (e.g. you reloaded this tab),
// resume listening for incoming calls automatically.
if (getStatus(who) === 'online') startListening();
return true;
}
function setStatus(status) {
if (!togglePersonId) return;
saveStatus(togglePersonId, status);
const label = status === 'online' ? '🟢 Online' : '⚫ Offline';
document.getElementById('tgl-current').textContent = 'Current status: ' + label;
const confirm = document.getElementById('tgl-confirm');
confirm.textContent = status === 'online'
? '✅ You are now showing as available on CallMate.'
: '✅ You are now showing as away. Callers will see you offline.';
confirm.style.display = 'block';
renderGrids();
if (status === 'online') {
const tip = document.getElementById('tgl-notif-tip');
if (tip && Notification && Notification.permission !== 'granted') tip.style.display = 'block';
requestNotifPermission();
startListening();
} else {
stopListening();
}
}
// ================================================================
// RENDER AVAILABILITY CARDS
// ================================================================
function buildCard(p) {
const online = getStatus(p.id) === 'online';
const pill = online
? `<div class="status-pill online"><div class="pulse green"></div>Available now</div>`
: `<div class="status-pill offline"><div class="pulse amber"></div>Away</div>`;
const btn = online
? `<button class="call-now-btn" onclick="startEntryFlow('${p.id}')">📞 Call ${p.name}</button>`
: `<button class="call-now-btn" disabled>📞 Not available right now</button>
<p class="offline-note">Check back soon — we show our real availability here.</p>`;
return `
<div class="avail-card">
<div class="avail-header">
<div class="avail-identity">
<div class="avail-av" style="background:${p.bg};color:${p.color};">${p.init}</div>
<div>
<div class="avail-name">${p.name}</div>
<div class="avail-role">${p.role}</div>
<div style="font-size:11px;color:var(--muted);margin-top:3px;letter-spacing:0.5px;">CallMate no. <strong style="color:var(--body);letter-spacing:2px;">${formatCode(p.code)}</strong></div>
</div>
</div>
${pill}
</div>
<p class="avail-intention">${p.intention}</p>
<p class="avail-window">🕐 <span>${p.availText}</span></p>
${btn}
</div>`;
}
function renderGrids() {
const cards = Object.values(PEOPLE).map(buildCard).join('');
const lg = document.getElementById('avail-grid-landing');
const ag = document.getElementById('avail-grid-app');
if (lg) lg.innerHTML = cards;
if (ag) ag.innerHTML = cards;
}
// Refresh status every 30 seconds in case they update on another device
setInterval(renderGrids, 30000);
// ================================================================
// NAVIGATION
// ================================================================
function showPage(name) {
document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));
document.getElementById(name).classList.add('active');
window.scrollTo(0, 0);
if (name === 'app') renderGrids();
}
function scrollSmoothTo(id) {
setTimeout(() => {
const el = document.getElementById(id);
if (el) el.scrollIntoView({ behavior: 'smooth' });
}, 120);
}
// ================================================================
// ENTRY FLOW (mood / topic before connecting)
// ================================================================
const moodsHeard = [
{ label: 'Anxious', desc: 'Overwhelmed or worried' },
{ label: 'Sad', desc: 'Down or low energy' },
{ label: 'Lonely', desc: 'Need someone to talk to' },
{ label: 'Stressed', desc: 'Too much going on' },
{ label: 'Angry', desc: 'Frustrated or upset' },
{ label: 'Just venting', desc: 'Need to talk it out' },
];
const topicsConnect = [
{ label: 'Life & choices', desc: 'Decisions, paths, what matters' },
{ label: 'Ideas & beliefs', desc: 'Challenge or explore a perspective' },
{ label: 'Work & ambition', desc: 'Purpose, pressure, the grind' },
{ label: 'People & relationships',desc: 'How we connect and disconnect' },
{ label: 'Something random', desc: 'No agenda — just curious' },
{ label: 'A bit of both', desc: 'Heavy and light at once' },
];
let entryMode = null;
let entryPerson = null;
function startEntryFlow(personId) {
entryPerson = PEOPLE[personId];
entryMode = null;
document.querySelectorAll('.mode-opt').forEach(o => o.classList.remove('selected'));
document.getElementById('entry-s1').style.display = 'block';
document.getElementById('entry-s2').style.display = 'none';
const chk = document.getElementById('good-faith-check');
if (chk) chk.checked = false;
const warn = document.getElementById('check-warning');
if (warn) warn.style.display = 'none';
document.getElementById('entry-overlay').classList.add('open');
}
function closeEntryModal() { document.getElementById('entry-overlay').classList.remove('open'); }
function selectMode(el, mode) {
document.querySelectorAll('.mode-opt').forEach(o => o.classList.remove('selected'));
el.classList.add('selected');
entryMode = mode;
}
function entryStep2() {
if (!entryMode) { alert('Please choose what brings you here.'); return; }
const isHeard = entryMode === 'heard';
document.getElementById('es2-title').textContent = isHeard ? 'What are you feeling?' : 'What would you like to explore?';
document.getElementById('es2-sub').textContent = isHeard
? 'Pick what fits — helps us be present from the first moment.'
: 'Choose a theme — or say you\'re open. Any direction is fine.';
const items = isHeard ? moodsHeard : topicsConnect;
document.getElementById('es2-grid').innerHTML = items.map(i =>
`<button class="mood-opt" onclick="selectMood(this)">${i.label}<small>${i.desc}</small></button>`
).join('');
document.getElementById('entry-s1').style.display = 'none';
document.getElementById('entry-s2').style.display = 'block';
}
function selectMood(btn) {
document.querySelectorAll('#es2-grid .mood-opt').forEach(b => b.classList.remove('selected'));
btn.classList.add('selected');
}
function proceedToCall() {
const check = document.getElementById('good-faith-check');
const warn = document.getElementById('check-warning');
if (check && !check.checked) {
if (warn) warn.style.display = 'block';
return;
}
if (warn) warn.style.display = 'none';
closeEntryModal();
setTimeout(() => dialPerson(entryPerson ? entryPerson.id : 'vaani'), 250);
}
// ================================================================
// PEER-TO-PEER VOICE CALL (PeerJS — no backend, no server needed)
//
// HOW IT WORKS — GENERAL DIAL LINE:
// Vaani and Mira each have a permanent, fixed dial line (a fixed
// PeerJS ID — see PEOPLE.<id>.peerId above). There is no per-call
// code to generate or share. When a caller taps "Call Vaani", the
// browser dials that fixed line directly.
//
// For this to work, Vaani/Mira just need to have their private
// toggle link open with status set to "Online" — the moment they
// go online, their browser starts listening on that fixed line, and
// stays listening (through multiple calls) until they go offline.
// No phone numbers, no server storage, no recording.
// ================================================================
let peer = null;
let activeCall = null;
let pendingCall = null; // incoming call awaiting accept/decline (host side)
let localStream = null;
let remoteAudio = null;
let callTimer = null;
let callSecs = 0;
let isMuted = false;
let isHost = false;
async function getMic() {
try {
localStream = await navigator.mediaDevices.getUserMedia({ audio: true, video: false });
return true;
} catch {
alert('CallMate needs microphone access to connect. Please allow it and try again.');
return false;
}
}
// ----------------------------------------------------------------
// HOST SIDE — Vaani / Mira, from their private toggle page.
// Starts as soon as they flip themselves "online" and keeps
// listening (across multiple calls) until they go "offline".
// ----------------------------------------------------------------
async function startListening() {
if (!togglePersonId) return;
if (peer && !peer.destroyed) return; // already listening
const ok = await getMic();
if (!ok) { saveStatus(togglePersonId, 'offline'); return; }
isHost = true;
const pid = PEOPLE[togglePersonId].peerId;
peer = new Peer(pid, { debug: 0 });
const statusEl = document.getElementById('tgl-listen-status');
const txtEl = document.getElementById('tgl-listen-txt');
if (statusEl) statusEl.style.display = 'flex';
if (txtEl) txtEl.textContent = '📡 Connecting…';
peer.on('open', () => {
if (txtEl) txtEl.textContent = '🎧 Listening for calls — anyone can dial you now';
});
peer.on('call', call => {
pendingCall = call;
const inc = document.getElementById('tgl-incoming');
if (inc) inc.style.display = 'block';
// Play ringtone — works even when tab is in background on Android.
// We generate the tone with Web Audio API (no file needed).
ringStart();
// Also trigger a browser notification if permission was granted.
if (Notification && Notification.permission === 'granted') {
new Notification('📞 CallMate — Incoming call', {
body: 'Someone wants to talk to you. Open CallMate to answer.',
icon: 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="8" fill="%231D9E75"/><text x="16" y="22" text-anchor="middle" font-size="18">📞</text></svg>',
requireInteraction: true,
});
}
});
peer.on('error', err => {
if (!txtEl) return;
txtEl.textContent = err.type === 'unavailable-id'
? '⚠️ Already listening in another tab/device.'
: '⚠️ Connection issue: ' + err.type;
});
peer.on('disconnected', () => {
if (txtEl) txtEl.textContent = '⚠️ Disconnected — trying to reconnect…';
try { peer.reconnect(); } catch (e) {}
});
}
function stopListening() {
const statusEl = document.getElementById('tgl-listen-status');
const incEl = document.getElementById('tgl-incoming');
if (statusEl) statusEl.style.display = 'none';
if (incEl) incEl.style.display = 'none';