/*
 * 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
 *
 * These selection rule sets have to be separate.
 * 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;
}

ul {
    padding-left: 0;
    
}
/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

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

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
body {
    font-family: 'Raleway', 'helvetica', sans-serif;
    font-size: 12pt;
    line-height: 14pt;
    background-color:#ddd;
    background-image: url("../img/gray_jean.png");
}

main {
    padding: 0.67em;
    border: 2px dashed transparent;
    max-width: 560px;
    margin: 0.5em;
    border-radius: 8px;
    background:linear-gradient(-45deg, rgba(0,0,0,0.3) 0%,rgba(0,0,0,0.3) 60%,rgba(53,59,90,0.3) 73%,rgba(75,80,81,0.3) 88%); 
}


h1 {
    font-size: 14pt;
    font-weight: bold;
    font-family: 'Raleway', sans-serif;
    margin: 0 0 0.67em 0;
}

aside h2 {
    font-size: 16pt;
    font-weight: normal;
    font-family: 'Raleway', sans-serif;
    margin: 0;
}

.colour-box {
    border: 1px solid #999; 
    border-radius: 5px;
    width: 50px;
    height: 30px;
}

.selected-colour-box {
   border-color: #000; 
}

aside#colour-wheel {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index:10;
    height: 65px;
    margin-bottom: -65px;
    width: 47px;
    background: linear-gradient(-45deg, rgba(0,0,0,0.3) 0%,rgba(0,0,0,0.3) 60%,rgba(53,59,90,0.3) 73%,rgba(75,80,81,0.3) 88%);
    top: -3.3em;
    left: 85%;
    cursor: pointer;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}



aside img.icon {
    width: 70%
}

#subtitle {
   
    
}

#primary-colour {
   margin-top: 14pt; 

}

#choice-of-colours {
   margin-top: 14pt;

}

#choice-of-colours ul#list-of-colours {
   list-style-type: none;
   margin: 14pt 0 0 0;
   padding: 0;
   max-width: 365px;
}

#choice-of-colours #list-of-colours li {
   display: inline-block;
   margin-right: 0.25em;
    
}

#choice-of-colours #task-description {
   list-style: square inside; 
}

#choice-of-colours #task-description li {
   display: list-item;
   margin-left: 1.5em;
   padding-left: 1em;
   text-indent: -2em; 
}

#choice-of-colours #task-description li span {
    left:-0.75em;
    position: relative;
}

#choice-of-colours {
   font-size: 10pt;
   line-height: 14pt;
}


#choice-of-colours li:not(:first-child) {
    margin-top:3.5pt;
    
}

figure {
    max-width: 500px;
    border: 1px solid #999;
    margin: 14pt 0 0 0;
    padding: 2em;
    background-image: radial-gradient(circle at top center, rgba(255,255,255,1), rgba(233,233,233,1) );
}

figure > article {
   display: flex; 
    flex-direction: column;
}

figure > article nav {
    order: 1;
}


figure > article .content {
    order: 2;
    font-size: 8pt;
    line-height: 14pt;
    display: flex;
    flex-direction: row;
    margin-top: 0.5em;
}

figure > article .content > section {
    margin-right: 3em;
}
figure > article .content p {
    max-width: 39em;
}

figure > article svg {
    order: 3;
}

figure > article h1 {
    font-size: 10pt;
}

figure > article nav div {
    height: 14px;
    background-color: #000;
    
}

figure > article nav div.logo {
    width: 90px;
    height: 20px;
    display: block;
    margin-bottom: 0.75em;
    
}

figure > article nav div.nav-item {
    width: 50px;
    height: 16px;
    display: inline-block;
    margin-right: 5pt;
}


a.reload {
    font-family: 'Raleway', 'helvetica', sans-serif;
    font-size: 12pt;
    line-height: 14pt;
    margin-left: 0.5em;
    color: #222;
}


@keyframes jump {
  0%{
	transform: translateY(0);
    filter: grayscale(0%)
  }
  20%{
	transform: translateY(0);
  }
  40%{
	transform: translateY(-15px);
  }
  50%{
	transform: translateY(0);
  }
  60%{
	transform: translateY(-7px);
  }
  80%{
	transform: translateY(0);
  }
  100%{
	transform: translateY(0);
    filter: grayscale(0%)
  }
}

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

/*
 * Hide visually and from screen readers:
 * http://juicystudio.com/article/screen-readers-display-none.php
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screen readers:
 * http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 */

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

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

/*
 * 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 */
    main {
        margin: 0.5em auto;
    }
    
    #choice-of-colours ul#list-of-colours {
       max-width: 460px;
    }
    
    aside#colour-wheel {
        left: 88%;
    }  
    
    aside#colour-wheel:hover > img {
        animation: jump 1.5s ease 0s infinite normal; 
    }
    
    .colour-box:hover {
       border-color: #000; 
    }

}

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

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

@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important; /* Black prints faster:
                                   http://www.sanbeiji.com/archives/953 */
        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,
    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;
    }

    img {
        max-width: 100% !important;
    }

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

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