/* ========================================================================
   Base: reset, tipografia e o fundo do site.
   ======================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altura-topo) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fundo);
  color: var(--texto-2);
  font-family: var(--fonte-texto);
  font-size: var(--t-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* O fundo: uma grade fina e um brilho ciano no alto, fixos atrás de tudo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 30rem at 50% -10%, rgba(34, 211, 238, 0.09), transparent 70%),
    radial-gradient(40rem 26rem at 100% 40%, rgba(167, 139, 250, 0.05), transparent 70%),
    linear-gradient(rgba(148, 178, 204, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(148, 178, 204, 0.035) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 60%, transparent 100%);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--texto);
  font-family: var(--fonte-titulo);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

strong,
b {
  color: var(--texto);
  font-weight: 600;
}

::selection {
  background: rgba(34, 211, 238, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--marca);
  outline-offset: 3px;
  border-radius: 6px;
}

.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pular-conteudo {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--marca);
  color: #04131a;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--rapido) var(--ease);
}

.pular-conteudo:focus {
  transform: none;
}

/* Barra de rolagem discreta */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--fundo);
}
::-webkit-scrollbar-thumb {
  background: var(--superficie-3);
  border: 2px solid var(--fundo);
  border-radius: 10px;
}

/* Quem pede menos movimento não vê animação */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
