@@ -13,6 +13,7 @@ import { LinkButton } from "@/components/ui/button";
1313import { SectionHeadingUnderline } from "@/components/site/section-heading-underline" ;
1414import { TypewriterText } from "@/components/site/typewriter-text" ;
1515import { OMA_DOCS_URL , OMA_REPO_URL } from "@/lib/oma-content" ;
16+ import { useMediaQuery } from "@/lib/use-media-query" ;
1617
1718const AGENTS = [
1819 { tag : "기획자" , desc : "어떤 화면이 필요한지 정리" } ,
@@ -30,21 +31,26 @@ const HIGHLIGHTS = [
3031
3132const easeOutExpo = [ 0.22 , 1 , 0.36 , 1 ] as const ;
3233
34+ const STATIC_BORDER_BG =
35+ "conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(122,185,76,0.55) 80deg, transparent 160deg, transparent 240deg, rgba(15,84,64,0.35) 320deg, transparent 360deg)" ;
36+
3337export function OmaSection ( ) {
3438 const reduceMotion = useReducedMotion ( ) ;
39+ const isDesktop = useMediaQuery ( "(min-width: 1024px)" ) ;
40+ const animateBorder = isDesktop && ! reduceMotion ;
3541 const angle = useMotionValue ( 0 ) ;
3642
3743 useEffect ( ( ) => {
38- if ( reduceMotion ) return ;
44+ if ( ! animateBorder ) return ;
3945 const ctrl = animate ( angle , 360 , {
4046 duration : 7 ,
4147 repeat : Infinity ,
4248 ease : "linear" ,
4349 } ) ;
4450 return ( ) => ctrl . stop ( ) ;
45- } , [ angle , reduceMotion ] ) ;
51+ } , [ angle , animateBorder ] ) ;
4652
47- const borderBackground = useMotionTemplate `conic-gradient(from ${ angle } deg at 50% 50%, transparent 0deg, rgba(122,185,76,0.55) 80deg, transparent 160deg, transparent 240deg, rgba(15,84,64,0.35) 320deg, transparent 360deg)` ;
53+ const animatedBorderBackground = useMotionTemplate `conic-gradient(from ${ angle } deg at 50% 50%, transparent 0deg, rgba(122,185,76,0.55) 80deg, transparent 160deg, transparent 240deg, rgba(15,84,64,0.35) 320deg, transparent 360deg)` ;
4854
4955 const fadeUpInitial = reduceMotion ? { opacity : 0 } : { opacity : 0 , y : 20 } ;
5056 const fadeUpAnimate = reduceMotion
@@ -154,11 +160,11 @@ export function OmaSection() {
154160 viewport = { { once : true , amount : 0.25 } }
155161 className = "relative"
156162 >
157- { /* Animated conic gradient border */ }
163+ { /* Animated conic gradient border (desktop) / static fallback (mobile) */ }
158164 < motion . div
159165 aria-hidden
160166 className = "pointer-events-none absolute -inset-[1.5px] rounded-2xl opacity-90 blur-[0.5px]"
161- style = { { background : borderBackground } }
167+ style = { { background : animateBorder ? animatedBorderBackground : STATIC_BORDER_BG } }
162168 />
163169 { /* Soft outer glow */ }
164170 < div
0 commit comments