*, *:before, *:after { box-sizing: border-box; margin: 0; padding: 0; } html, body { width: 100%; height: 100%; overflow: hidden; } a { color: inherit; text-decoration: underline; } @font-face { font-family: decade; src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/decade.ttf'); } @font-face { font-family: pt-reg; src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/PT_Sans-Web-Regular.ttf'); } @font-face { font-family: pfs-bold; src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/PFSquareSansPro-Bold.otf'); } @mixin mediaMinWidth($width) { @media (min-width: $width) { & { @content; } } } @mixin mediaMaxWidth($width) { @media (max-width: $width) { & { @content; } } } header { position: absolute; left: 0; top: 0; width: 100%; height: 3em; padding: 0.5em; @include mediaMinWidth(48em) { height: 5em; padding: 1em; } background-color: #fff; z-index: 150; nav { ul { list-style-type: none; text-align: right; li { display: inline-block; padding: 0.1em; font-size: 1em; border: 0.1em solid #000; margin-right: 0.2em; @include mediaMinWidth(48em) { font-size: 1.5em; padding: 0.2em; border: 0.2em solid #000; margin-right: 0.5em; } font-family: pfs-bold, sans-serif; text-transform: uppercase; cursor: pointer; transition: color, background-color 0.4s; &.active { background-color: #000; color: #fff; } &:hover { background-color: #000; color: #fff; } } } &.in-action { ul { li { opacity: 0.4; user-select: none; } } } } } section { position: absolute; top: 3em; @include mediaMinWidth(48em) { top: 5em; } right: 0; bottom: 0; left: 0; z-index: 50; .content { position: absolute; top: 0; left: 0; width: 100%; height: 100%; @include mediaMinWidth(48em) { width: 40%; } z-index: 100; padding: 2em; overflow-y: auto; background-color: rgba(255, 255, 255, 0.8); .inner { display: none; &.active { display: block; animation: showTextBlock 1s; } h1 { font-size: 2em; margin-bottom: 1em; text-transform: uppercase; font-family: decade, sans-serif; } p { font-size: 1.25em; margin-bottom: 0.75em; font-family: pt-reg, sans-serif; } } } .backgrounds { .bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; transition: 1.5s; will-change: transform; z-index: 60; &.iron { background-image: url('http://i.imgur.com/PbV1Grl.jpg'); transform: translateX(-100%); } &.cap { background-image: url('http://i.imgur.com/VWYl1EC.jpg'); transform: translateY(-100%); } &.bw { background-image: url('http://i.imgur.com/ga3BiDw.jpg'); transform: translateX(100%); } &.thor { background-image: url('http://i.imgur.com/jAY4044.jpg'); transform: translateY(100%); } &.active { transform: translateZ(0); z-index: 70; } &.fast { transition-duration: 0s; } } } } @keyframes showTextBlock { 0% { opacity: 0; transform: scale(0.5); } 80% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }