
:root {
    --fundo: #070b14;
    --superficie: #101725;
    --superficie-secundaria: #151f30;
    --borda: #263247;
    --texto: #f5f7fb;
    --texto-secundario: #99a5b8;
    --azul: #c9a45b;
    --azul-claro: #e0c27e;
    --dourado: #d6b36a;
    --dourado-claro: #f0d18d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--fundo);
    color: var(--texto);
    font-family: "DM Sans", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.cabecalho {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--borda);
    background: rgb(7 11 20 / 94%);
    backdrop-filter: blur(16px);

    .cabecalho-conteudo {
        min-height: 78px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
}

.logo {
    color: var(--texto);
    font-family: "Manrope", sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;

    span {
        color: var(--dourado);
    }
}

.navegacao {
    display: flex;
    align-items: center;
    gap: 26px;

    a {
        color: var(--texto-secundario);
        font-size: 0.9rem;
        transition: color 0.2s;

        &:hover {
            color: var(--dourado);
        }
    }

    .botao-voltar {
        padding: 11px 17px;
        border: 1px solid var(--dourado);
        border-radius: 9px;
        color: var(--dourado);
        font-weight: 600;

        &:hover {
            background: var(--dourado);
            color: var(--fundo);
        }
    }
}

.introducao {
    padding: 75px 0 55px;
    border-bottom: 1px solid var(--borda);

    .etiqueta {
        display: inline-block;
        margin-bottom: 20px;
        padding: 8px 13px;
        border: 1px solid rgb(214 179 106 / 30%);
        border-radius: 30px;
        background: rgb(214 179 106 / 8%);
        color: var(--dourado);
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 1.5px;
    }

    h1 {
        margin-bottom: 18px;
        font-family: "Manrope", sans-serif;
        font-size: clamp(2.5rem, 6vw, 4.3rem);
        font-weight: 800;
        letter-spacing: -2px;

        span {
            color: var(--dourado);
        }
    }

    > p {
        max-width: 650px;
        color: var(--texto-secundario);
        font-size: 1.05rem;
        line-height: 1.8;
    }

    .informacoes-documento {
        display: flex;
        flex-wrap: wrap;
        gap: 22px;
        margin-top: 25px;

        span {
            color: var(--texto-secundario);
            font-size: 0.8rem;
        }
    }
}

.documento-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
    gap: 45px;
    padding: 55px 0 80px;
}

.indice {
    position: sticky;
    top: 105px;
    padding: 24px;
    border: 1px solid var(--borda);
    border-radius: 15px;
    background: var(--superficie);

    h2 {
        margin-bottom: 20px;
        font-family: "Manrope", sans-serif;
        font-size: 1rem;
    }

    nav {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    a {
        padding: 10px;
        border-radius: 7px;
        color: var(--texto-secundario);
        font-size: 0.82rem;
        line-height: 1.5;
        transition: 0.2s;

        &:hover {
            background: var(--superficie-secundaria);
            color: var(--dourado);
        }
    }
}

.documento {
    min-width: 0;

    section {
        padding: 0 0 38px;
        margin-bottom: 38px;
        border-bottom: 1px solid var(--borda);
        scroll-margin-top: 110px;

        &:last-of-type {
            margin-bottom: 0;
        }

        .numero {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 37px;
            height: 37px;
            margin-bottom: 15px;
            border: 1px solid rgb(214 179 106 / 35%);
            border-radius: 10px;
            background: rgb(214 179 106 / 8%);
            color: var(--dourado);
            font-family: "Manrope", sans-serif;
            font-size: 0.8rem;
            font-weight: 800;
        }

        h2 {
            margin-bottom: 20px;
            font-family: "Manrope", sans-serif;
            font-size: 1.55rem;
            font-weight: 800;
            letter-spacing: -0.5px;
        }

        p {
            margin-bottom: 15px;
            color: var(--texto-secundario);
            font-size: 0.95rem;
            line-height: 1.9;
        }

        ul {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin: 18px 0 20px;
            padding-left: 22px;

            li {
                padding-left: 5px;
                color: var(--texto-secundario);
                font-size: 0.93rem;
                line-height: 1.8;

                &::marker {
                    color: var(--dourado);
                }
            }
        }

        a {
            color: var(--dourado);
            text-decoration: underline;
            text-underline-offset: 4px;

            &:hover {
                color: var(--dourado-claro);
            }
        }
    }

    .contato-documento {
        margin-top: 25px;
        padding: 24px;
        border: 1px solid var(--borda);
        border-radius: 12px;
        background: var(--superficie);

        h3 {
            margin-bottom: 8px;
            color: var(--dourado);
            font-family: "Manrope", sans-serif;
            font-size: 0.95rem;
        }

        p {
            margin-bottom: 20px;

            &:last-child {
                margin-bottom: 0;
            }
        }
    }
}

.aviso-final {
    margin-top: 35px;
    padding: 24px;
    border: 1px solid rgb(214 179 106 / 30%);
    border-radius: 12px;
    background: rgb(214 179 106 / 7%);

    p {
        color: var(--dourado-claro);
        font-size: 0.93rem;
        line-height: 1.8;
    }
}

.acoes-documento {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;

    .botao-principal,
    .botao-imprimir {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 0 22px;
        border: 1px solid var(--dourado);
        border-radius: 9px;
        font-size: 0.9rem;
        font-weight: 700;
        transition: 0.2s;
    }

    .botao-principal {
        background: var(--dourado);
        color: var(--fundo);

        &:hover {
            background: var(--dourado-claro);
        }
    }

    .botao-imprimir {
        background: transparent;
        color: var(--dourado);

        &:hover {
            background: rgb(214 179 106 / 10%);
        }
    }
}

.rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px max(20px, calc((100% - 1180px) / 2));
    border-top: 1px solid var(--borda);

    p {
        color: var(--texto-secundario);
        font-size: 0.8rem;
    }

    > div {
        display: flex;
        flex-wrap: wrap;
        gap: 18px;

        a {
            color: var(--texto-secundario);
            font-size: 0.8rem;

            &:hover {
                color: var(--dourado);
            }
        }
    }
}

@media (max-width: 900px) {
    .documento-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .indice {
        position: static;

        nav {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100% - 28px, 500px);
    }

    .cabecalho {
        .cabecalho-conteudo {
            min-height: 70px;
        }
    }

    .logo {
        font-size: 1.35rem;
    }

    .navegacao {
        gap: 12px;

        > a:first-child {
            display: none;
        }

        .botao-voltar {
            padding: 9px 11px;
            font-size: 0.78rem;
        }
    }

    .introducao {
        padding: 55px 0 35px;

        h1 {
            letter-spacing: -1px;
        }

        > p {
            font-size: 0.93rem;
        }

        .informacoes-documento {
            gap: 10px;
            flex-direction: column;
        }
    }

    .documento-layout {
        padding: 35px 0 55px;
    }

    .indice {
        padding: 18px;

        nav {
            grid-template-columns: 1fr;
        }
    }

    .documento {
        section {
            padding-bottom: 28px;
            margin-bottom: 28px;

            h2 {
                font-size: 1.3rem;
            }

            p,
            ul li {
                font-size: 0.9rem;
            }
        }
    }

    .acoes-documento {
        flex-direction: column;

        a,
        button {
            width: 100%;
        }
    }

    .rodape {
        flex-direction: column;
        align-items: flex-start;
        padding: 25px 20px;

        > div {
            flex-direction: column;
            gap: 10px;
        }
    }
}

@media print {
    body {
        background: white;
        color: black;
    }

    .cabecalho,
    .indice,
    .rodape,
    .acoes-documento {
        display: none !important;
    }

    .container {
        width: 100%;
    }

    .introducao {
        padding: 20px 0;
    }

    .documento-layout {
        display: block;
        padding: 20px 0;
    }

    .documento {
        section {
            break-inside: avoid;
            border-color: #ddd;

            p,
            li {
                color: #333;
            }

            h2 {
                color: black;
            }
        }
    }

    .aviso-final {
        border-color: #999;
        background: white;

        p {
            color: black;
        }
    }
}
