@font-face {
    font-family: 'amble';
    src: url('fonts/amble-regular-webfont.woff2') format('woff2'),
         url('fonts/amble-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
  
  }
  
@font-face {
    font-family: 'quicksand';
    src: url('fonts/quicksand-regular-webfont.woff2') format('woff2'),
         url('fonts/quicksand-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
  }

*, *::before, *::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    line-height: 1.5;
}

:root {
    --clr-one: #F5F5F5;
    --clr-two: #FAFAFA;
    --clr-three: #ECECEC;
    --clr-four: #DEDEDE;
    --clr-five: #D4D4D4;

    --padding-vertical: 2rem;
    --padding-hori: 3.5rem;
}

body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    font-family: "quicksand";
    background-color: var(--clr-three);
}

h1 {
    text-align: center;
    position: relative;
    width: 100%;
    overflow: hidden;
}

h1::after, h1::before {
    content: "";
    position: absolute;
    height: 1px;
    width: 25%;
    top: 50%;
    background-color: black;
    --line-width: 25%;
    --space: 2%;
} 

h1::before {
    margin-left: calc(-1 * (var(--line-width) + var(--space))); 
}

h1::after {
    margin-left: var(--space);
}

img {
    width: auto;
    height: 100vh;
}

.top {
    flex: 1;
    padding-top: var(--padding-vertical);
}

.top > p {
    padding: 1.2em;
}

.form {
    min-height: 240px;
    background-color: var(--clr-one);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5%;
    flex: 2;
    padding: var(--padding-vertical) var(--padding-hori);
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.2);
    align-items: center;
}

form {
    width: 100%;
    height: 80%;
    gap: 20%;   
    display: flex;
    flex-direction: column;
}

h2 {
    width: 100%;
    position: relative;
}

h2::before, h2::after {
    content: "";
    position: absolute;
    background-color: var(--clr-four);
    height: 2rem;
}

h2::before {
    width: var(--padding-hori);
    margin-left: calc(-1 * var(--padding-hori));
}

h2::after {
    width: 100%;
}

.bottom {
    flex: 1;
}

.form-container {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.row {
    display: flex;
    justify-content: flex-start;
    align-self: flex-start;
    height: 100%;
    gap: max(50px, 15%);
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: center;
}

input {
    appearance: none;
    border: 0.05px solid var(--clr-five);
    border-radius: 5px;
    box-shadow: 3px 3px 3px 3px rgb(0,0,0,0.2);
    padding: 0.35em;
}

input:focus {
    outline: none;
}

input:hover, button:hover {
    transform: translate(-1.5px,-1.5px);
    box-shadow: 5px 5px 3px 2px rgb(0,0,0,0.3);
}

input.valid, input:valid {
    border: 1px solid green;
}

input.invalid, input:invalid {
    border: 1px solid red;
}

#phone {
    border: 1px solid #F0C200;
}

button {
    all: unset;
    margin: var(--padding-vertical) var(--padding-hori);
    margin-right: 1em;
    width: clamp(75px, 10%, 120px);
    height: 15%;
    box-shadow: 2px 2px 2px 2px rgb(0,0,0,0.2);
    color: white;
    background-color: #058494;
    text-align: center;
    border-radius: 5px;
    border: 0.1px solid #002e34;
    padding: 0.8em;
}

button:hover {
    box-shadow: 3.5px 3.5px 2px 2px rgb(0,0,0,0.35);
}

.bottom {
    display: flex;
    align-items: center;
}

.error {
    position: absolute;
    top: 100%;
    width: 100%;
    font-weight: 900;
    transform: scale(0);
    font-size: 0.75em;
    padding: 0.2em;
    color: red;
    transition: transform 0.1s ease-in-out;
}


.error.inactive {
    transform: scale(0);
}

.error.active {
    transform: scale(1);
}

.error::before {
    content: url(danger.svg);
    vertical-align: middle;    
    filter: invert(31%) sepia(96%) saturate(7332%) hue-rotate(356deg) brightness(100%) contrast(123%);
    padding: 1px 3px;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-7px); }
    50% { transform: translateX(7px); }
    75% { transform: translateX(-7px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.35s ease-in-out;
}

