/* Project Tiles - A Free Design by Bryant Smith (bryantsmith.com)
   Every colour, border and bit of spacing on the page is gathered here.
   Look for the section headings below to find what you want to change. */


/* ---- RESET: start everything from zero ---- */

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


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

body {
    background: #ede7dc;
    color: #241f1a;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    padding: 48px 20px;
}

a:focus-visible {
    outline: 2px solid #c2410c;
    outline-offset: 2px;
}


/* ---- PAGE: the card that holds the whole site ---- */

#page {
    background: #fffdf9;
    border: 1px solid #e7dece;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(36, 31, 26, 0.04), 0 20px 50px rgba(36, 31, 26, 0.09);
    margin: 0 auto;
    max-width: 920px;
    padding: 56px 56px 40px 56px;
}


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

#masthead {
    border-bottom: 1px solid #e7dece;
    padding-bottom: 32px;
}

.logo {
    color: #c2410c;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
}

#masthead h1 {
    color: #1c1712;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 50px;
    font-weight: normal;
    letter-spacing: -1px;
    line-height: 1.1;
    margin: 14px 0 10px 0;
}

.tagline {
    color: #6d6459;
    font-size: 16px;
}

#menu {
    margin-top: 28px;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: #4c443b;
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-right: 26px;
    padding-bottom: 4px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#menu a:hover {
    border-bottom-color: #c2410c;
    color: #c2410c;
}


/* ---- CONTENT: the reading column ---- */

#content {
    padding-top: 40px;
}

.lead {
    color: #3a332c;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 20px;
    line-height: 1.7;
    margin-bottom: 32px;
}


/* ---- NOTE: the friendly "how to use" callout ---- */

.note {
    background: #f8e6db;
    border-left: 4px solid #c2410c;
    border-radius: 8px;
    margin-bottom: 48px;
    padding: 22px 26px;
}

.note h2 {
    color: #8f2f08;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.note p {
    color: #4c443b;
    margin: 0;
}


/* ---- SECTION TITLE: the small rule above the grid ---- */

.section-title {
    border-bottom: 1px solid #e7dece;
    color: #6d6459;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2.5px;
    margin-bottom: 28px;
    padding-bottom: 12px;
    text-transform: uppercase;
}

.section-title::before {
    background: #c2410c;
    content: "";
    display: inline-block;
    height: 3px;
    margin-right: 10px;
    vertical-align: middle;
    width: 22px;
}


/* ---- TILE GRID: the columns that hold the project tiles ---- */

.tile-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
}


/* ---- TILE: one project card ---- */

.tile {
    background: #ffffff;
    border: 1px solid #e7dece;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 28px 24px 24px 24px;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* the terracotta bar that grows across the top when you hover */
.tile::before {
    background: #c2410c;
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.tile:hover {
    border-color: #d9cdba;
    box-shadow: 0 14px 30px rgba(36, 31, 26, 0.12);
    transform: translateY(-4px);
}

.tile:hover::before {
    transform: scaleX(1);
}

.tile-number {
    align-self: flex-start;
    background: #f8e6db;
    border-radius: 999px;
    color: #8f2f08;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 3px 11px;
}

.tile h3 {
    color: #1c1712;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 22px;
    font-weight: normal;
    line-height: 1.25;
    margin: 16px 0 10px 0;
}

.tile p {
    color: #6d6459;
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 20px;
}

.tile-link,
.tile-link:visited {
    align-self: flex-start;
    border-bottom: 2px solid transparent;
    color: #8f2f08;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
    padding-bottom: 3px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.tile-link::after {
    content: " \2192";
    display: inline-block;
    transition: transform 0.15s ease;
}

.tile:hover .tile-link {
    border-bottom-color: #c2410c;
    color: #c2410c;
}

.tile:hover .tile-link::after {
    transform: translateX(4px);
}


/* ---- CLOSING: a short sign-off under the grid ---- */

.closing {
    border-top: 1px dashed #e7dece;
    color: #6d6459;
    font-style: italic;
    margin-top: 48px;
    padding-top: 24px;
}


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

#footer {
    border-top: 1px solid #e7dece;
    color: #9a9084;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-top: 56px;
    padding-top: 22px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    color: #8a8074;
    text-decoration: none;
}

#footer a:hover {
    color: #c2410c;
}


/* ---- SMALL SCREENS: stack the tiles and tighten the type ---- */

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

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

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

    #menu a,
    #menu a:visited {
        margin-right: 18px;
    }

    .lead {
        font-size: 18px;
    }

    .note {
        padding: 18px 20px;
    }

    .tile-grid {
        grid-template-columns: 1fr;
    }

    .tile {
        padding: 24px 20px 20px 20px;
    }
}


/* ---- PRINT: drop the desk, shadows and menu for a clean page ---- */

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

    #page {
        border: none;
        box-shadow: none;
        max-width: 100%;
        padding: 0;
    }

    #menu {
        display: none;
    }

    .tile {
        break-inside: avoid;
        box-shadow: none;
    }
}
