:root {
    --bc: #f9f3ee;
    --bc-dark: #141412;
    --primary: rgb(161, 166, 252);
    --accent1: rgba(251, 161, 229, 1);
    --accent2: rgba(241, 196, 161, 1);
    --white: #ffffff;
    --black: #000000;
    /* Gray Colors */
    --bc-gray: #ede8e4;
    --gray: #9e9d9b;
    --gray-dark: #1c1a19;
    /* Gradients */
    --pace-gradient: linear-gradient(90deg, rgb(154, 174, 190) 0%, rgb(37, 70, 107) 50%, rgb(70, 100, 131) 100%);
    /* Sizes */
    --heading: 3.4rem;
    --paragraph: 1.1rem;
    --button-small: 1rem;
    /* Fonts */
    --font-main: "Poppins", sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    width: 100%;
    font-family: var(--font-main);
    background-color: var(--bc);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

main {
    min-height: 100vh;
}

textarea {
    min-height: 10em;
    font-family: var(--font-main);
    transition: opacity 0.15s ease-in-out;
    resize: none;
}

textarea::-webkit-scrollbar-track {
    background-color: transparent;
}

textarea::-webkit-scrollbar {
    width: 8px;
    background-color: transparent;
}

textarea::-webkit-scrollbar-thumb {
    border-radius: 5em;
    background-color: var(--primary);
}

/* Global classes */
.space {
    min-height: 25vh;
}

.flexbox {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flexbox-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.flexbox-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.flexbox-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flexbox-col-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.flexbox-col-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
}

.flexbox-left-start {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.flexbox-space {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Form */
.form-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#form {
    width: 75%;
}

.form {
    width: 100%;
}

.form-title {
    margin: 1em 0 0;
    font-size: var(--heading);
    font-weight: 800;
}

.form-undertitle {
    margin: 0 0 1em;
    color: var(--gray);
    font-weight: 300;
}

.send-success {
    width: 100%;
    padding: 1em;
    border-radius: 4px;
    background-color: var(--accent2);
    color: var(--white);
}

.send-error {
    width: 100%;
    padding: 1em;
    border-radius: 4px;
    background-color: var(--accent1);
    color: var(--white);
}

.form-text {
    margin: 1em 0 0.75em 2.2em;
    color: var(--gray-dark);
    font-weight: 300;
}

.form-input-grid {
    margin: 1.5em 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 1.5em;
}

.form-input-max {
    margin: 1.5em 0;
}

.form-input-wrapper {
    width: 100%;
    position: relative;
}

.form-input-wrapper i {
    left: 1em;
    position: absolute;
    font-size: 1.88rem;
    color: var(--primary);
    text-shadow: 0 0 4px rgba(161, 166, 252, 0.5);
}

#textarea textarea {
    border-radius: 2.25em;
}

#textarea i {
    top: 0.6em;
}

.form-input {
    width: 100%;
    padding: 1.2em 1.2em 1.2em 3.6em;
    font-size: 1.22rem;
    border-radius: 5em;
    box-shadow: 0 5px 20px 0 rgba(237, 232, 228, 0.8);
    background-color: var(--bc-gray);
    border: 2px solid var(--bc-gray);
    transition: border 0.15s ease-in-out;
}

.form-input:hover,
.form-input:focus {
    border: 2px solid var(--primary);
    outline: none;
}

#form-button {
    font-size: 1.22rem;
}

/* Button */
.button-wrapper {
    margin: 2em 0 1em;
}

.button, .btn-secondary {
    margin: 0;
    width: 100%;
    padding: 1.2em 1.8em;
    text-align: center;
    color: var(--white);
    font-size: var(--button-small);
    background: var(--pace-gradient);
    background-size: 500%;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s, background-position 3s;
}

.button:hover {
    transform: scale(1.1);
    background-position: 100% 50%;
    outline: none;
}

/* Media Rules */
@media only screen and (max-width: 1660px) {
    :root {
        --heading: 3rem;
    }
}

@media only screen and (max-width: 1456px) {
    :root {
        --heading: 2.8rem;
    }
}

@media only screen and (max-width: 1024px) {
    :root {
        --heading: 2.4rem;
    }

    #form {
        width: 85%;
    }
}

@media only screen and (max-width: 756px) {
    :root {
        --heading: 2.2rem;
    }

    #form {
        width: 90%;
    }
}

@media only screen and (max-width: 576px) {
    .form-input-grid {
        grid-template-columns: 1fr;
        grid-row-gap: 1.5em;
    }
}

@media only screen and (max-width: 496px) {
    :root {
        --heading: 1.75rem;
    }
}
