/*! HTML5 Boilerplate v7.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 1.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

 
/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

   html {
    color: #222;
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}




 /* ==========================================================================
   Helper classes
   ========================================================================== */

.hidden {
  display: none !important;
}

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap; /* 1 */
}

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
  white-space: inherit;
}

.invisible {
  visibility: hidden;
}

.clearfix:before,
.clearfix:after {
  content: " "; /* 1 */
  display: table; /* 2 */
}

.clearfix:after {
  clear: both;
}

.valign1 {
    display: table;
    width:100%;
    height: 100%;
}

.valign2 {
    display:table-cell;
    width: 100%;
    vertical-align: middle;
    height: 100%;
}

.valign3 {
    display: inline-block;
    width:100%;
}

 /* ==========================================================================
    @author: Thomas Rambaud
    @website: http://thomasrambaud.com
   ========================================================================== */

@font-face {
    font-family: 'Pixellari';
    src: url('fonts/Pixellari.eot');
    src: url('fonts/Pixellari.eot') format('embedded-opentype'),
         url('fonts/Pixellari.woff2') format('woff2'),
         url('fonts/Pixellari.woff') format('woff'),
         url('fonts/Pixellari.ttf') format('truetype'),
         url('fonts/Pixellari.svg#Pixellari') format('svg');
}

@font-face {
    font-family: 'AvenirLTStdHeavy';
    src: url('fonts/AvenirLTStdHeavy.eot');
    src: url('fonts/AvenirLTStdHeavy.eot') format('embedded-opentype'),
         url('fonts/AvenirLTStdHeavy.woff2') format('woff2'),
         url('fonts/AvenirLTStdHeavy.woff') format('woff'),
         url('fonts/AvenirLTStdHeavy.ttf') format('truetype'),
         url('fonts/AvenirLTStdHeavy.svg#AvenirLTStdHeavy') format('svg');
}

@keyframes twinkle {
  0% {
    transform: scale(1);
    opacity: 1;
    animation-timing-function: ease-in;
  }
  50% {
    transform: scale(0.65);
    opacity: 0.25;
    animation-timing-function: ease-out;
  }
  75% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

html {
    background:#000;
}

html, body, #site {
    height: 100%;
    overflow: hidden;
}

body {
    background:#001D2D;
    font-family: 'Roboto', sans-serif;
    color:#fff;
    font-size:17px;
}

#site {
    position: relative;
    z-index: 1;
}

.appears {
    opacity: 0;    
    -webkit-transition: all 1050ms cubic-bezier(0.175, 0.885, 0.320, 1); /* older webkit */
    -webkit-transition: all 1050ms cubic-bezier(0.175, 0.885, 0.320, 1.275); 
       -moz-transition: all 1050ms cubic-bezier(0.175, 0.885, 0.320, 1.275); 
         -o-transition: all 1050ms cubic-bezier(0.175, 0.885, 0.320, 1.275); 
            transition: all 1050ms cubic-bezier(0.175, 0.885, 0.320, 1.275); /* easeOutBack */
    position: relative;
    top: 100px;
}

.appears.appeared {
    opacity: 1;
    top:0;
}

.star {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    animation: twinkle 5s linear infinite;
}

#logo-gp {
    position: absolute;
    top: 20px;
    left: 50px;
    z-index: 2;
    font-family: 'AvenirLTStdHeavy';
    letter-spacing: 4px;
}

#logo-gp a {
    color: #fff;
    text-decoration: none;
    transition:all 250ms linear;
}

#logo-gp a:hover{
    opacity: 0.8;
}

#logo-gp img {
    float:left;
    margin-right: 1px;
}

#logo-gp p {
    display: inline-block;
    font-size:10px;
    padding-top: 16px;
    line-height: 15px;
}

#logo-gp p strong {
    letter-spacing: 0px;
    font-size: 18px;
    font-weight: normal;
}

h1 {
    margin:0;
    padding:30px 0;
    text-align: center;
}

h2 {
    font-family: "Pixellari";
    font-size: 36px;
    text-transform: uppercase;
    text-align: center;
    max-width: 480px;
    margin:0 auto;
    padding:20px 0;
}

h2 + p {
    max-width: 520px;
    margin:0 auto;
    padding:0 0 20px 0;
    text-align: center;
}

#main {
    position: relative;
    z-index: 1;
    transition:opacity 1000ms ease, transform 2000ms ease;
    height: 100%;
}

#share {
    font-family: 'AvenirLTStdHeavy';
    position: absolute;
    top:40px;
    right:50px;
    text-transform: uppercase;
    z-index: 2;
}

#share a {
    padding:0 5px;
    margin: 0 3px;
    text-decoration: none;
    display: inline-block;
    transition:all 250ms linear;
}

#share a:hover {
    opacity: 0.8;
}

#share span {
    font-size:10px;
    padding-right: 5px;
    font-family: 'AvenirLTStdHeavy';
    letter-spacing: 5px;
    position: relative;
    top: 5px;
}

#launch {
    display: block;
    margin:auto;
    width:214px;
    height: 49px;
    background:url(../img/button.png) no-repeat top left;
    text-align: center;
    box-sizing: border-box;
    padding:10px;
    font-family: "Pixellari";
    font-size: 21px;
    color:#fff;
    text-decoration: none;
    margin-top:40px;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

#launch:after {
    content: "";
    position: absolute;
    top: -110%;
    left: -210%;
    width: 335%;
    height: 500%;
    opacity: 0;
    transform: rotate(30deg);  
    background-repeat:no-repeat;
    background-image: -webkit-gradient(
        linear, 0 0, 100% 100%,
        color-stop(0% , rgba(255, 255, 255, 0.2)),
        color-stop(37%, rgba(255, 255, 255, 0.2)),
        color-stop(45%, rgba(255, 255, 255, 0.6)),
        color-stop(50%, rgba(255, 255, 255, 0.0))
    );
    background-image: -moz-linear-gradient(
        0 0,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.2) 37%,
        rgba(255, 255, 255, 0.6) 45%,
        rgba(255, 255, 255, 0.0) 50%
    );
    transition-property: left, top, opacity;
    transition-duration: 0.7s, 0.7s, 0.15s;
    transition-timing-function: ease;
}

#launch:hover {
    transform:scale(1.1);
}

#launch:hover:after {
  opacity: 1;
  top: -49%;
  left: -96%;
}

#launch:active:after {
  opacity: 0;
}

#arcade {
    top:auto;
    position: absolute;
    bottom:0;
    left:50%;
    background:url(../img/arcade.png) no-repeat center center;
    width:409px;
    height:506px;
    margin-left:-204px;
    transition:opacity 1500ms ease, transform 2000ms ease;
}

#arcade.appeared {
    opacity: 0.8 !important;
}

#footer {
    text-align: right;
    padding: 0 20px;
    position: absolute;
    bottom:0;
    right: 0;
    width:100%;
    z-index: 1;
    box-sizing: border-box;
    padding-bottom: 10px;
}

#footer a {
    color:#fff;
    font-size:11px;
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
    padding-bottom: 5px;
}

#footer a:first-child {
    margin-right: 20px;
}

#footer p {
    margin:0;
    padding:0;
}

#footer a:hover {
    text-decoration: underline;
}

#game-container {
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index: 1;
    display: none;
    box-sizing: border-box;    
}

#game {
    margin: auto;
    position: relative;
    height: 675px;
    width: 1200px;
    max-width:100%;
    max-height: 100%;
}

#game:-ms-fullscreen {
    padding-top:0 !important;
}

#game:-webkit-full-screen {
    padding-top:0 !important;
    width:100%;
    height: 100%;
}

#game:-moz-full-screen {
    padding-top:0 !important;
}

#game:fullscreen {
    padding-top:0 !important;
}

#game input {
    font-family: "Pixellari";
    font-size: 18px;
    color: #1d1d1b;
    text-transform: uppercase;
    border: none;
    background: none;
    padding: 17px;
    box-sizing: border-box;
    outline: 0;
    display: block;
}

#game canvas {
    margin: 0 auto !important;
    display: block;
    width: 100% !important;
    height:auto !important;
    max-height: 100% !important;
}

#site.launched #arcade {    
    opacity: 0 !important;
}

#site.launched #main {
    opacity: 0;
}

#logo-dl {
    margin-top:-120px;
    padding-bottom: 40px;
}

.std-page > div {
    padding-left:20px;
    padding-right: 20px;
    max-width: 440px;
    margin-left:auto;
    margin-right: auto;
}

.std-page a {
    color:#fff;
    text-decoration: underline;
}

.std-page a:hover {
    text-decoration: none;
}

.std-page #launch {
    text-decoration: none;
}

#close {display: none;}

@media screen and (max-width: 1024px), screen and (max-height: 768px){
    #arcade {
        opacity: 0.6;
    }
}

@media screen and (max-width: 650px), screen and (max-height: 500px) {
    html {
        overflow: visible;
    }
    
    body,#site {
        height: auto;
        min-height: 100%;
        overflow: visible;
        overflow-x: hidden;
    }
    
    .star {
        display: none;
    }
    
    body {
        background:url(../img/bg-mobile.jpg) no-repeat top left;
        background-size: cover;
    }
    
    #logo-gp {
        position: relative;
        top:auto;
        left:auto;
        padding:10px 20px 0 20px;
    }
    
    #share {
        top: 10px;
        right:10px;
        text-align: right;
    }
    
    #share span {
        display: none;
    }
    
    #share a {
        display: block;
        padding:3px 0;
    }
    
    #logo-dl {
        margin-top:0;
        padding-bottom: 0;
    }
    
    #logo-dl img {
        max-width: 60%;
        margin:auto;
        padding-bottom: 10px;
    }
    
    #main {
        height: auto;
        padding-top:0;
    }
    
    #launch {
        margin-top:15px;
    }
    
    h1 {
        padding-bottom: 0;
    }
    
    h2 {
        font-size:25px;
        padding-left:20px;
        padding-right: 20px;
    }
    
    h2 + p {
        padding-left:20px;
        padding-right: 20px;
    }
    
    #footer {
        position: relative;
        text-align: right;
        padding-top:50px;
    }
    
    #arcade {
        display: none;
    }
    
    #site.launched #arcade {
        transform:none;
        opacity: 0;
        display: none;
    }

    #site.launched #main {
        opacity: 0;
    }
    
    #game-container {
        z-index: 2;
        background: rgba(0,0,0,0.8);
    }
}

@media screen and (max-width: 380px) {
    h2 {
        font-size:20px;
    }
}

@media screen and (max-height: 400px) {
    #game-container #game {
        padding-top: 0 !important;
    }
}

@media screen and (max-width: 1850px) {
    #game-container {
        z-index: 2;
        background: rgba(0,0,0,0.8);
    }
}

@media screen and (orientation: portrait) and (max-width: 450px) {
    #close {display: block; position: absolute; top: 10px; right: 18px;color:#fff;font-size:32px;z-index: 1;}
    #game canvas {visibility: hidden;}
    #game-container::after {background:url(../img/rotate-screen.gif) no-repeat center center;display: block;background-size:cover;width:250px;height:250px;position: absolute;top:50%;margin-top:-125px;left:50%;margin-left:-125px;content: ' ';}
}