-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcards.css
More file actions
240 lines (204 loc) · 7.67 KB
/
Copy pathcards.css
File metadata and controls
240 lines (204 loc) · 7.67 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
/* * ======================================================================================
* HEARTIFY CARDS & PREVIEW SYSTEM (V6.0 - LOVE LETTER EDITION)
* ARCHITECT: Senior UI/UX Engineer
* DATE: 2026-05-22
* PURPOSE: Emotional Design Upgrade - Warmth, Realism, and Elegance
* ======================================================================================
*/
/* ======================================================================================
1.0 COMPONENT: PREVIEW STAGE (THE ROMANTIC SETTING)
====================================================================================== */
.preview-stage {
flex: 1;
height: 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
z-index: 10;
/* 1️⃣ VISUAL IDENTITY UPGRADE: WARMTH & EMOTION */
/* Base: Warm, romantic off-white/blush blend */
background-color: #fff0f5;
background:
/* Soft ambient light */
radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 241, 242, 0.5) 60%, rgba(255, 228, 230, 0.8) 100%),
/* Very subtle grid (barely visible, just for structure) */
linear-gradient(rgba(225, 29, 72, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(225, 29, 72, 0.03) 1px, transparent 1px);
background-size: 100% 100%, 60px 60px, 60px 60px;
background-position: center center;
/* 9️⃣ MICRO-NOISE TEXTURE (High-End Polish) */
/* This adds a "grain" to the whole stage, making it feel less digital */
}
.preview-stage::before {
content: "";
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
pointer-events: none;
z-index: 0;
}
/* 1.2 THE HERO CARD (THE ARTIFACT) */
#cardCanvas {
/* 2️⃣ CARD PHYSICALITY (PAPER REALISM) */
max-height: 82vh;
max-width: 90%;
width: auto;
height: auto;
background: white;
/* Soft, organic corners - feels like heavy cardstock */
border-radius: 12px;
position: relative;
z-index: 20;
/* 3️⃣ SHADOW SYSTEM (EMOTIONAL LIGHTING) */
/* Resting state: "Placed on a table in soft evening light" */
box-shadow:
/* Direct contact shadow */
0 2px 10px rgba(148, 20, 50, 0.05),
/* Ambient diffusion (Warm glow) */
0 20px 40px -12px rgba(225, 29, 72, 0.15),
/* Card edge definition */
0 0 0 1px rgba(0,0,0,0.02);
/* 5️⃣ ENTRANCE ANIMATION (GENTLE RISE) */
animation: cardFloatUp 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards 0.2s;
/* 4️⃣ HOVER INTERACTION (ELEGANCE) */
transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Add slight paper texture to the card itself (digital representation) */
#cardCanvas::after {
content: "";
position: absolute;
inset: 0;
border-radius: 12px;
background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 40%);
pointer-events: none;
}
#cardCanvas:hover {
/* Less movement, more breathing */
transform: translateY(-3px) scale(1.002);
/* Shadow deepens slightly */
box-shadow:
0 4px 15px rgba(148, 20, 50, 0.08),
0 25px 50px -12px rgba(225, 29, 72, 0.2),
0 0 0 1px rgba(0,0,0,0.02);
}
/* 1.3 PARTICLE SYSTEM (EMOTION & DRIFT) */
#bg-particles {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 15;
overflow: hidden;
}
.particle {
position: absolute;
pointer-events: none;
/* 6️⃣ ANIMATION VARIATION */
animation:
particleFloat 12s linear infinite,
particleSway 4s ease-in-out infinite alternate;
/* Make particles soft/blurry for depth of field effect */
filter: blur(0.5px);
will-change: transform, opacity;
/* Use heart shape for particles if possible (handled in JS content, but style here) */
color: rgba(225, 29, 72, 0.2);
font-family: serif; /* Better heart shape */
}
@keyframes particleFloat {
0% { transform: translateY(10vh) rotate(0deg); opacity: 0; }
20% { opacity: 0.6; }
80% { opacity: 0.6; }
100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}
@keyframes particleSway {
0% { margin-left: -15px; }
100% { margin-left: 15px; }
}
@keyframes cardFloatUp {
0% {
opacity: 0;
transform: translateY(40px) scale(0.96);
}
100% {
opacity: 1;
transform: translateY(0) scale(1);
}
}
/* ======================================================================================
2.0 MOBILE RESPONSIVENESS (DELIGHTFUL EXPERIENCE)
====================================================================================== */
@media (max-width: 1024px) {
/* 7️⃣ MOBILE EXPERIENCE UPGRADE */
.preview-stage {
height: auto;
min-height: 80vh; /* More vertical space */
padding: 3rem 1.5rem; /* More breathing room */
/* Remove grid on mobile for pure emotion */
background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 241, 242, 0.6) 100%);
background-size: 100% 100%;
margin-top: 0;
}
#cardCanvas {
max-height: none;
width: 100%;
/* Default slight zoom for impact */
transform: scale(1.02);
/* Softer mobile shadow */
box-shadow: 0 10px 30px -8px rgba(225, 29, 72, 0.2);
}
/* Ensure no hover effects on touch */
#cardCanvas:hover {
transform: scale(1.02);
box-shadow: 0 10px 30px -8px rgba(225, 29, 72, 0.2);
}
}
/* ======================================================================================
3.0 DARK MODE OVERRIDES (MIDNIGHT ROMANCE)
====================================================================================== */
[data-theme="dark"] .preview-stage {
background-color: #0f172a;
/* Deep midnight gradient */
background:
radial-gradient(circle at 50% 30%, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 1) 80%),
linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
background-size: 100% 100%, 60px 60px, 60px 60px;
box-shadow: inset 0 0 250px rgba(0,0,0,0.8);
}
[data-theme="dark"] #cardCanvas {
box-shadow:
0 20px 60px -10px rgba(0, 0, 0, 0.7),
0 0 0 1px rgba(255,255,255,0.05);
}
/* ======================================================================================
4.0 PRINT & EXPORT UTILITIES (CRAFTED FEEL)
====================================================================================== */
@media print {
/* 8️⃣ PRINT MODE UPGRADE */
body {
background-color: #fffcf9; /* Faint cream/ivory for warmth */
color: black;
}
.preview-stage {
background: #fffcf9;
padding: 0;
margin: 0;
box-shadow: none;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
#cardCanvas {
box-shadow: none;
max-width: 100%;
width: auto;
height: auto;
transform: none !important;
border: none;
border-radius: 0; /* Printers cut corners anyway */
}
/* Hide particles in print */
#bg-particles, .particle { display: none !important; }
}