/* CSS BY Kaitlyn Murray */

/* IMPORTED FONTS*/
/* IMPORT "INTER" FROM GOOGLE FONTS" */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* CSS RESET */
/* 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 VARIABLES */
:root {
    /* --- Colors --- */
    --blue: #007BFF;
    --red: #FF4500;
    --white: #EAEAEA;
    --black: #000000;
    --charcoal: #333333;

    /* --- Fonts --- */
    --font: "Inter", sans-serif;
}

/* GLOBAL STYLES (MOBILE FIRST (SMALL) */
/* MIN-WIDTH OF THE PAGE SHOULD NOT GO BELOW 400PX */
body {
    min-width: 400px;
    width: 100%;
    font-family: var(--font);
    font-size: 1em;
    line-height: 1.5;
    color: var(--white)
}

/* ADD A DIV WITH THE CLASS OF CONTAINER TO EVERY CONTENT CONTAINER THIS IS ALLOW THE BASE ELEMENTS TO BE 100% WIDTH, BUT CONSTRAIN THE ACTUAL CONTENT TO 90% */
.container {
    width: 90%;
    max-width: 1200px;
    margin: .1rem auto 0;
}

header, footer {
    background-color: var(--black);
}

header {
    border-top: 2px solid var(--black);
    box-shadow: 0 6px 10px var(--blue);
    position: relative;
    z-index: 2;
}

header .container{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem;
}

h1 {
    font-size: 2em;
    font-weight: bold;
    color: var(--blue);
    padding: 1rem 0 1rem 4.5rem;
    margin: auto 0;
}

/* ADD FLOATING SVG LOGO BEFORE THE H1 */
h1::before {
    content: "";
    position: absolute;
    left: 1rem;
    width: 3.75rem;
    height: 3.75rem;
    background: url('images/vanguard-logo.svg') no-repeat center/contain;
    animation: idle 10s ease-in-out 200ms infinite normal;
}

@keyframes idle {
    0%   {transform: translate(0, 0px);}
    50%   {transform: translate(0, 10px);}
    100%   {transform: translate(0, 0px);}
}

nav {
    background-color: var(--black);
}

nav ul {
    list-style: none;
    overflow: hidden;
    text-align: center;
    max-height: 0;
    padding: 0;
}

input[type=checkbox] {
    appearance: none;
}

label span {
    background-color: var(--white);
    display: block;
    width: 2rem;
    height: 0.25rem;
    position: absolute;
    right: 60px;
    top: 50px;
    cursor: pointer;
}

label span::before, label span::after {
    background-color: var(--white);
    content: "";
    display: block;
    width: 2rem;
    height: 0.25rem;
    position: absolute;
}

label span::before {
    top: -1rem;
}

label span::after {
    top: 1rem;
}

input:checked ~ ul {
    max-height: 400px;
    padding-top: 50px;
}

nav li a {
    display: block;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.5em;
    color: var(--blue);
    padding: 1rem;
    transition: all 500ms ease-in-out;
}

nav li a:hover {
    background-color: var(--blue);
    color: var(--black);
}

h2 {
    font-size: 2em;
    font-weight: bold;
    margin: 1rem;
    animation: appear 1.5s ease 300ms 1 normal;
}

nav h2 {
    visibility: hidden;
    height: 0px;
    margin: 0;
}

h3 {
    font-size: 1.4em;
    font-weight: bold;
    padding: 1rem;
    animation: appear 1.5s ease 300ms 1 normal;
}

@keyframes appear {
    0%   {transform: translate(0, -40px); opacity: 0;}
    100% {transform: translate(0, 0); opacity: 100;}
}

/* ADD TO "INNOVATION & INVESTMENT SECTION (Photo by Kevin Matos on Unsplash) */
#innov-invest {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('images/vanguard-hero.jpg') no-repeat center center/cover;
    height: 80vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1rem;
    overflow: hidden;
}

.container:first-child {
    padding: 10px;
    backdrop-filter: blur(10px);
}


#innov-invest p:nth-child(2) {
    margin: 1rem 0 1.8rem;
} 

#innov-invest a {
    background-color: var(--blue);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.25em;
    color: var(--white);
    display: inline-block;
    padding: 1rem;
    border-radius: 8px;
    transition: all 300ms ease-in-out;
}

#expertise {
    color: var(--black);
}

#offers h2 {
    color: var(--black);
}

#offers section {
    background-color: var(--blue);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
    transition: all 400ms ease-in-out;
}

#offers section:hover {
    transform: translate(0, -12px);
}

#offers {
    padding-bottom: 5rem;
}

#results {
    background-color: var(--blue);
    padding: 0 1rem 0.5rem;
}

#results  h3{
    font-size: 1.75em;
}

table {
    background-color: var(--black);
    width: 100%;
    margin: 1rem 0;
}

tr:nth-child(odd) td {
    background-color: var(--charcoal);
}

th, td {
    border: 1px solid var(--charcoal);
    text-align: center;
    padding: 1rem;
}

/* THIS ONE IS DONE FOR YOU */
#bar-chart {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: flex-end;
    justify-content: space-around;
    gap: 1rem;
    height: 300px;
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    position: relative;
}

/* ADD ON TRANSITION ON HEIGHT */
.bar {
    width: 50px;
    background: var(--charcoal);
    border-radius: 10px;
    position: relative;
    transition: height 1s;
    height: 0;
}

/* THIS ONE IS DONE FOR YOU */
.bar::after {
    content: attr(data-year);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: bold;
    color: var(--white);
}

@keyframes stepUp {
    0% {
        height: 0;
    }

    100% {
        height: var(--height);
    }
}

/* ADD ANIMATION ON stepUp for 1s ease-in-out forwards */
.bar {
    animation: stepUp 1s ease-in-out forwards;
}

footer {
    border-top: 1px solid var(--black);
    padding: 1rem;
}

form {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

form div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

input[type=text],input[type=email], textarea {
    border: 2px solid var(--blue);
    height: 2rem;
}

textarea {
    height: 6rem;
}

#user-submit {
    color: var(--white);
    font-weight: bold;
    background-color: var(--blue);
    border-radius: 8px;
    border: none;
    padding: 1rem;
    margin: 1rem 0;
    transition: all 300ms ease-in-out;
}

#user-submit:hover, #innov-invest a:hover {
    background-color: var(--red);
    transform: scale(1.05);
}

address {
    text-align: center;
    font-size: 0.8em;
}

address a {
    color: var(--blue)
}

/* MEDIA QUERIES (MEDIUM) */ 
@media screen and (min-width: 800px) {
    nav ul {
        max-height: 100px;
        display: flex;
        flex-direction: row;
        position: relative;
        top: -10px;
    }

    label span {
        opacity: 0;
        z-index: -5;
    }

    #offers .container{
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
    }

    #offers h2 {
        grid-column: 1/3;
    }

    #results .container{
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    #results .container > div {
        grid-column: 1/3;
    }

    .results-table {
        width: 50%;
    }

    .bar-chart {
        width: 50%;
    }
}

/* MEDIA QUERIES (LARGE) */
@media screen and (min-width: 1024px) {
    #offers .container{
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    #offers h2 {
        grid-column: 1/4;
    }

    form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}