/* Variáveis CSS */
:root {
    /* Paleta de cores */
    /* Obtida de: https://www.iamsajid.com/ui-colors/ */
    --bg-dark: hsl(211 86% 91%);
    --bg: hsl(211 100% 96%);
    --bg-light: hsl(211 100% 100%);
    --text: hsl(220 100% 7%);
    --highlight: hsl(211 100% 100%);
    --border: hsl(211 30% 52%);
    --border-muted: hsl(211 41% 64%);
    --primary: hsl(208 74% 28%);
    --danger: hsl(9 28% 41%);
    --info: hsl(217 30% 42%);

    /* Medidas padrão */
    --border-radius: 16px;

    --space-single: 8px;
    --space-double: 16px;
    --space-triple: 24px;
    --space-quadruple: 32px;
}

/* Utilitários Flex */
.flex {
    display: flex;
}

.row {
    flex-direction: row;
}

.column {
    flex-direction: column;
}

.wrap {
    flex-wrap: wrap;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-single {
    gap: var(--space-single);
}

.gap-double {
    gap: var(--space-double);
}

.gap-triple {
    gap: var(--space-triple);
}

.gap-quadruple {
    gap: var(--space-quadruple);
}

.container {
    margin: 0 auto;
    padding: var(--space-double);
    max-width: 1200px;
}

/* Outros utilitários */
.border-default {
    border: 3px solid var(--border-muted);
    border-top: 3px solid var(--highlight);
    border-radius: var(--border-radius);
}

.shadow-default {
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.24);
}

.flat-block {
    background-color: var(--bg-dark);
    border-radius: var(--border-radius);
    padding: var(--space-double);
}

.cta {
    display: block;
    background-color: var(--primary);
    padding: 16px 64px;
    border-radius: var(--border-radius);
    width: fit-content;
    color: var(--highlight);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
}

.cta:hover {
    background-color: var(--border);
    color: var(--highlight);
    transition: all 0.3s ease-in-out;
}

/* Estilos gerais*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*:focus {
    outline-offset: var(--space-single);
    outline-color: var(--info);
}

body {
    background-color: var(--bg);

    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-size: 18px;
}

p {
    line-height: 2;
    max-width: 65ch;
    color: var(--text);
}

h1,
h2,
h3 {
    color: var(--primary);
}

h1 {
    font-size: 40px;
}

h2 {
    font-size: 32px;
    text-align: center;
}

/* Header */

header {
    justify-content: space-between;
}

header > nav > ul {
    list-style-type: none;
    background-color: var(--bg-dark);
    padding: 8px 32px;
    border-radius: calc(var(--border-radius) * 2);
}

header > nav > ul > li > a {
    display: inline-block;
    padding: var(--space-single);
    color: var(--primary);
}

header > nav > ul > li > a:hover {
    transform: translateY(-3px);
    transition: transform 0.2s ease-in-out;
    color: var(--border-muted);
}

.logotipo {
    font-size: 40px;
    font-weight: 900;
    color: var(--primary);
    text-shadow:
        var(--border) 2px 2px 0px,
        var(--border) -2px 2px 0px,
        var(--highlight) -2px -2px 0px,
        var(--border) 2px -2px 0px;
}

/* Seção Destaque */
.hero {
    background: HSL(211 86% 91%);
    background: linear-gradient(
        0deg,
        rgba(212, 231, 252, 1) 0%,
        rgba(255, 255, 255, 1) 100%
    );
    padding: var(--space-double);
    margin-top: var(--space-double);
    position: relative;
    height: 500px;
    justify-content: space-evenly;
}

.hero > p {
    line-height: 2.5;
    max-width: 55ch;
}

.hero > * {
    z-index: 2;
}

.img-relativa {
    position: absolute;
    top: -16px;
    right: -50px;
    z-index: 1;
    -webkit-filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.24));
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.24));
}

/* Seção Sobre */
.sobre-row:nth-child(odd) {
    flex-direction: row-reverse;
}

.sobre-row > * {
    min-width: 0px;
    flex: 1 1 100px;
}

.sobre-row > img {
    border: 3px solid var(--border-muted);
    border-top: 3px solid var(--highlight);
    border-radius: var(--border-radius);
    width: 100%;
    height: auto;
}

.credencial {
    text-align: center;
    padding: var(--space-double);
    background-color: var(--bg);
    font-size: 20px;
    width: fit-content;
    margin: 0 auto;
}

.credencial > span {
    color: var(--primary);
    font-size: 24px;
    font-weight: bold;
}

/* Seção Serviços */
.card {
    justify-content: flex-start;
    padding: var(--space-double);
    aspect-ratio: 9 / 10;
    background-color: var(--bg-dark);
}

.card > p,
.card > a {
    font-size: 16px;
    max-width: 30ch;
}

.card-icon-container {
    background-color: var(--bg-light);
    padding: var(--space-double);
    border: 2px solid var(--border-muted);
    border-radius: var(--border-radius);
}

.card .cta {
    padding: 16px 32px;
    font-weight: 500;
}

/* Seção Contato */
form > button {
    margin: 0 auto;
    font-size: 18px;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.form-column {
    align-items: flex-start;
    padding: var(--space-double);
}

.form-column:not(:last-child) {
    border-right: 1px solid var(--border);
}

fieldset {
    width: fit-content;
    padding: var(--space-single);
}

input {
    font-size: 18px;
}

span:has(input[type="radio"]) {
    display: inline-flex;
    flex-direction: row;
    gap: var(--space-single);
    margin-right: var(--space-single);
}

#consentimento-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    font-size: 16px;
    gap: var(--space-single);
}

#consentimento-container input {
    width: fit-content;
}

.form-error {
    font-size: 16px;
    color: var(--danger);
}

#spinner {
    animation: rotate 0.5s linear infinite;
    width: 50px;
    height: auto;

    display: none;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    margin-top: var(--space-quadruple);
    background-color: var(--info);
    border-radius: var(--border-radius);
    padding: var(--space-double);
}

.footer > p {
    text-align: center;
    color: var(--highlight);
    max-width: none;
}

.footer > a {
    color: var(--bg-light);
}

/* Responsividade */
@media screen and (max-width: 768px) {
    /* Header */
    .header-query {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    /* Seção Sobre */
    .sobre-row {
        flex-direction: column;
    }

    .sobre-row:nth-child(odd) {
        flex-direction: column;
    }

    /* Seção Serviços */
    .servicos-query {
        gap: var(--space-double);
    }

    /* Seção Contato */
    input {
        width: 100%;
    }
}

@media screen and (min-width: 480px) and (max-width: 1023px) {
    /* Seção Destaque */
    .img-relativa {
        opacity: 0.2;
        top: 0px;
        right: 0px;
    }
}

@media screen and (max-width: 480px) {
    /* Header */
    header > nav > ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Seção Destaque */
    .hero {
        height: 100%;
    }

    .img-relativa {
        display: none;
    }

    /* Seção Contato */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-column:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}
