/*
    http://meyerweb.com/eric/tools/css/reset/ 
    v2.0 | 20110126
    License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}

:root{
    /* Color Theme from Adobe Color */
    --lt-gray: #F2F2F0;
    --mint: #CCD9BF;
    --sage: #8DA68A;
    --leaf: #425946;
    --forest: #2D4030;

    --lt-gray-rgba: rgb(242 242 240 / 20%);
    --mint-rgba: rgb(204 217 191 / 20%);
    --sage-rgba: rgb(141 166 138 / 20%);
    --leaf-rgba: rgb(66 89 70 / 20%);
    --forest-rgba: rgb(45 64 48 / 20%);

    /* Backgrounds/Text Colors/Neutrals */
    --med-gray: #555;
    --dk-gray: #222;
    --blk: #000;
    --wht: #FDFEFF;

    /* Font Stack */
    /* Fonts from Adobe Fonts */
    /* 
        regular weight: 400
        semi-bold: 600
        extra-bold: 800
    */
    --body-fonts: "mendl-sans-dusk", Georgia, sans-serif;
    --heading-fonts: "spirits-sharp", "Arial Black", sans-serif;

    /* Shadows */
    --box-shadow-sm: -3px 3px 6px var(--med-gray);
    --box-shadow-lg: -6px 6px 10px var(--med-gray);
}

/* Body Styles */
/* --------------------
    TO DO: BEGIN WORK ON LINE 280
    Most of the page styles have been written for you, but we will complete the styles for the page using flexbox and grid
--------------------- */
body{
    font-family: var(--body-fonts);
    color: var(--dk-gray);
    background-color: var(--sage-rgba);
    line-height: 1.35;
    font-size: 1.25rem;
    font-weight: 400;
    box-sizing: border-box;
    margin: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='24' viewBox='0 0 88 24'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='autumn' fill='%238DA68A' fill-opacity='0.2'%3E%3Cpath d='M10 0l30 15 2 1V2.18A10 10 0 0 0 41.76 0H39.7a8 8 0 0 1 .3 2.18v10.58L14.47 0H10zm31.76 24a10 10 0 0 0-5.29-6.76L4 1 2 0v13.82a10 10 0 0 0 5.53 8.94L10 24h4.47l-6.05-3.02A8 8 0 0 1 4 13.82V3.24l31.58 15.78A8 8 0 0 1 39.7 24h2.06zM78 24l2.47-1.24A10 10 0 0 0 86 13.82V0l-2 1-32.47 16.24A10 10 0 0 0 46.24 24h2.06a8 8 0 0 1 4.12-4.98L84 3.24v10.58a8 8 0 0 1-4.42 7.16L73.53 24H78zm0-24L48 15l-2 1V2.18A10 10 0 0 1 46.24 0h2.06a8 8 0 0 0-.3 2.18v10.58L73.53 0H78z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}

/* Skip Link Styles */
#skip{
    position: absolute;
    top: auto;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#skip:focus{
    position: static;
    display: block;
    padding: 1rem;
    width: auto;
    height: auto;
    font-family: var(--body-fonts);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dk-gray);
    outline: 4px solid var(--forest);
    background: var(--wht);
    text-decoration: 3px solid var(--sage);
}

/* Header, Main, Footer */
header, main, footer{
    width: 100%;
    margin: 0 auto;
}

/* Header and Footer Only */
header, footer{
    width: calc(100% - 32px);
    max-width: 1248px;
    padding: 32px 16px;
    background-color: var(--wht);
}

/* For All Headings */
h1, h2, h3, h4{
    font-weight: 800;
    color: var(--forest);
    font-family: var(--heading-fonts);
    letter-spacing: 1px;
}

/* h1 Headings */
h1{
    font-size: 3rem;
    margin: 1rem 0 2rem;
    text-align: center;
}

/* The Link in the h1 */
h1 a{
    text-decoration: none;
    color: var(--forest);
}

/* Link in the h1 on Hover/Focus */
h1 a:hover{
    text-decoration: underline;
}

h1 a:focus{
    outline: 4px solid var(--forest);
}

/* h2 Headings */
h2{
    color: var(--wht);
    text-align: center;
    font-size: 2.25rem;
    margin: 1rem 0;
}

/* h3 Headings */
h3{
    text-align: center;
    font-size: 2rem;
    margin: 1rem 0;
}

/* h4 Headings */
h4{
    text-align: center;
    font-size: 1.85rem;
    margin: 1rem 0;
}

/* Navigation */
nav{
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

nav a{
    display: block;
    font-size: 2rem;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    font-family: var(--heading-fonts);
    letter-spacing: 1px;
    margin: 1rem auto;
    background-color: var(--forest);
    color: var(--wht);
}

nav a svg{
    display: none;
}

nav a:hover{
    background-color: var(--sage);
    color: var(--dk-gray);
}

nav a:focus{
    outline: 4px solid var(--sage);
    outline-offset: 2px;
}

/* Links */
a{
    color: var(--leaf);
}

/* Link Hover Styles */
a:hover{
    color: var(--forest);
    text-decoration: none;
}

/* Link Focus Styles */
a:focus{
    outline-color: var(--forest);
    outline-offset: 4px;
}

/* Main Styles */
main{
    background-color: var(--forest);
    width: 100%;
    max-width: 1280px;
    padding: 32px 0;
}

/* Paragraphs in the Main (Direct Descendants Only) */
main > p{
    color: var(--wht);
    font-size: 1.25rem;
    padding: 1rem;
    width: calc(100% - 2rem);
    margin-bottom: 2rem;
}

main > section{
    padding: 16px;
}

/* Text */
p{
    width: 100%;
    max-width: 65ch;
    margin: 0 auto;
    padding: 8px 0;
}

/* Plants Section */
#plants{
    background-color: var(--wht);
    padding-bottom: 3rem;
}

#plants section{
    /* TO DO: Make these flex containers that flow in the column direction, do not allow wrapping, and justify the content with space between the elements */
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin: 32px auto 0;
    max-width: 384px;
}

#plants img{
    /* TO DO: Use flexbox here to make the images in these sections appear before the headings */
    order: -1;
    width: 100%;
    max-width: 400px;
    height: auto;
}

.price{
    font-weight: 600;
    text-align: center;
    font-size: 1.5rem;
    padding: 12px 0;
    background-color: var(--mint);
    color: var(--dk-gray);
    margin-top: 32px;
}

/* Contact Section */
#contact{
    color: var(--wht);
}

/* Contact text color */
#contact h3, #contact h4, #contact a, #contact label, #contact address{
    color: var(--wht);
}

/* Contact Links */
#contact a{
    display: block;
    padding: 10px 0;
}

#contact > div, #contact > section{
    margin-top: 32px;
}

#contact div h4, #contact div caption, #contact #social h4{
    margin-top: 48px;
}

#contact h4:first-of-type{
    margin-bottom: 8px;
    margin-top: 0;
}

/* Address */
address{
    width: fit-content;
    margin: 0 auto;
    font-style: normal;
}

/* Address Anchors On Hover */
address a:hover{
    text-decoration: none;
}

address a:focus{
    outline-offset: 2px;
}

/* Contact Table */
table{
    width: fit-content;
    border-collapse: collapse;
    margin: 0 auto;
}

/* Contact Caption */
caption{
    font-size: 1.75rem;
    text-align: center;
    margin: 0;
    font-family: var(--heading-fonts);
    font-weight: 800;
    letter-spacing: 1px;
}

/* Other Table Styles */
th{
    font-size: 1.35rem;
    font-weight: 600;
}

th, td{
    border-bottom: 2px solid var(--wht);
    padding: 10px 4px 4px 4px;
}

th:nth-of-type(even), td:nth-of-type(even){
    padding-left: 0;
}

/* Social Media Section */
#social{
    width: fit-content;
    margin: 32px auto;
}

/* Social Media List */
#social ul{
    /* TO DO: Make this a grid container with three equal columns and a 16 pixel gap */
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    width: fit-content;
    margin: 16px auto 32px;
}

/* Heading for Social Media Section */
#social h4{
    /* TO DO: Make this heading span all of the columns in its grid container */
    grid-column: 1 / -1;
}

#social a{
    display: block;
    padding: 8px 12px 0 12px;
}

/* Social Media Icons */
#social svg{
    stroke: var(--wht);
}

/* Social Media Icons on Hover */
#social a:hover svg{
    fill: var(--wht);
    stroke: var(--forest);

}

/* Social Media Icons on Focus */
#social a:focus{
    outline: 2px solid var(--mint);
    outline-offset: 2px;
}

/* Spans to Mark Required Form Inputs */
.required svg{
    display: inline-block;
    padding-left: 4px;
    stroke: var(--mint);
    width: 1.5rem;
    height: auto;
}

/* Form */
form{
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Form Labels/Widgets */
label, input, textarea{
    display: block;
    font-size: 1.25rem;
    width: calc(100% - 10px);
}

/* Labels */
label{
    margin: 12px 0 8px 0;
    font-size: 1.5rem;
}

input, textarea{
    border: none;
    background: var(--mint);
    padding: 0 4px;
    height: 3rem;
    color: var(--dk-gray);
    margin-bottom: 24px;
    font-family: var(--body-fonts);
}

textarea{
    height: 8rem;
    padding: 8px 4px;
}

input:focus, input:focus-visible, textarea:focus, textarea:focus-visible{
    outline: 2px solid var(--wht);
    outline-offset: 2px;
    background-color: var(--forest);
    color: var(--wht);
}

#feedback{
    margin: 48px auto 32px;
    width: 100%;
    height: auto;
    padding: 16px 0;
    font-size: 1.75rem;
    font-family: var(--body-fonts);
    font-weight: 600;
    border: 4px solid var(--mint);
}

#feedback:hover, #feedback:focus{
    background-color: var(--forest);
    color: var(--wht);
    outline: none;
}

/* Plant-Row Div */
#plant-row{
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    height: 420px;
    background-image: url("images/plants-in-row.jpg");
    background-repeat: no-repeat;
    background-origin: border-box;
    background-clip: border-box;
    background-position: center;
    background-size: cover;
}

/* Back to Top of Page Link */
#btt{
    display: block;
    line-height: 0;
    padding: 10px;
    border-radius: 50%;
    position: fixed;
    top: calc(100vh - 85px);
    left: calc(100vw - 95px);
    background-color: var(--forest);
    border: 2px solid var(--wht);
}

#btt svg{
    stroke: var(--wht);
    transition: all 300ms;
}

#btt:hover{
    padding: 10px;
}

#btt:hover svg, #btt:focus svg{
    transform: scale(1.5);
}

#btt:focus{
    outline: 4px solid var(--leaf);
    outline-offset: 4px;
}

/* Footer */
footer{
    text-align: center;
}

/* Media Queries */
@media screen and (min-width: 500px){
    nav ul{
        width: 100%;
        /* TO DO: Convert the unordered list in the navigation to a flex container with space between the items */
        display: flex;
        justify-content: space-between;
    }

    nav li{
        /* TO DO: Give each of these a flex basis of 30% */
        flex-basis: 30%;
    }

    nav a{
        margin: 0;
    }
}

@media screen and (min-width: 700px){
    #plants{
        /* TO DO: Make this a flex container that allows wrapping, has a 1rem gap, and justifies the content to the center */
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    #plants h3, #plants p{
        /* TO DO: Give these two elements a flex basis of 100% so they fill the container width */
        flex-basis: 100%;
    }

    #plants section{
        /* TO DO: Give these sections each a flex basis of 45% */
        flex-basis: 45%;
    }

    #plants .price{
        /* TO DO: Give each of these elements a flx basis of 25% to ensure that they are all the same height */
        flex-basis: 25%;
    }

    #contact > div{
        /* TO DO: Make this a grid container with the first column being 1 fr and the second being 1.5 fr  and two rows that will size automatically. Include a 1rem gap and align the items to the start */
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        grid-template-rows: auto auto;
        gap: 1rem;
        align-items: start;
    }

    #contact div > section{
        /* TO DO: Ensure that this container only displays in the first column of its grid parent */
        grid-column: 1 / 2;
        margin-top: 0;
    }

    #contact div table{
        /* TO DO: Place this table in the second column and tell it to span two rows */
        grid-column: 2 / 3;
        grid-row: 1 / 3;
    }

    #contact div caption{
        margin-top: 0;
    }

    th:nth-of-type(even), td:nth-of-type(even){
        padding-left: 12px;
    }
}

@media screen and (min-width: 900px){
    /* Header Styles */
    header{
        height: 600px;
        background-color: var(--wht);
        background-image: url("images/plants-on-table-narrow.jpg");
        background-repeat: no-repeat;
        background-origin: border-box;
        background-clip: border-box;
        background-position: right;
        background-size: contain;
        /* TO DO: Make this a flex container that flows in the column direction and justifies the items with space around them */
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }

    h1{
        text-align: left;
        font-size: 7rem;
        width: 515px;
        margin-left: 7rem;
    }

    /* h2 Headings */
    h2{
        font-size: 4rem;
        margin: 96px 0 0 0;
    }

    /* h3 Headings */
    h3{
        font-size: 3.5rem;
        margin: 8px;
    }

    /* h4 Headings */
    h4{
        font-size: 2.5rem;
        margin: 0;
    }

    nav{
        margin-left: 4rem;
        position: relative;
    }

    nav ul{
        /* TO DO: Make this into a flex container */
        display: flex;
    }

    nav a{
        font-size: 2.5rem;
        background-color: transparent;
        color: var(--leaf);
    }

    nav a svg{
        display: block;
        width: 200px;
        height: 200px;
        fill: var(--mint);
        position: relative;
        transform: rotate(320deg);
        transition: all 300ms;
        z-index: 0;
    }

    nav a span{
        display: block;
        position: relative;
        top: -140px;
        z-index: 1;
    }

    nav a:hover{
        background-color: transparent;
    }

    nav a:hover svg, nav a:focus svg{
        transform: scale(1.25) rotate(320deg);
    }

    main > section{
        padding: 32px;
    }

    /* Paragraphs in the Main (Direct Descendants Only) */
    main > p{
        margin-bottom: 96px;
        font-size: 1.5rem;
    }

    /* Plants Section */
    #plants{
        padding: 96px 32px;
        /* TO DO: Make this a grid container with three equal rows, then give it an 8 pixel row gap and a 32 pixel column gap */
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px 32px;
    }

    #plants h3, #plants > p{
        /* TO DO: Make these elements span all of the columns in their parent containers */
        grid-column: 1 / -1;
    }

    #plants .price{
        /* TO DO: Assign these a flex basis of 20% so that they are all the same height */
        flex-basis: 20%;
    }

    /* Contact Section */
    #contact{
        padding: 64px 32px;
        /* TO DO: Make this a grid container with two equally sized columns, a 16 pixel row gap and a 32 pixel column gap */
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 32px;
    }

    /* Contact Heading and Paragraph */
    #contact h3, #contact > p{
        /* TO DO: Use grid to make these elements span all of the columns in their container */
        grid-column: 1 / -1;
    }

    #contact > div{
        display: block;
    }

    #contact h4, #contact div caption{
        margin-top: 32px;
    }

    #contact a{
        padding: 4px 0;
    }

    /* Contact Caption */
    caption{
        font-size: 2.5rem;
    }

    /* Other Table Styles */
    th{
        font-size: 1.5rem;
    }

    th, td{
        border-bottom: 2px solid var(--wht);
        padding: 10px 4px 4px 4px;
    }

    th:nth-of-type(even), td:nth-of-type(even){
        padding-left: 24px;
    }
}

@media screen and (min-width: 1100px){
    header{
        background-image: url("images/plants-on-table-wide.jpg");
    }
}
