-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmobile-interactions.css
More file actions
232 lines (201 loc) · 6.26 KB
/
mobile-interactions.css
File metadata and controls
232 lines (201 loc) · 6.26 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
/* Mobile Touch Interactions CSS for Bird's Nest Landing Page */
/* Enhanced touch feedback for About section */
@media (hover: none) and (pointer: coarse) {
/* Feature item touch interactions */
.feature-item {
transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
background-color 0.3s ease;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
cursor: pointer;
}
.feature-item:active {
transform: scale(0.98);
box-shadow: 0 4px 16px rgba(200, 150, 120, 0.15);
background: linear-gradient(135deg,
rgba(255, 255, 255, 0.95) 0%,
rgba(248, 246, 243, 0.8) 100%);
}
.feature-icon {
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
background 0.3s ease,
color 0.3s ease;
}
.feature-item:active .feature-icon {
transform: scale(1.1) rotate(15deg);
background: linear-gradient(135deg, #c89678 0%, #96b4c8 100%);
color: white;
}
/* Better touch effects for small screens */
@media screen and (max-width: 576px) {
.feature-item {
position: relative;
overflow: hidden;
}
.feature-item:active::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at center,
rgba(200, 150, 120, 0.1) 0%,
transparent 70%);
animation: ripple 0.8s ease-out;
}
@keyframes ripple {
from { opacity: 1; transform: scale(0.3); }
to { opacity: 0; transform: scale(2); }
}
}
/* Image placeholder touch interactions */
.image-placeholder {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.image-placeholder:active {
transform: scale(0.97);
box-shadow: 0 15px 45px rgba(200, 150, 120, 0.2);
}
.image-placeholder i {
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.image-placeholder:active i {
transform: scale(1.1) rotate(10deg);
}
}
/* Add smooth content reveal animations for About section on mobile */
@media (max-width: 767px) {
.about .section-header,
.feature-item,
.image-placeholder {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.5s ease, transform 0.5s ease;
}
.about .section-header.animate,
.feature-item.animate,
.image-placeholder.animate {
opacity: 1;
transform: translateY(0);
}
/* Staggered animation for feature items */
.feature-item:nth-child(1) {
transition-delay: 0.1s;
}
.feature-item:nth-child(2) {
transition-delay: 0.2s;
}
.feature-item:nth-child(3) {
transition-delay: 0.3s;
}
}
/* Improve scrolling performance */
@media (max-width: 991px) {
.about {
will-change: transform;
backface-visibility: hidden;
}
.feature-item {
will-change: transform;
}
}
/* Swipe gestures for About section */
@media (pointer: coarse) {
.about {
position: relative;
/* Enable smooth scrolling for the section */
scroll-behavior: smooth;
/* Add momentum scrolling on iOS */
-webkit-overflow-scrolling: touch;
}
.about::after {
content: '';
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 40px;
background-color: rgba(200, 150, 120, 0.1);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
opacity: 0.7;
animation: pulse 1.5s infinite alternate ease-in-out;
}
.about::before {
content: '';
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid rgba(200, 150, 120, 0.6);
pointer-events: none;
z-index: 2;
animation: bounce 1.5s infinite alternate ease-in-out;
}
@keyframes pulse {
from { transform: translateX(-50%) scale(0.8); opacity: 0.5; }
to { transform: translateX(-50%) scale(1.1); opacity: 0.8; }
}
@keyframes bounce {
from { transform: translateX(-50%) translateY(-5px); }
to { transform: translateX(-50%) translateY(5px); }
}
/* Show bounce indicator only on smaller screens in portrait */
@media screen and (min-width: 768px), (orientation: landscape) {
.about::after, .about::before {
display: none;
}
}
}
/* Touch optimizations for iPhone SE (375x667) */
@media (width: 375px) and (height: 667px), (width: 667px) and (height: 375px) {
/* Increased touch targets */
.nav-menu li a,
.btn,
.feature-item,
.benefit-card,
.social-link,
.footer-links a {
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
/* Feature items touch effects */
.feature-item {
transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
background-color 0.25s ease;
}
.feature-item:active {
transform: scale(0.97);
background: rgba(248, 246, 243, 0.8);
}
.feature-item:active .feature-icon {
transform: scale(1.1);
background: linear-gradient(135deg, #c89678 0%, #96b4c8 100%);
color: white;
}
/* Reduce animation durations for smoother experience on lower-power devices */
.touch-ripple {
animation-duration: 0.5s;
}
/* Optimize scrolling */
.about,
.benefits,
.testimonials {
scroll-padding-top: 60px;
-webkit-overflow-scrolling: touch;
}
/* Bounce indicator visibility */
.about::after,
.about::before {
animation-duration: 1s;
bottom: 15px;
}
}