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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--white);
  background: var(--bg-deep);
  overflow-x: hidden;
}

/* Fundo estático: grafo irregular + bolinhas — canvas em ambient.js */
.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.circuit-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.52;
}

.page-home .circuit-canvas {
  opacity: 0.62;
}

/* Não incluir .site-header aqui: z-index: 1 empata com main (mesmo valor → main por cima)
   e anula o z-index do header, escondendo o menu mobile (fixed) atrás do conteúdo. */
body > .noise,
body > main,
body > .site-footer {
  position: relative;
  z-index: 1;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--white);
}

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

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.narrow {
  max-width: 720px;
  margin-inline: auto;
}

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

.text-gold {
  color: var(--gold-bright);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}
