@font-face {
  font-family:  Messapia;
  src:  url(messapia-bold.woff2);
}

@keyframes show {
  0% {
    opacity: 0;
    transform: translate(0, 24px) scale(0.95);
  } 
  100% {
    opacity:  1;
    transform: translate(0, 0) scale(1);
  }
}

body {
	font-family: Messapia;
	font-size: 56px;
  text-transform: uppercase;
	line-height: 1.1;
	
	background-color: #f9f9f9;
	color: #2b5487;
}


section {
  background-image: linear-gradient(120deg, #97ebd6, #9aa6f9);
  color: #ffffff;
  height: 100vh;
  
  position: sticky;
  top: 0;
  z-index: 0;
  
/*   perspective: 800px; */
}

section.dark {
  background-image: linear-gradient(180deg, #e96651, #f0cce2);
  background-color: #000000;
  color: #f9f9f9;
}

figure {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 120px;
  clip: rect(0, auto, auto, 0);
  
}

figcaption {
  position: fixed;
  top: 70%;
  left: 50%;
  width: 100%;
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  
  display: flex;
  flex-direction: column;
  align-items:  center;
}

h1 {
   font-size: 120px;
}

h2 {
  font-size: 64px;
}

figure div {
	display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  
  position: relative;
  z-index: 0;
  
  perspective: 800px;
}

section.in-view figure div {
  animation: show 0.4s 0.4s both cubic-bezier(0.68, -0.55, 0.27, 1.55) ;
}

img {
  height: 100%;
  object-fit: contain;
  margin: 0 24px 0 24px;
  
  transform: translate(0, 0) scale(1);
}



@keyframes intro-box {
  100% {
    background-color: transparent;
  }
}


@keyframes grow-box {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  40% {
    width: 360px;
    height: 200px;
  }
  100% {
    width: 100%;
    height: 100%;
    border-color: transparent;
  }
}


div.intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
	animation: intro-box 1s 4s both;
  pointer-events: none;
}

div.box {  
  width: 360px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  
  border: 1px solid #000000;
  animation: grow-box 3s 2s both;
}

div.box div.column {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

div.box span {
  font-size: 14px;
  padding: 24px;
  color: #000000;
}


@media (prefers-reduced-motion: no-preference), (max-width: 900px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }
  
  main {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
  }
  
  section {
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) or (max-width: 900px) {
  div.intro, div.box {
    animation-delay: 0.001s;
    animation-duration: 0.001s;
  }
}


@media (max-width: 900px) {
  body {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  
  header, footer {
    padding: 16px;
  }
  
  div.content {
    padding: 64px 64px 64px 64px;
  }
}