/* ========================================================================
   NOVRA CONSULTORIA · BASE STYLES v1.0
   Reset + tipografia global + estruturas fundamentais
   Depende de: tokens.css
   ======================================================================== */


/* ====================================================================
   01 · RESET MODERNO
   ==================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* compensa header fixo */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Mídia · imagens, vídeos, SVGs */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Formulários · herdar tipografia */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Links · reset semântico */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

/* Listas · reset onde precisar */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Seleção de texto · identidade NOVRA */
::selection {
  background-color: var(--color-azure);
  color: var(--color-bone);
}

::-moz-selection {
  background-color: var(--color-azure);
  color: var(--color-bone);
}

/* Foco visível · acessibilidade */
:focus-visible {
  outline: 2px solid var(--color-azure);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Reduzir movimento · acessibilidade */
@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;
  }
}


/* ====================================================================
   02 · TIPOGRAFIA GLOBAL · HIERARQUIA
   ==================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  text-wrap: balance; /* equilibra linhas em browsers modernos */
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-hero);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-normal);
}

h5 {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

h6 {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

/* Parágrafos */
p {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--text-primary);
  text-wrap: pretty; /* evita órfãs em browsers modernos */
}

/* Texto forte / itálico */
strong, b {
  font-weight: var(--fw-bold);
}

em, i {
  font-style: italic;
}

/* Small · captions inline */
small {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}

/* Citações */
blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  padding-left: var(--space-5);
  border-left: 2px solid var(--color-gold);
}

/* Código inline */
code, kbd, samp {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  background-color: var(--color-smoke-100);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

/* Linha horizontal · divisor editorial */
hr {
  border: none;
  height: 1px;
  background-color: var(--border-light);
  margin: var(--space-7) 0;
}


/* ====================================================================
   03 · UTILIDADES TIPOGRÁFICAS · CLASSES REUTILIZÁVEIS
   ==================================================================== */

/* Display · usado em heros (override de tamanho) */
.display {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-hero);
}

/* Lead · parágrafo de abertura */
.lead {
  font-size: var(--fs-lead);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  max-width: 640px;
}

/* Eyebrow · pequena label acima de títulos */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}

/* Caption · legendas */
.caption {
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-secondary);
}

/* Number Hero · KPIs gigantes */
.number-hero {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-kpi);
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--color-azure);
}

.number-hero--green { color: var(--color-green); }
.number-hero--gold  { color: var(--color-gold); }
.number-hero--bone  { color: var(--color-bone); }


/* ====================================================================
   04 · CONTAINERS E LAYOUT BASE
   ==================================================================== */

.container {
  width: 100%;
  max-width: var(--container-lg);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--xl { max-width: var(--container-xl); }
.container--fluid { max-width: 100%; }

/* Section · padding vertical padrão */
.section {
  padding-block: var(--space-9);
  position: relative;
}

.section--sm { padding-block: var(--space-7); }
.section--lg { padding-block: var(--space-10); }

/* Section dark · inversão de tema */
.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--text-inverse);
}

.section--dark p {
  color: var(--color-smoke-300);
}

.section--dark .lead {
  color: var(--color-smoke-300);
}

/* Section alt · background neutro */
.section--alt {
  background-color: var(--bg-alt);
}


/* ====================================================================
   05 · UTILITÁRIOS DE TEXTO (HELPERS)
   ==================================================================== */

/* Alinhamento */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Cores de texto */
.text-azure     { color: var(--color-azure); }
.text-green     { color: var(--color-green); }
.text-gold      { color: var(--color-gold); }
.text-bone      { color: var(--color-bone); }
.text-onyx      { color: var(--color-onyx); }
.text-muted     { color: var(--text-secondary); }
.text-smoke     { color: var(--color-smoke-600); }

/* Pesos */
.font-regular   { font-weight: var(--fw-regular); }
.font-medium    { font-weight: var(--fw-medium); }
.font-semibold  { font-weight: var(--fw-semibold); }
.font-bold      { font-weight: var(--fw-bold); }
.font-black     { font-weight: var(--fw-black); }

/* Famílias */
.font-display   { font-family: var(--font-display); }
.font-body      { font-family: var(--font-body); }

/* Transformações */
.uppercase      { text-transform: uppercase; letter-spacing: var(--ls-wider); }
.italic         { font-style: italic; }

/* Tracking utilitário */
.tracking-tight { letter-spacing: var(--ls-tight); }
.tracking-wide  { letter-spacing: var(--ls-wider); }


/* ====================================================================
   06 · UTILITÁRIOS DE ESPAÇAMENTO (HELPERS)
   ==================================================================== */

/* Margin top */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mt-8 { margin-top: var(--space-8); }

/* Margin bottom */
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-7 { margin-bottom: var(--space-7); }
.mb-8 { margin-bottom: var(--space-8); }


/* ====================================================================
   07 · UTILITÁRIOS DE DISPLAY E FLEX
   ==================================================================== */

.flex          { display: flex; }
.inline-flex   { display: inline-flex; }
.grid          { display: grid; }
.block         { display: block; }
.inline-block  { display: inline-block; }
.hidden        { display: none; }

.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }

.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.items-baseline { align-items: baseline; }

.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start   { justify-content: flex-start; }
.justify-end     { justify-content: flex-end; }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-7 { gap: var(--space-7); }


/* ====================================================================
   08 · ACESSIBILIDADE · SR-ONLY
   ==================================================================== */

.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;
}

/* Skip link · acessibilidade */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-onyx);
  color: var(--color-bone);
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-toast);
  text-decoration: none;
  font-weight: var(--fw-semibold);
}

.skip-link:focus {
  top: 0;
}


/* ====================================================================
   09 · RESPONSIVIDADE BASE
   ==================================================================== */

@media (max-width: 768px) {

  /* Reduz padding de seção em mobile */
  .section { padding-block: var(--space-8); }
  .section--lg { padding-block: var(--space-9); }

  /* Esconde elementos só no desktop */
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  /* Esconde elementos só no mobile */
  .hide-desktop { display: none !important; }
}

/* ====================================================================
   REVEAL ON SCROLL · ANIMAÇÕES DE ENTRADA
   Acionado via main.js (IntersectionObserver)
   ==================================================================== */

[data-reveal] {
  opacity: 0;
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal="up"],
[data-reveal=""],
[data-reveal]:not([data-reveal="left"]):not([data-reveal="right"]):not([data-reveal="fade"]) {
  transform: translateY(40px);
}

[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="fade"]  { transform: none; }

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate(0, 0);
}
