/* ============================================================
   SODOMA — Base / Reset / Layout primitives
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark; /* força UI nativa escura */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text-200);
  /* Conteúdo do site não é selecionável — só comandos (<code>) podem ser copiados. */
  user-select: none;
  -webkit-user-select: none;
  background-color: var(--bg-900);
  background-image:
    var(--grad-glow),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Camada animada de fundo (flat 2D) — preenchida por js/modules/background.js */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-100);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--accent);
  color: #fff;
}

kbd {
  font-family: var(--font-head);
  font-size: 0.85em;
  font-weight: 600;
  padding: 0.12em 0.45em;
  border-radius: 6px;
  background: var(--bg-600);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  color: var(--text-100);
}

code {
  font-family: var(--font-head);
  background: rgba(58, 208, 122, 0.1);
  border: 1px solid rgba(58, 208, 122, 0.32);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  color: var(--success);
  /* Comandos são o único conteúdo copiável do site. */
  user-select: text;
  -webkit-user-select: text;
}

/* Campos de formulário continuam selecionáveis (entrada do usuário). */
input, textarea, select { user-select: text; -webkit-user-select: text; }

/* Scrollbar dark */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-800); }
::-webkit-scrollbar-thumb {
  background: var(--bg-500);
  border-radius: var(--r-pill);
  border: 2px solid var(--bg-800);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section {
  padding-block: var(--sp-9);
  position: relative;
}

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--sp-7);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: var(--sp-3);
}

.section__title { margin-bottom: var(--sp-3); }
.section__sub { color: var(--text-300); font-size: var(--fs-lg); }

/* --- Utilitários --- */
.u-accent { color: var(--accent-bright); }
.u-gold { color: var(--gold-soft); }
.u-center { text-align: center; }
.u-hidden { display: none !important; }
.u-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;
}

.surface {
  background: var(--grad-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
