@@ -44,11 +44,23 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
4444 ) ;
4545
4646 // 로고 위에서 아래로 자연스럽게 등장
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+
4759 gsap . fromTo (
4860 logoRef . current ,
4961 { y : - 300 , opacity : 0 } ,
5062 {
51- y : ! isDesktop ? - 230 : - 18 , // 데스크톱이 아닐 때 더 위로
63+ y : logoFinalY , // 뷰포트 높이 기반 계산
5264 opacity : 1 ,
5365 duration : 3 ,
5466 ease : 'power3.out' ,
@@ -69,7 +81,7 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
6981 return (
7082 < div
7183 ref = { containerRef }
72- className = "relative w-full lg:min-h-[110vh] min-h-[89vh] 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"
7385 id = "scroll-fixed"
7486 >
7587 { /* 대각선 줄 1 */ }
@@ -84,7 +96,7 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
8496 />
8597
8698 { /* 로고 */ }
87- < div ref = { logoRef } className = "absolute md:w-115 w-85 md:h-90 h-40" >
99+ < div ref = { logoRef } className = "absolute z-4 md:w-115 w-65 md:h-90 h-40" >
88100 < Image
89101 src = "/logo.svg"
90102 alt = "로고 이미지"
@@ -95,20 +107,17 @@ function CocktailDrop({ isDesktop = false }: CocktailDropProps) {
95107 />
96108 </ div >
97109
98- < div className = "w-full md:h-90 h-30" > </ div >
99-
100110 { /* 컵 이미지 - 모바일에서 바닥에 붙도록 */ }
101- < div className = "md:relative absolute bottom-0" >
111+ < div className = "z-5 absolute bottom-0" >
102112 < Image
103113 src = { Cocktailcup }
104114 alt = "칵테일 컵"
105- width = { 900 }
106- height = { 700 }
107115 priority
108- className = "md:w-auto md:h-auto w-[500px] h-[400px] object-cover"
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