/* =============================================
FONTS
/* ============================================= */


@font-face {
    font-family: 'CalibreWeb';
    src:url('/fonts/CalibreWeb-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CalibreWeb';
    src:url('/fonts/CalibreWeb-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'LyonWeb';
    src:url('/fonts/LyonText-Regular-Web.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'LyonWeb';
    src:url('/fonts/LyonText-RegularItalic-Web.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}


/* =============================================
SITE-WIDE
/* ============================================= */

* {
    box-sizing: border-box;
    text-rendering: optimizelegibility;
}

::-moz-selection { background: #fff0b9; }
::selection { background: #fff0b9; }

body {
    font-family: 'CalibreWeb', Helvetica, Arial, sans-serif;
    font-size: 20px;
    line-height: 1.3;
    background-color: #222;
    color: #fff;
    margin: 0 auto;
    max-width: 1500px;
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 700px) { body { font-size: 22px; } }
@media (min-width: 1000px) { body { font-size: 24px; } }

h1, h2, h3, h4 {
    font-size: 1em;
    margin: 1em;
    font-weight: 400;
}

h2 { color: #999; }

/*div.textspace h2 {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 80%;
}*/

time {
    font-family: CalibreWeb, Helvetica, Arial, sans-serif;
    color: rgba(0,0,0,0.5);
}

div.body figure { margin: 2em auto; }
div.body figure img.fullimg { margin-bottom: 1em; }

div.body figure.sm { max-width: 15em; }

div.body figure figcaption {
    margin-top: -2em;
    margin-bottom: 3em;
    color: rgba(0,0,0,0.5);
    font-size: 80%;
    max-width: 42rem;
    margin: 0 auto;
}

div.body figure figcaption a {
    text-decoration: none;
    color: rgba(0,0,0,0.5);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0) 93%, #fb8171 93%);
}

div.body figure figcaption a:hover { color: #fb8171; }

p, blockquote, ul {
    max-width: 38rem;
    margin: 1.1em 0;
    -webkit-hyphenate-limit-after: 4;
    -webkit-hyphenate-limit-before: 2;
    -webkit-hyphenate-limit-lines: 2;
    -webkit-hyphens: auto;
    word-break: break-word;
    word-wrap: break-word;
}

p a, blockquote a, ul a, ol a { color: #fff; text-decoration: none; background-image: linear-gradient(to bottom, rgba(255,255,255,0) 93%, #fb8171 93%); }
p a:hover, blockquote a:hover, ul a:hover, ol a:hover { color: #fb8171; }

blockquote { text-indent: -0.3em; }

hr {
    border: none;
    height: 1px;
    border-top: 1px solid #333;
    margin: 1em 0;
}

img.fullimg {
    display: block;
    width: 100%;
}

div.clear { clear: both; }

cite {
    color: rgba(255,255,255,0.5);
    display: block;
    font-style: normal;
    text-indent: 0;
    margin-top: 0.5em;
}

footer {
    clear: both;
    color: #777;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 1em 0;
    padding: 1em;
    font-size: 80%;
}

footer a {
    color: #777;
    border-bottom: 1px solid #555;
    text-decoration: none;
}

footer.nobord {
    border-top: none;
    padding-top: 0;
}


/* =============================================
NAV
/* ============================================= */

header {
    padding: 1.25em 1em;
}

header h1 {
    font-size: 1em;
    margin: 0 0 0.5em 0;
    font-weight: 400;
}

nav[role='navigation'] ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5em 0;
    font-family: CalibreWeb, Helvetica, Arial, sans-serif;
}

nav[role='navigation'] ul li {
    display: inline-block;
    margin-right: 1em;
}

nav[role='navigation'] ul li a {
    color: #777;
    text-decoration: none;
    background: none;
    font-family: CalibreWeb, Helvetica, Arial, sans-serif;
}

nav[role='navigation'] ul li a:hover { color: #fb8171; }
nav[role='navigation'] ul li a:active { color: #fff; }

nav[role='navigation'] ul li a.active {
    color: #fff;
}

header h1 a {
    display: block;
    color: #fff;
    text-decoration: none;
}

@media (min-width: 600px) {
    header {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
    }
    header h1 { width: 50%; margin-right: 1em;  }
    header ul { margin-left: 1em; }
}

/* =============================================
MOSIAC LISTING
/* ============================================= */

div.mosiac { margin-bottom: 0.25em; }

a.tile {
    display: block;
    height: 0;
    width: 100%;
    color: #fff;
    text-decoration: none;
    position: relative;
    -webkit-transform: translateZ(0);
}

a.tile img {
    transition: opacity 0.1s ease-in;
    -webkit-transition: opacity 0.1s ease-in;
    -moz-transition: opacity 0.1s ease-in;
    -ms-transition: opacity 0.1s ease-in;
}

a.tile:hover img { opacity: 0.33; }

a.item4x3 { padding-bottom: 75%; }
a.item2x3 { padding-bottom: 150%; }
a.item1x1 { padding-bottom: 100%; }

a.item4x3 img, a.item2x3 img, a.item1x1 img {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

a.item4x3 div, a.item2x3 div, a.item1x1 div {
    display: block;
    position: absolute;
    left: 1em;
    top: 1em;
    z-index: 5;
    padding-right: 1em;
}

a.item4x3 span, a.item2x3 span, a.item1x1 span {
    display: block;
    margin-top: 0.5em;
    opacity: 0;
    line-height: 1.2;
    transition: opacity 0.1s ease-in;
    -webkit-transition: opacity 0.1s ease-in;
    -moz-transition: opacity 0.1s ease-in;
    -ms-transition: opacity 0.1s ease-in;
}

a.item4x3:hover span, a.item2x3:hover span, a.item1x1:hover span { opacity: 1; }

a.tile b {
    font-weight: 400;
    color: rgba(255,255,255,0.33);
}

a.tile strong { font-weight: 400; }
a.tile:hover strong { padding-bottom: 3px; border-bottom: 2px solid rgba(255,255,255,1);}

@media (min-width: 600px) {
    div.mosiacthird {
        width: 33.3333333%;
        float: left;
    }

    div.mosiachalf {
        width: 50%;
        float: left;
    }

    div.mosiac:after {
        content: "."; 
        visibility: hidden; 
        display: block; 
        height: 0; 
        clear: both;
    }
}

/* hide mosiac descriptions on tiny breakpoints */
@media (min-width: 600px) and (max-width: 800px) {
    a.item4x3:hover span, a.item2x3:hover span, a.item1x1:hover span { opacity: 0; }
}

@media (min-width: 1000px) {
    h2.sectiontitle { margin-left: 25%; float: left; margin-top: 1em; }
}


/* =============================================
TEXT LAYOUT
/* ============================================= */

div.textspace div {
    padding: 0 1em;
}

@media (min-width: 700px) {
    div.textspace {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-align-items: baseline;
        -moz-align-items: baseline;
        -ms-align-items: baseline;
        align-items: baseline;
    }
    div.textspace h2 { font-weight: 400; margin: 0; width: 25%; padding-left: 1em; }
    div.textspace div { width: 75%; padding: 0 1em; }
}

@media (min-width: 1000px) {
    div.textspace h2 { padding-left: 25%; width: 50%; }
    div.textspace div { width: 50%; }

    /* don't apply above rules if text space is in a 50% width container */
    div.mosiachalf div.textspace h2 { padding-left: 1em; width: 25%; }
    div.mosiachalf div.textspace div { width: 75%; padding-right: 2em;}
}


/* =============================================
TABLE LISTING
/* ============================================= */

ul.tablelist {
    list-style: none;
    padding: 0;
    margin: 0 0 -1em 0;
    border-top: 1px solid #333;
}

ul.tablelist.second {
    border-top: 1px solid #333;
    margin-top: 1em;
}

h2.second { margin-top: 2em; }

ul.tablelist li {
    position: relative;
}


ul.tablelist li:not(:last-child) {
    border-bottom: 1px solid #333;
}

ul.tablelist li em {
    position: absolute;
    right: 0;
    top: 0.5em;
    font-style: normal;
    color: #555;
}

ul.tablelist li a {
    display: block;
    padding: 0.5em 0 0.8em;
    text-decoration: none;
    color: #fff;
    padding-right: 5em;
    line-height: 1.25;
    background: none;
}

ul.tablelist li a strong {
    font-weight: 400;
    color: #fff;
}

ul.tablelist li a:hover strong { color: #fb8171; }

@media (min-width: 700px) {
    ul.tablelist { border-top: none; }
    h2.second { margin-top: 0; }
}

/* =============================================
Library Grid
/* ============================================= */

body.library header {
    border-bottom: 1px solid #444;
    margin-bottom: 2em;
}

body.library section {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex; 
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -mx-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-bottom: 3em;
}

body.library section a {
    width: 50%;
    margin-top: 2em;
    color: #fff;
    text-decoration: none;
    line-height: 1.1;
    font-size: 20px;
}

body.library section a h2, body.library section a h3 {
    margin: 0;
    padding: 0 1em;
}
body.library section a h3 {
    color: rgba(255,255,255,0.33);
}

body.library section a h2 {
    border-top: 10px solid #444;
    margin-top: 0;
    padding-top: 0.5em;
    color: #fff;
}

body.library section div.imgcontainer {
    width: 100%;
    position: relative;
    height: 0;
    padding-bottom: 100%;
}

body.library section div.imgcontainer img {
    display: block;
    position: absolute;
    bottom: 0;
    left: 1em;
    width: 65%;
    transition: opacity 0.1s ease-in;
    -webkit-transition: opacity 0.1s ease-in;
    -moz-transition: opacity 0.1s ease-in;
    -ms-transition: opacity 0.1s ease-in;
}

body.library section a:hover h2 { color: #fb8171; }
body.library section a:hover h3 { color: #fff; }
body.library section a:hover img { opacity: 0.3;}

@media (min-width: 700px) { body.library section a { width: 33%; } }
@media (min-width: 1000px) { body.library section a { width: 25%; } body.library section h2, body.library section h3 { /*font-size: 22px;*/ } }
@media (min-width: 1200px) { body.library section a { width: 20%; } }

/* =============================================
ARTICLE
/* ============================================= */

/* Nav fixes */
body.vanilla header {
    background-color: #fafafa;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.vanilla header h1 a {
    color: rgba(0,0,0,0.75);
}

body.vanilla header nav[role='navigation'] ul li a.active { color: rgba(0,0,0,0.75); }
body.vanilla header nav[role='navigation'] ul li a { color: rgba(0,0,0,0.3); }
body.vanilla header nav[role='navigation'] ul li a:hover { color: #fb8171; }

/* Nav fixes for Customs */
body.custom div.body { max-width: none !important; }
body.custom article { padding: 0 !important; }
body.custom header { background-color: #222 !important; }
body.custom header h1 a { color: #fff !important; }
body.custom header nav[role='navigation'] ul li a.active { color: #fff !important; }
body.custom header nav[role='navigation'] ul li a { color: #777 !important; }
body.custom header nav[role='navigation'] ul li a:hover { color: #fb8171 !important; }


body.vanilla article {
    background-color: #fafafa;
    padding: 1em;
    color: rgba(0,0,0,0.75);
    min-height: 100%;
}

body.vanilla article p, body.vanilla article blockquote, body.vanilla div.body ul, body.vanilla div.body ol {
    font-size: 19px; /* Balance Lyon size, because Calibre sits tiny. */
    font-family: 'LyonWeb', Georgia, serif;
    margin-left: auto; 
    margin-right: auto; 
    max-width: 42rem;
    line-height: 1.5;
    letter-spacing: 0.15px;
    /*-webkit-font-smoothing: subpixel-antialiased;*/
}

body.vanilla div.body {
    max-width: 55rem;
    margin: 0 auto;
}

/* altar spacing on paras around videos
div is inserted by fitvids.js */
div.fluid-width-video-wrapper { margin: 3em 0; }

/* add more margin to bottom of pics */
div.body img.fullimg { margin: 3em 0; }

article blockquote {
    text-indent: 0;
    padding-left: 2em;
    color: rgba(0,0,0,0.5);
    border-left: 1px solid rgba(0,0,0,0.1);
    font-style: italic;
}

article blockquote em { font-style: normal; }

article hr {
    max-width: 5em;
    margin: 2em auto;
    border-top-color: rgba(0,0,0,0.1);
}

body.vanilla article h1 {
    margin-left: 0;
    font-size: 220%;
    margin: 0.75em auto 1em;
    font-weight: 600;
    line-height: 1;
}

body.vanilla article p a, body.vanilla article blockquote a, body.vanilla article div.body ul a, body.vanilla article div.body ol a { color: rgba(0,0,0,0.75); }
body.vanilla article p a:hover, body.vanilla article blockquote a:hover, body.vanilla article div.body ul a:hover, body.vanilla article div.body ol a:hover { color: #fb8171; }

body.vanilla article h1, body.vanilla article h2, body.vanilla article h3 {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

body.vanilla article h2 {
    font-size: 110%;
    margin-top: 2em;
    font-weight: 600;
    color: rgba(0,0,0,0.75);
}

body.vanilla article h3 {
    font-family: LyonWeb, Georgia, serif;
    font-style: italic;
    font-size: 90%;
    color: rgba(0,0,0,0.5);
}


#open, #closehotspot { display: none; }

body.vanilla footer {
    color: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-left: 0;
    font-size: 80%;
    margin-top: 2em;
    max-width: 42rem;
    margin: 2em auto;
}

body.vanilla footer a {
    border-bottom: 1px solid #ccc;
}

@media (min-width: 700px) {
    html { height: 100%; }
    body.article {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        background-color: #babec0;
        min-height: 100%;
    }

    body.article article, body.article div.wrap { min-height: 100vh; }
    
    body.article div.wrap {
        position: absolute;
        width: calc(100% - 55px);
        left: 55px;
        top: 0;
        z-index: 500;
        -ms-transition: transform 0.5s ease-in;
        -webkit-transition: -webkit-transform 0.4s ease-in;
        transition: transform 0.4s ease-in;
    }

    body.article section {
        background-color: #babec0;
        position: fixed;
        width: calc(100% - 110px);
        padding: 1em 1em 1em 0;
        height: 100%;
        left: 55px;
        top: 0;
        overflow-x: hidden;
        overflow-y: scroll;
        z-index: 1;
        padding-bottom: 2em;
    }

    body.article section div.textspace h2 { color: rgba(0,0,0,0.5); }
    body.article section div.textspace ul.tablelist li em { color: rgba(255,255,255,0.5); }
    body.article section div.textspace ul.tablelist li a strong { color: rgba(0,0,0,0.5);}
    body.article section div.textspace ul.tablelist li a:hover strong { color: #fff; }
    body.article section div.textspace ul.tablelist li:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.5); }
    body.article section ul.tablelist.second { border-top: 1px solid rgba(255,255,255,0.5); }

    #open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 55px;
        cursor: pointer;
        background-color: #babec0;
        z-index: 999;
        transition: background-color 0.1s ease-in;
        -webkit-transition: background-color 0.1s ease-in;
        -moz-transition: background-color 0.1s ease-in;
        -ms-transition: background-color 0.1s ease-in;
    }

    #open:hover { background-color: #a2acb1; }

    #open b {
        font-weight: 400;
        position: fixed;
        top: 50%;
        left: -1.1em;
        -ms-transform: rotate(-90deg);
        -webkit-transform: rotate(-90deg);
        transform: rotate(-90deg);
        -ms-transform-origin: 50% 50%;
        -webkit-transform-origin: 50% 50%;
        transform-origin: 50% 50%;
        font-size: 80%;
        margin-top: -1em;
        color: rgba(255,255,255,1);
        width: 5em;
        text-align: center;
    }

    body.articleoff #closehotspot {
        display: block;
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 55px;
        cursor: pointer;
        z-index: 999;
        opacity: 0;
    }

    body.articleoff {
        overflow: hidden;
    }

    body.articleoff div.wrap {
        -ms-transform: translate(calc(100% - 55px),0);
        -webkit-transform: translate(calc(100% - 55px),0);
        transform: translate(calc(100% - 55px),0);
        overflow: hidden;
    }
}

@media (min-width: 700px) {
    body.vanilla article p, body.vanilla article blockquote, body.vanilla article div.body ul, body.vanilla article div.body ol { font-size: 21px; -webkit-font-smoothing: antialiased; }
}

@media (min-width: 1000px) {
    body.vanilla article p, body.vanilla article div.body blockquote, body.vanilla article div.body ul, body.vanilla article div.body ol { font-size: 23px; max-width: 43rem; }
    body.vanilla article footer, body.vanilla article h1, body.vanilla article h2, body.vanilla article h3, div.body figure figcaption { max-width: 43rem; }
}