/* Dusty Rose - A Free Design by Bryant Smith (bryantsmith.com)
   Every colour and space on the page is gathered here.
   The section headings below tell you what each part does. */


/* ---- COLOURS: the whole palette lives in this one block ----
   Change a value here and it updates every card at once. */

:root {
    --bg: #f7f0ee;          /* warm blush page background */
    --surface: #fffaf9;     /* the card surface */
    --line: #e7d6d6;        /* understated card borders */
    --rose: #95596a;        /* muted pink headings */
    --rose-deep: #6f3d4c;   /* links and hover states */
    --ink: #4a3f42;         /* body text */
    --muted: #8d7c7e;       /* small print, tags */
}


/* ---- RESET & BODY: the "desk" behind the cards ---- */

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

body {
    background: var(--bg);
    background-image: radial-gradient(900px 420px at 50% -160px, #fbf3f2, var(--bg) 70%);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.7;
    padding: 48px 18px 56px 18px;
}

a:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 3px;
}


/* ---- PAGE: the centred shell that holds everything ---- */

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


/* ---- MASTHEAD: title, tagline and navigation ---- */

#masthead {
    border-bottom: 1px solid var(--line);
    padding-bottom: 26px;
    text-align: center;
}

#masthead h1 {
    color: var(--rose);
    font-size: 52px;
    font-weight: normal;
    letter-spacing: -0.5px;
    line-height: 1.08;
}

.tagline {
    color: var(--muted);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    margin-top: 12px;
    text-transform: uppercase;
}

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

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: var(--ink);
    margin: 0 11px;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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


/* ---- INTRO: the opening words under the title ---- */

#intro {
    margin: 42px auto 0 auto;
    max-width: 660px;
}

.lead {
    color: #5a4d50;
    font-size: 20px;
    line-height: 1.65;
}

#intro p + p {
    margin-top: 18px;
}


/* ---- SECTION HEADINGS: centred, with quiet rules either side ---- */

h2 {
    color: var(--rose);
    font-size: 26px;
    font-weight: normal;
    margin: 66px 0 34px 0;
    text-align: center;
}

h2::before,
h2::after {
    background: var(--line);
    content: "";
    display: inline-block;
    height: 1px;
    vertical-align: middle;
    width: 44px;
}

h2::before {
    margin-right: 16px;
}

h2::after {
    margin-left: 16px;
}


/* ---- CARD: the soft panel each project rests in ---- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(74, 63, 66, 0.04), 0 10px 26px rgba(149, 89, 106, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.card:focus-within {
    border-color: #d8b9be;
    box-shadow: 0 2px 3px rgba(74, 63, 66, 0.05), 0 18px 40px rgba(149, 89, 106, 0.12);
    transform: translateY(-4px);
}


/* ---- FEATURE: the wide opening card with art beside its story ---- */

.feature {
    display: flex;
    margin-top: 6px;
}

.feature .art {
    flex: 0 0 44%;
    min-height: 320px;
}

.feature .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 46px;
}


/* ---- ART: a CSS gradient standing in for a photograph ----
   To use a real picture, swap a gradient below for:
   background-image: url("my-photo.jpg"); */

.art {
    background-position: center;
    background-size: cover;
    display: block;
    width: 100%;
}

.art-feature { background-image: linear-gradient(140deg, #d9a7ae, #b57b86 55%, #8f5563); }
.art-1 { background-image: linear-gradient(135deg, #e3b7b0, #c58a86); }
.art-2 { background-image: linear-gradient(135deg, #cdd8c4, #a8bba0); }
.art-3 { background-image: linear-gradient(135deg, #e4c3ab, #c99a78); }
.art-4 { background-image: linear-gradient(135deg, #e9d7cf, #cdb0a6); }
.art-5 { background-image: linear-gradient(135deg, #d9b7c4, #b98aa0); }
.art-6 { background-image: linear-gradient(135deg, #dbc2b6, #b98f8a); }

.card .art {
    aspect-ratio: 4 / 3;
}

.feature .art {
    aspect-ratio: auto;
}


/* ---- GALLERY: the offset grid of project cards ----
   Two columns; every even card drops down to break the straight line. */

.gallery {
    align-items: start;
    display: grid;
    gap: 44px 30px;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 36px;
}

.gallery .card:nth-child(even) {
    margin-top: 60px;
}


/* ---- CARD TEXT: tag, title, paragraph and link ---- */

.card-body {
    padding: 22px 26px 26px 26px;
}

.card .tag {
    color: var(--rose);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

h3 {
    color: var(--rose);
    font-size: 22px;
    font-weight: normal;
    line-height: 1.25;
    margin: 8px 0 10px 0;
}

h3 a,
h3 a:visited {
    color: inherit;
    text-decoration: none;
}

h3 a:hover,
h3 a:focus {
    color: var(--rose-deep);
    text-decoration: underline;
    text-decoration-color: var(--line);
}

.card p {
    font-size: 15px;
    line-height: 1.65;
}

.more {
    color: var(--rose-deep);
    display: inline-block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 16px;
    text-decoration: none;
    text-transform: uppercase;
}

.more::after {
    content: " \2192";
}

.more:hover,
.more:focus {
    color: #4a2530;
}


/* ---- HOW-TO NOTES: the friendly instructions near the bottom ---- */

#howto {
    margin: 0 auto;
    max-width: 720px;
}

#howto p {
    margin-bottom: 18px;
}

code {
    background: #f3e6e7;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: #7a4453;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    padding: 1px 6px;
}

.tips {
    list-style: none;
}

.tips li {
    border-top: 1px solid var(--line);
    padding: 13px 0 13px 26px;
    position: relative;
}

.tips li::before {
    color: var(--rose);
    content: "\2192";
    left: 0;
    position: absolute;
}


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

#footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    margin-top: 72px;
    padding-top: 24px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    color: var(--rose);
    text-decoration: none;
}

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


/* ---- MEDIUM SCREENS: stack the feature card ---- */

@media (max-width: 760px) {
    .feature {
        display: block;
    }

    .feature .art {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .feature .card-body {
        padding: 32px 30px 34px 30px;
    }
}


/* ---- SMALL SCREENS: one column, no offsets, tighter spacing ---- */

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

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

    #menu a {
        margin: 0 7px;
    }

    .lead {
        font-size: 17px;
    }

    h2 {
        font-size: 22px;
        margin: 52px 0 26px 0;
    }

    h2::before,
    h2::after {
        display: none;
    }

    .gallery {
        gap: 26px;
        grid-template-columns: 1fr;
    }

    .gallery .card:nth-child(even) {
        margin-top: 0;
    }

    .card-body {
        padding: 20px 22px 24px 22px;
    }

    #footer {
        margin-top: 56px;
    }
}


/* ---- PRINT: drop the blush and show the work plainly ---- */

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

    #page {
        max-width: 100%;
    }

    #menu {
        display: none;
    }

    .card,
    .feature {
        border-color: #cccccc;
        box-shadow: none;
        transform: none;
    }

    .gallery .card:nth-child(even) {
        margin-top: 0;
    }

    #footer {
        color: #555555;
    }
}
