:root {
    --black: #141D2A;
    --dark-gray: #282D3D;
    --blue: #62F1F1;
    --red: #FF8360;
    --white: #FFFFFF;

    --font-size: 16px;
    --side-padding: 4rem;
    --section-top-padding: 10rem;
    --article-top-padding: 6rem;
    --card-size: 30rem;
    --card-padding: 4rem;
}

::backdrop {
    --dark-gray: #282D3D;
}

img {
    height: auto;
    max-width: 100%;
}

html {
    font-size: var(--font-size);
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-gray);
    box-sizing: border-box;
    accent-color: var(--blue);
}

*, *:before, *:after {
    box-sizing: inherit;
}

h1 {
    color: var(--blue);
    font-size: 5.75rem;
    font-weight: 900;
    margin-bottom: 2rem;
}

h2 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 4.375rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

p {
    font-size: 1.5rem;
    line-height: 2.625rem;
}

ul {
    font-size: 1.5rem;
}

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

a {
    text-decoration: none;
}

a, a:visited {
    color: inherit;
}

strong {
    font-weight: 700;
}

.link {
    font-weight: 700;
    text-decoration: underline;
    cursor:pointer;
}

.button {
    --button-font-size: 1rem;
    --icon-color: var(--dark-gray);

    color: var(--dark-gray);
    background-color: var(--white);
    padding: calc(.5 * var(--button-font-size)) calc(.75 * var(--button-font-size));
    text-decoration: none;
    width: fit-content;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    border: none;
    font-size: var(--button-font-size);
    outline-color: var(--blue);
}

.button img {
    height: var(--button-font-size);
}

.button.large {
    --button-font-size: 3rem;
}

.button.inverted {
    --icon-color: var(--white);
    color: var(--white);
    background-color: var(--dark-gray);
}

.button.contact {
    display: flex;
    align-items: center;
    gap: calc(.25 * var(--button-font-size));
}

section {
    min-height: 100lvh;
    padding: var(--section-top-padding) var(--side-padding);
}

.centered {
    min-height: unset;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 0rem;
}

article {
    padding: var(--article-top-padding) var(--side-padding);
}

footer.bottom {
    padding: 4rem var(--side-padding) 14rem;
    background-color: var(--dark-gray);
    color: var(--white);

    background-image: url('../images/logo-short.svg');
    background-position: calc(100% - var(--side-padding)) 6rem;
    background-repeat: no-repeat;

    & ul {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    & li:not(:last-child) {
        margin-bottom: .75rem;
    }
}

section.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;

    background-color: var(--dark-gray);
    color: var(--white);
}

header.top {
    width: 100%;
    height: 7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 0;
    padding: 0 var(--side-padding);
    background-color: var(--dark-gray);
}

section.hero > * {
    text-align: center;
    max-width: 50rem;
}

section.hero p {
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 500;
    opacity: 80%;
    text-wrap: balance;
}

section.what-we-do {
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('../images/cnw.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    color: var(--dark-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

section.article {
    color: var(--dark-gray);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    padding-top: 4rem;
}

section.article h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

section.article h3 {
    margin-bottom: 0;
}

section.article p {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

section.article img {
    max-width: 80%;
}

section.article a {
    text-decoration: underline;
}

section.what-we-do h2 {
    text-align: center;
}

section.what-we-do > * {
    max-width: 55rem;
}

section.values-and-practices {
    background-color: var(--black);
    color: var(--blue);
    padding: 0;

    display: flex;
    flex-wrap: wrap;
}

section.values-and-practices article {
    flex: 3;
    flex-basis: 25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

section.values-and-practices article.small {
    flex: 2;
    background-color: var(--dark-gray);
    color: var(--white);
}

section.values-and-practices ul:not(:last-child) {
    margin-bottom: 6.5rem;
}

section.clients {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    min-height: unset;
}

section.clients > h2 {
    text-align: center;
    text-wrap: balance;
}

section.how-we-work {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

section.how-we-work > h2 {
    text-wrap: balance;
    text-align: center;
}

section.how-we-work > p {
    max-width: 65rem;
    text-align: center;
}

section.how-we-work p {
    font-size: 1.5rem;
    line-height: 2.25rem;
    padding-bottom: 3rem;
}

section.content {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 5rem var(--side-padding);
}

section.landing-page-content {
    padding: 2rem var(--section-top-padding);
}

.proper-name {
    font-style: italic;
}

section.content .button {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 1.25rem;
    font-size: 1.25rem;
}

section.content h2 {
    margin: 0;
    color: var(--blue);
    font-weight: 400;
    font-family: 'Bowlby One', sans-serif;
    font-size: 4rem;
    line-height: 6.25rem;
}

section.content header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;

    margin-bottom: 3.5rem;
}

.carousel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    overflow-x: scroll;

    margin-left: calc(-1 * var(--side-padding));
    margin-right: calc(-1 * var(--side-padding));

    padding: 0 var(--side-padding);
}

.carousel-item {
    width: var(--card-size);
    height: var(--card-size);
    padding: var(--card-padding);
    flex-shrink: 0;

    border-radius: .5rem;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    background: linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%), var(--image);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.carousel-item h3 {
    font-family: "Bowlby One", sans-serif;
    font-weight: normal;
    font-size: 2rem;
    line-height: normal;
    margin-bottom: 0;
}

.carousel-item p {
    height: 3.75rem;
    line-height: normal;
    font-weight: 500;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

dialog {
    background-color: var(--black);
    color: var(--white);
    max-width: 40rem;

    border: none;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
    padding: 2rem;
}

dialog::backdrop {
    background-color: var(--dark-gray);
    opacity: 80%;
}

dialog h2 {
    margin-bottom: 1rem;
}

dialog p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

body:has(dialog[open]) {
    overflow: hidden
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    flex: 1;
    display: flex;
    font-weight: 500;
    font-size: .9rem;
    flex-direction: column;
    gap: .35rem;
}

input, textarea {
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--white);

    padding: .75rem;
    background-color: var(--dark-gray);
    outline-color: var(--blue);
    border: none;
}

fieldset {
    display: flex;
    gap: 1rem;
}

fieldset.actions {
    justify-content: flex-end;
}

.flash-messages {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flash-messages .message {
    padding: 1rem 1.5rem;
    color: var(--black);
    background-color: var(--blue);

    animation: hideMessage .25s ease-in 5s;
    animation-fill-mode: forwards;
}

.flash-messages .message.error {
    background-color: var(--red);
}

@keyframes hideMessage {
    0% {
        opacity: 1;
        height: auto;
    }

    99% {
        opacity: 0;
        height: auto;
    }

    100% {
        visibility: hidden;
        opacity: 0;
        height: 0;
    }
}

@media screen and (max-width: 800px) {
    :root {
        --font-size: 12px;
        --side-padding: 2rem;
        --section-top-padding: 4rem;
        --article-top-padding: 4rem;
        --card-size: 24rem;
        --card-padding: 1.5rem;
    }

    h1 {
        font-size: 4.5rem;
    }

    footer.bottom {
        padding-top: var(--section-top-padding);
        padding-bottom: var(--section-top-padding);
    }
}
