.modal { width: 100%; height: 100dvh; position: fixed; top: 0; left: 0; z-index: 999; /* background-color: #000; */ opacity: 0; -webkit-transition: opacity 3s ease; -moz-transition: opacity 3s ease; -ms-transition: opacity 3s ease; -o-transition: opacity 3s ease; transition: opacity 3s ease; will-change: opacity; animation: disappearance 3s ease; animation-fill-mode: forwards; } .open { opacity: 1; animation: appearance 3s ease; animation-fill-mode: forwards; } .modal__content { width: 100%; height: 100%; animation: appearance-content 3s ease; animation-fill-mode: forwards; } @keyframes appearance { 0% { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); pointer-events: none; } 100% { -webkit-backdrop-filter: blur(50px); backdrop-filter: blur(50px); pointer-events: auto; } } @keyframes appearance-content { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes disappearance { 0% { -webkit-backdrop-filter: blur(50px); backdrop-filter: blur(50px); pointer-events: auto; } 100% { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); pointer-events: none; } }