/* =====================================================
   RESET GLOBAL
   Remove margens e paddings padrão dos navegadores
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

html {
    background: #050505;
}

/* =====================================================
   CONFIGURAÇÕES GERAIS DO SITE
===================================================== */

html,
body {
    height: 100%;
}

/* Corpo principal do site */

body {
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    position: relative;
    background-color: #050505;

    /* Fundo escuro estrelado */
    background:
        radial-gradient(circle at top left, rgba(124, 140, 255, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(147, 51, 234, 0.08), transparent 28%),
        #050505,
        url("../images/estrelas.png") center center / cover no-repeat fixed;

    color: #e2e8f0;

    /* Espaço para compensar navbar fixa */
    padding-top: 70px;

    /* Permite footer ficar no final da página */
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Fundo animado de código subindo */
.codigo-fundo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    opacity: 0.16;
}

.codigo-fundo span {
    position: absolute;
    display: block;
    color: #7c8cff;
    /* Ajusta automaticamente o tamanho das linhas de código para diferentes larguras */
    font-size: clamp(0.75rem, 3vw, 1rem);
    white-space: nowrap;
    animation: subirCodigo 18s linear infinite;
}

.codigo-fundo span:nth-child(1) {
    left: 8%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.codigo-fundo span:nth-child(2) {
    left: 25%;
    animation-delay: 3s;
    animation-duration: 18s;
}

.codigo-fundo span:nth-child(3) {
    left: 42%;
    animation-delay: 6s;
    animation-duration: 14s;
}

.codigo-fundo span:nth-child(4) {
    left: 60%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.codigo-fundo span:nth-child(5) {
    left: 78%;
    animation-delay: 5s;
    animation-duration: 17s;
}

.codigo-fundo span:nth-child(6) {
    left: 12%;
    animation-delay: 8s;
    animation-duration: 22s;
}

.codigo-fundo span:nth-child(7) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 19s;
}

.codigo-fundo span:nth-child(8) {
    left: 32%;
    animation-delay: 10s;
    animation-duration: 21s;
}

@keyframes subirCodigo {
    0% {
        transform: translateY(110vh);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-20vh);
        opacity: 0;
    }
}

/* Garantir que conteúdo fique acima da camada animada */
body > * {
    position: relative;
    z-index: 1;
}

/* =====================================================
   CONFIGURAÇÃO PADRÃO DE IMAGENS
===================================================== */

img {
    max-width: 100%;
    height: auto;
}

/* Apenas para textos de acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
