@katajere/recap 1.0.13 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/App.css +32 -12
  2. package/dist/LoginScreen.css +22 -21
  3. package/dist/OtpScreen.css +20 -17
  4. package/dist/RecapStory.css +148 -0
  5. package/dist/RecapStory.d.ts +2 -2
  6. package/dist/RecapStory.d.ts.map +1 -1
  7. package/dist/RecapStory.js +169 -81
  8. package/dist/StoryProgress.css +3 -3
  9. package/dist/StoryProgress.d.ts +3 -2
  10. package/dist/StoryProgress.d.ts.map +1 -1
  11. package/dist/StoryProgress.js +66 -12
  12. package/dist/assets/huxxle-login-blue-logo.svg +14 -0
  13. package/dist/assets/noisy-background.png +0 -0
  14. package/dist/assets/noisy-background.svg +23 -0
  15. package/dist/assets/search-icon.svg +4 -0
  16. package/dist/assets/share-button.svg +5 -0
  17. package/dist/assets/web-icon.png +0 -0
  18. package/dist/assets/web-icon.svg +14 -0
  19. package/dist/components/Header.css +12 -1
  20. package/dist/components/Header.js +2 -2
  21. package/dist/data/mock.d.ts +1 -1
  22. package/dist/data/mock.d.ts.map +1 -1
  23. package/dist/data/mock.js +36 -23
  24. package/dist/index.d.ts +0 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +0 -1
  27. package/dist/slides/Slide10Final.css +73 -35
  28. package/dist/slides/Slide1Intro.css +204 -56
  29. package/dist/slides/Slide1Intro.d.ts +2 -1
  30. package/dist/slides/Slide1Intro.d.ts.map +1 -1
  31. package/dist/slides/Slide1Intro.js +41 -47
  32. package/dist/slides/Slide2Days.css +121 -34
  33. package/dist/slides/Slide2Days.d.ts +2 -1
  34. package/dist/slides/Slide2Days.d.ts.map +1 -1
  35. package/dist/slides/Slide2Days.js +45 -4
  36. package/dist/slides/Slide3Revenue.css +80 -38
  37. package/dist/slides/Slide3Revenue.d.ts.map +1 -1
  38. package/dist/slides/Slide3Revenue.js +31 -3
  39. package/dist/slides/Slide4Orders.css +93 -34
  40. package/dist/slides/Slide4Orders.d.ts +2 -1
  41. package/dist/slides/Slide4Orders.d.ts.map +1 -1
  42. package/dist/slides/Slide4Orders.js +45 -3
  43. package/dist/slides/Slide5Buyers.css +124 -67
  44. package/dist/slides/Slide5Buyers.d.ts +2 -1
  45. package/dist/slides/Slide5Buyers.d.ts.map +1 -1
  46. package/dist/slides/Slide5Buyers.js +43 -3
  47. package/dist/slides/Slide6Customer.css +294 -52
  48. package/dist/slides/Slide6Customer.d.ts +6 -3
  49. package/dist/slides/Slide6Customer.d.ts.map +1 -1
  50. package/dist/slides/Slide6Customer.js +25 -4
  51. package/dist/slides/Slide7Products.css +8 -7
  52. package/dist/slides/Slide7Products.js +3 -3
  53. package/dist/slides/Slide8Months.css +6 -6
  54. package/dist/slides/Slide9Year.css +4 -2
  55. package/dist/slides/Slide9Year.d.ts +2 -1
  56. package/dist/slides/Slide9Year.d.ts.map +1 -1
  57. package/dist/slides/Slide9Year.js +23 -2
  58. package/dist/types.d.ts +7 -0
  59. package/dist/types.d.ts.map +1 -1
  60. package/dist/utils/slideScreenshot.d.ts +27 -0
  61. package/dist/utils/slideScreenshot.d.ts.map +1 -0
  62. package/dist/utils/slideScreenshot.js +274 -0
  63. package/package.json +2 -1
  64. package/src/App.css +32 -12
  65. package/src/LoginScreen.css +22 -21
  66. package/src/LoginScreen.tsx +1 -1
  67. package/src/OtpScreen.css +20 -17
  68. package/src/OtpScreen.tsx +1 -1
  69. package/src/RecapStory.css +148 -0
  70. package/src/RecapStory.tsx +249 -118
  71. package/src/StoryProgress.css +3 -3
  72. package/src/StoryProgress.tsx +96 -21
  73. package/src/components/Header.css +12 -1
  74. package/src/components/Header.tsx +2 -2
  75. package/src/data/mock.ts +44 -24
  76. package/src/index.ts +0 -1
  77. package/src/slides/Slide10Final.css +73 -35
  78. package/src/slides/Slide1Intro.css +204 -56
  79. package/src/slides/Slide1Intro.tsx +89 -81
  80. package/src/slides/Slide2Days.css +121 -34
  81. package/src/slides/Slide2Days.tsx +67 -19
  82. package/src/slides/Slide3Revenue.css +80 -38
  83. package/src/slides/Slide3Revenue.tsx +43 -6
  84. package/src/slides/Slide4Orders.css +93 -34
  85. package/src/slides/Slide4Orders.tsx +71 -10
  86. package/src/slides/Slide5Buyers.css +124 -67
  87. package/src/slides/Slide5Buyers.tsx +97 -38
  88. package/src/slides/Slide6Customer.css +294 -52
  89. package/src/slides/Slide6Customer.tsx +68 -10
  90. package/src/slides/Slide7Products.css +8 -7
  91. package/src/slides/Slide7Products.tsx +3 -3
  92. package/src/slides/Slide8Months.css +6 -6
  93. package/src/slides/Slide9Year.css +4 -2
  94. package/src/slides/Slide9Year.tsx +35 -7
  95. package/src/types.ts +7 -0
  96. package/src/utils/slideScreenshot.ts +324 -0
  97. package/dist/FloatingFrames.css +0 -55
  98. package/dist/FloatingFrames.d.ts +0 -11
  99. package/dist/FloatingFrames.d.ts.map +0 -1
  100. package/dist/FloatingFrames.js +0 -12
  101. package/src/FloatingFrames.css +0 -55
  102. package/src/FloatingFrames.tsx +0 -27
@@ -14,7 +14,7 @@
14
14
  align-items: flex-start;
15
15
  padding: 0;
16
16
  /* gap: clamp(12px, 1.9dvh, 16px); */
17
- gap: calc(12px + env(safe-area-inset-top));
17
+ /* gap: calc(12px + env(safe-area-inset-top)); */
18
18
  position: absolute;
19
19
  /* width: clamp(300px, 91.79vw, 358px);
20
20
  left: clamp(16px, 4.1vw, 16px);
@@ -23,43 +23,67 @@
23
23
  overflow: visible;
24
24
  }
25
25
 
26
- /* Background "HEY" text - first line, with opacity */
26
+ /* Background "HEY" text - first line, with opacity and border */
27
27
  .slide1-intro__bg-text {
28
28
  font-family: 'Lora', serif;
29
29
  font-style: normal;
30
30
  font-weight: 700;
31
31
  font-size: clamp(40px, 16.41vw, 64px);
32
- line-height: 1;
33
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
34
- -webkit-background-clip: text;
35
- -webkit-text-fill-color: transparent;
36
- background-clip: text;
32
+ /* line-height: 180%; */
33
+ color: transparent;
34
+ -webkit-text-stroke: 1.5px var(--primary-purple);
37
35
  opacity: 0.1;
38
36
  flex: none;
39
37
  order: 0;
40
38
  align-self: stretch;
41
- margin: calc(48px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
39
+ /* Header is ~48px + safe-area, add 6px gap below header */
40
+ margin: calc(54px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
42
41
  }
43
42
 
44
- /* Business name - single line, animated horizontally */
43
+ /* Business name - wraps naturally with dynamic font size */
45
44
  .slide1-intro__brand {
46
45
  font-family: 'Lora', serif;
47
46
  font-style: normal;
48
47
  font-weight: 700;
49
- font-size: clamp(40px, 16.41vw, 64px);
50
- line-height: 1;
51
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
52
- -webkit-background-clip: text;
53
- -webkit-text-fill-color: transparent;
54
- background-clip: text;
48
+ font-size: clamp(28px, 10vw, 56px);
49
+ line-height: 1.05;
50
+ color: #4F4CD8;
55
51
  flex: none;
56
52
  order: 1;
57
53
  align-self: stretch;
54
+ display: flex;
55
+ flex-wrap: wrap;
56
+ margin-left: calc(16px + env(safe-area-inset-left));
57
+ margin-right: calc(16px + env(safe-area-inset-right));
58
+ max-width: calc(100% - calc(16px + env(safe-area-inset-left)) - calc(16px + env(safe-area-inset-right)));
59
+ position: relative;
60
+ z-index: 4;
61
+ }
62
+
63
+ /* Single word business name - larger font */
64
+ .slide1-intro__brand--words-1 {
65
+ font-size: clamp(56px, 20vw, 96px);
66
+ line-height: 1;
67
+ }
68
+
69
+ /* Two word business name - medium font */
70
+ .slide1-intro__brand--words-2 {
71
+ font-size: clamp(44px, 14vw, 72px);
72
+ line-height: 1;
73
+ }
74
+
75
+ /* Three+ word business name - smaller font */
76
+ .slide1-intro__brand--words-3 {
77
+ font-size: clamp(28px, 10vw, 56px);
78
+ }
79
+
80
+ /* Each word - inline with natural flow, wraps when needed */
81
+ .slide1-intro__word {
82
+ display: inline;
58
83
  white-space: nowrap;
59
- margin-left: calc(16px + env(safe-area-inset-top));
60
84
  }
61
85
 
62
- /* Top floating frames - 255px from top */
86
+ /* Top floating frames - positioned to avoid business name */
63
87
  .slide1-intro__frames-top {
64
88
  display: flex;
65
89
  flex-direction: row;
@@ -70,11 +94,26 @@
70
94
  position: absolute;
71
95
  width: 100%;
72
96
  left: 0;
73
- /* top: clamp(180px, 30.21dvh, 255px); */
74
- top: 30.2vh;
97
+ top: 32vh;
75
98
  z-index: 2;
76
99
  }
77
100
 
101
+ /* Dynamic frame positioning based on word count */
102
+ /* 1 word: frames start closer to name since name is on single line */
103
+ .slide1-intro--words-1 .slide1-intro__frames-top {
104
+ top: 26vh;
105
+ }
106
+
107
+ /* 2 words: frames start slightly closer */
108
+ .slide1-intro--words-2 .slide1-intro__frames-top {
109
+ top: 28vh;
110
+ }
111
+
112
+ /* 3+ words: default position */
113
+ .slide1-intro--words-3 .slide1-intro__frames-top {
114
+ top: 32vh;
115
+ }
116
+
78
117
  .slide1-intro__frames-top .frame-rect {
79
118
  box-sizing: border-box;
80
119
  width: clamp(140px, 46.15vw, 180px);
@@ -99,26 +138,33 @@
99
138
  padding: 0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
100
139
  }
101
140
 
141
+ /* Text positioning based on word count - align with frame positions */
142
+ .slide1-intro--words-1 .slide1-intro__text {
143
+ top: 58vh;
144
+ }
145
+
146
+ .slide1-intro--words-2 .slide1-intro__text {
147
+ top: 60vh;
148
+ }
149
+
150
+ .slide1-intro--words-3 .slide1-intro__text {
151
+ top: 63.39vh;
152
+ }
153
+
102
154
  .slide1-intro__headline {
103
155
  width: 100%;
104
156
  font-family: 'Lora', serif;
105
157
  font-style: normal;
106
158
  font-weight: 600;
107
159
  font-size: 4.7vh;
108
- /* line-height: 1.2; */
109
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
110
- -webkit-background-clip: text;
111
- -webkit-text-fill-color: transparent;
112
- background-clip: text;
160
+ line-height: 1.25;
161
+ color: #4F4CD8;
113
162
  flex: none;
114
163
  order: 0;
115
164
  align-self: stretch;
116
165
  margin: 0;
117
- display: -webkit-box;
118
- -webkit-line-clamp: 3;
119
- line-clamp: inherit;
120
- -webkit-box-orient: vertical;
121
- overflow: hidden;
166
+ word-wrap: break-word;
167
+ overflow-wrap: break-word;
122
168
  }
123
169
 
124
170
  .slide1-intro__subtitle {
@@ -128,7 +174,7 @@
128
174
  font-weight: 400;
129
175
  font-size: clamp(14px, 4.1vw, 16px);
130
176
  line-height: 1.5;
131
- color: #FFFFFF;
177
+ color: #3734D3;
132
178
  flex: none;
133
179
  order: 1;
134
180
  align-self: stretch;
@@ -136,17 +182,7 @@
136
182
  }
137
183
  /* Bottom floating frames - 743px from top */
138
184
  .slide1-intro__frames-bottom {
139
- display: flex;
140
- flex-direction: row;
141
- justify-content: center;
142
- align-items: center;
143
- padding: 0;
144
- gap: clamp(10px, 3.85vw, 15px);
145
- position: absolute;
146
- width: 100%;
147
- left: 0;
148
- top: 88dvh;
149
- z-index: 2;
185
+ display: none;
150
186
  }
151
187
 
152
188
  .slide1-intro__frames-bottom .frame-rect {
@@ -194,7 +230,7 @@
194
230
  }
195
231
 
196
232
  .slide1-intro--new-user .slide1-intro__subtitle {
197
- color: #CDCCF4;
233
+ color: var(--border-line);
198
234
  }
199
235
 
200
236
  .slide1-intro--new-user .frame-rect {
@@ -211,27 +247,139 @@
211
247
 
212
248
  /* Media queries for landscape and short screens */
213
249
  @media (max-height: 720px), (orientation: landscape) {
214
- /* .slide1-intro__brand-container {
215
- top: clamp(32px, 4dvh, 40px);
216
- gap: clamp(8px, 1.5dvh, 12px);
217
- } */
218
-
219
250
  .slide1-intro__bg-text,
220
251
  .slide1-intro__brand {
221
252
  font-size: clamp(32px, 12vw, 48px);
222
253
  }
223
254
 
224
- /* .slide1-intro__frames-top {
225
- top: clamp(140px, 22dvh, 180px);
226
- } */
255
+ /* Maintain larger sizes for fewer words on short screens */
256
+ .slide1-intro__brand--words-1 {
257
+ font-size: clamp(48px, 16vw, 72px);
258
+ }
227
259
 
228
- /* .slide1-intro__text {
229
- top: clamp(280px, 50dvh, 380px);
230
- } */
260
+ .slide1-intro__brand--words-2 {
261
+ font-size: clamp(36px, 12vw, 56px);
262
+ }
263
+ }
264
+
265
+ /* Small/Short screens - handles browser chrome taking space */
266
+ @media (max-height: 700px) {
267
+ .slide1-intro__bg-text {
268
+ font-size: clamp(28px, 10vw, 40px);
269
+ /* Maintain header clearance: header ~48px + 6px gap */
270
+ margin-top: calc(54px + env(safe-area-inset-top));
271
+ }
272
+
273
+ .slide1-intro__brand {
274
+ font-size: clamp(22px, 8vw, 36px);
275
+ line-height: 1.0;
276
+ }
277
+
278
+ /* Single word - still larger on short screens */
279
+ .slide1-intro__brand--words-1 {
280
+ font-size: clamp(40px, 14vw, 60px);
281
+ }
282
+
283
+ .slide1-intro__brand--words-2 {
284
+ font-size: clamp(32px, 11vw, 48px);
285
+ }
286
+
287
+ /* Frame positioning for short screens by word count */
288
+ .slide1-intro--words-1 .slide1-intro__frames-top {
289
+ top: 30dvh;
290
+ }
291
+
292
+ .slide1-intro--words-2 .slide1-intro__frames-top {
293
+ top: 32dvh;
294
+ }
295
+
296
+ .slide1-intro--words-3 .slide1-intro__frames-top {
297
+ top: 36dvh;
298
+ }
299
+
300
+ .slide1-intro__frames-top .frame-rect {
301
+ height: 30dvh;
302
+ }
303
+
304
+ /* Text positioning for short screens by word count */
305
+ .slide1-intro--words-1 .slide1-intro__text {
306
+ top: 64dvh;
307
+ }
308
+
309
+ .slide1-intro--words-2 .slide1-intro__text {
310
+ top: 66dvh;
311
+ }
312
+
313
+ .slide1-intro--words-3 .slide1-intro__text {
314
+ top: 70dvh;
315
+ }
316
+
317
+ .slide1-intro__headline {
318
+ font-size: 4dvh;
319
+ line-height: 1.2;
320
+ }
321
+
322
+ .slide1-intro__subtitle {
323
+ font-size: clamp(12px, 3.5vw, 14px);
324
+ line-height: 1.4;
325
+ }
326
+ }
327
+
328
+ /* Extra short screens - more aggressive adjustments */
329
+ @media (max-height: 600px) {
330
+ .slide1-intro__bg-text {
331
+ font-size: clamp(24px, 8vw, 32px);
332
+ /* Maintain header clearance even on extra short screens */
333
+ margin-top: calc(54px + env(safe-area-inset-top));
334
+ }
335
+
336
+ .slide1-intro__brand {
337
+ font-size: clamp(18px, 7vw, 28px);
338
+ line-height: 0.95;
339
+ }
340
+
341
+ /* Single word - still larger on extra short screens */
342
+ .slide1-intro__brand--words-1 {
343
+ font-size: clamp(32px, 12vw, 48px);
344
+ }
345
+
346
+ .slide1-intro__brand--words-2 {
347
+ font-size: clamp(26px, 10vw, 40px);
348
+ }
349
+
350
+ /* Frame positioning for extra short screens by word count */
351
+ .slide1-intro--words-1 .slide1-intro__frames-top {
352
+ top: 26dvh;
353
+ }
231
354
 
232
- /* .slide1-intro__frames-bottom {
233
- top: clamp(420px, 70dvh, 520px);
234
- } */
355
+ .slide1-intro--words-2 .slide1-intro__frames-top {
356
+ top: 28dvh;
357
+ }
358
+
359
+ .slide1-intro--words-3 .slide1-intro__frames-top {
360
+ top: 30dvh;
361
+ }
362
+
363
+ .slide1-intro__frames-top .frame-rect {
364
+ height: 24dvh;
365
+ }
366
+
367
+ /* Text positioning for extra short screens by word count */
368
+ .slide1-intro--words-1 .slide1-intro__text {
369
+ top: 54dvh;
370
+ }
371
+
372
+ .slide1-intro--words-2 .slide1-intro__text {
373
+ top: 56dvh;
374
+ }
375
+
376
+ .slide1-intro--words-3 .slide1-intro__text {
377
+ top: 58dvh;
378
+ }
379
+
380
+ .slide1-intro__headline {
381
+ font-size: 3.5dvh;
382
+ }
235
383
  }
236
384
 
237
385
  /* New User CTA Button */
@@ -1,4 +1,4 @@
1
- import React, { useLayoutEffect, useRef, useState } from 'react';
1
+ import React from 'react';
2
2
  import { motion } from 'framer-motion';
3
3
  import { delayedFadeIn } from '../utils';
4
4
  import { BUSINESS_CATEGORIES, BusinessCategory } from '../types';
@@ -11,74 +11,19 @@ interface Slide1IntroProps {
11
11
  introHeadline?: string;
12
12
  introSubtitle?: string;
13
13
  onDurationCalculated?: (duration: number) => void;
14
+ frameImages?: string[];
14
15
  }
15
16
 
16
17
  /**
17
18
  * Slide1Intro - Identity slide with business name and category-based messaging
18
19
  */
19
- function Slide1Intro({ businessName, businessCategory, introHeadline, introSubtitle, onDurationCalculated }: Slide1IntroProps) {
20
+ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubtitle, onDurationCalculated, frameImages }: Slide1IntroProps) {
20
21
  // Dynamic messaging: use props if provided, otherwise fall back to recapCopy
21
22
  const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
22
23
  const headline = introHeadline ?? copy.introHeadline;
23
24
  const subtitle = introSubtitle ?? copy.introSubtitle;
24
- const [brandWidth, setBrandWidth] = useState(0);
25
- const [headlineWidth, setHeadlineWidth] = useState(0);
26
- const brandRef = useRef<HTMLDivElement | null>(null);
27
- const headlineRef = useRef<HTMLHeadingElement | null>(null);
28
-
29
- useLayoutEffect(() => {
30
- if (brandRef.current) {
31
- // Add extra buffer to account for hidden characters (approximately 3 character widths)
32
- const extraBuffer = brandRef.current.scrollWidth * 0.25; // ~25% extra space
33
- setBrandWidth(brandRef.current.scrollWidth + extraBuffer);
34
- }
35
- }, [businessName]);
36
-
37
- useLayoutEffect(() => {
38
- if (headlineRef.current) {
39
- setHeadlineWidth(headlineRef.current.scrollWidth);
40
- }
41
- }, [headline]);
42
-
43
- // Get actual viewport width for calculation
44
- const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : 390;
45
- const containerWidth = Math.min(viewportWidth, 430); // max-width from App.css
46
- const sidePadding = Math.max(16, containerWidth * 0.041); // clamp(16px, 4.1vw, 20px)
47
- const availableWidth = containerWidth - (sidePadding * 2);
48
-
49
- const brandShift = Math.max(brandWidth - availableWidth, 0);
50
- const headlineShift = Math.max(headlineWidth - availableWidth, 0);
51
-
52
- // Calculate dynamic slide duration based on brand name length
53
- // Tested with real data: 26-75 character business names
54
- const baseAnimationDuration = 6; // seconds minimum for short names
55
- const pixelsPerSecond = 65; // animation speed (constant across all names)
56
-
57
- // Calculate animation duration for brand name
58
- const brandAnimationDuration =
59
- brandShift > 0
60
- ? Math.max(baseAnimationDuration, brandShift / pixelsPerSecond)
61
- : baseAnimationDuration;
62
-
63
- // Calculate animation duration for headline
64
- const headlineAnimationDuration = headlineShift > 0
65
- ? Math.max(baseAnimationDuration, headlineShift / pixelsPerSecond)
66
- : baseAnimationDuration;
67
-
68
- // Use the longer of the two animations, plus buffer time
69
- const dynamicSlideDuration = Math.max(
70
- brandAnimationDuration,
71
- headlineAnimationDuration
72
- ) + 2; // +2 second buffer for user to read the final position
73
-
74
- // Notify parent of calculated duration
75
- React.useEffect(() => {
76
- if (onDurationCalculated && brandWidth > 0 && headlineWidth > 0) {
77
- onDurationCalculated(dynamicSlideDuration);
78
- }
79
- }, [dynamicSlideDuration, brandWidth, headlineWidth, onDurationCalculated]);
80
25
 
81
- const slideClass = `slide1-intro slide1-intro--${copy.introVariant}`;
26
+ const slideClass = `slide1-intro slide1-intro--${copy.introVariant} slide1-intro--words-${Math.min(businessName.split(' ').length, 3)}`;
82
27
  const isNewUser = businessCategory === BUSINESS_CATEGORIES.NEW_USER;
83
28
 
84
29
  const handleContinue = () => {
@@ -87,6 +32,37 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
87
32
  }
88
33
  };
89
34
 
35
+ const frameImagePool = React.useMemo(() => {
36
+ return frameImages && frameImages.length > 0 ? frameImages : [];
37
+ }, [frameImages]);
38
+
39
+ const frameSources = React.useMemo(() => {
40
+ if (!frameImagePool.length) {
41
+ return [];
42
+ }
43
+
44
+ return Array.from({ length: 6 }, () =>
45
+ frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
46
+ );
47
+ }, [frameImagePool]);
48
+
49
+ const getFrameStyle = (index: number) => {
50
+ if (!frameSources.length) {
51
+ return undefined;
52
+ }
53
+
54
+ const image = frameSources[index % frameSources.length];
55
+ if (!image) {
56
+ return undefined;
57
+ }
58
+
59
+ return {
60
+ backgroundImage: `url('${image}')`,
61
+ backgroundSize: 'cover',
62
+ backgroundPosition: 'center',
63
+ };
64
+ };
65
+
90
66
  return (
91
67
  <div className={slideClass}>
92
68
  {/* Brand name container with HEY text and business name */}
@@ -94,15 +70,52 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
94
70
  {/* Background "HEY" text */}
95
71
  <div className="slide1-intro__bg-text">HEY</div>
96
72
 
97
- {/* Business name (animated scroll left) */}
98
- <motion.div
99
- className="slide1-intro__brand"
100
- ref={brandRef}
101
- animate={{ x: [0, -brandShift] }}
102
- transition={{ duration: brandAnimationDuration, repeat: 0, ease: 'linear' }}
103
- >
104
- {businessName}
105
- </motion.div>
73
+ {/* Business name (character animation with natural word flow) */}
74
+ <div className={`slide1-intro__brand slide1-intro__brand--words-${Math.min(businessName.split(' ').length, 3)}`}>
75
+ {businessName.split(' ').map((word, wordIndex, wordsArray) => {
76
+ // Calculate character offset for stagger delay (include space characters)
77
+ const charOffset = wordsArray
78
+ .slice(0, wordIndex)
79
+ .reduce((acc, w, i) => acc + w.length + (i < wordIndex ? 1 : 0), 0);
80
+
81
+ return (
82
+ <React.Fragment key={wordIndex}>
83
+ <span className="slide1-intro__word">
84
+ {word.split('').map((char, charIndex) => (
85
+ <motion.span
86
+ key={charIndex}
87
+ initial={{ opacity: 0, y: 20, rotateX: -90 }}
88
+ animate={{
89
+ opacity: 1,
90
+ y: 0,
91
+ rotateX: 0,
92
+ }}
93
+ transition={{
94
+ duration: 0.5,
95
+ delay: (charOffset + charIndex) * 0.03,
96
+ ease: [0.34, 1.56, 0.64, 1],
97
+ }}
98
+ style={{ display: 'inline-block' }}
99
+ >
100
+ {char}
101
+ </motion.span>
102
+ ))}
103
+ </span>
104
+ {/* Add space between words (except after last word) */}
105
+ {wordIndex < wordsArray.length - 1 && (
106
+ <motion.span
107
+ initial={{ opacity: 0 }}
108
+ animate={{ opacity: 1 }}
109
+ transition={{ duration: 0.3, delay: (charOffset + word.length) * 0.03 }}
110
+ style={{ display: 'inline-block', width: '0.3em' }}
111
+ >
112
+ {' '}
113
+ </motion.span>
114
+ )}
115
+ </React.Fragment>
116
+ );
117
+ })}
118
+ </div>
106
119
  </div>
107
120
 
108
121
  {/* Top floating frames (slow horizontal drift) */}
@@ -111,9 +124,9 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
111
124
  animate={{ x: [-30, 30] }}
112
125
  transition={{ duration: 15, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
113
126
  >
114
- <div className="frame-rect" />
115
- <div className="frame-rect" />
116
- <div className="frame-rect" />
127
+ {Array.from({ length: 3 }).map((_, index) => (
128
+ <div key={`top-rect-${index}`} className="frame-rect" style={getFrameStyle(index)} />
129
+ ))}
117
130
  </motion.div>
118
131
 
119
132
  {/* Headline and subtitle */}
@@ -123,14 +136,9 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
123
136
  initial="initial"
124
137
  animate="animate"
125
138
  >
126
- <motion.h2
127
- className="slide1-intro__headline"
128
- ref={headlineRef}
129
- animate={{ x: [0, -headlineShift] }}
130
- transition={{ duration: headlineAnimationDuration, repeat: 1, repeatType: 'reverse', ease: 'linear' }}
131
- >
139
+ <h2 className="slide1-intro__headline">
132
140
  {headline}
133
- </motion.h2>
141
+ </h2>
134
142
  <p className="slide1-intro__subtitle">{subtitle}</p>
135
143
  </motion.div>
136
144
 
@@ -140,9 +148,9 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
140
148
  animate={{ x: [-30, 30] }}
141
149
  transition={{ duration: 15, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
142
150
  >
143
- <div className="frame-rect" />
144
- <div className="frame-rect" />
145
- <div className="frame-rect" />
151
+ {Array.from({ length: 3 }).map((_, index) => (
152
+ <div key={`bottom-rect-${index}`} className="frame-rect" style={getFrameStyle(index + 3)} />
153
+ ))}
146
154
  </motion.div>
147
155
 
148
156
  {/* New User CTA Button - Animated from bottom */}