.dialog__overlay {
	-webkit-transition-duration: 0.6s;
	transition-duration: 0.6s;
}

.dialog__content {
	background: transparent;
}

.morph-shape {
	position: absolute;
	width: 100%;
	height: 170%;
	top: -45%;
	left: 0;
	z-index: -1;
}

.morph-shape svg {
	fill: #cae4b6;
}

.dialog--open .morph-shape {
	-webkit-animation: anim-shape 0.6s forwards;
	animation: anim-shape 0.6s forwards;
}

.dialog-inner {
	opacity: 0;
}

.dialog--open .dialog-inner {
	opacity: 1;
	-webkit-transition: opacity 0.5s 0.3s;
	transition: opacity 0.5s 0.3s;
}

.dialog.dialog--open .dialog__content,
.dialog.dialog--close .dialog__content {
	opacity: 1;
	-webkit-animation-fill-mode: forwards;
	animation-fill-mode: forwards;
}

.dialog.dialog--open .dialog__content {
	-webkit-animation-duration: 0.6s;
	animation-duration: 0.6s;
	-webkit-animation-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
	animation-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
	-webkit-animation-name: anim-open;
	animation-name: anim-open;
}

.dialog.dialog--close .dialog__content {
	-webkit-animation-name: anim-close;
	animation-name: anim-close;
	-webkit-animation-duration: 0.3s;
	animation-duration: 0.3s;
	-webkit-animation-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
	animation-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
}

.dialog.dialog--open h2,
.dialog.dialog--open button {
	-webkit-animation: anim-elem 0.5s both;
	animation: anim-elem 0.5s both;
}

.dialog.dialog--open h2 {
	-webkit-animation-delay: 0.5s;
	animation-delay: 0.5s;
}

.dialog.dialog--open button {
	-webkit-animation-delay: 0.4s;
	animation-delay: 0.4s;
}

@-webkit-keyframes anim-open {
	0% { -webkit-transform: translate3d(0, -50vh, 0); }
	50% { -webkit-transform: translate3d(0, -50vh, 0); }
	100% { -webkit-transform: translate3d(0, 0, 0); }
}

@keyframes anim-open {
	0% { -webkit-transform: translate3d(0, -50vh, 0); transform: translate3d(0, -50vh, 0); }
	50% { -webkit-transform: translate3d(0, -50vh, 0); transform: translate3d(0, -50vh, 0); }
	100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
}

@-webkit-keyframes anim-close {
	100% { opacity: 0; -webkit-transform: translate3d(0, 50vh, 0); }
}

@keyframes anim-close {
	100% { opacity: 0; -webkit-transform: translate3d(0, 50vh, 0); transform: translate3d(0, 50vh, 0); }
}

/* Inner elements animations */

@-webkit-keyframes anim-elem {
	0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); }
	100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); }
}

@keyframes anim-elem {
	0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); transform: translate3d(0, -100px, 0); }
	100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
}

@-webkit-keyframes anim-shape {
	50% { -webkit-transform: scale3d(0.8,1.2,1); }
}

@keyframes anim-shape {
	50% { -webkit-transform: scale3d(0.8,1.2,1); transform: scale3d(0.8,1.2,1); }
}

@media screen and (max-width: 32em) {
	.dialog h2 {
		padding-bottom: 1em;
	}
}