/* Red Thread - A Free Design by Bryant Smith (bryantsmith.com)
   A personal timeline built from one vertical red line.
   Every colour, space and border is gathered below; look for the section
   headings to find the part you want to change. The red is #b3261e. */


/* ---- BODY: the warm desk behind the page ---- */

body {
    background: #f0e9e1;
    color: #2a2521;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.7;
    text-align: center;
    padding: 48px 16px;
}

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


/* ---- PAGE: the sheet the timeline is drawn on ---- */

#page {
    background: #fffdfb;
    border-top: 5px solid #b3261e;
    max-width: 820px;
    margin: 0 auto;
    padding: 56px 48px 40px 48px;
    text-align: left;
    box-shadow: 0 1px 2px rgba(42, 37, 33, 0.05),
                0 16px 40px rgba(42, 37, 33, 0.09);
}


/* ---- MASTHEAD: the centred title at the very top ---- */

#masthead {
    text-align: center;
    padding-bottom: 30px;
    margin-bottom: 48px;
    border-bottom: 1px solid #ece2d8;
}

.kicker {
    color: #b3261e;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#masthead h1 {
    color: #211d1a;
    font-size: 54px;
    font-weight: normal;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin: 10px 0 14px 0;
}

.tagline {
    color: #8a7f75;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
}


/* ---- MENU: the row of links under the title ---- */

#menu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    margin-top: 28px;
    text-transform: uppercase;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: #6b615a;
    margin: 0 11px;
    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: #b3261e;
    color: #b3261e;
    outline: none;
}


/* ---- TEXT: the intro and body copy ---- */

.lead {
    color: #4a423c;
    font-size: 21px;
    line-height: 1.65;
    margin: 0 auto 8px auto;
    max-width: 600px;
    text-align: left;
}

.lead::first-letter {
    color: #b3261e;
    float: left;
    font-size: 3.2em;
    line-height: 0.82;
    padding: 6px 10px 0 0;
}

h2 {
    color: #211d1a;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    margin: 52px 0 26px 0;
    text-align: center;
    text-transform: uppercase;
}

h2::after {
    background: #b3261e;
    content: "";
    display: block;
    height: 2px;
    margin: 12px auto 0 auto;
    width: 42px;
}

#content > p {
    margin-bottom: 20px;
}

#content > p,
.steps {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

#content a,
#content a:visited {
    border-bottom: 1px solid #e3b6b0;
    color: #b3261e;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#content a:hover,
#content a:focus {
    border-bottom-color: #7d1913;
    color: #7d1913;
    outline: none;
}


/* ---- TIMELINE: the red spine that runs down the middle ---- */

.timeline {
    position: relative;
    margin: 18px 0 10px 0;
    padding: 10px 0;
}

/* the line itself, drawn with a pseudo-element */
.timeline::before {
    background: #b3261e;
    border-radius: 3px;
    bottom: 12px;
    content: "";
    left: 50%;
    margin-left: -1.5px;
    position: absolute;
    top: 12px;
    width: 3px;
}

/* a small cap at the very bottom of the thread */
.timeline::after {
    background: #b3261e;
    border-radius: 50%;
    bottom: 2px;
    box-shadow: 0 0 0 4px #fffdfb;
    content: "";
    height: 11px;
    left: 50%;
    margin-left: -5.5px;
    position: absolute;
    width: 11px;
}


/* ---- EVENTS: cards that alternate either side of the line ---- */

.event {
    position: relative;
    width: 50%;
    padding: 0 40px 40px 0;
}

.event.right {
    margin-left: 50%;
    padding: 0 0 40px 40px;
}

.event:last-child {
    padding-bottom: 0;
}

.event-body {
    background: #ffffff;
    border: 1px solid #ece2d8;
    border-radius: 8px;
    border-top: 3px solid #b3261e;
    box-shadow: 0 1px 2px rgba(42, 37, 33, 0.04),
                0 6px 16px rgba(42, 37, 33, 0.06);
    padding: 18px 20px 20px 20px;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.event-body:hover {
    box-shadow: 0 2px 4px rgba(42, 37, 33, 0.06),
                0 14px 30px rgba(42, 37, 33, 0.11);
    transform: translateY(-3px);
}

/* the dot that pins each card to the thread */
.event-body::after {
    background: #fffdfb;
    border: 3px solid #b3261e;
    border-radius: 50%;
    content: "";
    height: 14px;
    position: absolute;
    top: 24px;
    width: 14px;
    z-index: 2;
}

/* the short tick joining the card to its dot */
.event-body::before {
    background: #b3261e;
    content: "";
    height: 2px;
    position: absolute;
    top: 33px;
    width: 40px;
}

.event.left .event-body::after {
    right: -50px;
}

.event.left .event-body::before {
    right: -40px;
}

.event.right .event-body::after {
    left: -50px;
}

.event.right .event-body::before {
    left: -40px;
}

/* the small red year label inside each card */
.date {
    color: #b3261e;
    display: inline-block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.event-body h3 {
    color: #211d1a;
    font-size: 22px;
    font-weight: normal;
    line-height: 1.25;
    margin-bottom: 8px;
}

.event-body p {
    color: #655c55;
    font-size: 15.5px;
    line-height: 1.65;
}


/* ---- BLOCKQUOTE: the closing thought ---- */

blockquote {
    border-left: 3px solid #b3261e;
    color: #5a524b;
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
    margin: 52px auto 0 auto;
    max-width: 600px;
    padding: 4px 0 4px 24px;
}

blockquote p {
    margin: 0;
}


/* ---- STEPS: the friendly "how to use this" list ---- */

.steps {
    list-style: none;
    counter-reset: step;
    margin-top: 4px;
}

.steps li {
    border-bottom: 1px solid #f0e8e0;
    counter-increment: step;
    padding: 14px 0 14px 44px;
    position: relative;
}

.steps li:last-child {
    border-bottom: none;
}

.steps li::before {
    background: #b3261e;
    border-radius: 50%;
    color: #ffffff;
    content: counter(step);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    height: 24px;
    left: 0;
    line-height: 24px;
    position: absolute;
    text-align: center;
    top: 15px;
    width: 24px;
}

.note {
    color: #8a7f75;
    font-size: 15px;
    font-style: italic;
}

strong {
    color: #3a332e;
}


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

#footer {
    border-top: 1px solid #ece2d8;
    color: #a2978c;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    margin-top: 56px;
    padding-top: 22px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    border-bottom: none;
    color: #7f7369;
    text-decoration: none;
}

#footer a:hover,
#footer a:focus {
    color: #b3261e;
    outline: none;
}


/* ---- SMALL SCREENS: slide the thread to the left ---- */

@media (max-width: 640px) {
    body {
        padding: 24px 12px;
    }

    #page {
        padding: 36px 24px 28px 24px;
    }

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

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

    /* the spine moves from the centre to the left edge */
    .timeline::before {
        left: 21px;
        margin-left: 0;
    }

    .timeline::after {
        left: 21px;
        margin-left: -4px;
    }

    /* every card becomes a single full-width column */
    .event,
    .event.right {
        margin-left: 0;
        padding: 0 0 32px 52px;
        width: 100%;
    }

    .event-body::before {
        left: -31px;
        right: auto;
        width: 31px;
    }

    .event.left .event-body::after,
    .event.right .event-body::after {
        left: -41px;
        right: auto;
    }

    .lead {
        font-size: 19px;
    }

    blockquote {
        font-size: 18px;
    }
}


/* ---- PRINT: a clean sheet with no shadows ---- */

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

    #page {
        border-top: 5px solid #b3261e;
        box-shadow: none;
        max-width: 100%;
        padding: 0;
    }

    #menu {
        display: none;
    }

    .event-body {
        box-shadow: none;
    }

    .event-body:hover {
        transform: none;
    }
}
