/* Quote Stack - A Free Design by Bryant Smith (bryantsmith.com)
   The colours, sizes and spacing all live here. Look for the section
   headings below to find whatever you would like to change. */


/* ---- PALETTE: every colour used on the page, in one place ----
   Change these values and the whole page updates. */

:root {
    --stone:   #e9e3d8;   /* the page background            */
    --paper:   #faf6ef;   /* the light quotation blocks      */
    --ink:     #232019;   /* the dark quotation blocks       */
    --text:    #2b2620;   /* body text on light blocks       */
    --text-lo: #f2ece0;   /* body text on dark blocks        */
    --muted:   #6f675a;   /* quiet text on the stone ground  */
    --accent:  #a94d1a;   /* terracotta, for light blocks    */
    --accentlite: #e29a5a;/* warm sand, for dark blocks      */
}


/* ---- BODY: the warm stone ground the stack rests on ---- */

body {
    background: var(--stone);
    color: var(--text);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.7;
    margin: 0;
    padding: 64px 20px 72px 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#page {
    margin: 0 auto;
    max-width: 860px;
}


/* ---- MASTHEAD: the title, tagline and menu ---- */

#masthead {
    text-align: center;
}

.eyebrow {
    color: var(--accent);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#masthead h1 {
    color: var(--ink);
    font-size: 72px;
    font-weight: normal;
    letter-spacing: -1.5px;
    line-height: 1.05;
    margin-top: 12px;
}

.tagline {
    color: var(--muted);
    font-size: 19px;
    font-style: italic;
    margin-top: 12px;
}

#menu {
    border-top: 1px solid #cfc6b5;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    margin-top: 32px;
    padding-top: 20px;
    text-transform: uppercase;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: #5a5246;
    margin: 0 12px;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#menu a:hover,
#menu a:focus {
    border-bottom-color: var(--accent);
    color: var(--accent);
}


/* ---- LEAD: the short introduction above the stack ---- */

.lead {
    color: #4a4339;
    font-size: 21px;
    line-height: 1.65;
    margin: 44px auto 40px auto;
    max-width: 640px;
    text-align: center;
}


/* ---- STACK: holds the alternating quotation blocks ----
   The counter below supplies the 01, 02, 03 numbers you see
   in the corner of each block. */

#stack {
    border-radius: 16px;
    border-top: 5px solid var(--accent);
    box-shadow: 0 22px 55px rgba(35, 32, 25, 0.16);
    counter-reset: quote;
    overflow: hidden;
}


/* ---- QUOTE: one quotation block ---- */

.quote {
    counter-increment: quote;
    padding: 52px 76px 48px 76px;
    position: relative;
}

/* the oversized opening quotation mark (a pseudo-element) */
.quote::before {
    content: "\201C";
    font-family: Georgia, "Times New Roman", serif;
    font-size: 150px;
    line-height: 1;
    position: absolute;
    right: 52px;
    top: 6px;
}

/* the small running number (another pseudo-element) */
.quote::after {
    bottom: 24px;
    content: "No. " counter(quote, decimal-leading-zero);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    position: absolute;
    right: 76px;
    text-transform: uppercase;
}

.quote-text {
    font-size: 27px;
    line-height: 1.5;
    max-width: 62ch;
    position: relative;
}

.quote-source {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    margin-top: 20px;
    text-transform: uppercase;
}

.quote-source cite {
    font-style: normal;
}


/* ---- ALTERNATING COLOURS: odd blocks light, even blocks dark ----
   This single pair of rules is what makes the stack alternate.
   Try changing the two background colours to restyle the page. */

.quote:nth-child(odd) {
    background: var(--paper);
    color: var(--text);
}

.quote:nth-child(even) {
    background: var(--ink);
    color: var(--text-lo);
}

.quote:nth-child(odd)::before {
    color: rgba(169, 77, 26, 0.16);
}

.quote:nth-child(even)::before {
    color: rgba(226, 154, 90, 0.18);
}

.quote:nth-child(odd) .quote-source {
    color: var(--accent);
}

.quote:nth-child(even) .quote-source {
    color: var(--accentlite);
}

.quote:nth-child(odd)::after {
    color: #b3a894;
}

.quote:nth-child(even)::after {
    color: #8a8172;
}


/* ---- HOW TO USE: the plain-English note at the bottom ---- */

#howto {
    border-top: 1px solid #cfc6b5;
    margin-top: 56px;
    padding-top: 32px;
}

#howto h2 {
    color: var(--ink);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

#howto h2::before {
    background: var(--accent);
    content: "";
    display: inline-block;
    height: 3px;
    margin-right: 10px;
    vertical-align: middle;
    width: 24px;
}

#howto p {
    color: #4a4339;
    margin-top: 18px;
    max-width: 68ch;
}

#howto code {
    background: #dcd4c5;
    border-radius: 3px;
    color: #3d362c;
    font-family: "Courier New", Courier, monospace;
    font-size: 15px;
    padding: 2px 6px;
}


/* ---- LINKS inside the reading column ---- */

#content a,
#content a:visited {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(169, 77, 26, 0.35);
    transition: border-color 0.15s ease;
}

#content a:hover,
#content a:focus {
    border-bottom-color: var(--accent);
}


/* ---- FOOTER: the required credit link ---- */

#footer {
    border-top: 1px solid #cfc6b5;
    color: #8a8172;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    margin-top: 52px;
    padding-top: 24px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    color: #6f675a;
    text-decoration: none;
}

#footer a:hover {
    color: var(--accent);
}


/* ---- SMALL SCREENS: tighter padding and type on phones ---- */

@media (max-width: 640px) {
    body {
        padding: 40px 14px 48px 14px;
    }

    #masthead h1 {
        font-size: 42px;
    }

    .lead {
        font-size: 18px;
        margin: 32px auto 28px auto;
    }

    #menu a {
        display: inline-block;
        margin: 4px 8px;
    }

    .quote {
        padding: 40px 28px 40px 28px;
    }

    .quote-text {
        font-size: 21px;
    }

    .quote::before {
        font-size: 96px;
        right: 24px;
        top: 6px;
    }

    .quote::after {
        bottom: 16px;
        right: 28px;
    }
}


/* ---- PRINT: a clean, quiet sheet of quotations ---- */

@media print {
    body {
        background: #ffffff;
        color: #000000;
        padding: 0;
    }

    #menu,
    #footer,
    .quote::before,
    .quote::after {
        display: none;
    }

    #stack {
        box-shadow: none;
        border-radius: 0;
    }

    .quote:nth-child(even) {
        background: #f2f2f2;
        color: #000000;
    }

    .quote {
        page-break-inside: avoid;
    }
}
