.debug {
    background-color: rgba(255,0,0,0.1) !important;
}

/* Reset and Box Sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation !important;
    color: var(--mono-100);
}

/* Global Styles */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px;
    background-color: var(--app-background-100);
}

.mb0 {
    margin-bottom: 0 !important;
}

.mt0 {
    margin-top: 0 !important;
}

.pb0 {
    padding-bottom: 0 !important;
}

.pt0 {
    padding-top: 0 !important;
}

a {
    display: inline-flex;

    & img {
        pointer-events: none;
    }
}

.content-container {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    align-items: flex-start;

    max-width: var(--max-content-width);
    width: 100%;
}

/* .content {
    max-width: var(--max-content-width);
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 0px var(--content-inset);

            & h2 {
            max-width: 12ch;
        }

        & p {
            max-width: 50ch;
        }
} */

/* section {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;

    width: 100%;
    padding: var(--content-inset) 0px;
    margin: var(--margin-vertical) 0px;

    &.emphasized {
        background-color: #FFFAF1;

        & h2 {
            max-width: 12ch;
            margin-top: var(--h2-margin-bottom);
        }

        & p {
            max-width: 50ch;
        }

        & .cta-section {
            display: flex;
            gap: 12px;
            z-index: 1000;

            margin-top: calc(var(--h2-margin-bottom) * 1);

            & button.primary {
                background-color: #FFEAC4;
            }

            & button.primary:hover {
                background-color: #FFD891;
            }

            & button.primary:active {
                background-color: #FFEAC4;
            }

            & button.secondary {
                background-color: #FFFFFF;
            }

            & button.secondary:hover {
                background-color: #E6E6E6;
            }

            & button.secondary:active {
                background-color: #FFFFFF;
            }
        }
    }
} */

/* Responsive header for 640 */
/* @media only screen and (max-width: 1024px) {
    section {
        &.emphasized{
            & .cta-section {
                margin-top: calc(var(--h2-margin-bottom) * 1);
            }
        }
    }
}

/* Responsive header for 640 */
/* @media only screen and (max-width: 640px) {
    section {
        &.emphasized{
            & .cta-section {
                display: flex;
                flex-direction: column;
                margin-top: calc(var(--h2-margin-bottom) * 2);
            }
        }
    }
} */

button {
    all: unset;
    padding: 16px 28px 16px 28px;
    border: 2px solid var(--mono-100);
    box-shadow: 2px 2px 0px var(--mono-100);
    background-color: var(--mono-600);
    align-self: flex-start;

    font-weight: 500;
    font-size: var(--p-font-size);
    line-height: var(--p-line-height);
    text-align: center;

    cursor: pointer;

    transition: background-color 320ms ease, box-shadow 120ms ease;
}

button:hover {
    box-shadow: 4px 4px 0px var(--mono-100);
    background-color: var(--mono-500);
}

button:active {
    box-shadow: 2px 2px 0px var(--mono-100);
    background-color: var(--mono-400);
}

button.primary {
    background-color: var(--primary-button-100);
}

button.primary:hover {
    background-color: var(--mono-500);
}

button.primary:active {
    background-color: var(--mono-400);
}

button,
a {
    /* box-shadow: 0 0 0 2px black;
    box-shadow: 0 0 0 4px #00b8ff; */
    outline: none;
    position: relative;

    &::before {
        content: '';
        position: absolute;
        z-index: 1000;
        width: 140px;
        height: 140px;
        border-radius: 70px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        background-color: rgba(255, 0, 0, 0.4);
        transition: all 220ms ease-in-out;
    }
}

button:focus-visible,
a:focus-visible {
    outline: none;
    position: relative;

    &::before {
        transform: translate(-50%, -50%) scale(1);
    }
}

.grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 80px; /* spacing between cards */

    &.content-container {
        padding: 0 var(--content-inset) 0;
    }

    & .grid-item {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;

        width: calc((100% - 160px) / 3); /* 2 gaps of 20px = 40px */

        text-align: center;

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

        & p {
            color: var(--mono-100);
        }

        & p strong {
            color: var(--mono-100);
            font-weight: 600;
        }

        & p.large {
            font-weight: 750;
            text-transform: uppercase;
            color: var(--mono-100);
            letter-spacing: -0.2px;
        }
    }
}

input[type=text],
input[type=email],
input[type=tel],
textarea {
    all: unset;

    border: 2px solid var(--mono-100);
    padding: 16px 20px 16px 20px;

    font-size: var(--p-font-size);
    line-height: var(--p-line-height);

    transition: box-shadow 120ms ease;

    max-width: var(--max-character-width-for-p);
}

input[type=text]:hover,
input[type=email]:hover,
input[type=tel]:hover,
textarea:hover {
    box-shadow: 2px 2px 0px var(--mono-100);
}

input[type=text]:focus-visible,
input[type=email]:focus-visible,
input[type=tel]:focus-visible,
textarea:focus-visible {
    box-shadow: 4px 4px 0px var(--mono-100);
}

.error {
    color: red;
    display: none;
    font-weight: 500;
    margin-top: 4px !important;
}

.input-error {
    border-color: red !important;
    border-width: 2px !important;
}

input[type=text].input-error:hover,
input[type=email].input-error:hover,
input[type=tel].input-error:hover,
textarea.input-error:hover {
    box-shadow: 2px 2px 0px rgba(255, 0, 0, 0.2);
}

input[type=text].input-error:focus-visible,
input[type=email].input-error:focus-visible,
input[type=tel].input-error:focus-visible,
textarea.input-error:focus-visible {
    box-shadow: 4px 4px 0px rgba(255, 0, 0, 0.2);
}

form {
    display: flex;
    flex-direction: column;

    & label {
        pointer-events: none;
        font-weight: 600;
        font-size: var(--p-font-size);
        line-height: var(--p-line-height);
        margin-top: var(--p-margin-top);
        margin-bottom: 4px;
    }

    & button {
        margin-top: var(--p-margin-top);
    }
}

/*
**
** HEADER AND FOOTER
**
*/
header,
footer,
section {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;

    margin: var(--margin-vertical) 0;

    & .top-gravity-area {
        padding: calc(var(--content-inset) * 1) var(--content-inset) 0;
    }

    & .bottom-gravity-area {
        padding: 0 var(--content-inset) calc(var(--content-inset) * 1);
    }

    & .plain-text-area {
        padding: calc(var(--content-inset) * 1) var(--content-inset) 0;

        & h6 {
            max-width: var(--max-character-width-for-p);
            margin-top: var(--h2-margin-bottom);
        }

        & p {
            max-width: var(--max-character-width-for-p);
        }

        & ul {
            font-size: var(--p-font-size);
            line-height: var(--p-line-height);
            margin-top: var(--p-margin-top);
            margin-bottom: var(--p-margin-bottom);
            list-style: none;

            font-weight: 400;

            padding-left: 1em;
            text-indent: -1em;

            & li:before {
                content: "-";
                display: block;
                float: left;
                width: 1em;
            }
        }
    }
}

section.emphasized {
    background-color: var(--app-background-300);

    & .bottom-gravity-area {
        display: flex;
        flex-direction: column;

        & h2 {
            max-width: var(--max-character-width-for-h);
            margin-top: var(--h2-margin-bottom);
        }

        & p {
            max-width: var(--max-character-width-for-p);
        }

        & .cta-section {
            display: flex;
            gap: 20px;
            z-index: 1000;

            margin-top: calc(var(--h2-margin-bottom) * 1);
        }
    }
}

section.contact-form {
    & .top-gravity-area {
        display: flex;
        flex-direction: column;
        padding-top: 0;

        & h2 {
            max-width: var(--max-character-width-for-h);
            margin-top: var(--h2-margin-bottom);
        }

        & p {
            max-width: var(--max-character-width-for-p);
        }

        & .cta-section {
            display: flex;
            gap: 20px;
            z-index: 1000;

            margin-top: calc(var(--h2-margin-bottom) * 1);
        }
    }

    & .bottom-gravity-area {
        display: flex;
        flex-direction: column;
        padding-bottom: 0;
        width: 100%;
        
        & h2 {
            max-width: var(--max-character-width-for-h);
            margin-top: var(--h2-margin-bottom);
        }

        & p {
            max-width: var(--max-character-width-for-p);
        }

        & .cta-section {
            display: flex;
            gap: 20px;
            z-index: 1000;

            margin-top: calc(var(--h2-margin-bottom) * 1);
        }
    }
}

/*
**
** HEADER
**
*/
header {
    background-color: var(--app-background-200);
    background-image: url(../assets/images/img-hero.svg);

    &.message-ok {
        background-color: var(--app-background-200);
        background-image: url(../assets/images/img-hero-message-ok.svg);
    }

    &.warning {
        background-color: var(--app-background-200);
        background-image: url(../assets/images/img-hero-404.svg);
    }

    &.plain {
        background-color: var(--mono-500);
        background-image: unset;
    }

    background-repeat: no-repeat;
    background-clip: border-box;
    background-size: 44%;
    background-position: center right;

    & .top-gravity-area {
        & img {
            width: var(--logo-width);
            height: auto;
        }
    }

    & .center-gravity-area {
        display: none;
            width: 100%;
    }

    & .bottom-gravity-area {
        display: flex;
        flex-direction: column;

        & h1 {
            max-width: var(--max-character-width-for-h);
        }

        & p {
            max-width: var(--max-character-width-for-p);
        }

        & .cta-section {
            display: flex;
            gap: 12px;
            z-index: 1000;

            margin-top: var(--h1-margin-bottom);
        }
    }
}

/*
**
** FOOTER
**
*/
footer {
    background-color: var(--mono-500);
    
    & .content-container {
        opacity: 0.7;
    }

    & small {
        max-width: var(--max-character-width-for-p);
    }

    & .top-gravity-area {
        display: flex;
        flex-direction: column;
        align-content: flex-start;
        align-items: flex-start;

        & .contact-information {
            display: flex;
            flex-direction: column;
            align-content: flex-start;
            align-items: flex-start;
        }
    }

    & .bottom-gravity-area {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        gap: 20px;

        & a {
            display: flex;
            flex-direction: row;
            align-content: center;
            align-items: center;
            gap: 6px;

            cursor: pointer;

            font-size: var(--small-font-size);
            line-height: var(--small-line-height);
            font-weight: 500;
            text-decoration: none;

            & img {
                pointer-events: none;
            }
            
            & :hover {
                text-decoration: underline;
            }
        }

        & .leading {
            display: flex;
            flex-direction: row;
            gap: 20px;
        }

        & .trailing {
            display: flex;
            flex-direction: row;
            gap: 20px;
        }
    }
}

/*
**
** RESPONSIVE BREAKPOINTS
**
*/

/* Responsive for 1024 */
@media only screen and (max-width: 1024px) {
    body {
        padding: 0;
    }
    
    header {
        background-image: none !important;

        & .center-gravity-area {
            display: unset !important;
        }
    }

    footer {
        & small {
            max-width: 100%;
        }

        & .bottom-gravity-area {
            flex-direction: column;

            & .leading {
                flex-direction: column;
            }

            & .trailing {
                flex-direction: column;
            }
        }
    }

    button {
        padding: 16px 20px 16px 20px;
    }

    .grid {
        gap: 40px; /* spacing between cards */

        & .grid-item {
            width: calc((100% - 40px) / 2); /* 1 gap */
        }
    }

    section.emphasized {
        & .bottom-gravity-area {
            & .cta-section {
                & button {
                    flex: unset;
                }
            }
        }
    }
}

/* Responsive for 640 */
@media only screen and (max-width: 640px) {
    header {
        background-image: none;

        & .center-gravity-area {
            display: unset !important;
        }

        & .bottom-gravity-area {
            & .cta-section {
                display: flex;
                flex-direction: column;
            }
        }
    }

    footer {
        & small {
            max-width: 100%;
        }

        & .bottom-gravity-area {
            flex-direction: column;
            padding: 0 var(--content-inset) calc(var(--content-inset) * 3);

            & .leading {
                flex-direction: column;
            }

            & .trailing {
                flex-direction: column;
            }
        }
    }

    button {
        padding: 16px 20px 16px 20px;
        align-self: stretch;
    }

    .grid {
        gap: 40px; /* spacing between cards */

        & .grid-item {
            width: 100%;
        }
    }

    section.emphasized {
        & .bottom-gravity-area {
            & .cta-section {
                & button {
                    flex: auto;
                }
            }
        }
    }
}