@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400&display=swap');

/* variables */
:root {
    --dark-blue: hsl(233, 26%, 24%);
    --line-green: hsl(136, 65%, 51%);
    --bright-cyan: hsl(192, 70%, 51%);
    --grayish-blue: hsl(233, 8%, 62%);
    --light-gray-blue: hsl(220, 16%, 96%);
    --very-light-gray: hsl(0, 0%, 98%);
    --white: hsl(0, 0%, 100%);
}

* {
    /* border:  1px solid black; */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* general styles */
body {
    font-family: 'Public Sans', sans-serif;
    background-color: var(--white);
    font-size: calc(18px + 0.390625vw);
}

h1, h2, h3, h4 {
    color: var(--dark-blue);
    letter-spacing: 0.1;
    font-weight: 400;
    margin-bottom: 1rem;
}

h1 { font-size: 2.75rem;}
h2 { font-size: 2.25rem;}
h3 { font-size: 1.75rem;}
h4 { font-size: 1.25rem;}

p {
    font-size: 1rem;
    color: var(--grayish-blue);
    line-height: 1.75;
}

a { 
    text-decoration: none; 
    font-size: 1.1rem;
}

img {
    display: block;
    max-width: 100%;
}

/* global classes */
.cta-btn {
    background: linear-gradient(135deg, var(--line-green) 0%, var(--bright-cyan) 100%);
    color: var(--white);
    border: none;
    border-radius: 1.5rem;
    padding: 1rem 2.5rem; 
    width: 12.5rem;
    display: inline-block;
}

.cta-btn:hover { opacity: 0.8; }

.container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
}

/* header */
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5rem;
    height: 5rem;
    background-color: var(--white);
    z-index: 9;  
    position: relative;
} 

.logo { transform: scale(1.1); }

.nav-toggle { display: none; }

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

nav > a { 
    color: var(--grayish-blue); 
    padding: 1.5rem;
}

nav > a:hover { 
    color: var(--dark-blue);
    border-block-end: 4px solid; 
    border-image: linear-gradient(to right, var(--line-green), var(--bright-cyan));
    border-image-slice: 1;
} 

/* intro section */
#intro {
    background-color: var(--very-light-gray);
    max-width: 100%;
    height: 65vh; 
    padding-left: 5rem;
    margin-right: -100px;
    display: flex;
    flex-direction: row;
    gap: 2rem;
}

.intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
}

.intro-text p { width: 50%; }

.intro-img {
    flex: 1;
    background-image: url('/easybank-landing-page/docs/assets/images/bg-intro-desktop.svg');
    background-repeat: no-repeat;
    background-position: left 0 bottom 25%;
    background-size: 150% 150%;
    height: 65vh;
} 

.intro-img img {
    top: 15%;
    right: -80%;
    transform: translateY(-15%);
    object-fit: contain;
    height: 140%;
}

/* features section */
#features { 
    background-color: var(--light-gray-blue);
    padding: 5rem;
}

#features > p { width: 60%; }

.feature-img { 
    margin-bottom: 1rem; 

}

/* articles section */
#articles { 
    background-color: var(--very-light-gray); 
    padding: 5rem;
}

.card {
    max-width: 350px; 
    background-color: var(--white);
}

.card-img {
    object-fit: contain;
    border-radius: 20px 20px 0 0;
}

.card-body { padding: 1.5rem; }

.card-author {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.card-body h4:hover { color: var(--line-green); }

/* footer */
footer {
    background-color: var(--dark-blue); 
    padding: 2rem 5rem;
    display: flex;
    justify-content: space-between;
}

.box1 { 
    flex: 1; 
    padding-right: 2rem;
}

.social-media-icons { 
    margin-top: 2.5rem; 
    display: flex; 
    gap: 1rem; 
}

.icon:hover { filter: invert(.5) sepia(1) saturate(4) hue-rotate(85deg) brightness(106%); }

.box2 { flex: 2; }

ul { 
    display: inline-block; 
    margin-right: 5rem;
}

li { list-style-type: none; }

.box2 a { 
    display: inline-block;
    color: var(--white);
    margin-bottom: 1rem;
}

.box2 a:hover { color: var(--line-green); }

.box3 { 
    text-align: right; 
    flex: 3;
}

.box3 .cta-btn { margin-bottom: 2rem; }

/**/
.attribution {  
    text-align: center;
    font-size: 11px;
    padding: 1rem;
}

.attribution a { 
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    color: var(--line-green); 
}


.attribution a:hover {
    text-decoration: underline;
}

/* media queries */
@media (max-width: 899px) {
    header .cta-btn { display: none; }
}

@media (max-width: 834px) {
    /* global */
    h1, h2, h3 { text-align: center; }

    .container {
        flex-direction: column;
        align-items: center;
    }

    /* header */
    .nav-logo {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .logo { transform: scale(1.2); }

    .nav-toggle { 
        display: block; 
        background-color: inherit;
        border: none;
    }

   nav {
        background-color: var(--white);
        position: fixed;
        width: 80%;
        left: 0;
        top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 6rem 10%;
        border-radius: 1rem;
        height: 0;
        overflow: hidden;
    }

    nav a { color: var(--dark-blue); }

    .show-links {  height:  auto; }

    /* intro */
    #intro {
        flex-direction: column-reverse;
        padding-left: 0;
        padding-bottom: 3rem;
        height: auto;
        gap: 0;
    }

    .intro-img {
        background-image: url('/easybank-landing-page/docs/assets/images/bg-intro-mobile.svg');
        background-position: center top;
        background-size: 100% 80%;
        margin-bottom: -20%;
        height: auto;
    }

    .intro-text { 
        align-items: center; 
        padding: 2rem;
    }

    .intro-text p { 
        width: 100%; 
        text-align: center; 
    }

    /* features */
    #features > p { width: 100%; }
    .feature-img{ margin: 0 auto 2rem; }

    /* articles */
    .card { max-width: 100%; }

    .card-img {
        border-radius: 0;
        margin: 0 auto;
    }
    .card-body { padding: 1.5rem 3rem; }

    /* footer */
    footer {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .box1 { padding-right: 0; }
    .box1 > img { margin: 0 auto; }

    ul { 
        margin-right: 0; 
        display: block;
        text-align: center;
    }

    .box3 { text-align: center; }
}
