
/* ==========================================
   ARTISAN COFFEE
   HOMEPAGE STYLESHEET
   ========================================== */


/* 1. COLOUR PALETTE */

:root {
    --espresso: #38251D;
    --cream: #F8F1E7;
    --latte: #D9C3A5;
    --caramel: #A87952;
    --mocha: #6B422E;
    --sage: #879078;
    --white: #FFFFFF;

    --shadow: 0 10px 30px rgba(56, 37, 29, 0.12);
}


/* 2. GLOBAL SETTINGS */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F8F1E7;
    color: #38251D;
    font-family: Arial, sans-serif;
    line-height: 1.7;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    display: block;
}


/* 3. HEADER */

header {
    background-color: #F8F1E7;
    padding: 22px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    border-bottom: 1px solid #D9C3A5;
}

header h1 {
    font-family: Georgia, serif;
    font-size: 27px;
    letter-spacing: 3px;
    color: var(--espresso);
}

header p {
    color: var(--caramel);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
}


/* 4. NAVIGATION */

nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

nav a {
    font-size: 13px;
    font-weight: 600;
    position: relative;
    padding-bottom: 6px;
}

header nav a {
    color: var(--mocha);
}

nav a:hover {
    color: var(--caramel);
}

/* 5. ANNOUNCEMENT MARQUEE */

body > section:first-of-type {
    background-color: var(--espresso);
    color: var(--latte);
    padding: 11px;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
}


/* 6. HERO SECTION */

main > section:first-child {
    min-height: 570px;
    padding: 75px 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 55px;
}

/* Hero text */

main > section:first-child div:first-child {
    flex: 1;
}

main > section:first-child div:first-child > p:first-child {
    color: var(--caramel);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

main > section:first-child h2 {
    font-family: Georgia, serif;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.1;
    font-weight: normal;
    margin-bottom: 25px;
}

main > section:first-child div:first-child > p:nth-of-type(2) {
    color: var(--mocha);
    font-size: 15px;
    max-width: 480px;
    margin-bottom: 32px;
}

/* Hero button */

main > section:first-child a {
    display: inline-block;
    background-color: var(--caramel);
    color: var(--white);
    padding: 14px 32px;
    letter-spacing: 1px;
    font-size: 13px;
    border: 1px solid var(--caramel);
}

main > section:first-child a:hover {
    background-color: transparent;
    color: var(--espresso);
    transform: translateY(-4px);
}

/* Hero image */

main > section:first-child div:nth-child(2) {
    flex: 1;
}

main > section:first-child img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: var(--shadow);
    transition: transform 0.5s ease;
}

main > section:first-child img:hover {
    transform: scale(1.02);
}


/* 7. SIGNATURE BREWS */

main > section:nth-child(2) {
    background-color: var(--white);
    padding: 85px 7%;
    text-align: center;
}

main > section:nth-child(2) h2 {
    font-family: Georgia, serif;
    font-size: 42px;
    font-weight: normal;
    margin-bottom: 12px;
}

main > section:nth-child(2) > p {
    color: var(--mocha);
    margin-bottom: 45px;
    font-size: 14px;
}

/* Coffee cards */

main > section:nth-child(2) article {
    display: inline-block;
    vertical-align: top;
    width: 29%;
    margin: 10px;
    padding-bottom: 25px;
    background-color: var(--cream);
    text-align: left;
    border: 1px solid #E9DED0;
    overflow: hidden;
    transition: transform 0.35s ease,
                box-shadow 0.35s ease;
}

main > section:nth-child(2) article:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

main > section:nth-child(2) article img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

main > section:nth-child(2) article:hover img {
    transform: scale(1.05);
}

main > section:nth-child(2) article h3 {
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: normal;
    margin: 20px 20px 10px;
}

main > section:nth-child(2) article p {
    color: var(--mocha);
    font-size: 13px;
    margin: 0 20px 18px;
}

main > section:nth-child(2) article a {
    color: var(--caramel);
    font-size: 13px;
    font-weight: bold;
    margin: 0 20px;
}

main > section:nth-child(2) article a:hover {
    color: var(--espresso);
}

/* 8. ABOUT SECTION */

main > section:nth-child(3) {
    padding: 90px 8%;
    display: flex;
    align-items: center;
    gap: 65px;
    background-color: var(--cream);
}

main > section:nth-child(3) div {
    flex: 1;
}

main > section:nth-child(3) img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 3px;
}

main > section:nth-child(3) h2 {
    font-family: Georgia, serif;
    font-size: 43px;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 25px;
}

main > section:nth-child(3) p {
    color: var(--mocha);
    font-size: 15px;
    margin-bottom: 30px;
}

main > section:nth-child(3) a {
    display: inline-block;
    background-color: var(--espresso);
    color: var(--white);
    padding: 13px 28px;
    font-size: 13px;
}

main > section:nth-child(3) a:hover {
    background-color: var(--caramel);
    transform: translateY(-3px);
}


/* 9. CALL TO ACTION */

main > section:nth-child(4) {
    background-color: var(--espresso);
    color: var(--white);
    padding: 85px 20px;
    text-align: center;
}

main > section:nth-child(4) h2 {
    font-family: Georgia, serif;
    font-size: 43px;
    font-weight: normal;
    margin-bottom: 15px;
}

main > section:nth-child(4) p {
    color: var(--latte);
    margin-bottom: 30px;
}

main > section:nth-child(4) a {
    display: inline-block;
    background-color: var(--caramel);
    color: var(--white);
    padding: 14px 32px;
    font-size: 13px;
}

main > section:nth-child(4) a:hover {
    background-color: var(--latte);
    color: var(--espresso);
    transform: translateY(-3px);
}


/* 10. FOOTER */

footer {
    background-color: #291B15;
    color: var(--white);
    padding: 60px 8% 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 35px;
}

footer div {
    flex: 1;
    min-width: 180px;
}

footer h2 {
    font-family: Georgia, serif;
    color: var(--latte);
    font-size: 25px;
    margin-bottom: 12px;
}

footer h3 {
    color: var(--caramel);
    font-size: 16px;
    margin-bottom: 15px;
}

footer p {
    color: var(--latte);
    font-size: 13px;
}

footer ul {
    list-style: none;
}

footer li {
    margin-bottom: 7px;
}

footer a {
    color: var(--latte);
    font-size: 13px;
}

footer a:hover {
    color: var(--white);
    padding-left: 5px;
}

footer div:last-child {
    flex-basis: 100%;
    border-top: 1px solid var(--mocha);
    padding-top: 22px;
    text-align: center;
}


/* 11. RESPONSIVE DESIGN */

@media (max-width: 1000px) {

    header {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }

    main > section:first-child {
        gap: 30px;
    }

    main > section:nth-child(2) article {
        width: 42%;
    }

}

@media (max-width: 650px) {

    main > section:first-child {
        flex-direction: column;
        text-align: center;
        padding: 55px 6%;
    }

    main > section:first-child img {
        height: 280px;
    }

    main > section:first-child h2 {
        font-size: 42px;
    }

    main > section:nth-child(2) article {
        width: 100%;
        max-width: 350px;
    }

    main > section:nth-child(3) {
        flex-direction: column;
        text-align: center;
        padding: 55px 6%;
    }

    main > section:nth-child(3) img {
        height: 280px;
    }

    main > section:nth-child(4) h2 {
        font-size: 32px;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }

}
/* MOBILE NAVIGATION */

header details {
    display: none;
}

@media screen and (max-width: 768px) {

    header {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
    }

    /* Hide desktop navigation */
    header nav {
        display: none;
    }

    /* Show mobile menu button */
    header details {
        display: block;
        position: relative;
    }

    header details summary {
        list-style: none;
        cursor: pointer;
        background-color: #38251D;
        color: #F8F1E7;
        padding: 12px 18px;
        border-radius: 6px;
        font-size: 15px;
        font-weight: bold;
    }

    header details summary::-webkit-details-marker {
        display: none;
    }

    /* Dropdown menu */
    header details ul {
        position: absolute;
        top: 45px;
        right: 0;
        width: 190px;
        background-color: #F8F1E7;
        list-style: none;
        padding: 10px 0;
        margin: 0;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(56, 37, 29, 0.2);
        z-index: 1000;
    }

    header details ul li a {
        display: block;
        color: var(--mocha);
        padding: 12px 18px;
        font-size: 14px;
        transition: 0.3s;
    }

    header details ul li a:hover {
        background-color: #D9C3A5;
        color: var(--caramel);
    }

}