@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
@@ -11,14 +11,12 @@
11
11
  .slide2-days__heading {
12
12
  position: absolute;
13
13
  width: 91.79%;
14
- /* left: 4.1%;
15
- top: 10.66%; */
16
14
  font-family: 'Lora', serif;
17
15
  font-style: normal;
18
16
  font-weight: 400;
19
- color: white;
20
- /* margin: 0 0 4.74% 0; */
21
- margin: calc(108px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
17
+ font-size: clamp(14px, 4.1vw, 16px);
18
+ color: #3734D3;
19
+ margin: calc(128px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
22
20
  text-align: left;
23
21
  z-index: 3;
24
22
  }
@@ -33,10 +31,8 @@
33
31
  gap: clamp(8px, 3.08vw, 12px);
34
32
  position: absolute;
35
33
  width: 100%;
36
- /* height: 28.4vh; */
37
34
  left: 0;
38
- top: 21.68vh;
39
- /* margin: calc(183px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right)); */
35
+ top: calc(50% - 240px/2 - 143px);
40
36
  z-index: 2;
41
37
  }
42
38
 
@@ -69,13 +65,9 @@
69
65
  width: 100%;
70
66
  font-family: 'Lora', serif;
71
67
  font-style: normal;
72
- font-weight: 500;
73
- font-size: 2.8vh;
74
- /* line-height: 72px; */
75
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
76
- -webkit-background-clip: text;
77
- -webkit-text-fill-color: transparent;
78
- background-clip: text;
68
+ font-weight: 600;
69
+ font-size: clamp(14px, 4.1vw, 16px);
70
+ color: #3734D3;
79
71
  margin: 0;
80
72
  flex: none;
81
73
  order: 0;
@@ -102,8 +94,8 @@
102
94
  font-style: normal;
103
95
  font-weight: 700;
104
96
  font-size: 10.37vh;
105
- /* line-height: 115px; */
106
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
97
+ /* color: var(--primary-blue); */
98
+ background: var(--bg-gradient);
107
99
  -webkit-background-clip: text;
108
100
  -webkit-text-fill-color: transparent;
109
101
  background-clip: text;
@@ -120,11 +112,7 @@
120
112
  font-style: normal;
121
113
  font-weight: 400;
122
114
  font-size: clamp(14px, 4.1vw, 16px);
123
- /* line-height: 72px; */
124
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
125
- -webkit-background-clip: text;
126
- -webkit-text-fill-color: transparent;
127
- background-clip: text;
115
+ color: #3734D3;
128
116
  margin: 0;
129
117
  flex: none;
130
118
  order: 1;
@@ -138,9 +126,8 @@
138
126
  width: 74.1%;
139
127
  height: 0;
140
128
  left: 25.9%;
141
- top: 79.86vh;
142
- opacity: 0.4;
143
- border: 0.24vh solid #FFFFFF;
129
+ top: 77vh;
130
+ border: 2px solid #E6E5F9;
144
131
  transform-origin: left;
145
132
  z-index: 3;
146
133
  }
@@ -158,11 +145,12 @@
158
145
  flex-direction: column;
159
146
  align-items: flex-end;
160
147
  padding: 0;
148
+ /* padding-right: 70px; Avoid floating Share button */
161
149
  /* gap: 40px; */
162
150
  position: absolute;
163
151
  width: 91.79%;
164
152
  left: 4.1%;
165
- top: 82.23vh;
153
+ top: 79.5vh;
166
154
  z-index: 3;
167
155
  }
168
156
 
@@ -179,12 +167,10 @@
179
167
  font-style: normal;
180
168
  font-weight: 700;
181
169
  font-size: 6.64vh;
182
- /* line-height: 115px; */
183
170
  text-align: right;
184
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
185
- -webkit-background-clip: text;
186
- -webkit-text-fill-color: transparent;
187
- background-clip: text;
171
+ color: #FFFFFF;
172
+ -webkit-text-stroke: 1.5px var(--primary-blue);
173
+ paint-order: stroke fill;
188
174
  margin: 0;
189
175
  flex: none;
190
176
  order: 0;
@@ -198,12 +184,113 @@
198
184
  font-style: normal;
199
185
  font-weight: 400;
200
186
  font-size: clamp(14px, 4.1vw, 16px);
201
- /* line-height: 72px; */
202
187
  text-align: right;
203
188
  flex: none;
204
189
  order: 1;
205
190
  align-self: stretch;
206
191
  flex-grow: 0;
207
- color: white;
208
- margin: 0 0 4.74% 0;
192
+ color: #3734D3;
193
+ margin: 0;
194
+ }
195
+
196
+ /* Media queries for landscape and short screens */
197
+ @media (max-height: 720px), (orientation: landscape) {
198
+ .slide2-days__heading {
199
+ margin-top: calc(100px + env(safe-area-inset-top));
200
+ font-size: clamp(12px, 3.5vw, 14px);
201
+ }
202
+
203
+ .slide2-days__frames .frame-rect {
204
+ height: 24dvh;
205
+ }
206
+
207
+ .stats-number {
208
+ font-size: 8dvh;
209
+ }
210
+
211
+ .streak-number {
212
+ font-size: 5.5dvh;
213
+ }
214
+ }
215
+
216
+ /* Small/Short screens - handles browser chrome taking space */
217
+ @media (max-height: 700px) {
218
+ .slide2-days__heading {
219
+ margin-top: calc(84px + env(safe-area-inset-top));
220
+ }
221
+
222
+ .slide2-days__frames {
223
+ top: calc(50% - 180px/2 - 110px);
224
+ }
225
+
226
+ .slide2-days__frames .frame-rect {
227
+ height: 22dvh;
228
+ width: clamp(120px, 40vw, 160px);
229
+ }
230
+
231
+ .slide2-days__stats-section {
232
+ margin-top: calc(50dvh + env(safe-area-inset-top));
233
+ }
234
+
235
+ .stats-number {
236
+ font-size: 7dvh;
237
+ }
238
+
239
+ .slide2-days__divider {
240
+ top: 70dvh;
241
+ }
242
+
243
+ .slide2-days__streak-section {
244
+ top: 72.5dvh;
245
+ }
246
+
247
+ .streak-number {
248
+ font-size: 5dvh;
249
+ }
250
+ }
251
+
252
+ /* Extra short screens (under 600px) - more aggressive adjustments */
253
+ @media (max-height: 600px) {
254
+ .slide2-days__heading {
255
+ margin-top: calc(68px + env(safe-area-inset-top));
256
+ font-size: clamp(11px, 3vw, 13px);
257
+ }
258
+
259
+ .slide2-days__frames {
260
+ top: calc(50% - 160px/2 - 90px);
261
+ }
262
+
263
+ .slide2-days__frames .frame-rect {
264
+ height: 18dvh;
265
+ width: clamp(100px, 35vw, 140px);
266
+ }
267
+
268
+ .slide2-days__stats-section {
269
+ margin-top: calc(46dvh + env(safe-area-inset-top));
270
+ }
271
+
272
+ .stats-number {
273
+ font-size: 6dvh;
274
+ }
275
+
276
+ .stats-label,
277
+ .stats-sublabel {
278
+ font-size: clamp(11px, 3vw, 13px);
279
+ }
280
+
281
+ .slide2-days__divider {
282
+ top: 66dvh;
283
+ }
284
+
285
+ .slide2-days__streak-section {
286
+ top: 68.5dvh;
287
+ }
288
+
289
+ .streak-number {
290
+ font-size: 4.5dvh;
291
+ }
292
+
293
+ .streak-label {
294
+ font-size: clamp(11px, 3vw, 13px);
295
+ }
209
296
  }
@@ -1,17 +1,71 @@
1
1
  import React from 'react';
2
- import { motion } from 'framer-motion';
2
+ import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
3
3
  import { formatNumber } from '../utils';
4
4
  import './Slide2Days.css';
5
5
 
6
6
  interface Slide2DaysProps {
7
7
  days: number;
8
8
  streak: number;
9
+ frameImages?: string[];
10
+ }
11
+
12
+ /**
13
+ * Custom hook for number counter animation
14
+ */
15
+ function useCountAnimation(target: number, duration: number = 2, delay: number = 0) {
16
+ const count = useMotionValue(0);
17
+ const rounded = useTransform(count, (latest) => Math.round(latest));
18
+
19
+ React.useEffect(() => {
20
+ const controls = animate(count, target, {
21
+ duration,
22
+ delay,
23
+ ease: 'easeOut',
24
+ });
25
+
26
+ return controls.stop;
27
+ }, [count, target, duration, delay]);
28
+
29
+ return rounded;
9
30
  }
10
31
 
11
32
  /**
12
33
  * Slide2Days - Days active and streak statistics
13
34
  */
14
- function Slide2Days({ days, streak }: Slide2DaysProps) {
35
+ function Slide2Days({ days, streak, frameImages }: Slide2DaysProps) {
36
+ const daysCount = useCountAnimation(days, 1.6, 0.4); // 1.6s + 0.4s delay = 2s total
37
+ const streakCount = useCountAnimation(streak, 1.2, 0.8); // 1.2s + 0.8s delay = 2s total
38
+ const frameImagePool = React.useMemo(() => {
39
+ return frameImages && frameImages.length > 0 ? frameImages : [];
40
+ }, [frameImages]);
41
+
42
+ const frameSources = React.useMemo(() => {
43
+ if (!frameImagePool.length) {
44
+ return [];
45
+ }
46
+
47
+ return Array.from({ length: 3 }, () =>
48
+ frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
49
+ );
50
+ }, [frameImagePool]);
51
+
52
+ const getFrameStyle = (index: number) => {
53
+ if (!frameSources.length) {
54
+ return undefined;
55
+ }
56
+
57
+ const image = frameSources[index % frameSources.length];
58
+ if (!image) {
59
+ return undefined;
60
+ }
61
+
62
+ return {
63
+ backgroundImage: `url('${image}')`,
64
+ backgroundSize: 'cover',
65
+ backgroundPosition: 'center',
66
+ };
67
+ };
68
+
15
69
  return (
16
70
  <div className="slide2-days">
17
71
  {/* Top heading - positioned at top like Figma */}
@@ -31,21 +85,15 @@ function Slide2Days({ days, streak }: Slide2DaysProps) {
31
85
  animate={{ opacity: 1, x: 0 }}
32
86
  transition={{ duration: 0.8, delay: 0.2 }}
33
87
  >
34
- <motion.div
35
- className="frame-rect"
36
- animate={{ x: [-20, 20] }}
37
- transition={{ duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
38
- />
39
- <motion.div
40
- className="frame-rect"
41
- animate={{ x: [-20, 20] }}
42
- transition={{ duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
43
- />
44
- <motion.div
45
- className="frame-rect"
46
- animate={{ x: [-20, 20] }}
47
- transition={{ duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
48
- />
88
+ {Array.from({ length: 3 }).map((_, index) => (
89
+ <motion.div
90
+ key={`frame-${index}-${frameSources[index] ?? 'no-image'}`}
91
+ className="frame-rect"
92
+ style={getFrameStyle(index)}
93
+ animate={{ x: [-20, 20] }}
94
+ transition={{ duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
95
+ />
96
+ ))}
49
97
  </motion.div>
50
98
 
51
99
  {/* Days stats block */}
@@ -62,7 +110,7 @@ function Slide2Days({ days, streak }: Slide2DaysProps) {
62
110
  animate={{ opacity: 1, scale: 1 }}
63
111
  transition={{ duration: 0.6, delay: 0.6 }}
64
112
  >
65
- <div className="stats-number">{formatNumber(days)}</div>
113
+ <motion.div className="stats-number">{daysCount}</motion.div>
66
114
  <p className="stats-sublabel">days dey hustle with Huxxle</p>
67
115
  </motion.div>
68
116
  </motion.div>
@@ -82,7 +130,7 @@ function Slide2Days({ days, streak }: Slide2DaysProps) {
82
130
  animate={{ opacity: 1, y: 0 }}
83
131
  transition={{ duration: 0.6, delay: 1.1 }}
84
132
  >
85
- <div className="streak-number">{formatNumber(streak)}</div>
133
+ <motion.div className="streak-number">{streakCount}</motion.div>
86
134
  <p className="streak-label">day streak, You no dey play oh 🤯</p>
87
135
  </motion.div>
88
136
  </div>
@@ -1,30 +1,27 @@
1
+ /* Slide3Revenue - Figma exact specifications with blue/purple scheme */
2
+
1
3
  .slide3-revenue {
2
4
  position: relative;
3
5
  width: 100%;
4
- min-height: 100%;
6
+ height: 100%;
5
7
  overflow: hidden;
6
8
  display: flex;
7
9
  align-items: center;
8
10
  justify-content: center;
9
- padding: 9.48% 6.15% 7.11%;
10
- }
11
-
12
- @media (max-height: 720px), (orientation: landscape) {
13
- .slide3-revenue {
14
- padding: clamp(24px, 5vh, 40px) 6.15% clamp(24px, 4vh, 32px);
15
- }
16
11
  }
17
12
 
18
13
  .slide3-revenue__overlay {
19
14
  position: absolute;
20
- inset: 0;
15
+ width: 100%;
16
+ height: 100%;
17
+ left: 0;
18
+ top: 0;
21
19
  background-size: cover;
22
20
  background-repeat: no-repeat;
23
21
  background-position: center;
24
- opacity: 0.05;
25
- mix-blend-mode: screen;
22
+ opacity: 0.1;
26
23
  z-index: 0;
27
- filter: brightness(0.75);
24
+ pointer-events: none;
28
25
  }
29
26
 
30
27
  .slide3-revenue__content {
@@ -35,55 +32,100 @@
35
32
  flex-direction: column;
36
33
  align-items: center;
37
34
  justify-content: center;
38
- gap: 2.84vh;
35
+ gap: clamp(12px, 2dvh, 24px);
39
36
  text-align: center;
40
- }
41
-
42
- .gradient-text {
43
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
44
- -webkit-background-clip: text;
45
- -webkit-text-fill-color: transparent;
46
- background-clip: text;
47
- color: transparent;
37
+ padding: 0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
48
38
  }
49
39
 
50
40
  .slide3-revenue__title {
51
- font-family: 'Lora', 'Georgia', serif;
52
- font-size: 2.84vh;
53
- font-weight: 500;
54
- letter-spacing: 0.04em;
41
+ font-family: 'Lora', serif;
42
+ font-style: normal;
43
+ font-weight: 600;
44
+ font-size: clamp(16px, 4.1vw, 20px);
45
+ line-height: 1.25;
46
+ color: #3734D3;
55
47
  margin: 0;
56
48
  }
57
49
 
58
50
  .slide3-revenue__amount {
59
- font-family: 'Lora', 'Georgia', serif;
60
- font-size: 7.58vh;
51
+ font-family: 'Lora', serif;
52
+ font-style: normal;
61
53
  font-weight: 700;
54
+ font-size: clamp(40px, 12vh, 60px);
62
55
  line-height: 1;
56
+ /* color: #4F4CD8; */
57
+ background: var(--bg-gradient);
58
+ -webkit-background-clip: text;
59
+ -webkit-text-fill-color: transparent;
60
+ background-clip: text;
63
61
  margin: 0;
62
+ display: flex;
63
+ align-items: baseline;
64
+ justify-content: center;
64
65
  }
65
66
 
66
67
  .slide3-revenue__subline {
67
- font-family: 'Lora', 'Georgia', serif;
68
- font-size: 1.9vh;
68
+ font-family: 'Lora', serif;
69
+ font-style: normal;
69
70
  font-weight: 400;
71
+ font-size: clamp(14px, 4.1vw, 16px);
72
+ line-height: 1.5;
73
+ color: #3734D3;
70
74
  margin: 0;
71
75
  }
72
76
 
73
77
  .slide3-revenue__footer {
74
78
  position: absolute;
75
- bottom: 4.74%;
76
- left: 4.1%;
77
- transform: translateX(0);
78
- font-family: 'Lora', 'Georgia', serif;
79
- font-size: clamp(14px, 4.1vw, 16px);
79
+ bottom: calc(100px + env(safe-area-inset-bottom));
80
+ left: 0;
81
+ right: 0;
82
+ padding: 0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
83
+ font-family: 'Lora', serif;
84
+ font-style: normal;
80
85
  font-weight: 400;
81
- letter-spacing: 0.03em;
86
+ font-size: clamp(14px, 4.1vw, 16px);
87
+ line-height: 1.5;
88
+ color: #3734D3;
89
+ text-align: left;
82
90
  z-index: 1;
83
91
  }
84
92
 
85
- @media (max-width: 480px) {
86
- .slide3-revenue {
87
- padding: 7.11% 4.1% 5.69%;
93
+ /* Media queries for landscape and short screens */
94
+ @media (max-height: 720px), (orientation: landscape) {
95
+ .slide3-revenue__amount {
96
+ font-size: clamp(36px, 10dvh, 60px);
97
+ }
98
+
99
+ .slide3-revenue__title {
100
+ font-size: clamp(14px, 3.5vw, 18px);
101
+ }
102
+ }
103
+
104
+ /* Small/Short screens - handles browser chrome taking space */
105
+ @media (max-height: 700px) {
106
+ .slide3-revenue__amount {
107
+ font-size: clamp(32px, 9dvh, 56px);
108
+ }
109
+
110
+ .slide3-revenue__footer {
111
+ bottom: calc(90px + env(safe-area-inset-bottom));
112
+ font-size: clamp(12px, 3.5vw, 14px);
113
+ }
114
+ }
115
+
116
+ /* Extra short screens (under 600px) - more aggressive adjustments */
117
+ @media (max-height: 600px) {
118
+ .slide3-revenue__amount {
119
+ font-size: clamp(28px, 8dvh, 52px);
120
+ }
121
+
122
+ .slide3-revenue__title,
123
+ .slide3-revenue__subline {
124
+ font-size: clamp(12px, 3vw, 14px);
125
+ }
126
+
127
+ .slide3-revenue__footer {
128
+ bottom: calc(80px + env(safe-area-inset-bottom));
129
+ font-size: clamp(11px, 3vw, 13px);
88
130
  }
89
131
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { motion } from 'framer-motion';
2
+ import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
3
3
  import { formatCurrency } from '../utils';
4
4
  import { BUSINESS_CATEGORIES, BusinessCategory } from '../types';
5
5
  import { recapCopy } from '../data/recapCopy';
@@ -13,12 +13,48 @@ interface Slide3RevenueProps {
13
13
  currency?: string;
14
14
  }
15
15
 
16
+ /**
17
+ * Custom hook for number counter animation with formatting
18
+ */
19
+ function useCountAnimation(target: number, duration: number = 2, delay: number = 0) {
20
+ const count = useMotionValue(0);
21
+ const formatted = useTransform(count, (latest) =>
22
+ Math.round(latest).toLocaleString()
23
+ );
24
+
25
+ React.useEffect(() => {
26
+ const controls = animate(count, target, {
27
+ duration,
28
+ delay,
29
+ ease: 'easeOut',
30
+ });
31
+
32
+ return controls.stop;
33
+ }, [count, target, duration, delay]);
34
+
35
+ return formatted;
36
+ }
37
+
16
38
  /**
17
39
  * Slide3Revenue - Revenue display with money rain overlay
18
40
  */
19
41
  function Slide3Revenue({ revenue, businessCategory, currency }: Slide3RevenueProps) {
20
42
  const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
21
43
  const footerText = copy.revenueFooter;
44
+
45
+ // Counter animation for revenue
46
+ const revenueCount = useCountAnimation(revenue, 1.6, 0.4); // 1.6s + 0.4s delay = 2s total
47
+
48
+ // Get currency symbol
49
+ const getCurrencySymbol = (curr?: string) => {
50
+ const symbols: Record<string, string> = {
51
+ GBP: '£',
52
+ USD: '$',
53
+ EUR: '€',
54
+ NGN: '₦',
55
+ };
56
+ return symbols[curr ?? 'GBP'] ?? '£';
57
+ };
22
58
 
23
59
  return (
24
60
  <div className="slide3-revenue">
@@ -32,7 +68,7 @@ function Slide3Revenue({ revenue, businessCategory, currency }: Slide3RevenuePro
32
68
  <div className="slide3-revenue__content">
33
69
  {/* Title */}
34
70
  <motion.h2
35
- className="slide3-revenue__title gradient-text"
71
+ className="slide3-revenue__title"
36
72
  initial={{ opacity: 0, y: 20 }}
37
73
  animate={{ opacity: 1, y: 0 }}
38
74
  transition={{ duration: 0.5 }}
@@ -42,17 +78,18 @@ function Slide3Revenue({ revenue, businessCategory, currency }: Slide3RevenuePro
42
78
 
43
79
  {/* Big amount with counter animation */}
44
80
  <motion.div
45
- className="slide3-revenue__amount gradient-text"
81
+ className="slide3-revenue__amount"
46
82
  initial={{ opacity: 0, scale: 0.9 }}
47
83
  animate={{ opacity: 1, scale: 1 }}
48
84
  transition={{ duration: 0.8, delay: 0.3 }}
49
85
  >
50
- {formatCurrency(revenue, currency)}
86
+ <span className="slide3-revenue__currency">{getCurrencySymbol(currency)}</span>
87
+ <motion.span>{revenueCount}</motion.span>
51
88
  </motion.div>
52
89
 
53
90
  {/* Subline */}
54
91
  <motion.p
55
- className="slide3-revenue__subline gradient-text"
92
+ className="slide3-revenue__subline"
56
93
  initial={{ opacity: 0, y: 20 }}
57
94
  animate={{ opacity: 1, y: 0 }}
58
95
  transition={{ duration: 0.5, delay: 0.6 }}
@@ -63,7 +100,7 @@ function Slide3Revenue({ revenue, businessCategory, currency }: Slide3RevenuePro
63
100
 
64
101
  {/* Footer message */}
65
102
  <motion.div
66
- className="slide3-revenue__footer gradient-text"
103
+ className="slide3-revenue__footer"
67
104
  initial={{ opacity: 0, y: 20 }}
68
105
  animate={{ opacity: 1, y: 0 }}
69
106
  transition={{ duration: 0.5, delay: 0.9 }}