@@ -44,12 +44,23 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
4444 ) ;
4545
4646 // 로고 위에서 아래로 자연스럽게 등장
47- const isMobile = window . innerWidth < 768 ;
47+ const screenWidth = window . innerWidth ;
48+ const viewportHeight = window . innerHeight ;
49+ const isTablet = screenWidth >= 640 && screenWidth < 1024 ;
50+ const isMobile = screenWidth < 640 ;
51+
52+ // 뷰포트 높이 기반으로 로고 위치 계산
53+ const logoFinalY = isMobile
54+ ? `-${ viewportHeight * 0.3 } px`
55+ : isTablet
56+ ? `-${ viewportHeight * - 0.8 } px`
57+ : '0px' ;
58+
4859 gsap . fromTo (
4960 logoRef . current ,
5061 { y : - 300 , opacity : 0 } ,
5162 {
52- y : isMobile ? - 140 : - 40 , // 모바일에서는 더 위로
63+ y : logoFinalY , // 뷰포트 높이 기반 계산
5364 opacity : 1 ,
5465 duration : 3 ,
5566 ease : 'power3.out' ,
@@ -70,7 +81,7 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
7081 return (
7182 < div
7283 ref = { containerRef }
73- className = "relative w-full md:min-h-[110vh ] min-h-[74vh ] flex flex-col md:justify-center justify-end items-center mt-10 overflow-hidden"
84+ className = "relative w-full lg:min-h-[120vh] md:min-h-[95vh ] min-h-[87vh ] flex flex-col lg:justify-center md:justify-center justify-end items-center mt-10 overflow-hidden"
7485 id = "scroll-fixed"
7586 >
7687 { /* 대각선 줄 1 */ }
@@ -85,7 +96,7 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
8596 />
8697
8798 { /* 로고 */ }
88- < div ref = { logoRef } className = "absolute z-20 md:w-115 w-65 md:h-90 h-40" >
99+ < div ref = { logoRef } className = "absolute z-4 md:w-115 w-65 md:h-90 h-40" >
89100 < Image
90101 src = "/logo.svg"
91102 alt = "로고 이미지"
@@ -97,18 +108,16 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
97108 </ div >
98109
99110 { /* 컵 이미지 - 모바일에서 바닥에 붙도록 */ }
100- < div className = "z-10 md:relative absolute bottom-0" >
111+ < div className = "z-5 absolute bottom-0" >
101112 < Image
102113 src = { Cocktailcup }
103114 alt = "칵테일 컵"
104- width = { 900 }
105- height = { 800 }
106115 priority
107- style = { { width : 'auto' , height : 'auto' } }
108- className = "md:w-auto md:h-auto w-[300px] h-[300px ] object-contain"
116+ style = { { height : 'auto' } }
117+ className = "md:w-[700px] w-[500px ] object-contain"
109118 />
110119 </ div >
111- < div className = "absolute md:bottom-35 bottom-20 flex items-center justify-center z-3 w-full" >
120+ < div className = "absolute md:bottom-35 bottom-20 flex items-center justify-center z-10 w-full" >
112121 < PassBtn />
113122 </ div >
114123 </ div >
0 commit comments