@font-face {
    font-family: 'Bassanova';
    src: url('../type/bassanova.eot');
    src: url('../type/bassanova.eot?#iefix') format('embedded-opentype'),
            url('../type/bassanova.woff2') format('woff2'),
            url('../type/bassanova.woff') format('woff'),
            url('../type/bassanova.ttf') format('truetype');
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    padding: 0;

    min-height: 100vh;
    overflow-x: hidden;

    background-color: #2b2b2b;
    color: #2b2b2b;

    font-family: "Source Sans Pro";
    font-feature-settings: "kern";
}

a {
    color: #FF14AB;
    font-weight: bold;
    text-decoration: none;

    font-style: italic;
}

a:hover, a:focus {
    box-shadow: inset 0 -4px 0 #00E6F0;
}

/* Header */
header {
    padding: 0 1rem;
    text-align: center;
}

header a {
    color: inherit;
    font-style: inherit;
    font-weight: inherit;
    text-decoration: none;
}

header a:hover,
header a:focus {
    box-shadow: none;
}

h1 {
    position: relative;
    font-size: 3.5rem;
    line-height: 1;
    margin: -1.5rem auto 1rem auto;
    max-width: 320px;

    transform: rotate(2deg) translateY(2.25rem);

    color: #00E6F0;
    font-family: "Bassanova", sans-serif;
    font-feature-settings: "kern", "dlig", "calt";
    z-index: 2;
}

h1 span {
    display: block;
    width: 14rem;
    transform: translateX(3rem);

    color: #FF6800;
    text-shadow: -1px -1px 0 #ff0,
        -2px -2px 0 #ff0,
        -3px -3px 0 #2b2b2b,
        -4px -4px 0 #2b2b2b,
        -5px -5px 0 #2b2b2b,
        -6px -6px 0 #2b2b2b,
        -7px -7px 0 #2b2b2b,
        -8px -8px 0 #2b2b2b,
        -9px -9px 0 #2b2b2b,
        -10px -10px 0 #2b2b2b,
        -11px -11px 0 #2b2b2b,
        -12px -12px 0 #2b2b2b,
        -13px -13px 0 #2b2b2b,
        -14px -14px 0 #2b2b2b,
        -15px -15px 0 #2b2b2b,
        -16px -16px 0 #2b2b2b,
        -16px -16px 15px #2b2b2b,
        -16px -16px 5px #2b2b2b;
}

h1 b {
    position: relative;
    z-index: 1;

    text-shadow:
        -1px -1px 0 #ff0,
        -2px -2px 0 #ff0;
}

.logo {
    fill: #ff0;
}

.slogan {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 3rem;
    background-color: #eaeaea;
    color: #2b2b2b;
    margin: 0;
    padding: 0.5rem 2rem;

    font-style: italic;
    font-weight: bold;
}

.navbar {
    display: none;
}

/* Body */
.wrapper {
    position: relative;
    padding: 1rem;

    background-color: #EAEAEA;
    color: #1b1b1b;
}

section {
    font-size: 1.125rem;
    line-height: 2rem;

    max-width: 620px;
    margin: auto;
}

p {
    margin: 1rem 0;
}

#intro > p:first-child {
    font-size: 1.25rem;
    line-height: 2rem;

    font-weight: bold;
}

section ul {
    list-style: square;
    font-size: 1rem;
    line-height: 1.5rem;
    margin: 0;

    padding: 0 0 0 4rem;
}

section li {
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 3.75rem;
    line-height: 3.5rem;
    margin: 2rem 0 0 0;


    color: #FF6800;
    font-family: "Bassanova", sans-serif;
    font-feature-settings: "kern", "dlig", "calt";
    font-weight: normal;
    text-align: center;

    text-shadow: -1px -1px 0px #FFFF00,
        -2px -2px 0px #FFFF00;
}

.robot-rule {
    display: none;
}

/* Footer */
footer h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

footer img {
    vertical-align: middle;
}

/* Calculator */
#calculator {
    display: none;
}

.js #calculator {
    display: block;
}

#calculator p {
    position: relative;
}

#calculator label {
    display: block;
    height: 3rem;
}

#calculator label span {
    display: inline-block;
    vertical-align: middle;

    font-style: italic;
    font-size: 1rem;
    line-height: 2rem;
    text-align: right;
}

#calculator input {
    font-size: 2rem;
    padding: 0.5rem;
    max-width: 80%;

    vertical-align: middle;
}

#calculator output {
    position: absolute;
    right: 0;
}

/* Forms */
form label {
    display: block;

    font-size: 1rem;
    line-height: 1.5rem;
}

form input[type="text"], textarea {
    display: block;

    border: none;
    border-bottom: 3px solid #FF6800;
    border-top-right-radius: 0.25rem;
    border-top-left-radius: 0.25rem;
    margin-bottom: -3px;
    padding: 0.5rem;
}

form input, textarea {
    font-size: 1.25rem;
    width: 100%;
    margin: 0.25rem 0;

    font-family: inherit;
}

textarea[name="mission"] {
    min-height: 6rem;
}

textarea[name="problem"] {
    min-height: 12rem;
}

.field {
    margin-bottom: 1.5rem;
}

.privacy-note {
    font-size: 1rem;
    line-height: 1.5rem;
    margin: -1rem 0 0 0;
}

.submit {
    text-align: right;
}

input[type="submit"] {
    background-color: #FF6800;
    border: none;
    border-radius: 0.25rem;
    padding: 0.5rem;
    color: #fff;
    box-shadow: -2px -2px 0 #FFFF00;
    cursor: pointer;
}

input[type="submit"]:focus,
input[type="submit"]:hover {
    background-color: #FF14AB;
    box-shadow: -2px -2px 0 #FFFF00;
}

input[type="submit"]:active {
    position: relative;
    top: -2px;
    left: -2px;
    box-shadow: none;
}

/* Animation */
@keyframes slidein1 {
    from {
        transform: translate3d(0px, -100px, 0) rotate(0);
    }
    to {
        transform: translate3d(0px, 5000px, 0) rotate(760deg);
    }
}
@keyframes slidein2 {
    from {
        transform: translate3d(0px, -100px, 0) rotate(0);
    }
    to {
        transform:  translate3d(0px, 5000px, 0) rotate(-760deg);
    }
}

#canvas {
    display: none;

    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    overflow: hidden;
    z-index: -1;
}

#canvas .gutter {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 600px;
    right: 0;
    z-index: 1;
}

#canvas .icon {
    position: absolute;
    mix-blend-mode:lighten;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

#pause {
    display: none;
}

#pause-label {
    display: none;
}

#pause:checked + #pause-label + #canvas .icon {
    animation-play-state: paused;
}


@media screen and (min-width: 620px) {
    header {
        width: 600px;
        text-align: left;
    }

    h1 {
        max-width: none;
        font-size: 6rem;
        line-height: 5rem;
        margin: -1rem 0 1rem 0;

        transform: rotate(2deg) translateY(2.5rem);
    }

    .logo {
        display: block;
        width: 150px;
        height: 150px;

        position: absolute;
        top: 130px;
        left: 510px;

        fill: #eaeaea;
        transform: rotate(45deg) scale(1.25);
    }

    h2 {
        text-align: left;
    }

    .wrapper {
        border-top-right-radius: 20rem;
        padding: 2rem 4rem 2rem 4rem;
        width: 600px;
    }

    #intro p:first-child {
        margin-right: 6rem;
        font-size: 1.5rem;
        line-height: 2.5rem;
    }

    section ul {
        font-size: 1.125rem;
        line-height: 2rem;
    }

    #calculator label span {
        width: 10rem;
    }

    #calculator input {
        width: 12rem;
    }

    #canvas {
        display: block;
    }

    #canvas .gutter {
        display: none;
    }

    .robot-heads {
        position: absolute;
        top: 0;
        left: 600px;
        width: 100px;
        height: 5450px;

        fill: #eaeaea;
        z-index: 2;
    }
}

@media screen and (min-width: 700px) {
    #canvas .gutter {
        display: block;
    }

    #pause-label {
        display: block;

        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 5;

        width: 1rem;
        height: 1rem;

        border-left: 5px solid #eaeaea;
        border-right: 5px solid #eaeaea;
        cursor: pointer;

        text-indent: 100%;
        white-space: nowrap;
        overflow: hidden;
    }

    #pause:checked + #pause-label {
        border-top: 8px solid transparent;
        border-left: 14px solid #eaeaea;
        border-bottom: 8px solid transparent;
        border-right: none;
    }
}

@media screen and (min-width: 920px) {
    body {
        padding-bottom: 4rem;
    }

    header {
        width: 100%;
        height: 24rem;
    }

    h1 {
        font-size: 8rem;
        line-height: 6rem;
        width: 600px;
        margin: auto;
        text-shadow: -1px -1px 0 #ff0,
            -2px -2px 0 #ff0,
            -3px -3px 0 #ff0,
            -4px -4px 0 #ff0;

        mix-blend-mode: screen;
        will-change: opacity;

        position: relative;
        top: 50%;
        transform: rotate(2deg) translate(10%, -60%);
    }

    h1 b,
    h1 span {
        text-shadow: inherit;
    }

    .logo {
        display: block;

        position: absolute;
        top: 0;
        left: 0;

        fill: #ff0;
        mix-blend-mode: lighten;
        transform: translate(-110%, 40%) scale(1.5) rotate(-16deg);
    }

    .wrapper {
        box-sizing: content-box;

        width: auto;
        max-width: calc(920px - 6rem);
        margin: -1rem auto 0 auto;
        padding: 2rem 3rem 2rem 3rem;

        background: rgba(255, 255, 255, 0.925);
        border-radius: 0rem;
    }

    /* Mock skew this rect with some triangle bookends */
    .wrapper:before,
    .wrapper:after {
        display: block;
        content: "";

        position: absolute;
        left: 0;
        width: 0;
        height: 0;
    }

    .wrapper:before {
        bottom: 100%;

        border-style: solid;
        border-width: 0 0 1.5rem 920px;
        border-color: transparent transparent
            rgba(255, 255, 255, 0.925) transparent;
    }

    .wrapper:after {
        top: 100%;

        border-style: solid;
        border-width: 0 0 1rem 920px;
        border-color: transparent transparent
            transparent rgba(255, 255, 255, 0.925);
    }

    section {
        width: auto;
        max-width: none;

        font-size: 1.25rem;
    }

    section ul {
        padding-left: 2rem;
    }

    section li {
        margin-bottom: 0;
    }

    h2 {
        text-shadow: -1px -1px 0px #FFFF00,
            -2px -2px 0px #FFFF00,
            -3px -3px 0px #FFFF00;
    }

    .robot-rule {
        display: block;
        width: 100%;
        height: 4rem;
        margin: 3rem 0 2rem 0;
    }

    #intro {
        max-width: 460px;
        min-height: 43rem;
        margin: 0;
    }

    #intro > p:first-child {
        margin-right: 0;
    }

    #get-started {
        max-width: 460px;
        margin: 0;
    }

    .privacy-note {
        position: absolute;

        margin: 0;
        max-width: 300px;
    }

    #calculator,
    #how {
        position: absolute;
        right: 3rem;
        width: 340px;

        border-left: 1px solid #ccc;
        padding-left: 1rem;
    }

    #calculator h2,
    #get-started h2,
    #how h2 {
        margin: 0;
    }

    #calculator {
        top: 3rem;
    }

    #how {
        top: 55rem;
    }

    #tale,
    #about,
    #faq,
    footer {
        max-width: 620px;
        margin: auto;
    }

    #calculator .field {
        margin: 0;
    }

    #calculator label span {
        width: 8rem;
    }

    #calculator input {
        width: 8rem;
    }

    .submit input {
        width: auto;
    }

    #canvas .gutter {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1;
    }

    .robot-heads {
        display: none;
    }
}
