/* CSS BY LIZ KILROY */

/* 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&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Roboto:ital,wght@0,100..900;1,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;
}

        /* visually hidden Utility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

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

/* MIN-WIDTH OF THE PAGE SHOULD NOT GO BELOW 400PX */
body {
    font-family: var(--font);
    color: var(--white);
    background-color: var(--black);
    min-width: 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;
}

a {
    text-decoration: none;
    color: inherit;
}

        /* header/navi */
header {
    background-color: var(--black);
    border-bottom: 4px solid var(--blue);
    box-shadow: 0 4px 15px var(--blue);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;  
}

#main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--blue);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.logo-text {
    display: inline-block;
    vertical-align: top;
    line-height: 1;
}

.logo-img {
    width: 48px;
    height: 48px;
    display: block;
    animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

#main-nav ul li a {
    color: var(--blue);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s ease, background-color 0.2s ease;
    line-height: 1;
    padding: 0.75rem 1.5rem;
    display: inline-block;
}

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

.nav-right {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

#main-nav ul {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    width: auto;
    background-color: transparent;
    padding: 0 0 1rem 0;
    box-sizing: border-box;
    z-index: 99;
    align-items: flex-end;
    position: absolute;
    top: 2.5rem;
    right: 0;
}

#main-nav:has(ul.nav-open) {
    padding-bottom: 9rem;
}

#main-nav ul.nav-open {
    display: flex;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
}

#contact header {
    background-color: transparent;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none;
    position: static;
    padding-bottom: 0;
}



            /* hero */

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

/* ADD FLOATING SVG LOGO BEFORE THE H2 */
#innovation-investment h2::before {
    content: "";
    position: absolute;
    left:-.5rem;
    width: 3.75rem;
    height: 3.75rem;
}

#innovation-investment h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
    min-height: 1em;
}

#innovation-investment p {
    color: var(--white);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 0.85rem;
}

#innovation-investment a {
    display: inline-block;
    background-color: var(--blue);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: background 0.2s ease;
}

#innovation-investment a:hover {
    background-color: var(--red);
}

            /* about */

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


#about h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#about p {
    line-height: 1.7;
    color: var(--charcoal);
}

        /* services */

#services {
    background-color: var(--white);
    color: var(--black);
    padding: 2rem 0 3rem;
    margin-top: -1px;
}


#services h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

.service-grid li {
    background-color: var(--blue);
    color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
} 

.service-grid li:hover {
    cursor: default;
    transform: translateY(-6px);
} 

.service-grid h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-grid p {
    font-size: 0.9rem;
    line-height: 1.6;
}

        /* results */

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

#results h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

#results 
.container > p {
    color: var(--white);
    margin-bottom: 2rem;
    line-height: 1.6;
    padding-left: 0.5rem;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}


        /* table */
.results-table
.bar-chart {
    flex: 1;
    display: flex;
    flex-direction: column;
} 

.results-table {
    flex: 1;
    width: 100%;
} 

.bar-chart {
    flex: 1;
    width: 100%;
}

.results-table h3,
.bar-chart h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0;
    line-height: 1;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    overflow: hidden;
}

.results-table th {
    background-color: var(--black);
    color: var(--white);
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border-right: 1px solid var(--charcoal);
    border-bottom: 1px solid var(--charcoal);

}

/* .results-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    color: var(--white);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--charcoal);
}

.results-table th {
    padding: 0.75rem 1rem;
    text-align: center;
    color: var(--white);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--charcoal);
} */


.results-table th:last-child {
    border-right: none;
}

.results-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    color: var(--white);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--charcoal); 
    border-right: 1px solid var(--charcoal);
}

.results-table td:last-child {
    border-right: none;
}
                    /* profit chart col/row black & grey  */
.results-table tbody tr:nth-child(odd) {
    background-color: var(--black);
}

.results-table tbody tr:nth-child(even) {
    background-color: var(--charcoal);
}

.results-table tr:last-child td {
    border-bottom: none;
}


/* THIS ONE IS DONE FOR YOU */
#bar-chart {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    height: 250px;
    width: 100%;
    padding: 1rem;
    padding-bottom: 2rem;
    position: relative;
    box-sizing: border-box;
}

.bar-chart {
    flex: 1;
    padding-top: 0;
}



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

.bar p {
    color: var(--white);
}

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

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


#contact h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#contact 
.container > p {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--white);
}

#contact form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem 1.75rem;
}

.form-message {
    grid-column: 1;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
}

#contact input,
#contact textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background-color: var(--white);
    border: 4px solid var(--blue);
    color: var(--black);
    font-family: var(--font);
    font-size: 0.9rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

#contact textarea {
    height: 120px;
    resize: vertical;
}

/* .form-message {
    grid-column: 1;
} */

/* .form-submit {
    grid-column: 2;
    display: flex;
    align-items: flex-end;
} */


#contact button[type="submit"] {
    background-color: var(--blue);
    color: var(--white);
    border: none;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
    border-radius: 10px;
}

         /* color to to match the hint video */
#contact button[type="submit"]:hover {
    background-color: var(--red);
}

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

        /* footer */
footer {
    padding: 2rem 0;
    text-align: center;
}

footer address {
    font-style: normal;
    line-height: 1.8;
    color: var(--white);
}

footer a {
    color: var(--blue);
}

/* MEDIA QUERIES (MEDIUM) */ 

@media (min-width: 800px) {

    .nav-toggle{
        display: none;
    }

    #main-nav ul {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background: none;
        border: none;
        padding: 0;
        gap: 2rem;
        align-items: center;
    }

    #results {
        grid-template-columns: 1fr 1fr;
    }
    .results-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .results-table {
        width: 50%;
    }

    .bar-chart {
        width: 50%;
    }

    #contact form {
        grid-template-columns: 1fr;
    }

    .form-message {
        grid-column: 1;
    }

    .form-submit {
        grid-column: 1;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MEDIA QUERIES (LARGE) */
@media (min-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    #innovation-investment h2 {
        font-size: 2rem;
    }

    #contact form {
        grid-template-columns: 1fr 1fr;
    }

    .form-message {
        grid-column: 1;
    }

    .form-submit {
        grid-column: 1;
        align-items: flex-start;
    }

    .form-submit {
        grid-column: 2;
        grid-row: 3;
        display: flex;
        align-items: flex-start;
        padding-top: 0.6rem;
    }
}