/* ================================================================
   BASE.CSS — Reset, tipografia, utilitários e grain overlay
   Fundação visual do projeto LNK-SINGUS
   ================================================================ */

/* Importa os tokens do design system */
@import './tokens.css';

/* ── Reset minimalista ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Body principal ── */
body {
  background: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: var(--fonte-ui);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Grain texture overlay via body::after ──
   SVG com feTurbulence gera textura noise sutil
   z-index alto garante que fique acima de tudo,
   pointer-events: none evita bloqueio de interação */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* ── Container centralizado ── */
.container {
  width: 100%;
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: 0 var(--espaco-xl);
}

/* Variante estreita para conteúdo de leitura */
.container--estreito {
  max-width: var(--largura-estreita);
}

/* ── Tipografia base ── */

/* Headings usam Cormorant Garamond (display) */
h1, h2, h3, h4 {
  font-family: var(--fonte-display);
  font-weight: 400;
  line-height: 1.2;
}

/* Tamanhos responsivos via clamp */
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

/* Parágrafos usam Raleway (UI) */
p { font-family: var(--fonte-ui); }

/* Código e elementos monospace usam JetBrains Mono */
code, pre, .mono { font-family: var(--fonte-mono); }

/* Links */
a {
  color: var(--cor-acento);
  text-decoration: none;
  transition: color var(--transicao-rapida);
}

a:hover { color: var(--cor-acento-hover); }

/* ── Scrollbar customizada (webkit) ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cor-fundo); }
::-webkit-scrollbar-thumb {
  background: rgba(200, 169, 110, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(200, 169, 110, 0.5); }

/* ── Seleção de texto ── */
::selection {
  background: rgba(200, 169, 110, 0.25);
  color: var(--cor-texto);
}

/* ── Utilitários gerais ── */

/* Esconde elemento por completo */
.oculto { display: none !important; }

/* Esconde visualmente mas mantém acessibilidade */
.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Cores de conveniência */
.texto-acento { color: var(--cor-acento); }
.texto-suave  { color: var(--cor-texto-suave); }
.texto-centro { text-align: center; }

/* Separador decorativo dourado */
.separador {
  width: 60px;
  height: 1px;
  background: var(--cor-acento);
  opacity: 0.6;
  margin: var(--espaco-lg) 0;
}

/* Variante centralizada do separador */
.separador--centro {
  margin-left: auto;
  margin-right: auto;
}
