/* Resets */

html,body,div,p,
h1,h2,h3,h4,h5,h6,
ul,ol,li,
dl,dt,dd,
form,fieldset,caption,
table,tr,td,th,
address,blockquote,img {
    margin:0;
    padding:0;
}

img, fieldset {
    border:none;
}

/* General scroll behaviour */

html {
    scroll-behavior: smooth;

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {

    --primary-font-family: "proxima-nova", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --secondary-font-family: "myriad-pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    font-family: var(--primary-font-family);


}

body {
    display: grid;
    grid-template-columns: minmax(1rem, 1fr) minmax(21rem, 62rem) minmax(1rem, 1fr);
}

main,
header,
body > section,
footer {
    grid-column: 1/4;
}

header {
    grid-column: 2;
}

header ul {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 0.625rem;
}

header ul li:last-child a:link,
header ul li:last-child a:visited {
    color: #333;
    font-size: 0.8125rem;
    margin-right: 1.25rem;
    text-decoration: none;
}

header ul li:last-child a:hover {
    border-bottom: 1px dotted #333;
}

a#logo {
    background: url(https://statistics.laerd.com/img/logo.png) no-repeat;
    background-size: contain;
    height: 4.25rem;
    width: 7rem;
    display: block;
}

nav[aria-label="primary"] {
    grid-column: 1/4;
    display: grid;
    grid-template-columns: inherit;
    font-family: var(--secondary-font-family);
}

nav[aria-label="primary"] {
    background-color: #369;
}

nav[aria-label="primary"] > * {
    grid-column: 2;
}

nav[aria-label="primary"] + div {
    height: 2rem;
    background-color: #fafafa;
    grid-column: 1/4;
}

body > nav:nth-child(4) {
    display: none;
    padding: 0.5rem 0;
}

main section:first-child {
    /*margin-top: 2rem;*/
    grid-column: 1/4;
    display: grid;
    grid-template: inherit;
    background: #fafafa url("../img/main-image-home.jpg") no-repeat top center;
    background-size: contain;
    min-height: 29rem;
}

main section:first-child p {
    padding-left: 1.5rem;
    padding-right: 1rem;
    margin-bottom: 0;
    padding-bottom: 2rem;
    line-height: 1.5rem;

}

main section:first-child ul {
    padding: 0 1.5rem;
    justify-content: flex-end;
}

main section:first-child > * {
    margin-left: 3rem;
    grid-column: 2;
}

main,
footer,
nav[aria-label="primary"] + div {
    display: grid;
    grid-template-columns: inherit;
}

main section:not(main section:first-child) {
    grid-column: 2;
    width: 100%;

}

body > section > *,
footer ul {
    grid-column: 2;
}

ul {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

ul li {
    display: inline-block;
}

nav[aria-label="primary"] ul {
    justify-content: flex-end;
    font-size: 1.125rem;
}

#menu-features:before {
    content: url('../img/menu-selected.png');
    position: absolute;
    margin-top: 1.45rem;
    margin-left: 2.5rem;
    z-index: 1000;
}

a#sign-up:link,
a#sign-up:visited {
    background: linear-gradient(to bottom,  #FF9801 0%,#FF6633 100%);
    text-shadow: 1px 1px 1px #333;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.3125rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

a#sign-up:hover {
    background: #FF9801;
}

nav a:link,
nav a:visited {
    display: block;
    padding: 0.35rem 0.65rem;
    margin: 0.35rem 0.7rem;
    text-decoration: none;
    color: #333;
    text-align: center;
}

nav[aria-label="primary"] a:link,
nav[aria-label="primary"] a:visited {
    color: #fff;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}
nav[aria-label="secondary"] ul {
    margin-left: -0.7rem;
}

nav a:hover {
    color: #fff;
    background-color: #6095CA;
    border-radius: 0.3125rem;
}

h1, h2, h6 {
    font-family: var(--secondary-font-family);
}

h1 {
    font-weight:100;
    color:#212121;
    font-size: 2.25rem;
    margin-top: 1.5rem;
}

h1.declare {
    font-weight: 700;
    padding: 1.25rem;
    padding-bottom: 0.625rem;
    margin-top: 0;
}

h1.declare span {
    color:#005595;
    font-weight:500;
}

h1 + p {
    font-family: var(--secondary-font-family);
    font-size: 1.125rem;
    line-height: 1.875rem;
    font-weight: 100;
}

main section:first-child ul a:link,
main section:first-child ul a:visited {
    font-family: var(--secondary-font-family);
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(to bottom, #6095ca 0%,#369 100%);
    border-radius: 0.3125rem;
    text-align: center;
    padding: 0.625rem 1.56rem;
    margin-left: 0.5rem;
}

main section:first-child ul a:hover {
    background: #6095ca;
}

main section:first-child > div {
    background-color: #fff;
    max-width: 42rem;
    width: calc(100% - 2.5rem);
    margin-top: 4.9rem;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
}

#features-h1 {
    margin-bottom: 2rem;
}

section#main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

section#main > * {
    flex: 1;
    align-items: flex-start;
}

section#main h1 {
    width: 100%;
    min-width: 80%;
}

section#main div#testimonials {
    width: 100%;
    min-width: 35rem;
}

section#main div:last-child  {
    font-family: var(--secondary-font-family);
    /*padding: 1.5rem;*/
    width: 20rem;
    min-width: 15rem;
    margin-left: 2rem;
}

section#main div:last-child > * {
    background-color: #fafafa;
}

section#main div:last-child h2 {
    padding: 1.5rem;
    /*padding-bottom: 0;*/
}

section#main div:last-child p {
    color: #444;
    font-size: 1.125rem;
    line-height: 1.875rem;
    font-weight: 100;
    padding: 0.5rem 1.5rem;
}

section#main div:last-child p:last-child {
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}

section#main div:last-child h2 {
    font-size: 1.75rem;
    font-weight: 300;
    /*margin-bottom: 1rem;*/
}

section#main div:last-child p:last-child {
    text-align: right;
    display: block;
    margin-top: auto;
    padding-right: 1rem;
}

section#main a:link,
section#main a:visited {
    display: inline-block;
    background: linear-gradient(to bottom,  #FF9801 0%,#FF6633 100%);
    text-shadow: 1px 1px 1px #333;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.3125rem;
    padding: 0.575rem 2.625rem;
    text-decoration: none;
    color: white;
}

section#main a:hover {
    background: #FF9801;
}

h2 {
    font-weight:300;
    color:#005595;
    font-size: 1.375rem;
    margin-bottom:0px;
    margin-top:0px;
}
h3 {
    font-weight:600;
    color:#6095CA;
    font-size:16px;
    margin-bottom:0px;
    margin-top:0px;
    padding-bottom:0px;
}
h6 {
    color:#555666;
    font-size:14px;
    margin-top:35px;
    padding:0px;
    padding-top:15px;
    margin-bottom:2px;
    border-top:1px solid #e9e9e9;
    font-weight:normal;
}

section#main {
    margin-top: 2rem;
}

div#testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

div#testimonials img {
    padding: 0.5rem;
}

div#testimonials p {
    padding: 1.25rem;
    width: 25%;
    min-width: 15rem;
    flex: 1;
    font-family: Georgia, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
    line-height: 1.375rem;
    font-style: italic;
    color: #444;
    position: relative;
}

div#testimonials span:first-child {
    position: relative;
}

div#testimonials p::before,
div#testimonials span:first-child::after {
    position: absolute;
    font-family: Georgia, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
    font-style: normal;
    font-weight: bold;
    font-size: 36px;
    color: #095393;
}

div#testimonials p::before {
    content: '\201C';
    top: 0.8125rem;
    left: -0.375rem;
}

div#testimonials span:first-child::after {
    content: '\201D';
    top: 1rem;
    left: 0.5rem;
}

span.who {
    display: block;
    padding-top: 2rem;
    text-align: right;
    font-size: 0.875rem;
    color: #369;
}

footer ul {
    justify-content: center;
    flex-wrap: wrap;
    margin: 2.5rem 0;
}

footer li {
    /*margin: 1rem 0;*/
}

footer a:link,
footer a:visited,
footer li {
    font-size: 0.75rem;
    text-decoration: none;
    color: #333;
    margin: 0.25rem 0.5rem;
    white-space: nowrap;
}

footer a:hover {
    border-bottom: 1px dotted #333;
}

@media (max-width: 60rem) {
    section#main div:last-child {
        margin-left: 0;
    }
}

@media (max-width: 49rem) {
    main section:first-child > * {
        margin: 0 auto;
    }
    /*body > nav:nth-child(3) {*/
    /*    display: none;*/
    /*}*/
    /*body > nav:nth-child(4) {*/
    /*    display: flex;*/
    /*}*/

}

@media (max-width: 44rem) {
    main section:first-child {
        background: none;
        min-height: 20rem;
    }
    main section:first-child > div {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    div#testimonials p {
        min-width: 20rem;
    }
    section#main div#testimonials {
        min-width: 10rem;
    }
    nav[aria-label="primary"] li:nth-child(2) {
        display: none;
    }
    footer a:link,
    footer a:visited {
        padding: 0.5rem;
    }
    main section:first-child > div {
        width: 100%;
        margin-top: 0;
    }
    section#main {
        flex-direction: column;

    }
    section#main div:last-child {
        width: 100%;
    }
}

@media (max-width: 30rem) {
    main section:first-child ul {
        padding: 0;
        justify-content: space-around;
    }
    main section:first-child ul a:link,
    main section:first-child ul a:visited {
        /*padding: 0.5rem 1rem;*/
    }
}
