/* CSS BY Bernard Pammit */

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

    --font: "Inter", sans-serif;
}

/* GLOBAL STYLES (MOBILE FIRST (SMALL) */

/* MIN-WIDTH OF THE PAGE SHOULD NOT GO BELOW 400PX */

/* 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: 0 auto;
}

body {
    font-family: var(--font);
    line-height: 1.3;   
}

@keyframes dropText {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

h1,
h2,
h3 {
    animation: dropText 1s ease-out forwards;
}

header {
    background-color: var(--black);
    color: var(--white);
    box-shadow: 0 5px 5px 1px var(--blue);
    position: relative;
    z-index: 10;
}

h1 {
    color: var(--blue);
    font-size: 1.5rem;
    justify-self: start;
    margin-top: -1.75rem;
}

/* ADD FLOATING SVG LOGO BEFORE THE H1 */
h1::before {
    content: "";

    display: inline-block;
    position: relative;
    top: 1.75rem;
    left:-0.5rem;
    width: 3.75rem;
    height: 3.75rem;
    background: url('images/vanguard-logo.svg') no-repeat center/contain;
}

header div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 1rem 0;
    margin: 0;
}

nav {
    justify-self: end;
    text-align: right;
}

/* adapted from module 4 lecture: mobile menu */
nav h2 {
    visibility: hidden;
    height: 1px;
}

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

nav li a {
    color: var(--white);
    display: block;
    padding: 1rem;
    text-decoration: none;
    transition: background-color 300ms ease-in;
}

nav a:hover,
nav input:hover {
    background-color: var(--red);
}

nav label {
    cursor: pointer;
    display: inline-block;
    padding: 0.5rem;
    user-select: none;
    width: 3rem;
    margin: 0;
}

nav label span {
    background-color: var(--white);
    display: block;
    height: 0.25rem;
    position: relative;
    top: 0;
    right: 0;
    transition: background-color 300ms ease-out;
    width: 3rem;
}

nav label span:before,
nav label span:after {
    background: var(--white);
    content: "";
    display: block;
    height: 100%;
    position: absolute;
    transition: all 200ms ease-out;
    width: 3rem;
}

nav label span:before {
    top: 0.75rem;
}

nav label span:after {
    top: -0.75rem;
}

nav input {
    display: none;
}

nav input:checked ~ ul {
    max-height: 500px;
}

nav input:checked ~ label span {
    background: transparent;
}

nav input:checked ~ label span:before {
    transform: rotate(-45deg);
}

nav input:checked ~ label span:after {
    transform: rotate(45deg);
}

input:checked ~ label:not(.steps) span:before,
input:checked ~ label:not(.steps) span:after {
    top: 0;
    right: 0;
}



/* ADD TO "INNOVATION & INVESTMENT SECTION (Photo by Kevin Matos on Unsplash) */
 main > section:first-child {
    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;
    color: var(--white);
    height: 80vh;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 1rem;
    overflow: hidden;

    font-family: var(--font);
}

button {
    display: block;
    background-color: var(--blue);
    color: var(--white);
    font-weight: bold;
    padding: 1rem;
    width: 70%;
    border-radius: 10px;
    margin: 2rem auto;
}

button:hover {
    background-color: var(--red);
    transform: scale(1.15);
}

h2 {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 0.5rem;
    margin: 0;
}

h3 {
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.5rem;
    margin: 0;
}

#services {
    margin-bottom: 3rem;
}

#services section {
    background-color: var(--blue);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 500ms ease-in-out, box-shadow 500ms ease-in-out;
}

#services section:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}

#proven-results {
    background-color: var(--blue);
    color: var(--white);
    padding-bottom: 2rem;
    margin: 0;
}

#table {
    background-color: var(--black);
    display: grid;
    padding: 0;
    margin: 0;
}

#table p {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

#table p:nth-child(odd) {
    background-color: var(--charcoal);
}

#table p:first-child {
    background-color: var(--black);
}

#table span {
    flex: 1;
    border: 1px solid var(--charcoal);
    text-align: center;
    padding: 0.5rem;
}

/* 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: 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;
}

#contact {
    background-color: var(--black);
    color: var(--white);
    padding: 1rem 0;
}

form {
    padding-top: 1rem;
}

input,
label,
textarea {
    display: block;
    width: 90%;
}

label {
    font-weight: bold;
    margin-top: 1rem;
}

input,
textarea {
    border: 2px solid var(--blue);
    padding: 0.5rem;
}

footer {
    background-color: var(--black);
    color: var(--white);
    text-align: center;
    font-size: smaller;
    padding: 2rem 0;
    margin: 0;
}

/* MEDIA QUERIES (MEDIUM) */ 
@media (min-width: 768px) {
    nav h2 {
        display: none;
    }
    
    nav ul {
        overflow: visible;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-content:space-around;
    }

    nav label {
        display: none;
    }

    #results {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .results-container {
        flex-direction: row;
        justify-content: space-between;
    }
    .results-table {
        width: 90%;
    }
    .bar-chart {
        width: 90%;
    }

    #services {
        display: grid;
        grid-template-columns: 1fr 1fr;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* MEDIA QUERIES (LARGE) */

@media (min-width: 1024px) {
    #services {
        grid-template-columns: repeat(3, 1fr);
    }

    form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}
