-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowcase-j.html
More file actions
386 lines (345 loc) · 23.4 KB
/
showcase-j.html
File metadata and controls
386 lines (345 loc) · 23.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://www.agentcollect.com/showcase-j">
<title>AgentCollect — The End of Manual Collection</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%23433196'/%3E%3Ctext x='28' y='48' text-anchor='middle' fill='white' font-family='system-ui' font-weight='900' font-size='46' letter-spacing='-3'%3EA%3C/text%3E%3Ccircle cx='52' cy='16' r='6' fill='white' opacity='0.85'/%3E%3C/svg%3E">
<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=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
*{margin:0;padding:0;box-sizing:border-box}
:root{
--bg:#FAFBFF;--bg-card:#fff;--bg-dark:#0B1B3D;
--border:#E8ECF2;--border-hover:rgba(79,70,229,.18);
--text:#0B1B3D;--text-mid:#374151;--text-muted:#64748B;--text-dim:#94A3B8;
--indigo:#4F46E5;--indigo-dark:#4338CA;--indigo-light:rgba(79,70,229,.04);--indigo-glow:rgba(79,70,229,.08);
--green:#10B981;--green-dark:#059669;--green-light:rgba(16,185,129,.04);
--amber:#F59E0B;--red:#EF4444;
--mono:'JetBrains Mono',monospace;--sans:'Inter',-apple-system,sans-serif;--display:'Plus Jakarta Sans',sans-serif;
--shadow-sm:0 1px 2px rgba(0,0,0,.03);
--shadow-md:0 2px 8px rgba(0,0,0,.04);
--shadow-lg:0 8px 24px rgba(0,0,0,.06);
--radius:14px;
--max-w:1120px;
}
html{scroll-behavior:smooth}
body{font-family:var(--sans);font-size:17px;background:#fff;color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden;line-height:1.7;position:relative}
/* SUBTLE GRID BACKGROUND */
body::before{content:'';position:fixed;inset:0;z-index:-1;background-image:
linear-gradient(rgba(79,70,229,.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(79,70,229,.03) 1px, transparent 1px);
background-size:64px 64px;pointer-events:none}
h1,h2,h3,h4,h5{font-family:var(--display);line-height:1.15;letter-spacing:-.04em}
::selection{background:rgba(79,70,229,.08)}
@keyframes fadeUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@keyframes pulse-ring{0%{box-shadow:0 0 0 0 rgba(79,70,229,.2)}70%{box-shadow:0 0 0 6px rgba(79,70,229,0)}100%{box-shadow:0 0 0 0 rgba(79,70,229,0)}}
/* NAV */
.nav{position:fixed;top:0;left:0;right:0;z-index:1000;background:rgba(255,255,255,.92);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid var(--border);transition:box-shadow .3s}
.nav.scrolled{box-shadow:0 1px 3px rgba(0,0,0,.02)}
.nav-inner{max-width:var(--max-w);margin:0 auto;padding:0 32px;display:flex;align-items:center;height:64px}
.logo{display:inline-flex;align-items:baseline;text-decoration:none;margin-right:auto;font-family:var(--display);font-size:18px;font-weight:900;letter-spacing:-.04em;color:var(--text)}
.dot-circle{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--indigo);margin-left:1px;vertical-align:super}
.nav-links{display:flex;gap:24px;margin-right:24px}
.nav-links a{color:var(--text-muted);text-decoration:none;font-size:13px;font-weight:500;transition:color .2s;letter-spacing:-.01em;white-space:nowrap}
.nav-links a:hover{color:var(--text)}
.nav-right{display:flex;align-items:center;gap:10px}
.nav-cta{padding:12px 24px;background:var(--indigo);color:#fff;border:none;border-radius:12px;font-family:var(--sans);font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;transition:all .2s;display:inline-flex;align-items:center;letter-spacing:-.01em}
.nav-cta:hover{background:var(--indigo-dark)}
.nav-cta-ghost{padding:12px 24px;background:transparent;color:var(--text-mid);border:1px solid var(--border);border-radius:12px;font-family:var(--sans);font-size:13px;font-weight:500;cursor:pointer;text-decoration:none;transition:all .2s;display:inline-flex;align-items:center}
.nav-cta-ghost:hover{border-color:var(--text-mid);color:var(--text)}
.nav-mobile{display:none;background:none;border:none;cursor:pointer;padding:8px;min-width:44px;min-height:44px}
/* ORB ANIMATIONS */
@keyframes orb1{0%{transform:translate(0,0) scale(1)}33%{transform:translate(120px,-80px) scale(1.15)}66%{transform:translate(-60px,100px) scale(.9)}100%{transform:translate(0,0) scale(1)}}
@keyframes orb2{0%{transform:translate(0,0) scale(1)}33%{transform:translate(-140px,60px) scale(1.1)}66%{transform:translate(100px,-120px) scale(1.15)}100%{transform:translate(0,0) scale(1)}}
@keyframes orb3{0%{transform:translate(0,0) scale(1)}25%{transform:translate(80px,90px) scale(1.2)}50%{transform:translate(-50px,40px) scale(.85)}75%{transform:translate(60px,-60px) scale(1.1)}100%{transform:translate(0,0) scale(1)}}
@keyframes pulse{0%,100%{transform:scale(1);opacity:.65}50%{transform:scale(1.25);opacity:.85}}
.hero-canvas{position:absolute;bottom:-80px;left:50%;transform:translateX(-50%);width:1100px;height:580px;pointer-events:none;z-index:0}
.hero-canvas .orb{position:absolute;border-radius:50%;filter:blur(48px);animation-timing-function:ease-in-out;animation-iteration-count:infinite;mix-blend-mode:multiply}
.hero-canvas .o1{width:520px;height:320px;bottom:-40px;left:50%;margin-left:-380px;border-radius:45%;background:radial-gradient(ellipse,rgba(79,70,229,.75) 0%,rgba(99,102,241,.35) 50%,transparent 75%);animation:orb1 5s ease-in-out infinite}
.hero-canvas .o2{width:480px;height:280px;bottom:0;left:50%;margin-left:80px;border-radius:45%;background:radial-gradient(ellipse,rgba(16,185,129,.7) 0%,rgba(5,150,105,.35) 50%,transparent 75%);animation:orb2 6s ease-in-out infinite}
.hero-canvas .o3{width:400px;height:250px;bottom:60px;left:50%;margin-left:-120px;border-radius:45%;background:radial-gradient(ellipse,rgba(139,92,246,.65) 0%,rgba(167,139,250,.3) 50%,transparent 75%);animation:pulse 4s ease-in-out infinite, orb3 5s ease-in-out infinite}
.hero-canvas .o4{width:340px;height:200px;bottom:10px;left:50%;margin-left:260px;border-radius:45%;background:radial-gradient(ellipse,rgba(79,70,229,.5) 0%,transparent 70%);animation:orb1 7s ease-in-out infinite reverse}
.hero-canvas .o5{width:300px;height:180px;bottom:40px;left:50%;margin-left:-340px;border-radius:45%;background:radial-gradient(ellipse,rgba(16,185,129,.55) 0%,transparent 70%);animation:orb2 5s ease-in-out infinite reverse}
.hero-canvas .o6{width:240px;height:160px;bottom:100px;left:50%;margin-left:0;border-radius:45%;background:radial-gradient(ellipse,rgba(245,158,11,.4) 0%,transparent 70%);animation:orb3 6s ease-in-out infinite 1s}
/* fade to white at top */
.hero-canvas::after{content:'';position:absolute;inset:0;background:linear-gradient(to top,transparent 15%,#fff 60%);pointer-events:none}
/* HERO */
.hero{min-height:100vh;padding:112px 32px 80px;text-align:center;position:relative;background:#fff;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center}
/* GRADIENT MESH */
.hero::after{content:'';position:absolute;inset:0;pointer-events:none;
background:
radial-gradient(ellipse 600px 600px at 75% 20%, rgba(79,70,229,.04), transparent),
radial-gradient(ellipse 500px 500px at 25% 80%, rgba(16,185,129,.03), transparent);
background-size:200% 200%;
animation:mesh-move 20s ease-in-out infinite alternate}
@keyframes mesh-move{
0%{background-position:0% 0%}
25%{background-position:50% 30%}
50%{background-position:100% 50%}
75%{background-position:60% 80%}
100%{background-position:10% 60%}
}
.hero h1{font-size:clamp(40px,5.5vw,56px);font-weight:900;letter-spacing:-.05em;line-height:1.05;margin-bottom:14px;max-width:700px;color:var(--text);position:relative;z-index:1}
.hero-sub{font-size:20px;color:var(--text-muted);font-weight:400;margin-bottom:32px;position:relative;z-index:1;letter-spacing:-.01em}
/* TRUST BAR */
.hero-trust{display:flex;align-items:center;justify-content:center;gap:28px;margin-bottom:36px;flex-wrap:wrap;position:relative;z-index:1}
.hero-trust-label{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-dim);white-space:nowrap;margin-right:4px}
.hero-trust img{height:20px;opacity:.55;filter:grayscale(100%);object-fit:contain;max-width:100px;transition:opacity .3s}
.hero-trust img:hover{opacity:.8;filter:grayscale(0%)}
/* SEARCH BAR */
.hero-search{max-width:520px;width:100%;position:relative;z-index:1}
.hero-search-label{font-size:14px;color:var(--text-mid);font-weight:500;text-align:center;margin-bottom:10px;letter-spacing:-.01em}
.hero-search .input-box{display:flex;align-items:center;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:4px;transition:all .25s;box-shadow:0 4px 24px rgba(0,0,0,.04)}
.hero-search .input-box:focus-within{border-color:var(--indigo);box-shadow:0 0 0 3px rgba(79,70,229,.06),0 4px 24px rgba(0,0,0,.04)}
.hero-search .input-field{flex:1;padding:16px 20px;background:transparent;border:none;font-family:var(--sans);font-size:17px;color:var(--text);outline:none;letter-spacing:-.01em}
.hero-search .input-field::placeholder{color:var(--text-muted)}
.hero-search .input-btn{padding:16px 32px;background:var(--indigo);color:#fff;border:none;border-radius:12px;font-family:var(--sans);font-size:16px;font-weight:600;cursor:pointer;transition:all .2s;white-space:nowrap;letter-spacing:-.01em}
.hero-search .input-btn:hover{background:var(--indigo-dark)}
/* ============================================ */
/* PROOF WALL — dark section */
/* ============================================ */
.proof-wall{padding:120px 32px;background:#050505;position:relative;overflow:hidden}
.proof-wall::before{content:'';position:absolute;inset:0;background-image:
linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
background-size:64px 64px;pointer-events:none}
.proof-wall-header{text-align:center;margin-bottom:64px;position:relative}
.proof-wall-header h2{font-size:clamp(28px,4vw,36px);font-weight:900;color:#fff;letter-spacing:-.04em;margin-bottom:10px}
.proof-wall-header p{font-size:17px;color:rgba(255,255,255,.45);max-width:460px;margin:0 auto;letter-spacing:-.01em}
.proof-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;max-width:var(--max-w);margin:0 auto;position:relative}
/* Card */
.proof-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:28px;display:flex;flex-direction:column;gap:20px;transition:all .35s cubic-bezier(.16,1,.3,1);opacity:0;transform:translateY(24px)}
.proof-card.visible{opacity:1;transform:translateY(0)}
.proof-card:hover{transform:translateY(-4px);border-color:rgba(255,255,255,.14);box-shadow:0 16px 48px rgba(0,0,0,.3)}
.proof-card.playing{border-color:rgba(79,70,229,.5);box-shadow:0 0 0 1px rgba(79,70,229,.3),0 16px 48px rgba(79,70,229,.1)}
/* Badge pill */
.proof-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:100px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;width:fit-content}
.proof-badge.indigo{background:rgba(79,70,229,.12);color:#818CF8}
.proof-badge.green{background:rgba(16,185,129,.12);color:#34D399}
/* Quote */
.proof-quote{font-family:var(--display);font-size:18px;font-weight:600;color:#fff;line-height:1.45;letter-spacing:-.02em;flex:1}
.proof-attribution{font-size:12px;color:rgba(255,255,255,.35);font-weight:400;margin-top:-8px}
/* AI response box */
.proof-ai{background:rgba(79,70,229,.08);border:1px solid rgba(79,70,229,.12);border-radius:10px;padding:14px 16px}
.proof-ai-label{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#818CF8;margin-bottom:6px}
.proof-ai-text{font-size:14px;color:rgba(79,70,229,.8);line-height:1.55;font-weight:400;color:#A5B4FC}
/* Play button */
.proof-play{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:auto}
.proof-play-btn{width:44px;height:44px;border-radius:50%;background:var(--indigo);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .25s;position:relative;overflow:hidden}
.proof-play-btn:hover{background:var(--indigo-dark);transform:scale(1.06)}
.proof-play-btn svg{width:16px;height:16px;fill:#fff;position:relative;z-index:1}
.proof-play-label{font-size:11px;color:rgba(255,255,255,.35);font-weight:500;letter-spacing:.02em}
/* Equalizer animation */
.proof-play-btn .eq{display:none;gap:2px;align-items:flex-end;height:14px}
.proof-play-btn.playing-btn .eq{display:flex}
.proof-play-btn.playing-btn svg.play-icon{display:none}
.eq-bar{width:3px;background:#fff;border-radius:2px;animation:eq-bounce .6s ease-in-out infinite alternate}
.eq-bar:nth-child(1){height:6px;animation-delay:0s}
.eq-bar:nth-child(2){height:12px;animation-delay:.15s}
.eq-bar:nth-child(3){height:8px;animation-delay:.3s}
.eq-bar:nth-child(4){height:14px;animation-delay:.1s}
@keyframes eq-bounce{0%{height:4px}100%{height:14px}}
/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media(max-width:768px){
.nav-links{display:none}
.nav-mobile{display:block}
.nav-inner{padding:0 20px}
.nav-right .nav-cta-ghost{display:none}
.hero{padding:100px 20px 60px;min-height:auto}
.hero-search .input-box{flex-direction:column;padding:4px}
.hero-search .input-btn{width:100%;justify-content:center;border-radius:12px}
.hero-search .input-field{text-align:center}
.hero-trust{gap:16px}
.hero-trust img{height:16px}
.proof-wall{padding:80px 20px}
.proof-cards{grid-template-columns:1fr;max-width:440px}
}
@media(max-width:480px){
.hero h1{font-size:36px}
.hero-sub{font-size:17px}
}
</style>
<!-- RB2B -->
<script>!function(key) {if (window.reb2b) return;window.reb2b = {loaded: true};var s = document.createElement("script");s.async = true;s.src = "https://ddwl4m2hdecbv.cloudfront.net/b/" + key + "/" + key + ".js.gz";document.getElementsByTagName("script")[0].parentNode.insertBefore(s, document.getElementsByTagName("script")[0]);}("LNKLDHEDW9OJ");</script>
</head>
<body>
<!-- NAV -->
<nav class="nav" id="nav">
<div class="nav-inner">
<a href="/" class="logo">Agent<span>Collect</span><span class="dot-circle"></span></a>
<div class="nav-links">
<a href="#">AI Collection</a>
<a href="#">Attorney Collection</a>
<a href="#">Pricing</a>
<a href="#">Security</a>
</div>
<div class="nav-right">
<a href="https://cal.com/johnb/30" class="nav-cta-ghost" target="_blank">Talk to us</a>
<a href="#" class="nav-cta">See your collection plan</a>
</div>
<button class="nav-mobile" aria-label="Menu">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="var(--text)" stroke-width="1.5"><path d="M3 12h18M3 6h18M3 18h18"/></svg>
</button>
</div>
</nav>
<!-- HERO -->
<section class="hero">
<!-- Orbs -->
<div class="hero-canvas">
<div class="orb o1"></div>
<div class="orb o2"></div>
<div class="orb o3"></div>
<div class="orb o4"></div>
<div class="orb o5"></div>
<div class="orb o6"></div>
</div>
<h1>The end of manual collection.</h1>
<p class="hero-sub">They think they're talking to you.</p>
<!-- Trust bar -->
<div class="hero-trust">
<span class="hero-trust-label">Trusted by</span>
<img src="https://cdn.brandfetch.io/microsoft.com/w/512/h/80/logo" alt="Microsoft">
<img src="https://cdn.brandfetch.io/dell.com/w/512/h/80/logo" alt="Dell">
<img src="https://cdn.brandfetch.io/plaid.com/w/512/h/80/logo" alt="Plaid">
</div>
<!-- Search bar -->
<div class="hero-search">
<div class="hero-search-label">50% recovered in 20 days — see your agent</div>
<div class="input-box">
<input type="text" class="input-field" placeholder="uber.com" autocomplete="off" spellcheck="false">
<button class="input-btn">Build my agent</button>
</div>
</div>
</section>
<!-- 3 REAL CALLS — PROOF WALL -->
<section class="proof-wall" id="proof">
<div class="proof-wall-header">
<h2>Hear your AI agent in action</h2>
<p>3 real collection calls. Handled entirely by AI.</p>
</div>
<div class="proof-cards">
<!-- Card 1: Objection Handled -->
<div class="proof-card" data-audio="https://dxc03zgurdly9.cloudfront.net/075961824e83d68a634b91afb75f59fba97b1b2951c58dc43ec9a5e3bc58b806/recording.wav" data-start="30">
<div class="proof-badge indigo">Objection Handled</div>
<div class="proof-quote">“What are we getting charged for exactly?”</div>
<div class="proof-attribution">— Khalil, debtor</div>
<div class="proof-ai">
<div class="proof-ai-label">AI Agent:</div>
<div class="proof-ai-text">$29.99. Background check from [Client].</div>
</div>
<div class="proof-play">
<button class="proof-play-btn" aria-label="Play call recording">
<svg class="play-icon" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>
<div class="eq"><div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div></div>
</button>
<span class="proof-play-label">Listen to the real call</span>
</div>
</div>
<!-- Card 2: Contact Collected -->
<div class="proof-card" data-audio="https://dxc03zgurdly9.cloudfront.net/00d79b2208aee99e88fb7a0033974bba3140f3b905b388429b22133e4694c670/recording.wav" data-start="56">
<div class="proof-badge indigo">Contact Collected</div>
<div class="proof-quote">“I don't deal with that. You'd wanna call accounts payable.”</div>
<div class="proof-attribution">— Jonathan, employee</div>
<div class="proof-ai">
<div class="proof-ai-label">AI Agent:</div>
<div class="proof-ai-text">Could you provide the name or contact info for AP?</div>
</div>
<div class="proof-play">
<button class="proof-play-btn" aria-label="Play call recording">
<svg class="play-icon" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>
<div class="eq"><div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div></div>
</button>
<span class="proof-play-label">Listen to the real call</span>
</div>
</div>
<!-- Card 3: Paid on Call -->
<div class="proof-card" data-audio="https://dxc03zgurdly9.cloudfront.net/10b4ec959b4a004a6bf47dcfa2da0a213c7ce231590e295d9c60faffde486685/recording.wav" data-start="50">
<div class="proof-badge green">Paid on Call</div>
<div class="proof-quote">“I'm paying it today. I have it coming in.”</div>
<div class="proof-attribution">— Rachel, debtor</div>
<div class="proof-ai">
<div class="proof-ai-label">AI Agent:</div>
<div class="proof-ai-text">No worries at all. I can stay on the line.</div>
</div>
<div class="proof-play">
<button class="proof-play-btn" aria-label="Play call recording">
<svg class="play-icon" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>
<div class="eq"><div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div></div>
</button>
<span class="proof-play-label">Listen to the real call</span>
</div>
</div>
</div>
</section>
<script>
// Nav scroll shadow
window.addEventListener('scroll', () => {
document.getElementById('nav').classList.toggle('scrolled', window.scrollY > 10);
});
// IntersectionObserver for proof cards — staggered reveal
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
observer.unobserve(entry.target);
}
});
}, { threshold: 0.15 });
document.querySelectorAll('.proof-card').forEach((card, i) => {
card.style.transitionDelay = `${i * 150}ms`;
observer.observe(card);
});
// Audio player — only one at a time
let currentAudio = null;
let currentBtn = null;
let currentCard = null;
document.querySelectorAll('.proof-play-btn').forEach(btn => {
btn.addEventListener('click', function() {
const card = this.closest('.proof-card');
const audioUrl = card.dataset.audio;
const startTime = parseFloat(card.dataset.start) || 0;
// If clicking the same card that's playing, stop it
if (currentCard === card && currentAudio && !currentAudio.paused) {
currentAudio.pause();
currentAudio.currentTime = 0;
currentBtn.classList.remove('playing-btn');
currentCard.classList.remove('playing');
currentAudio = null;
currentBtn = null;
currentCard = null;
return;
}
// Stop any currently playing audio
if (currentAudio) {
currentAudio.pause();
currentAudio.currentTime = 0;
if (currentBtn) currentBtn.classList.remove('playing-btn');
if (currentCard) currentCard.classList.remove('playing');
}
// Create and play new audio
const audio = new Audio(audioUrl);
audio.currentTime = startTime;
audio.play().catch(() => {});
this.classList.add('playing-btn');
card.classList.add('playing');
currentAudio = audio;
currentBtn = this;
currentCard = card;
audio.addEventListener('ended', () => {
this.classList.remove('playing-btn');
card.classList.remove('playing');
currentAudio = null;
currentBtn = null;
currentCard = null;
});
});
});
</script>
</body>
</html>