@charset "utf-8";

main {
    padding: 0 20px;
}

.contactform {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px;
}

.contactform__title {
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 40px;
}

form {
    max-width: 920px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: 15px;
}
.inline-group {
    display: flex;
    align-items: center;
    gap: 24px;
}
.inline-group div {
    width: 50%;
}
.required-label {
    color: red;
    margin-left: -0.7em;
    margin-top: -1em;
}
.optional-label {
    background-color: gray;
    color: white;
    padding: 2px 5px;
    font-size: 12px;
    margin-right: 5px;
    display: inline-block;
    width: 40px;
    text-align: center;
}
label {
    margin-bottom: 4px;
}
.name-label {
    background-color: #000;
    color: #fefefe;
    padding: 4px 40px;
    margin-bottom: 8px;
    display: inline-block;
}
input, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #666;
    box-sizing: border-box;
}

.button {
    display: block;
    width: 200px;
    margin: 40px auto 8px;
    background-color: #fff;
    color: #000;
    padding: 16px 32px;
    border: 1px solid #000;
    position: relative;
    transition: all 0.3s ease-out;
    overflow: hidden;
    box-shadow: 8px 8px 0px 0 rgb(0, 0, 0);
}

.button::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    border: 1px solid #000;
    box-shadow: 8px 8px 0px 0 rgb(0, 0, 0);
    top: 0;
    left: 0;
    transition: all 0.3s ease-out;
}

.button:hover::before {
    transform: translate(12px, 12px);
    opacity: 0;
}

.button:hover {
    transform: translate(-4px, -4px);
    box-shadow: none;
    background-color: #FE53BB;
    color: #000;
}

#privacy {
    width: 40px;
}

.privacy-group {
    text-align: center;
    margin-top: 48px;
}

.privacy-group label a:hover {
    color: #393939;
}

.policy {
    max-width: 640px;
    height: 240px;
    margin: 0 auto 64px;
    border: 1px solid #333;
    padding: 20px;
    overflow: scroll;
    font-size: 80%;
}
.policy h2,
.policy h3,
.policy p {
    margin-bottom: 8px;
}
.policy ul {
    list-style-type: disc;
    padding-left: 1em;
    margin-bottom: 8px;
}

@media screen and (max-width: 428px) {
    .contactform {
        padding: 24px 8px;
    }
    
    .contactform__title {
        font-size: 18px;
        margin-bottom: 24px;
    }
    
    .inline-group {
        display: flex;
        flex-direction: column;
        align-items: start;
        gap: 0px;
    }
    .inline-group div {
        width: 100%;
    }
    .inline-group div:first-child {
        margin-bottom: 16px;
    }
    
    .name-label {
        padding: 4px 24px;
        font-size: 14px;
        margin-top: 12px;
        margin-bottom: 4px;
    }
    
    .button {
        width: 144px;
        margin: 24px auto 8px;
        padding: 16px 24px;
    }
    
    #privacy {
        width: 24px;
        transform: translateY(1px) translateX(4px);
    }
    
    .privacy-group {
        text-align: center;
        margin-top: 48px;
        font-size: 14px;
    }
    
    .privacy-group label a:hover {
        color: #393939;
    }

    .policy {
        height: 160px;
    }
}