/* CSS BY Carey Tung */

/* 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 {
    --blue: #007BFF;
    --red: #FF4500;
    --white: #EAEAEA;
    --black: #000000;
    --charcoal: #333333;
    --font: "Inter", sans-serif;
}

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

/* MIN-WIDTH OF THE PAGE SHOULD NOT GO BELOW 400PX */
body {
    min-width: 400px;
    font-family: var(--font);
}

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

main h2 {
    margin-left: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* ADD TO "INNOVATION & INVESTMENT SECTION (Photo by Kevin Matos on Unsplash) */
.innovation {
    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;
    color: var(--white);
    margin-top: -0.01rem;
}

.innovation .container {
    backdrop-filter: blur(15px);
}

.innovation h2 {
    color: var(--white);
}

.innovation a {
    display: block;
    background-color: var(--blue);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    padding: 1rem;
    border-radius: 10px;
    width: 15rem;
    justify-self: center;
    transition: transform 0.5s ease-in-out, background-color linear;
}

.innovation a:hover {
    background-color: var(--red);
    transform: scale(1.1, 1.1);
}

header {
    display: relative;
    z-index: 10;
    background-color: var(--black);
    padding-top: 0.25rem;
    box-shadow: 0 0 50px var(--blue), 0 0 10px var(--blue), 0 0 15px var(--blue);
    margin-bottom: 0.3rem;
}

nav {
    padding: 0.5rem;
}

#nav1 ul li a {
    color: var(--blue);
    font-weight: bold;
    text-decoration: none;
    padding: 1rem;
    margin-left: 13rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--blue);
    padding-top: 1rem;
    margin-left: 5.5rem;
    margin-top: -3.5rem;
}

@keyframes float {
    0% {
        transform: translateY(-5px);
    }

    50% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(-5px);
    }
}

/* ADD FLOATING SVG LOGO BEFORE THE H1 */
header div {
    content: "";
    left: -.5rem;
    width: 3.75rem;
    height: 3.75rem;
    background: url('images/vanguard-logo.svg') no-repeat center/contain;
    margin: 1rem 0 0 1rem;
    animation: float 3s infinite ease-in-out;
}

#nav1 ul {
  width: 100%;
  margin:0;
  padding:0;
  list-style:none;
  overflow:hidden;
  text-align:center;
  max-height: 0;
}

#nav1 li a {
  display:block;
  font-family:sans-serif;
  font-size:1.5rem;
  padding:1rem;
  text-transform:uppercase;
  font-weight:bold;
  text-decoration:none;
  color: var(--white);
  transition: background-color .3s ease-in;
}

#nav1 a:hover, #nav1 input:hover {
    background-color: var(--blue);
    color: var(--black);
}

#nav1 label {
    cursor: pointer;
    float: right;
    padding: 2rem;
    user-select: none;
    margin-top: -3.5rem;
}

label span {
    background-color: white;
    display: block;
    height: .2rem;
    position: relative;
    transition: background-color .3s ease-out;
    width: 2rem;
}

label span:before, label span:after {
    background: white;
    content: '';
    display: block;
    height: 100%;
    position: absolute;
    transition: all .2s ease-out;
    width: 100%;
}

label span:before {
    top: .75rem;
}

label span:after {
    top: -.75rem;
}

#nav1 input {
  display:none;
}

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

#nav1 input:checked ~ label span {
    background: transparent;
}

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

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

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

#nav2 {
    display: none;
}

section {
    margin-top: 1rem;
}

section p {
    margin-top: .5rem;
    line-height: 1.25;
}

@keyframes fadeIn {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }

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

h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--black);
    animation: fadeIn 0.5s ease-in;
}

.offerings {
    display: grid;
    background-color: var(--blue);
    padding: 1rem;
    border-radius: 10px;
    color: var(--white);
    transition: transform 0.3s ease-in-out;
}

.offerings:hover {
    transform: translateY(-10px);
}

.offerings p {
    line-height: 1.5;
}

h3 {
    font-size: 1.25rem;
    font-weight: bold;
    animation: fadeIn 0.5s ease-in;
}

#results {
    background-color: var(--blue);
    color: var(--white);
    padding-bottom: 3rem
}

#results h2 {
    color: var(--white);
    padding-top: 2rem;
}

#results h3 {
    margin-top: 2rem;
}

.results-table {
    background-color: var(--black);
    text-align: center;
    margin-top: 2rem;
}

th,
td {
    padding: 1.5rem;
    border: 2px solid var(--charcoal);
}

th {
    font-weight: bold;
}

.charcoal {
    background-color: var(--charcoal);
}

/* 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 ease-in;
    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 {
    background-color: var(--black);
    color: var(--white);
    padding-bottom: 1rem;
}

footer h2 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 0.5rem;
    padding-top: 2rem;
}

.container>p {
    line-height: 1.25;
    margin: 1rem 0 1rem;
}

form {
    margin-bottom: 1rem;
}

form input {
    display: block;
    border: 3px solid var(--blue);
    padding: 0.5rem;
    width: 95%;
    margin: 0.5rem 0 1rem;
}

textarea {
    display: block;
    border: 3px solid var(--blue);
    width: 95%;
    height: 5rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

#submitButton {
    background-color: var(--blue);
    font-family: var(--font);
    font-weight: bold;
    font-size: 1rem;
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 2rem;
    width: 95%;
    transition: transform 0.5s ease-in-out, background-color 0.5s linear;
}

#submitButton:hover {
    background-color: var(--red);
    transform: scale(1.1, 1.1);
}

.buttonContainer {
    display: flex;
    justify-content: center;
}

.contact {
    text-align: center;
    line-height: 1.5rem;
}

.contact a {
    color: var(--blue);
}

/* MEDIA QUERIES (MEDIUM) */
@media screen and (min-width: 800px) {
    nav label {
        display: none;
    }

    #nav1 {
        display: none;
    }

    #nav2 {
        display: inline;
    }

    #nav2 ul {
        display: flex;
        justify-content: right;
    }

    #nav2 ul li a {
        color: var(--blue);
        text-decoration: none;
        font-weight: bold;
        font-size: 1.25rem;
        display: block;
        padding: 0;
        margin: -2.25rem 3rem 0 0;
        box-shadow: 0 0 0 0 transparent;
        transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out 0.5s ease-in-out;
    }

    #nav2 ul li a:hover {
        color: var(--black);
        background-color: var(--blue);
        box-shadow: 0 0 0 15px var(--blue);
    }

    .innovation a {
        display: block;
        text-align: center;
        padding: 1rem;
        width: 20rem;
        justify-self: center;
    }
    
    #offer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .offerings {
        margin: 0;
    }

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

    .results-container {
        display: flex;
        gap: 2rem;
    }

    .results-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .results-table {
        width: 50%;
        margin-top: 5rem;
        margin-left: -6rem;
    }

    #bar-chart {
        width: 50%;
        margin-top: 7rem;
        margin-left: -3rem;
    }
}

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

    .offerings h3 {
        line-height: 1.5;
    }

    form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    form input {
        margin-top: 0.5rem;
        margin-bottom: 0;
    }

    #submitButton {
        padding: 0;
        height: 3rem;
        margin-top: 1rem;
    }
}