/* ==========================================================================
   base.css — Reset, tipografia base e classes utilitárias
   CASB Segurança Patrimonial
   Propósito: Normaliza estilos entre browsers, define tipografia global
   e fornece classes utilitárias reutilizáveis em todo o projeto.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: var(--text-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

iframe {
  border: none;
  display: block;
}

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: 600; }

p {
  line-height: 1.75;
  color: var(--color-muted);
}

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

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ===== SECTION PADDING ===== */
.section-padding {
  padding: var(--space-24) 0;
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header h2 {
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
  margin: var(--space-3) auto 0;
  border-radius: var(--radius-full);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 580px;
  margin: var(--space-4) auto 0;
  color: var(--color-muted);
}

/* ===== UTILITÁRIOS ===== */
.text-accent  { color: var(--color-accent);  }
.text-accent2 { color: var(--color-accent2); }
.text-muted   { color: var(--color-muted);   }
.text-white   { color: var(--color-white);   }

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

.font-heading { font-family: var(--font-heading); }
.font-bold    { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.d-flex       { display: flex; }
.d-grid       { display: grid; }
.d-none       { display: none; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Acessibilidade — visível apenas para leitores de tela */
.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;
}

/* ===== HIGHLIGHT ===== */
.highlight {
  color: var(--color-accent);
  position: relative;
}

/* ===== DIVIDER ===== */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-8) 0;
}

.divider--accent {
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

/* ===== GLOW TEXT ===== */
.glow-text {
  text-shadow: 0 0 40px var(--color-accent-glow);
}

/* ===== SCROLLBAR CUSTOMIZADO ===== */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--color-bg); }
::-webkit-scrollbar-thumb  { background: var(--color-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ===== SELEÇÃO DE TEXTO ===== */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ===== FOCO ACESSÍVEL ===== */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
