* {
    box-sizing: border-box;
}

:root {
    /****** Primary ******/
    --Dark-Violet: hsl(256, 26%, 20%);
    --Grayish-Blue: hsl(216, 30%, 68%);

    /****** Neutral ******/
    --Very-Dark-Violet: hsl(270, 9%, 17%);
    --Dark-Grayish-Violet: hsl(273, 4%, 51%);
    --Very-Light-Gray: hsl(0, 0%, 98%);
}

body {
    color: var(--Dark-Violet);
    font-family: 'Karla', sans-serif;
    margin: 0;
}


h1,
h2,
h3 {
    font-family: 'DM Serif Display', sans-serif;
}

h1 {
    font-size: 4.5rem;
    letter-spacing: 7px;
    line-height: 1;
    position: relative;
    margin: 0;
    padding-top: 80px;
    width: 630px;
}

h2{
    font-size: 4.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    line-height: 1.7;
    opacity: 0.8;
}

/* .line-top::before {
    content: '';
    background-color: var(--Dark-Violet);
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 150px;
} */

h1::before {
    content: '';
    background-color: #fff;
    position: absolute;
    top: 3rem;
    left: 0;
    height: 2px;
    width: 100px;
}

h2::before {
    content: '';
    background-color: var(--Dark-Violet);
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 150px;
}

.btn {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    cursor: pointer;
    padding: 10px 30px;
    text-transform: uppercase;
}

.btn-view-secondary {
    padding: 10px 30px;
}

.btn:hover {
    background-color: #fff;
    color: #000;
}

.btn-reverse {
    border-color: var(--Dark-Violet);
    color: var(--Dark-Violet);
}

.btn-reverse:hover {
    background-color: var(--Dark-Violet);
    color: #fff;
}

.container {
    padding: 0 20px;
    margin: 0px auto;
    width: 1200px;
    max-width: 100%;
}

.insure-section p{
    width: 540px;
}

.different-section {
    margin-top: 100px;
}

.align-start {
    align-items: flex-start;
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.violet-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.different-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


/* nav styling */
nav {
    background-color: #fff;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
}

nav .hamburger {
    display: none;
}

nav li {
    margin-left: 30px;
    font-weight: 600;
}

nav li a {
    color: var(--Dark-Grayish-Violet);
    text-transform: uppercase;
    text-decoration: none;
}

nav li a:hover {
    cursor: pointer;
    color: var(--Dark-Violet);
}

/*header styling */
header {
    color: #fff;
    background-color: var(--Dark-Violet);
    padding: 50px;
    position: relative;
    margin-bottom: 50px;
    height: 600px;
}

header * {
    z-index: 2;
}

header::after {
    content: '';
    background-image: url('../images/bg-pattern-intro-right-desktop.svg');
    background-repeat: no-repeat;
    background-position: top right;
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;

}

header::before {
    content: '';
    background-image: url('../images/bg-pattern-intro-left-desktop.svg');
    background-repeat: no-repeat;
    background-position: bottom left;
    position: absolute;
    bottom: -50%;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 0;
}

.intro {
    margin-bottom: -250px;
}

.tiles {
    margin-top: 50px;
}

.bg-violet {
    background-color: var(--Very-Dark-Violet);
    background-image: url('../images/bg-pattern-how-we-work-desktop.svg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 50% 100%;
    padding: 0 70px;
    position: relative;
    margin: 100px auto;
    height: 250px;
}


.bg-violet h2 {
    color: #fff;
    font-size: 3.5rem;
    padding: 0;
    width: 33rem;
}

/* footer styling */
footer {
    background-image: url('../images/bg-pattern-footer-desktop.svg');
    background-repeat: no-repeat;
    background-position: top left;
    background-color: var(--Very-Light-Gray);
    padding: 60px 0 30px;
}

footer h4 {
    color: var(--Dark-Grayish-Violet);
    text-transform: uppercase;
}

footer li a {
    color: var(--Dark-Violet);
    list-style: none;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 600;
}

footer li a:hover {
    color: var(--Dark-Violet);
    text-decoration: underline;
}

footer ul.flex li:not(:first-child) {
    margin-left: 45px;
    margin-right: 45px;
}

.foot-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.border-bottom {
    border-bottom: 1px solid var(--Dark-Grayish-Violet);
    margin-bottom: 30px;
}

footer li {
    margin-bottom: 10px;
}

footer ul {
    padding: 0;
    list-style: none;

}

svg:hover {
    cursor: pointer;
    fill: var(--Dark-Violet);
}   

@media (max-width: 768px) {
    body {
        text-align: center;
    }

    header {
        padding-top: 0;
        height: 950px;
    }

    /* header::before,
    header::after {
        display: none;
    } */

    header::after {
        content: '';
        background-image: url('../images/bg-pattern-intro-right-mobile.svg');
        background-repeat: no-repeat;
        background-position: top right;
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: 100%;
    }

    header::before {
        content: '';
        background-image: url('../images/bg-pattern-intro-left-mobile.svg');
        background-repeat: no-repeat;
        background-position: bottom left;
        position: absolute;
        bottom: -50%;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: 0;
    }

    h1{
        font-size: 3rem;
        width: 20.438rem;
    }

    h2{
        font-size: 3rem;
    }

    h1::before {
        display: none;
    }

    nav .flex {
        flex-direction: row;
    }

    nav ul {
        display: none;
    }

    nav ul.show {
        background-color: var(--Very-Dark-Violet);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: fixed;
        padding-top: 30px;
        margin: 0;
        height: calc(100vh - 80px);
        width: 100vw;
        top: 70px;
        left: 0;
    }

    .btn-reverse {
        border-color: #fff;
        color: #fff;
    }

    nav ul li {
        margin: 20px 0;
    }

    nav .hamburger {
        display: flex;
        background-color: transparent;
        cursor: pointer;
        border: 0;
    }

    nav .hamburger .close {
        display: none;
    }

    nav .hamburger.show .close {
        display: block;
    }

    nav .hamburger.show .open {
        display: none;
    }

    .hamburger.show .open::after {
        transform: rotate(-90deg);
    }

    nav .image-wrapper {
        text-align: left;
    }

    .insure-section{
        height: 500px;
    }

    .insure-section p {
        width: 20.438rem;
    }

    .line-top::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .reverse-mobile {
        flex-direction: column-reverse;
    }

    .bg-violet {
        background-image: url('../images/bg-pattern-how-we-work-mobile.svg');
        height: 344px;
    }

    .violet-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tiles p{
        width: 20.438rem;
    }

    .bg-violet h2 {
        font-size: 2.5rem;
        margin-bottom: 20px;
        width: 17.438rem;
    }

    footer {
        background-image: url('../images/bg-pattern-footer-mobile.svg');
        background-size: 100% auto;
        background-position: top center;
    }

    footer ul.flex {
        flex-direction: row;
    }

    footer .flex div {
        width: 100%;
    }

    .different-row {
        flex-direction: column;
    }

    .foot-flex {
        flex-direction: column;
        gap: 20px;
    }

    .flex {
        flex-direction: column-reverse;
    }

    .intro {
        width: 375px;
        margin-bottom: -10px;
    }
}