.contacts-intro {
position: relative;
width: min(40rem, var(--container-width));
aspect-ratio: 225 / 82;
color: var(--text);
font-size: 1.5rem;
text-align: center;
z-index: 1;
}

.contacts-intro::before {
content: "";
position: absolute;
inset: 0;
background-image: url('/images/adamo.svg');
background-repeat: no-repeat;
background-position: center bottom;
background-size: 90%;
opacity: 0.75;
pointer-events: none;
z-index: 0;
}

.contacts-form {
width: var(--container-width);
display: flex;
flex-direction: column;
justify-content: center;
}

.contacts-form fieldset {
width: 100%;
border: none;
margin: 2rem 0;
padding: 0;
}

.contacts-form legend {
width: 100%;
display: block;
font-size: 1.25rem;
color: var(--text-muted);
margin-bottom: 1.5rem;
}

.contacts-form-row {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 1rem;
}

.contacts-form-row label {
flex: 0 0 25%;
}

.flex-max {
flex: 1;
min-width: 0;
}

.flex-mid {
flex: 0 0 40%;
min-width: 0;
}

.contacts-form-submit {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 1rem;
margin-top: 1rem;
}

.form-sub1 {
flex: 3;
}

.form-sub2 {
flex: 1;
}

form:invalid button[type="submit"] {
opacity: 0.5;
pointer-events: none;
}

input,
textarea,
button {
padding: 0.25rem;
border: 1px solid var(--border);
border-radius: 0.25rem;
transition: all 0.2s ease;
}

input:required:invalid,
textarea:required:invalid {
border-color: var(--border);
background-color: var(--surface-alt);
}

input:required:valid,
textarea:required:valid {
border-color: var(--primary);
background-color: var(--surface);
}

.contacts-social {
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
gap: 0.75rem 2rem;
}

@media (max-width: var(--media-width)) {

.contacts-form-row {
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
margin-bottom: 1rem;
}

.contacts-form-row label {
width: 100%;
}

.flex-max {
width: 100%;
min-width: 0;
}

.flex-mid {
width: 50%;
min-width: 0;
}

}
