/*! HTML5 Boilerplate v6.0.1 | 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
   ========================================================================== */

@font-face {
    font-family: 'MiraculousChristmas';
    src:url(../fonts/miraculous.ttf);
}
@font-face {
    font-family: 'SomethingNatural';
    src:url(../fonts/natural.otf);
}

body {
    background:url(../img/background.jpg) repeat top center;
    margin:30px;
}

#logo {
    width:800px;
    margin:0 auto -160px;
    display: block;
    
}
div#site {
    transform: rotate(-0.5deg);
}

main {
    background:url(../img/bluepaint.png) no-repeat, url(../img/purplepaint.png) no-repeat, url(../img/greenpaint.png) no-repeat, url(../img/paper.jpg) repeat-y;
    background-position: -180px -100px, 400px 730px, -300px 1240px, 0 0;
    width:900px;
    margin:200px auto;
    padding:60px 0;
    box-shadow: 0px 3px 15px 3px rgba(0,0,0,0.35);
}
header {
    width:1000px;
    margin:0 auto;
}

span#tape_upperleft {
    background: url(../img/tape_upperleft.png);
    width:112px;
    height:120px;
    display: block;
    position:absolute;
}
span#tape_upperright {
    background: url(../img/tape_upperright.png);
    width:112px;
    height:120px;
    display: inline-block;
    position:relative;
    float:right;
    right:0px;
    top:-50px
}

div#about {
    width:820px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 40px 1fr;
    grid-column-gap: 20px;
    clear:both;
    margin:0 auto;
}

div#about span#about-title {
    grid-column: 1;
    grid-row: 1;
}

div#about span#about-content {
    grid-column: 1;
    grid-row: 2;
}

div#about img {
    grid-column: 2;
    margin:-10px auto 0 16px;
    grid-row: 1 / span 2;
    align-self: center;
    width:101%;
}
div#classes {
    background:url(../img/arrow.png) no-repeat center 100px;
    background-size: 36px;
    width:820px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 40px 1fr 1fr;
    grid-column-gap: 70px;
    clear:both;
    margin:50px auto 0;
}
div#classes span#classes-title {
    grid-column: 1;
    grid-row: 1;
}
div#classes span#classes-content-1 {
    grid-column: 1;
    grid-row: 2;
}
div#classes span#classes-content-2 {
    grid-column: 2;
    grid-row: 2;
}
div#classes img {
    grid-column: 1 / span 2;
    grid-row: 3;
    align-self: center;
    
    margin:-52px auto -40px;
}

div#classtimes {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 80px 1fr 1fr 1fr 1fr;
    grid-column-gap: 40px;
    grid-row-gap: 20px;
    margin:80px 40px -20px;
    align-content: center;
    justify-content: center;
}
#classtimes-title {
    grid-column: 1 / span 6;
    grid-row: 1;
}
#classtimes-content-1 {
    grid-column: 1 / span 2;
    grid-row: 2;
}
#classtimes-content-2 {
    grid-column: 3 / span 2;
    grid-row: 2;
}
#classtimes-content-3 {
    grid-column: 5 / span 2;
    grid-row: 2;
}
#classtimes-content-4 {
    grid-column: 2 / span 2;
    grid-row: 3;
}
#classtimes-content-5 {
    grid-column: 4 / span 2;
    grid-row: 3;
}
#classtimes-content-6 {
    grid-column: 1 / span 6;
    grid-row: 4;
}
#classtimes-content-7 {
    grid-column: 1 / span 6;
    grid-row: 5;
    margin-top: 20px;
}

h1, #moreinfo span {
    font-family: 'SomethingNatural', sans-serif;
    font-weight:800;
    font-size: 24pt;
    line-height: 24pt;
    color: #403933;
    margin:-10px auto 40px;
    text-align: center;
    width:85%;
    clear:none;
}

h2 {
    font-family: 'MiraculousChristmas', sans-serif;
    font-weight:200;
    font-size: 36pt;
    line-height: 24pt;
    color: #403933;
    margin:0;
}
h3 {
    font-family: 'SomethingNatural', sans-serif;
    font-weight:800;
    font-size: 14pt;
    line-height: 18pt;
    color: #403933;
    margin:-10px auto 20px;
    text-align: center;
    width:85%;
    clear:none;
}
span#classtimes-title h2 {
    font-size: 54pt;
    margin:0px auto 40px;
    text-align: center;
    z-index: 2;
    opacity: .99;
    -webkit-opacity: .99;
}
p {
    font-family: 'Gentium Book Basic', serif;
    font-weight:800;
    font-size: 13pt;
    line-height: 18pt;
    text-align: justify;
    color: #403933;
}
#classtimes p {
    font-size: 12pt;
    line-height: 3pt;
    text-align: center;
}
.highlighter {
    background:rgba(255,195,36,0.5);
    padding:0 3px;
}

span#classtimes-title .highlighter {
    display: block;
    height:44px;
    width:210px;
    margin:0px auto -36px;
    transform: rotate(-3deg);
    z-index: 1;
}
#moreinfo {
    margin:70px auto 0px;
    text-align: center;
}
#moreinfo h1 {
    margin:0px auto 20px;
}
#moreinfo img {
    width:10%;
    display: inline;
}

footer {
    
    margin:-120px auto 40px;
    width:600px;
}
footer p {
    font-size: 18pt;
    line-height: 6pt;
    text-align: center;
}
footer a {
    text-decoration:none;
    color:#403933;
    border-bottom: 3px dashed #403933;
}

@media all and (max-width: 1080px) {
    
    body {
        margin:0px;
    }
    
    header {
        display:none;
    }
    div#site {
        margin:0 auto;
    }
    
    #logo {
        width:100%;
        margin: 20px auto -175px;
    }
    
    div#site {
        transform: rotate(0deg);
    }
    
    main {
        background-position: -180px -100px, 0px 1530px, -300px 2100px, 0 0;
        width:80%;
    }
    
    div#about {
        width:90%;
        display: grid;
        grid-template-columns: 1fr;
        /*grid-template-rows: 60px 1fr;*/
        grid-auto-rows: auto;
        margin:80px auto 20px;
        
    grid-row-gap: 20px;
    }
    div#about span#about-title {
    grid-column: 1;
    grid-row: 1;
}

div#about span#about-content {
    grid-column: 1;
    grid-row: 2;
}

div#about img {
    grid-column: 1;
    grid-row: 3;
    
    align-self: center;
    width:90%;
    margin:0 auto;
}
    
    div#classes {
    background:none;
    width:90%;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
        margin:80px auto 20px;
    grid-row-gap: 20px;
}
div#classes span#classes-title {
    grid-column: 1;
    grid-row: 1;
    margin:0 auto;
    
}
div#classes span#classes-content-1 {
    grid-column: 1;
    grid-row: 2;
}
div#classes span#classes-content-2 {
    grid-column: 1;
    grid-row: 3;
    margin:-30px auto 0px;
    
}
div#classes img {
    grid-column: 1;
    grid-row: 4;
    width:100%;
    margin:-100px auto 0px;
}
    
    div#classtimes {
    display: grid;
    grid-template-columns:1fr;
        
    grid-auto-rows: auto;
    grid-row-gap: 40px;
    margin:80px 40px -20px;
    align-content: center;
    justify-content: center;
}
#classtimes-title {
    grid-column: 1;
    grid-row: 1;
}
#classtimes-content-1 {
    grid-column: 1;
    grid-row: 2;
}
#classtimes-content-2 {
    grid-column: 1;
    grid-row: 3;
}
#classtimes-content-3 {
    grid-column: 1;
    grid-row: 4;
}
#classtimes-content-4 {
    grid-column: 1;
    grid-row: 5;
}
#classtimes-content-5 {
    grid-column: 1;
    grid-row: 6;
}
#classtimes-content-6 {
    grid-column: 1;
    grid-row: 7;
}
#classtimes-content-7 {
    grid-column: 1;
    grid-row: 8;
    margin-top: 0px;
}
    
h3 {
    font-family: 'SomethingNatural', sans-serif;
    font-weight:800;
    font-size: 17pt;
    line-height: 18pt;
    color: #403933;
    margin:-10px auto 20px;
    text-align: center;
    width:85%;
    clear:none;
}
    
    #classtimes p {
    font-size: 13pt;
    line-height: 16pt;
    text-align: center;
        margin:7px auto;
}
    
    h1, #moreinfo span {
    font-family: 'SomethingNatural', sans-serif;
    font-weight:800;
    font-size: 22pt;
    line-height: 22pt;
    }
    h2 {
        text-align:center;
        font-size: 42pt;
    line-height: 24pt;
    }
    
    footer {
    
    margin:-120px auto 40px;
    width:90%;
}
    footer p {
    font-size: 14pt;
    line-height: 6pt;
    text-align: center;
        
        color:#eee;
}
    footer a {
        color:#eee;
        
    border-bottom: 3px dashed #eee;
    }
    
    #moreinfo {
    margin:110px auto 0px;
    text-align: center;
}
    
}

@media all and (max-width: 450px) {
    
        main {
        width:100%;
    }
    
}

/* ==========================================================================
   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);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    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;
    -webkit-clip-path: none;
    clip-path: none;
    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:
   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 {
        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;
    }
}
