/*
 * HTML5 Boilerplate
 *
 * 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,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 20px;
    line-height: 1.4;
    font-family: helvetica, arial, sans-serif;
    color:#eee;
    text-align: center;
    background:#222;
    padding:3em;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection declarations have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #000;
    text-shadow: none;
    color:#fff;
}

::selection {
    background: #000;
    text-shadow: none;
    color:#fff;
}

/*
 * 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 images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

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

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

textarea {
    resize: vertical;
}

/* ==========================================================================
   Chrome Frame prompt
   ========================================================================== */

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

/* ==========================================================================
   Webfont Loader
   ========================================================================== */

    .page-title, 
    .quote-text em {
        font-family: 'Abril Fatface', georgia;
        visibility: hidden;
    }

    .quote-text {
       font-family:'Josefin Sans', sans-serif;
       visibility: hidden;
    }

    .quote-author {
        font-family: 'Gentium Basic', serif;
        visibility: hidden;
    }

    .wf-loading .page-title,
    .wf-loading .quote-text,
    .wf-loading .quote-text em,
    .wf-loading .quote-author{
        visibility: hidden;
    }

    .wf-active .page-title,
    .wf-active .quote-text,
    .wf-active .quote-text em,
    .wf-active .quote-author {
        visibility: visible;
    }

    .wf-inactive .page-title,
    .wf-inactive .quote-text,
    .wf-inactive .quote-text em,
    .wf-inactive .quote-author {
        visibility: visible;
    }

    .no-js .page-title,
    .no-js .quote-text,
    .no-js .quote-text em,
    .no-js .quote-author {
        visibility: visible;
    }


/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Fade that shit in */

@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

body.fade-in,
.page-title,
.quote-container .wrapper,
#header.compact .wrapper {
    opacity:0;
    -webkit-animation:fadeIn ease-in 1;  
    -moz-animation:fadeIn ease-in 1;
    animation:fadeIn ease-in 1;

    -webkit-animation-fill-mode:forwards; 
    -moz-animation-fill-mode:forwards;
    animation-fill-mode:forwards;

    -webkit-animation-duration:0.5s;
    -moz-animation-duration:0.5s;
    animation-duration:0.5s;
}

#header.compact .wrapper {
    -webkit-animation-duration:0.3s;
    -moz-animation-duration:0.3s;
    animation-duration:0.3s; 
}

#header .wrapper {
    -webkit-animation-duration:0.3s;
    -moz-animation-duration:0.3s;
    animation-duration:0.3s; 
}

body.fade-in {
    -webkit-animation-delay: 0;
    -moz-animation-delay: 0;
    animation-delay: 0;
}

.page-title,
.quote-container .wrapper {
    -webkit-animation-delay: 0.3s;
    -moz-animation-delay: 0.3s;
    animation-delay: 0.3s;
}

.no-js body, .no-cssanimations body,
.no-js #header.compact .wrapper, .no-cssanimations #header.compact .wrapper, 
.no-js .page-title, .no-cssanimations .page-title,
.no-js .quote-container .wrapper, .no-cssanimations .quote-container .wrapper {
    opacity:1;
}


a {
    color:#eee;
}


/* Layout */

.wrapper {
    padding:4em 2em;
}

footer {
    font-family:sans-serif;
    background:#111;
    color:#666;
}

footer .wrapper {
    opacity: 0.6;
    -webkit-transition:opacity .3s ease-in;  
    -moz-transition:opacity .3s ease-in;  
    -o-transition:opacity .3s ease-in;  
    transition:opacity .3s ease-in;  
}

footer .wrapper:hover {
    opacity: 1;
}

#container {
    max-width:60em;
    margin:0 auto;
}


/* Typography */

.page-title {
    font-size: 4em;
    line-height: 1em;
    font-weight: normal;
    text-transform: uppercase;
}

/* Header Components */

#header {
    background:#333 url('../img/navy_blue.png');
    color:#eee;
    text-shadow:transparent 0 0 0, -1px -2px 0px #000;
}

.svg #logo {
    background:url('../img/jobs-emblem.svg') center center no-repeat;
    background-size:100%; 
    display: inline-block;
}

.svg .compact #logo {
    background-image:url('../img/jobs-emblem-compact.svg');
}

#logo {
    width:12em;
    height:12em;
}

#logo img {
    opacity:0;
    max-width: 100%;
}

.no-svg #logo img {
    opacity:1;
}

#social-shit {
    position: absolute;
    position: fixed;
    z-index: 999;
    top:0;
    right:2em;
    opacity: 0.5;
    -webkit-transition:opacity .3s ease-in;  
    -moz-transition:opacity .3s ease-in;  
    -o-transition:opacity .3s ease-in;  
    transition:opacity .3s ease-in;  
}

#social-shit.fixed {
    position: absolute;
}

.social-shit:hover {
    opacity: 1;
}

#social-shit .twitter-share-button {
    margin-top: 0.85em;
    float:right;
    margin-left:1em;
}

.fb-button-wrapper {
    width:95px;
    height: 26px;
    overflow: hidden;
    float:right;
    margin-top: 0.6em;
}


/* Compact Header */

#header.compact .wrapper {
    height:3em;
    width: 100%;
    text-align: left;
    background:rgba(0,0,0,0.8);
    position: fixed;
    top:0;
    left:0;
    margin: 0;
    padding:0; 
    z-index: 999;
}

.no-rgba #header.compact .wrapper {
    background:#000;
    opacity:0.8;
}

#header.compact #logo {
    width:2em;
    height:2em;
    float:left;
    margin:0.5em;
    opacity: 0.5;
    -webkit-transition:opacity .3s ease-in;  
    -moz-transition:opacity .3s ease-in;  
    -o-transition:opacity .3s ease-in;  
    transition:opacity .3s ease-in;  
}

#header.compact #logo:hover {
    opacity: 1;
}

#header.compact .page-title {
    margin:1em 0;
    float:left;
    font-size: 1em;
    color:#666;
    text-shadow:none;
}

#header.compact .page-title br {
    display: none;
}


/* Quote Components */

/* Light */
.quote-container {
    background:#FFF url('../img/handmadepaper.png');
    text-shadow:transparent 0 0 0,1px 2px 0px #fff;
    border-top:2px solid #FFF;
    color:#333;
}

/* Dark */
.quote-container:nth-child(even) {
    background:#333 url('../img/navy_blue.png');
    text-shadow:transparent 0 0 0, -1px -2px 0px #000;
    border-top:2px solid #666;
    border-bottom:2px solid #000;
    color:#eee;
}

.quote-container:nth-child(even) a {
    color:#eee;
    border-color: #eee;
}

.quote-text {
    font-size:3em;
    font-weight: 100;
    line-height: 1.2em;
    text-transform: uppercase;
    width:80%; 
    margin:1em auto;
    word-wrap:break-word;
}

.quote-text a {
    text-decoration: none;
    border-color:#000;
    color:#333;
}

    .quote-text a:hover {
        border-bottom: none;
        border-bottom: 0.04em dotted;
        margin-bottom: -0.05em;
    }

.quote-text em {
    font-style: normal;
}

.quote-author {
    font-size:1.5em;
    font-style: normal;
}

.quote-author a:before,
.quote-author a:after {
    display:inline-block;
    content:"—";
    font-size:1em;
    padding:0 0.25em;
}

    .quote-author  a,
    .icon-btn {
        color:#333;
        text-decoration: none;
        opacity:0.2;
        -webkit-transition:opacity .3s ease-in;  
        -moz-transition:opacity .3s ease-in;  
        -o-transition:opacity .3s ease-in;  
        transition:opacity .3s ease-in;  
    }

        .quote-author  a:hover,
        .icon-btn:hover {
            opacity:1;
        }


.quote-meta {
    margin:0 0 2em;
}

.quote-container img {
    max-width: 80%;
    border:0.5em solid rgba(0,0,0,0.15);
    margin-bottom:3em;
}

.quote-image {
    background:#eee;
    padding:1em; 
    margin:2em 0; 
}

.js .quote-image {
    display:none; 
}

.quote-image img {
    border:1px solid #000;
}


/* page nav */

.page-nav {
    background: #000;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 1.2em;
    border-bottom: 2px solid #000;
    text-shadow:transparent 0 0 0, -1px -2px 0px #000;
}

.page-nav a, .page-nav span {
    text-decoration: none;
    padding: 2em 0;
    width:43.5%;
    display: inline-block;
}

.page-nav a {
    -webkit-transition:background .3s ease-in;  
    -moz-transition:background .3s ease-in;  
    -o-transition:background .3s ease-in;  
    transition:background .3s ease-in;  
}

.page-nav span {
    color:#666;
}

.page-nav a:hover {
    background: #262626;
}

.page-nav .count {
    display: inline-block;
    width:10%;
    color:#666;
    padding: 2em 0;
}

/*.page-nav a.dead {*/
    /*opacity: 0;*/
    /*cursor: default;*/
/*}*/

/* RT button */

.icon-btn {
    width:auto;
    height:auto;
    margin:0 0.5em;
}

.svg .icon-btn {
    height:0;
    width:0;
    text-indent: -9999px;
    display: inline-block;
    overflow:hidden;
    padding:0.6em;
    background-color:#999;
    background-repeat: no-repeat;
    background-size:100%;
    border:0.6em solid #999;
    border-radius: 2em;
}

.svg .quote-container:nth-child(even) .icon-btn {
    background-color:#eee;
    border-color:#eee;
}

.svg .rt {
    background-image:url("../img/rt.svg");
}

.svg .permalink {
    background-image:url("../img/link.svg");
}




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

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 100%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

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

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.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: h5bp.com/p
 */

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

/*
 * Hide visually and from screenreaders, 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;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

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

@media only screen and (max-width: 55em) {
    body{font-size: 1em; }
}

@media only screen and (max-width: 50em) {
    body{font-size: 0.9em;}
}

@media only screen and (max-width: 45em) {
    body{font-size: 0.8em;}
}

@media only screen and (max-width:40em) {
    body{font-size: 0.7em; padding:0em;}
    #header.compact .wrapper {height:4em;}
    #header.compact #logo {height:3em; width:3em;}
    #header.compact .page-title {font-size: 1.4em;}
}

@media only screen and (max-width:35em) {
    body{font-size: 0.5em; padding:0em;}
    .svg .icon-btn {padding:1em; border-width:1em;}
    #social-shit {position:static; padding-bottom:2em;}
    #social-shit .fb-like, #social-shit .twitter-share-button {float:none;}
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        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 for images, or javascript/internal links
     */

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

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

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

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

    @page {
        margin: 0.5cm;
    }

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

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