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

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

img {max-width:100%;}

/*
 * Remove default fieldset styles.
 */

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

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

textarea {
    resize: vertical;
}

/* Apply border-box to all content */
	*, *:before, *:after {-moz-box-sizing:border-box; -webkit-box-sizing:border-box; box-sizing:border-box;}

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

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

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
body {background:url(../images/bg.jpg); color:#60271e; font-family: 'Lora', serif; font-size:1.2em;}
a {color:#69723d;}
h1 {margin-top:0; font-family: 'Cinzel', serif; line-height:1; text-align:center;}
h1 span.script {font-family: 'Pinyon Script', cursive; font-size:1.5em; font-weight:400;}
h1 span.sm {font-size:.8em;}
h2 {margin-top:0; font-family: 'Pinyon Script', cursive; font-size:2em; font-weight:400; line-height:1;}
p {margin-top:0;}
figure {margin:0 1em 1em;}
blockquote {margin:0; font-style:italic;}
blockquote p:first-letter {font-family: 'Cinzel', serif; font-size:2em; font-style:normal; font-weight:700; line-height:1;}
cite {display:block; font-size:.8em; font-style:normal;}

.container {position:relative; width:96%; max-width:1200px; margin:2em auto; padding:1em; background:rgba(255,255,255,.8); 
--notchSize: 20px;
  clip-path: 
    polygon(
      0% var(--notchSize), 
      var(--notchSize) 0%, 
      calc(100% - var(--notchSize)) 0%, 
      100% var(--notchSize), 
      100% calc(100% - var(--notchSize)), 
      calc(100% - var(--notchSize)) 100%, 
      var(--notchSize) 100%, 
      0% calc(100% - var(--notchSize))
    );}
.script {font-family: 'Pinyon Script', cursive; font-size:1.2em; font-weight:400;}
.tagline {margin:0 0 2em -2.5em; padding:1em 2em 1em 1em; background:#69723d; color:#fff; font-family: 'Cinzel', serif; font-size:.9em; font-weight:700;
--notchSize: 20px;
  clip-path: 
    polygon(
      0% 0%, 
      var(--notchSize) 0%, 
      calc(100% - var(--notchSize)) 0%, 
      100% var(--notchSize), 
      100% calc(100% - var(--notchSize)), 
      calc(100% - var(--notchSize)) 100%, 
      0% 100%, 
      0% calc(100% - var(--notchSize))
    );}
.fb {position: absolute; top: 0; right: 32px; z-index: 1; padding: .5em 0; background: rgba(255,255,255,.9); text-align:center; box-shadow:0 1px 5px 0px rgba(0, 0, 0, 0.18)}
.fb img {width:50%;} 
.inner {margin:0 0 1em; padding:1em; border:1px outset #e2ba74;}
.hero-container {clear:both; margin:0 -2em 2em;}
.fadeshow-container {position:relative; min-height:144px; margin:0 -3em 40px;}
.fadeshow-inner {position:absolute; top:0; left:0; width:100%; height:100%;}
.vid{overflow:hidden; padding-bottom:56.25%; position:relative; height:0; max-width:640px; margin:0 auto 40px;}
.vid video{left:0; top:0; height:100%; width:100%; position:absolute;}
.book-container {margin:0 0 2em;}
.book-container h2 {text-align:center;}
	.book-container h2:after {content:" "url(../images/flourish.png); vertical-align:middle;}
.content {margin:0 0 2em;}
.buy {margin:0 0 2em; padding:1em; background:#fff; text-align:center;
--notchSize: 20px;
  clip-path: 
    polygon(
      0% var(--notchSize), 
      var(--notchSize) 0%, 
      calc(100% - var(--notchSize)) 0%, 
      100% var(--notchSize), 
      100% calc(100% - var(--notchSize)), 
      calc(100% - var(--notchSize)) 100%, 
      var(--notchSize) 100%, 
      0% calc(100% - var(--notchSize))
    );}
.buy h2 span,.author h2 span {display:inline-block; position:relative;}
	.buy h2 span:before, .buy h2 span:after,.author h2 span:before, .author h2 span:after {content: ""; position: absolute; height: 5px;   border-bottom: 1px solid #60271e; border-top: 1px solid #60271e; top: 14px; width: 20%;}
	.buy h2 span:before, .author h2 span:before {right: 100%; margin-right: 15px;}
	.buy h2 span:after, .author h2 span:after {left: 100%; margin-left: 15px;}
.author h2 {text-align:center;}
.author p {font-size:.8em;}
.footer {font-size:.7em;}
.footer p {margin:0;}
/* ==========================================================================
   Media Queries for Responsive Design.
   ========================================================================== */

@media only screen and (min-width: 568px) {
	.fadeshow-container {min-height:248px;}
	cite {margin-left:40%;}
	.content img, .author img {float:left; width:30%; margin:5px 1em 1em 0;}
}
@media only screen and (min-width: 667px) {
	h1 {text-align:left;}
	h1 .start {display:inline-block; text-align:center}
	h1 .end {position:absolute; top:1.5em; left:5.5em; line-height:1; text-align:center}
	h1 .end .sm {position:relative; top:-10px;}
	.tagline {width:80%;}
	.fadeshow-container {min-height:289px;}
	.buy h2 span:before, .buy h2 span:after {width:100%;}
	.author h2 span:before, .author h2 span:after  {width:57%;}
}
@media only screen and (min-width: 768px) {
	body {font-size:1.4em;}
    .container {padding:1.5em;}
	.inner {padding:1em;}
	h1 {position:relative;}
	h1 .end {top:.5em; left:4.4em;}
	.tagline {width:84%; margin-left:-3em;}
	.fadeshow-container {min-height:325px;}
	.hero-vid-container {margin:0 -2.5em 2em;}
}

@media only screen and (min-width: 992px) {
	.container {width:80%; padding:2em;}
	.inner {padding:1em;}
	.tagline {width:80%; margin-left:-3.5em}
	.fadeshow-container {min-height:354px;}
	.hero-vid-container {margin:0 -3em 2em;}
}
@media only screen and (min-width: 1200px) {
	h1 span.script {font-size:2em;}
	h1 .end {top:.2em; left:4.4em;}
	cite {margin-left:52%;}
	.tagline {width:60%; /*margin-right:-3.5em;*/} 
	.fadeshow-container {min-height:460px;}
	.content {font-size:.8em; column-count:2;}
	.content img, .author img {width:35%;}
	.vid {padding-bottom:42%;}
}

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


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

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