/* =============================================================================
   Base tipográfica, empilhamento das camadas e layout de página
   ========================================================================== */

body {
    background-color: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---- Empilhamento -------------------------------------------------------- */

/*
   O fundo saiu de body::before/::after e virou elemento: .fx (chuva, grid,
   brilho, raios) e .fx-over (scanline, grão, vinheta, flash), ambos em
   css/glitch.css. Com camada de verdade, a ordem é explícita —

     .fx        z-index 0
     conteúdo   z-index 1     ← esta regra
     header     z-index 100
     .fx-over   z-index 200
     overlay    z-index 300

   — em vez de depender de como o navegador propaga o background do body para
   a tela e de onde os z-index negativos caem nessa conta.
*/
main,
.site-footer {
    position: relative;
    z-index: 1;
}

::selection {
    background: var(--color-pink);
    color: var(--color-black);
}

/* ---- Tipografia --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    margin: 0;
    color: var(--color-white);
}

h1 {
    font-size: var(--fs-h1);
    line-height: var(--lh-h1);
    font-weight: 800;
    letter-spacing: -.02em;
}

h2 {
    font-size: var(--fs-h2);
    line-height: var(--lh-h2);
    font-weight: 700;
    letter-spacing: -.015em;
}

h3 {
    font-size: var(--fs-h3);
    line-height: var(--lh-h3);
    font-weight: 700;
}

h4 {
    font-size: var(--fs-h4);
    line-height: var(--lh-h4);
    font-weight: 600;
}

p {
    margin: 0 0 var(--lh-body);
}

p:last-child {
    margin-bottom: 0;
}

strong {
    font-weight: 600;
    color: var(--color-white);
}

a {
    color: var(--color-pink);
    transition: color var(--transition);
}

a:hover {
    color: var(--color-pink-neon);
}

.text-muted-rosathon {
    color: var(--color-gray);
}

.text-light-rosathon {
    color: var(--color-gray-light);
}

.text-pink {
    color: var(--color-pink);
}

/* Toda etiqueta pequena da interface virou monoespaçada: é a peça que carrega
   a leitura de console para dentro das telas de conteúdo. */
.small-caps {
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    line-height: var(--lh-small);
    letter-spacing: var(--tracking-mono);
    text-transform: uppercase;
    color: var(--color-gray);
    font-weight: 600;
}

/* ---- Layout ------------------------------------------------------------- */

.container-rosathon {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 575px) {
    .container-rosathon {
        padding: 0 20px;
    }
}

.section {
    padding: var(--section-gap) 0;
}

.section--tight {
    padding: calc(var(--section-gap) * .6) 0;
}

/*
   Faixa de contraste. Agora tem uma segunda função: o painel é opaco e a chuva
   de código não passa por ele. As seções alternam entre trecho com chuva e
   trecho limpo, e é nos limpos que fica o texto mais longo.
*/
.section--panel {
    position: relative;
    background: var(--color-black-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

/* Filete de energia na borda de cima do painel. */
.section--panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--border-matrix-faint) 20%,
            var(--border-pink) 50%,
            var(--border-matrix-faint) 80%,
            transparent);
    pointer-events: none;
}

.section-head {
    max-width: 720px;
    margin-bottom: 56px;
}

.section-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-head p {
    color: var(--color-gray-light);
    margin-top: 20px;
}

/*
   A etiqueta de seção é o prompt do terminal. Era um traço de 28px seguido de
   texto em caixa alta; virou "> comando" em monoespaçada, com o sinal em verde
   e o nome em rosa.
*/
.section-label {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    letter-spacing: var(--tracking-mono);
    text-transform: uppercase;
    color: var(--color-pink);
    font-weight: 700;
    margin-bottom: 18px;
}

.section-label::before {
    content: '>';
    color: var(--color-matrix);
    font-weight: 400;
}

/* Cursor piscando no fim do prompt. */
.section-label::after {
    content: '';
    width: .5em;
    height: 1em;
    background: var(--color-matrix);
    opacity: .8;
    animation: cursor-blink 1.05s steps(1, end) infinite;
}

.section-head--center .section-label {
    justify-content: center;
}

/* ---- Marca em texto ----------------------------------------------------- */

/*
   O wordmark é texto HTML, não imagem: aproveita a Sora carregada, fica nítido
   em qualquer densidade de tela e é lido por leitor de tela sem alt.
*/
.wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}

.wordmark__rosa {
    color: var(--color-pink);
}

.wordmark__thon {
    color: var(--color-gray);
}

/* Sobre fundo rosa (botão) a marca precisa virar monocromática. */
.wordmark--mono .wordmark__rosa,
.wordmark--mono .wordmark__thon {
    color: inherit;
}

/* ---- Utilitários -------------------------------------------------------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}
