Skip to content

Commit fa94fbd

Browse files
committed
Animated gradient blobs in hero - Apple Music style drifting
1 parent a7b67c0 commit fa94fbd

File tree

2 files changed

+70
-19
lines changed

2 files changed

+70
-19
lines changed

src/pages/index.module.css

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,76 @@
8282
justify-content: center;
8383
padding: 4rem 2rem;
8484
position: relative;
85-
background:
86-
radial-gradient(ellipse 80% 60% at 50% 40%, rgba(20, 50, 120, 0.25) 0%, transparent 70%),
87-
radial-gradient(ellipse 40% 30% at 70% 60%, rgba(77, 139, 255, 0.1) 0%, transparent 60%),
88-
linear-gradient(180deg, #000 0%, #050510 100%);
85+
background: #000;
8986
overflow: hidden;
9087
}
9188

89+
/* Animated gradient blobs */
90+
.blob1, .blob2, .blob3 {
91+
position: absolute;
92+
border-radius: 50%;
93+
filter: blur(100px);
94+
pointer-events: none;
95+
will-change: transform;
96+
z-index: 0;
97+
}
98+
99+
.blob1 {
100+
width: 50vw;
101+
height: 50vw;
102+
max-width: 700px;
103+
max-height: 700px;
104+
top: -15%;
105+
left: -10%;
106+
background: radial-gradient(circle, rgba(20, 50, 160, 0.5) 0%, transparent 70%);
107+
animation: drift1 14s ease-in-out infinite;
108+
}
109+
110+
.blob2 {
111+
width: 40vw;
112+
height: 40vw;
113+
max-width: 550px;
114+
max-height: 550px;
115+
bottom: -10%;
116+
right: -8%;
117+
background: radial-gradient(circle, rgba(77, 139, 255, 0.35) 0%, transparent 70%);
118+
animation: drift2 18s ease-in-out infinite;
119+
}
120+
121+
.blob3 {
122+
width: 30vw;
123+
height: 30vw;
124+
max-width: 400px;
125+
max-height: 400px;
126+
top: 40%;
127+
left: 50%;
128+
background: radial-gradient(circle, rgba(100, 60, 200, 0.2) 0%, transparent 70%);
129+
animation: drift3 20s ease-in-out infinite;
130+
}
131+
132+
@keyframes drift1 {
133+
0%, 100% { transform: translate(0, 0) scale(1); }
134+
20% { transform: translate(6vw, 8vh) scale(1.15); }
135+
40% { transform: translate(12vw, 3vh) scale(0.9); }
136+
60% { transform: translate(4vw, 15vh) scale(1.1); }
137+
80% { transform: translate(-3vw, 6vh) scale(0.95); }
138+
}
139+
140+
@keyframes drift2 {
141+
0%, 100% { transform: translate(0, 0) scale(1); }
142+
20% { transform: translate(-8vw, -5vh) scale(1.1); }
143+
40% { transform: translate(-4vw, -12vh) scale(0.95); }
144+
60% { transform: translate(-12vw, -2vh) scale(1.15); }
145+
80% { transform: translate(-2vw, -8vh) scale(0.9); }
146+
}
147+
148+
@keyframes drift3 {
149+
0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
150+
25% { transform: translate(-8vw, 5vh) scale(1.2) rotate(10deg); }
151+
50% { transform: translate(5vw, -8vh) scale(0.85) rotate(-5deg); }
152+
75% { transform: translate(-3vw, -3vh) scale(1.1) rotate(8deg); }
153+
}
154+
92155
/* Film grain overlay */
93156
.grain {
94157
position: absolute;
@@ -100,20 +163,6 @@
100163
z-index: 1;
101164
}
102165

103-
/* Subtle radial glow behind title */
104-
.heroGlow {
105-
position: absolute;
106-
top: 30%;
107-
left: 50%;
108-
transform: translate(-50%, -50%);
109-
width: 500px;
110-
height: 500px;
111-
background: radial-gradient(circle, rgba(77, 139, 255, 0.08) 0%, transparent 70%);
112-
border-radius: 50%;
113-
pointer-events: none;
114-
z-index: 1;
115-
}
116-
117166
.heroInner {
118167
position: relative;
119168
z-index: 2;

src/pages/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ function Hero() {
4545
return (
4646
<section className={styles.hero}>
4747
<div className={styles.grain} />
48-
<div className={styles.heroGlow} />
48+
<div className={styles.blob1} />
49+
<div className={styles.blob2} />
50+
<div className={styles.blob3} />
4951
<div className={styles.heroInner}>
5052
<p className={styles.kicker}>Independent Cardano Full-Node</p>
5153
<h1 className={styles.title}>BlueMatter</h1>

0 commit comments

Comments
 (0)