11"use client"
22
33import { InteractiveGridPattern } from "@/components/InteractiveGridPattern"
4+ import { useMediaQuery } from "@/hooks/useMediaQuery"
45import { Section } from "@/components/ui/Section"
56import { cn } from "@/lib/utils"
67import Image from "next/image"
@@ -25,6 +26,7 @@ interface CtaSectionProps {
2526
2627export const CtaSection : React . FC < CtaSectionProps > = ( { content } ) => {
2728 const { trigger } = useWebHaptics ( )
29+ const isTouchDevice = useMediaQuery ( "(hover: none), (pointer: coarse)" )
2830 if ( ! content ) return
2931
3032 const staggerContainer : Variants = {
@@ -61,17 +63,24 @@ export const CtaSection: React.FC<CtaSectionProps> = ({ content }) => {
6163 < div className = { "relative flex w-full flex-col items-center justify-center gap-8 overflow-hidden rounded-[calc(1.8rem-1px)] px-6 py-12 sm:px-10" } >
6264
6365 < InteractiveGridPattern
64- className = { cn ( "opacity-45 mask-[radial-gradient(600px_circle_at_center,white,transparent)]" ) }
66+ className = { cn (
67+ "opacity-45 mask-[radial-gradient(600px_circle_at_center,white,transparent)]" ,
68+ isTouchDevice && "opacity-30" ,
69+ ) }
6570 width = { 40 }
6671 height = { 40 }
6772 squares = { [ 30 , 15 ] }
6873 />
69- < div className = "pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top,rgba(255,255,255,0.1),transparent_36%),radial-gradient(circle_at_center,rgba(248,114,226,0.16),transparent_62%)]" />
70- < div className = "pointer-events-none absolute inset-x-8 -top-16 h-40 bg-[radial-gradient(circle,rgba(122,203,255,0.18),transparent_68%)] blur-2xl" />
74+ < div className = { cn (
75+ "pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top,rgba(255,255,255,0.1),transparent_36%),radial-gradient(circle_at_center,rgba(248,114,226,0.16),transparent_62%)]" ,
76+ isTouchDevice && "opacity-70" ,
77+ ) } />
78+ < div className = "pointer-events-none absolute inset-x-8 -top-16 hidden h-40 bg-[radial-gradient(circle,rgba(122,203,255,0.18),transparent_68%)] blur-2xl sm:block" />
7179
72- < motion . div variants = { staggerItem } className = { "relative z-20 flex size-32 items-center justify-center rounded-2xl bg-white/5 shadow-[0_14px_36px_rgba(0,0,0,0.22)] backdrop-blur-md" } >
80+ < motion . div variants = { staggerItem } className = { "relative z-20 flex size-32 items-center justify-center rounded-2xl bg-white/5 shadow-[0_14px_36px_rgba(0,0,0,0.22)] md: backdrop-blur-md" } >
7381 < div className = "pointer-events-none absolute inset-0 rounded-2xl bg-[radial-gradient(circle_at_top_left,rgba(255,255,255,0.12),transparent_35%)]" />
74- < div className = { "relative flex items-center justify-center rounded-2xl ring ring-white/10 bg-linear-to-br from-primary via-primary to-pink/8 px-4 py-4 shadow-[inset_0_1px_0_rgba(255,255,255,0.06)]" } >
82+ < div className = { "relative isolate flex items-center justify-center rounded-2xl ring ring-white/10 px-4 py-4 shadow-[inset_0_1px_0_rgba(255,255,255,0.06)]" } >
83+ < div className = "pointer-events-none absolute inset-0 rounded-2xl bg-linear-to-br from-primary via-primary to-[#2a1638]" />
7584 < Image src = { "/code0_logo_white.png" } width = { "112" } height = { "112" } alt = { "Code0 Logo" } className = { "z-20" } />
7685 </ div >
7786 </ motion . div >
0 commit comments