Skip to content

Commit 45e0297

Browse files
mikipaletclaude
andcommitted
fix: proper z-index layering for gradient orbs
- Gradients at z-5 - Header, Hero, FAQ, Open Source, Footer at z-10 with bg-background - Features at z-0 (gradients show over it) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b9b0504 commit 45e0297

1 file changed

Lines changed: 34 additions & 15 deletions

File tree

src/app/page.tsx

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,37 @@ export default function LandingPage() {
112112
];
113113

114114
return (
115-
<div className="relative min-h-screen"
116-
style={{
117-
background: `
118-
radial-gradient(ellipse 600px 600px at top right, rgba(229, 57, 53, 0.15), transparent),
119-
radial-gradient(ellipse 600px 600px at bottom left, rgba(229, 57, 53, 0.1), transparent)
120-
`,
121-
backgroundAttachment: 'fixed'
122-
}}
123-
>
115+
<div className="relative min-h-screen">
116+
{/* Fixed gradient orbs */}
117+
<div
118+
style={{
119+
position: 'fixed',
120+
top: -150,
121+
right: -150,
122+
width: 600,
123+
height: 600,
124+
borderRadius: '50%',
125+
background: 'radial-gradient(circle, rgba(229, 57, 53, 0.2), transparent 70%)',
126+
pointerEvents: 'none',
127+
zIndex: 5
128+
}}
129+
/>
130+
<div
131+
style={{
132+
position: 'fixed',
133+
bottom: -150,
134+
left: -150,
135+
width: 600,
136+
height: 600,
137+
borderRadius: '50%',
138+
background: 'radial-gradient(circle, rgba(229, 57, 53, 0.15), transparent 70%)',
139+
pointerEvents: 'none',
140+
zIndex: 5
141+
}}
142+
/>
124143

125144
{/* Header */}
126-
<header className="relative z-20 border-b border-border">
145+
<header className="relative z-10 border-b border-border bg-background">
127146
<div className="mx-auto flex h-16 max-w-7xl items-center justify-between px-6 lg:px-8">
128147
<Logo size="md" />
129148

@@ -163,7 +182,7 @@ export default function LandingPage() {
163182
</header>
164183

165184
{/* Hero Section */}
166-
<section className="relative z-20">
185+
<section className="relative z-10 bg-background">
167186
<div className="mx-auto max-w-7xl px-4 py-20 sm:px-6 lg:px-8">
168187
<div className="text-center">
169188
<h1 className="text-4xl font-bold tracking-tight sm:text-5xl lg:text-6xl">
@@ -223,7 +242,7 @@ export default function LandingPage() {
223242
</section>
224243

225244
{/* Features Section */}
226-
<section className="relative z-0 bg-muted/50 py-20">
245+
<section className="relative z-0 py-20">
227246
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
228247
<div className="text-center">
229248
<h2 className="text-3xl font-bold">Everything you need</h2>
@@ -252,7 +271,7 @@ export default function LandingPage() {
252271
</section>
253272

254273
{/* FAQ Section */}
255-
<section className="relative z-20 py-20">
274+
<section className="relative z-10 py-20 bg-background">
256275
<div className="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8">
257276
<div className="text-center">
258277
<h2 className="text-3xl font-bold">Frequently Asked Questions</h2>
@@ -273,7 +292,7 @@ export default function LandingPage() {
273292
</section>
274293

275294
{/* Open Source Section */}
276-
<section className="relative z-20 py-20">
295+
<section className="relative z-10 py-20 bg-background">
277296
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
278297
<div className="rounded-2xl border border-border bg-card p-8 text-center sm:p-12">
279298
<div className="mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-muted">
@@ -308,7 +327,7 @@ export default function LandingPage() {
308327
</section>
309328

310329
{/* Footer */}
311-
<footer className="relative z-20 border-t border-border py-8">
330+
<footer className="relative z-10 border-t border-border py-8 bg-background">
312331
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
313332
<div className="flex flex-col items-center justify-between gap-4 sm:flex-row">
314333
<Logo size="sm" />

0 commit comments

Comments
 (0)