* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    font-family: "Poppins", sans-serif;
}

body {
    width: 100%;
    min-height: 100vh;
}

/* Tirando o list das ul */
ul {
    list-style: none;
}

/* PARTE HEADER DA PÁGINA */
header {
    width: 100%;
    height: 4rem;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
}

header nav {
    display: flex;
    justify-content: center;
    height: 100%;
}

header .list-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

.list-nav a {
    text-decoration: none;
    color: #000000;
    font-size: 0.9rem;
}

.list-nav a:hover {
    color: blueviolet;

    transition: color 1s;
}

/* Parte principal da página - formulário */
 
/* Visualmente oculto mas lido por leitores de tela */
.data-contact {
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
}
 
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;

    padding: 3rem 4rem 0;
    width: 100%;
}
 
.header-main p {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.header-main em {
    color: #6753c0;
}
 
.header-main p::before {
      content: '';
      display: inline-block;
      width: 24px;
      height: 1px;
      background: #6753c0;
}
 
.header-main h2 {
    font-family: 'poppins', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
}

.section-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 40%;
    margin-bottom: 2rem;
}

.section-form h2 {
    font-family: 'poppins', serif;
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 500;
}
 
.form-card {
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 2rem;
}

fieldset {
    border: none;
}
 
/* Banners de status com role="alert" */
[role="alert"] {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 15px;

    padding: 14px 16px;
    margin-bottom: 1rem;

    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    animation: slideDown 1s ease;
}
 
[role="alert"].success {
    background: #6753c018;
    border: 1px solid rgba(109,185,138,0.3);
    color: rgb(40, 102, 16);
}

[role="alert"].error {
    background: #ff00008a;
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: rgb(255, 255, 255);
}
 
[role="alert"] svg { flex-shrink: 0; }
 
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
 
.field-group {
    margin-bottom: 1rem;
}
 
label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 8px;
    transition: color 0.2s;
    cursor: pointer;
}
 
/* Muda a cor do texto quando está em foco */
.field-group:focus-within label {
    color: #6753c0;
}
 
/* Indicador de campo obrigatório via <abbr> */
label abbr {
    text-decoration: none;
    color: red;
    margin-left: 2px;
}
 
input, textarea {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 300;
    padding: 14px 16px;
    outline: none;
}
 
input::placeholder, textarea::placeholder {
    color: #3d3a35;
}
 
input:focus, textarea:focus {
    border-color: #6753c0;
    box-shadow: 0 0 0 3px rgba(103, 83, 192, 0.1);
}
/* Estado inválido controlado por aria-invalid */
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: red;
    box-shadow: 0 0 0 3px rgba(224,112,112,0.1);
}
 
.field-error {
    font-size: 12px;
    color: red;
    margin-top: 6px;
    display: none;
}
 
textarea {
    min-height: 130px;
    resize: none;
}
 
.btn-submit {
    width: 100%;
    padding: 15px;
    background: #6753c036;
    border: none;
    border-radius: 5px;
    color: #0f0e0d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 0.5rem;
}
 
.btn-submit:hover { opacity: 0.7; }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:focus-visible {
    outline: 2px solid #6753c0;
    outline-offset: 3px;
}


/* Rodapé da página */
footer {
    font-size: 13px;

    width: 100%;
    height: 2rem;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


@media (max-width: 900px) {
    body {
        width: 100%;
    }

    header {
        height: auto;
        padding: 1rem 0;
    }

    header .list-nav {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    main {
        padding: 2rem;
    }

    .section-form {
        width: 70%;
    }
}

@media (max-width: 600px) {
    header .list-nav {
        gap: 1rem;
        padding: 0 1rem;
    }

    .list-nav a {
        font-size: 0.8rem;
    }

    main {
        padding: 1.5rem 2rem;
        gap: 1.5rem;
    }

    .header-main p {
        font-size: 11px;
        align-items: flex-start;
    }

    .section-form {
        width: 100%;
    }

    .form-card {
        padding: 1.2rem;
    }

    input,
    textarea {
        font-size: 13px;
        padding: 12px 14px;
    }

    [role="alert"] {
        font-size: 12px;
        align-items: flex-start;
    }

    footer {
        height: auto;
        padding: 1rem;
        text-align: center;
        gap: 0.3rem;
    }
}