-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
304 lines (255 loc) · 7.07 KB
/
styles.css
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
*{
padding: 0;
margin:0;
}
@use postcss-nested;
:root {
--white: 47deg, 98%, 95%;
--citrus: 47deg, 95%, 52%;
--orange: 23deg, 100%, 53%;
--sanguine: 347deg, 100%, 61%;
--pink: 346deg, 98%, 55%;
--electro: 181deg, 79%, 54%;
--purple: 261deg, 56%, 15%;
--night: 261deg, 89%, 7%;
--violet: 284deg, 80%, 20%;
--sky-line: 7px;
--sun-size: 50vh;
--ground-size: 45vh;
--ground-line: 23px;
--ground-speed: 8s;
--ratio-x: 0;
--ratio-y: 0;
}
.player {
position: fixed;
bottom: 25px;
left: 25px;
z-index: 1
}
.synthwave {
position: relative;
z-index: 0;
height: 100vh;
width: 100vw;
overflow: hidden;
background-color: hsl(var(--night));
background-image:linear-gradient(to bottom, hsla(var(--white), .05) 1px, transparent 1px);
background-size: 1px var(--sky-line);
&::after {
content: '';
position: absolute;
z-index: 1;
top: 0;
bottom: 0;
right: 0;
left: 0;
background-image: radial-gradient(circle at 50%, transparent calc(var(--sun-size) - 10vw), hsla(var(--sanguine), .3));
mix-blend-mode: soft-light;
}
}
.sun {
height: var(--sun-size);
width: var(--sun-size);
position: absolute;
z-index: 2;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
transform: translate(
calc(var(--ratio-x) * 1vw),
calc(var(--ratio-y) * -1vh)
);
filter:
drop-shadow(0 0 5px hsla(var(--sanguine), .1))
drop-shadow(0 0 10px hsla(var(--sanguine), .1))
drop-shadow(0 0 15px hsla(var(--sanguine), .1))
drop-shadow(0 0 20px hsla(var(--sanguine), .05))
drop-shadow(0 0 25px hsla(var(--sanguine), .05))
drop-shadow(0 0 30px hsla(var(--sanguine), .05))
drop-shadow(0 0 35px hsla(var(--sanguine), .05))
drop-shadow(0 0 40px hsla(var(--sanguine), .05))
drop-shadow(0 0 60px hsla(var(--sanguine), .05))
drop-shadow(0 0 80px hsla(var(--sanguine), .05))
drop-shadow(0 -2px 5px hsl(var(--sanguine)));
overflow: hidden;
&::after {
content: '';
--mask-show: rgba(0, 0, 0, 1);
--mask-hide: rgba(0, 0, 0, 0);
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 5;
backface-visibility: hidden;
border-radius: 50%;
background-image: linear-gradient(to top, hsl(var(--pink)) 40%, hsl(var(--orange)) 60%, hsl(var(--citrus)) 95%);
box-shadow:
inset 0 -30px 30px -5px hsl(var(--orange)),
inset 0 -15px 25px -20px hsl(var(--citrus));
mask-size: auto, auto 70%;
mask-position: top, bottom;
mask-repeat: no-repeat;
mask-image:
linear-gradient(
var(--mask-show) 30.1%,
var(--mask-hide) 30.1%
),
linear-gradient(
to bottom,
var(--mask-show) 0,
/* 30 / 3 */
var(--mask-show) 20px,
var(--mask-hide) 20px,
var(--mask-hide) 23px,
var(--mask-show) 23px,
/* 20 / 5 */
var(--mask-show) 43px,
var(--mask-hide) 43px,
var(--mask-hide) 48px,
var(--mask-show) 48px,
/* 20 / 8 */
var(--mask-show) 68px,
var(--mask-hide) 68px,
var(--mask-hide) 76px,
var(--mask-show) 76px,
/* 20 / 13 */
var(--mask-show) 96px,
var(--mask-hide) 96px,
var(--mask-hide) 109px,
var(--mask-show) 109px,
/* 20 / 21 */
var(--mask-show) 129px,
var(--mask-hide) 129px,
var(--mask-hide) 150px,
var(--mask-show) 150px,
/* 20 / 26 */
var(--mask-show) 170px,
var(--mask-hide) 170px,
var(--mask-hide) 196px,
var(--mask-show) 196px,
/* 20 / 34 */
var(--mask-show) 216px,
var(--mask-hide) 216px,
var(--mask-hide) 250px,
var(--mask-show) 250px,
/* 20 / 34 */
var(--mask-show) 270px,
var(--mask-hide) 270px,
var(--mask-hide) 304px,
var(--mask-show) 304px,
var(--mask-show) 400px
);
}
}
.ground {
height: calc(var(--ground-size) + 1vh);
width: 120vw;
position: absolute;
left: -10vw;
bottom: -16vh;
z-index: 3;
perspective: var(--ground-size);
perspective-origin: top center;
transform-style: preserve-3d;
transform:
translate(calc(var(--ratio-x) * 1vw), calc(var(--ratio-y) * 1vh))
rotateZ(calc(var(--ratio-x) * -0.5deg));
border-top: solid 1px hsla(var(--electro), .3);
background-color: hsl(var(--purple));
background-image: radial-gradient(100% 60% at bottom, hsla(var(--electro), .1), hsla(var(--purple), 1));
box-shadow:
0 3px 10px 2px hsla(var(--white), .2),
0 2px 20px 2px hsla(var(--electro), .3);
&::before {
--alpha: .2;
content: '';
display: block;
width: 100%;
height: 100vh;
position: absolute;
top: 0;
transform-origin: top center;
transform: rotateX(76deg) translate3d(calc(var(--ratio-x) * 1vw), 0, 0);
backface-visibility: hidden;
background-image:
linear-gradient(to bottom, hsla(var(--electro), var(--alpha)) 1px, transparent 1px),
linear-gradient(to right, hsla(var(--electro), var(--alpha)) 1px, transparent 1px);
background-size: 1px var(--ground-line), calc(2 * var(--ground-line)) 1px;
background-position: 0% 0%, center;
mix-blend-mode: color-dodge;
/*animation: ground-lines var(--ground-speed) linear infinite;*/
}
}
.mountain {
--mountain-z: -1px;
--mountain-x: 0;
--mountain-y: 0;
height: calc(var(--mountain-size) * 0.66);
width: var(--mountain-size);
position: absolute;
bottom: 100%;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
margin-bottom: -0.5vh;
transform-origin: bottom center;
transform: translate3d(var(--mountain-x), var(--mountain-y), var(--mountain-z));
backface-visibility: hidden;
&::before {
content: '';
display: block;
width: 100%;
height: 100%;
clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
background-image: linear-gradient(var(--mountain-gradient), hsl(var(--violet)) 50%, hsl(var(--purple)) 50%);
background-position-x: var(--mountain-bg-position);
background-size: 150% 100%;
}
&:nth-child(1),
&:nth-child(2) {
--mountain-gradient: -110deg;
--mountain-bg-position: 28%;
}
&:nth-child(1) {
--mountain-size: 24vh;
filter: brightness(0.8) drop-shadow(0 0 10px hsla(var(--sanguine), .05));
--mountain-x: -145%;
--mountain-y: calc(var(--ratio-y) * -1vh);
}
&:nth-child(2) {
--mountain-size: 30vh;
filter: drop-shadow(0 0 10px hsla(var(--sanguine), .05));
--mountain-x: calc(-85% + var(--ratio-x) * 0.5vw);
}
&:nth-child(3),
&:nth-child(4) {
--mountain-gradient: 110deg;
--mountain-bg-position: 73%;
}
&:nth-child(3) {
--mountain-size: 38vh;
filter: drop-shadow(0 0 10px hsla(var(--sanguine), .05));
--mountain-x: 85%;
--mountain-y: calc(var(--ratio-y) * -1vh);
}
&:nth-child(4) {
--mountain-size: 28vh;
filter: brightness(0.8) drop-shadow(0 0 10px hsla(var(--sanguine), .05));
--mountain-x: calc(85% + var(--ratio-x) * 0.5vw);
}
}
@keyframes ground-lines {
0% {
background-position: 0% 0%, center;
}
100% {
background-position: 0% 50%, center;
}
}