:root {
    --text-color: #16003B;
    --dark-purple: #3E00AA;
    --light-purple: #5D00FF;
    --white-on-purple: #FFFFFF;
    --border-color: #D6D6D6;
    --background-gray: #F5F5F5;
}

@font-face {
    font-family: "Karla";
    font-weight: 400 700;
    font-display: swap;
    src: url('../font/Karla.woff2')
    format("woff2");
}

html, body {
    font-family: "Karla", system-ui, sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Karla", system-ui, sans-serif;
    font-weight: 700;
    color: var(--text-color);
}

.container {
    max-width: 75rem;
}

a {
    text-decoration: none;
    color: var(--dark-purple);
}

a:hover {
    text-decoration: underline;
}

a.no-styling {
    color: var(--text-color);
    text-decoration: none;
}

.btn {
    display: inline-block;
    background-color: var(--dark-purple);
    color: var(--white-on-purple);
    line-height: 1.25;
    text-decoration: none;
    padding: .75rem 1.25rem;
}

.btn:hover {
    text-decoration: none;
    background-color: var(--light-purple);
}

#header {
    border-bottom: 1px solid var(--border-color);
}

#header .logo {
    padding: 1rem 1rem 1rem 0;
    display: block;
}

#hero {
    margin: 5rem auto;
}

#hero.subpage-hero {
    margin: 3rem auto;
}

#hero h1 {
    font-size: 4rem;
}

#hero.subpage-hero h1 {
    font-size: 3rem;
}

.benefit {
    font-size: 1.25rem;
    line-height: 1.5rem;
    font-weight: 700;
}

.subpage-hero .benefit {
    font-size: 1rem;
}

.subpage-hero .benefit svg {
    width: 18px;
    height: 18px;
    margin-right: .25rem;
}

.benefit:nth-child(2) {
    margin-left: 0;
}

.benefit svg {
    margin-right: .5rem;
}

.benefit:nth-child(2) {
    margin-left: 1.5rem;
}

.benefit:not(:last-child) {
    margin-bottom: 1.5rem;
}

.subpage-hero .benefit:not(:last-child) {
    margin-bottom: .5rem;
}

.review-link {
    color: var(--text-color);
    font-size: .75rem;
    font-weight: 700;
    padding: 1rem 1rem 1rem 0;
    display: inline-block;
}

.subpage-hero .review-link {
    padding: .5rem 1rem 1rem 0;
}

.review-link:hover {
    text-decoration: none;
}

.review-link picture {
    margin-right: .5rem;
}

#services h2 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
}

#services p {
    margin: 0 0 1rem;
}

#services a:not(.btn) {
    margin: 0 0 0 1rem;
}

#services a:not(.btn) svg {
    width: 14px;
    height: 14px;
    margin: -3px 0 0 .25rem;
}

.service-img {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.service-img img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    object-position: bottom;
}

@media (min-width: 768px) {
    .service-img {
        height: 220px;
    }
}

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

nav li {
    position: relative;
}

nav li a {
    display: block;
    padding: 1.25rem;
    color: var(--text-color);
}

nav li:hover {
    background-color: var(--background-gray);
}

nav li a:hover {
    text-decoration: none;
}

nav li a:hover::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--light-purple);
    position: absolute;
    left: 0;
    bottom: -1px;
}

nav li ul {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white-on-purple);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

nav li:hover > ul {
    display: grid;
}

nav li ul a {
    min-width: 11rem;
    text-align: center;
    padding: 1.5rem 1rem;
}

nav li ul img {
    width: 6rem;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    margin-bottom: 1rem;
}

#header {
    position: relative;
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    margin-left: .5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.smaller-container {
    max-width: 880px;
}

/* Mobile: nav collapses behind the hamburger */
@media (max-width: 767.98px) {
    #primary-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white-on-purple);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }

    #primary-nav.is-open {
        display: block;
    }

    #primary-nav ul {
        flex-direction: column;
    }

    #primary-nav li ul {
        display: block;
        position: static;
        width: 100%;
        border: none;
    }

    #primary-nav li ul a {
        display: flex;
        align-items: center;
        gap: 1rem;
        min-width: 0;
        text-align: left;
    }

    #primary-nav li ul img {
        margin-bottom: 0;
    }
}

#works {
    margin: 5rem auto;
}

#works h3 {
    font-size: 1rem;
}

#works .col-6 a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--text-color);
    background-color: var(--background-gray);
}

#works .col-6 a img {
    display: block;
    width: 100%;
}

#works .col-6 a span {
    font-size: .9375rem;
    color: var(--dark-purple);
}

#works .col-6 a span svg {
    width: 12px;
    height: 12px;
    margin: -2px 0 0 .25rem;
}

#works .work-text {
    padding: 1rem;
}

.section-heading {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

#footer {
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

#footer .row {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

.contact-box {
    font-weight: 700;
}

.contact-box:first-child a {
    margin: 0 1rem 0 0;
}

.contact-box a {
    display: block;
    font-size: 2rem;
}

.footer-logo-box {
    text-align: right;
}

.footer-logo-box svg {
    display: inline-block;
    margin: 0 0 .5rem 0;
}

#content p,
#content li {
    font-size: 1.125rem;
    line-height: 2rem;
}

#content .work-img {
    display: block;
}

#content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

aside h2 {
    font-size: 1.25rem;
}

aside .contact-box {
    font-weight: 400;
    margin: 1rem 0;
}

aside .contact-box a {
    font-weight: 700;
}

aside {
    border-left: 1px solid var(--border-color);
}

@media screen and (min-width: 576px) {
    #works .gy-3.gy-md-5 > [class*="col-6"]:nth-child(-n+3) {
        margin-top: 2rem;
    }
}

@media screen and (max-width: 576px) {
    #header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: #FFF;
    }

    #hero {
        margin: 6rem auto 2rem auto;
        text-align: center;
    }

    #hero h1 {
        font-size: 2.25rem;
    }

    #hero h1 br {
        display: none;
    }

    #hero .col-md-auto:not(:last-child) {
        margin-bottom: 1rem;
    }

    .benefit {
        font-size: 1rem;
    }

    .benefit svg {
        width: 18px;
        height: 18px;
        margin-right: .25rem;
    }

    .benefit:not(:last-child) {
        margin-bottom: .5rem;
    }

    .benefit:nth-child(2) {
        margin-left: 0;
    }

    #services .col-12 {
        margin-bottom: 3rem;
    }

    #works {
        margin: 0 auto 2rem auto;
    }

    #works .col-6 {
        margin-bottom: 2rem;
    }

    #footer, .footer-logo-box {
        text-align: center;
    }

    .contact-box {
        margin-bottom: 1rem;
    }

    nav li a:hover::after {
        display: none;
    }

    #primary-nav {
        border-bottom: 1px solid var(--border-color);
    }

    #hero.subpage-hero {
        margin: 6rem auto 1rem auto;
    }

    #hero.subpage-hero h1 {
        font-size: 2rem;
    }

    aside {
        border-left: none;
        border-top: 1px solid var(--border-color);
        margin: 1rem 0 2rem 0 !important;
        padding-top: 2rem;
    }
}
