/*! HTML5 Boilerplate v6.1.0 | MIT License | https://html5boilerplate.com/ */

/*
 * 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.
 */

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

::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;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
#container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}
.layer {
    position: absolute;
    width: 100%;
}
.layer img {
    width: 100%;
}
#full_screen_btn {
    left: 2.5%;
    top: 2.5%;
}
#full_screen_btn img {
    width: 2.5%;
    opacity: .5;
}
.curtain {
    height: 100%;
    background-image: url(../img/curtain.jpg);
    background-size: cover;
    background-position: center;
    /* the restart animation */
    transition: opacity .35s linear;
}
.curtain.animate {
    opacity: 0;
    transform: translateX(100%);
    transition: opacity .35s linear, transform 0s .5s;
}

/* Start screen */
#play_btn {
    width: 25%;
    left: 37.5%;
    bottom: 20%;
    /* the restart animation */
    transition: opacity .25s .75s linear;
}
#play_btn.animate {
    opacity: 0;
    transition: opacity .25s linear;
}

#logo {
    width: 50%;
    right: 25%;
    bottom: 45%;
    /* the restart animation */
    transition: all .5s ease-in-out;
}
#logo.animate {
    width: 20%;
    right: 5%;
    bottom: 5%;
    transition: all .6s .25s ease-in-out;
}

/* Question choicing screen */
#choice_bg {
    height: 100%;
    background-image: url(../img/choice_bg.jpg);
    background-size: cover;
    background-position: center bottom;
}
#choice_goat1 {
    width: 6%;
    left: 10%;
    bottom: 30%;
}
#choice_cow1 {
    width: 13%;
    left: 32%;
    bottom: 15%;
}
#choice_goat2 {
    width: 7%;
    left: 57%;
    bottom: 28%;
}
#choice_cow2 {
    width: 8%;
    left: 80%;
    bottom: 35%;
}
#choice_copy {
    width: 30%;
    bottom: 5%;
    left: 5%;
}

/* Question screen */
.questions {
    height: 100%;
    transform: translateX(100%);
    opacity: 0;
}
.animals {
    width: 30%;
    right: 65%;
    top: 5%;
    transform: translateX(330%);
}
.animals.cow {
    width: 30%;
    right: 68%;
    top: 10%;
}
.boards {
    height: 100%;
    width: 70%;
    right: 0;
    background-image: url(../img/curtain.jpg);
    background-size: cover;
    background-position: center;
    transform: translateX(100%);
}
.question-copy {
    width: 20%;
    left: 2.5%;
    bottom: 10%;
    opacity: 0;
}
.copies {
    width: auto;
    height: 30px;
    left: 50%;
    top: -40%;
    transform: translateX(-50%);
    opacity: 0;
}
.copies img {
    width: auto;
    height: 100%;
}

.questions.animate {
    opacity: 1;
    transform: translateX(0);
    transition: opacity .25s;
}
.animals.animate {
    transform: translateX(0);
    transition: transform .6s .35s ease-out;
}
.boards.animate {
    transform: translateX(0);
    transition: transform .5s .25s ease-out;
}
.question-copy.animate {
    opacity: 1;
    transition: opacity .5s 1s;
}
.copies.animate {
    opacity: 1;
    transition: opacity .5s 1s;
}

/* Single question */
#question1 {
    background-color: #5dc1cb;
    background: radial-gradient(ellipse at center, rgba(203,235,255,1) 0%,rgba(93,193,203,1) 100%);
}
#question1 #prop1 {
    width: 30%;
    left: 48%;
    transform: translateX(-50%);
    top: 15%;
}
#question1 #prop1 .copies {
    top: -30%;
}
#question1 #prop2 {
    width: 30%;
    left: 5%;
    top: 45%;
}
#question1 #prop2 .copies {
    top: -45%;
}
#question1 #prop3 {
    width: 25%;
    right: 7%;
    top: 38%;
}
#question1 #prop3 .copies {
    top: -35%;
}
#question1 #prop4 {
    width: 30%;
    left: 50%;
    transform: translateX(-50%);
    bottom: 13%;
}

#question2 {
    background-color: #a9c811;
    background: radial-gradient(ellipse at center, rgba(223, 226, 112) 0%,rgba(169, 200, 17, 1) 100%);
}
#question2 .question-copy {
    left: 5%;
}
#question2 .copies {
    height: 20px;    
    left: 44%;
    top: 56%;
}
#question2 #prop1 {
    width: 28%;
    left: 50%;
    transform: translateX(-50%);
    top: 8%;
}
#question2 #prop2 {
    width: 28%;
    left: 10%;
    top: 30%;
}
#question2 #prop3 {
    width: 28%;
    right: 10%;
    top: 30%;
}
#question2 #prop4 {
    width: 28%;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12%;
}
#question2 #prop4 .copies {
    height: 15px;
}

#question3 {
    background-color: #5dc1cb;
    background: radial-gradient(ellipse at center, rgba(203,235,255,1) 0%,rgba(93,193,203,1) 100%);
}
#question3 .question-copy {
    left: 4%;
}
#question3 .copies {
    height: 28px;
    top: -35%;
}
#question3 #copy4 {
    top: -50%;
}
#question3 #prop1 {
    width: 33%;
    left: 50%;
    transform: translateX(-50%);
    top: 15%;
}
#question3 #prop2 {
    width: 30%;
    left: 7%;
    top: 38%;
}
#question3 #prop2 .copies {
    top: -20%;
}
#question3 #prop3 {
    width: 33%;
    right: 7%;
    top: 42%;
}
#question3 #prop3 .copies {
    top: -32%;
}
#question3 #prop4 {
    width: 30%;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14%;
}
#question3 #prop4 .copies {
    top: -32%;
}

#question4 {
    background-color: #ffe100;
    background: radial-gradient(ellipse at center, rgba(255, 236, 113) 0%,rgba(255, 225, 0, 1) 100%);
}
#question4 .question-copy {
    left: 4%;
    bottom: 5%;
}
#question4 .copies {
    height: 28px;
    top: -35%;
}
#question4 #copy4 {
    height: 42px;
    top: -38%;
}
#question4 #prop1 {
    width: 30%;
    left: 50%;
    transform: translateX(-50%);
    top: 15%;
}
#question4 #prop1 .copies {
    top: -32%;
}
#question4 #prop2 {
    width: 17%;
    left: 13%;
    top: 35%;
}
#question4 #prop2 .copies {
    left: 47%;
    top: -22%;
}
#question4 #prop3 {
    width: 21%;
    right: 13%;
    top: 34%;
}
#question4 #prop3 .copies {
    left: 49%;
    top: -27%;
}
#question4 #prop4 {
    width: 30%;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15%;
}

/* Final screen */
.final {
    opacity: 0;
    transform: translateX(100%);
}
.final.animate {
    opacity: 1;
    transform: translateX(0);
    transition: transform .0s ease-out, opacity .35s linear;
}
.responses {
    width: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}
.responses.false {
    width: 35%;
}
.responses.animate {
    opacity: 1;
    transition: opacity .25s .5s linear;
}























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

/*
 * Hide visually and from screen readers
 */

.hidden {
    display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.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 */
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

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

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

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

.clearfix:after {
    clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 1.25dppx),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important; /* Black prints faster */
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
     * Printing Tables:
     * http://css-discuss.incutio.com/wiki/Printing_Tables
     */

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
