/* =================================================================
   ENJATEC — BASE
   Reset, tipografia e elementos fundamentais. Não conhece negócio.
   ================================================================= */

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

html, body {
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  font-family: var(--enj-font-sans);
  font-size: var(--enj-fs-base);
  line-height: var(--enj-lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-color: var(--enj-bg-app);
  color: var(--enj-text-primary);
  font-family: var(--enj-font-sans);
  font-size: var(--enj-fs-base);
  line-height: var(--enj-lh-normal);
  transition:
    background-color var(--enj-transition-slow),
    color var(--enj-transition-slow);
}

/* ===================== Tipografia ===================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--enj-space-3) 0;
  font-weight: var(--enj-fw-medium);
  line-height: var(--enj-lh-tight);
  color: var(--enj-text-primary);
  letter-spacing: var(--enj-letter-tight);
}

h1 { font-size: var(--enj-fs-3xl); }
h2 { font-size: var(--enj-fs-2xl); }
h3 { font-size: var(--enj-fs-xl); }
h4 { font-size: var(--enj-fs-lg); }
h5 { font-size: var(--enj-fs-md); }
h6 { font-size: var(--enj-fs-base); }

p {
  margin: 0 0 var(--enj-space-3) 0;
  line-height: var(--enj-lh-normal);
  color: var(--enj-text-primary);
}

small {
  font-size: var(--enj-fs-xs);
  color: var(--enj-text-muted);
}

/* ===================== Links ===================== */
a {
  color: var(--enj-text-link);
  text-decoration: none;
  transition: color var(--enj-transition-fast), opacity var(--enj-transition-fast);
}
a:hover {
  text-decoration: underline;
}
a:focus-visible {
  outline: none;
  box-shadow: var(--enj-shadow-focus);
  border-radius: var(--enj-radius-sm);
}

/* ===================== Seleção de texto ===================== */
::selection {
  background-color: var(--enj-primary-700);
  color: #FFFFFF;
}
[data-theme="dark"] ::selection {
  background-color: var(--enj-accent-500);
  color: var(--enj-primary-700);
}

/* ===================== Mídia ===================== */
img, svg, picture, video {
  max-width: 100%;
  display: block;
}

/* ===================== Form base ===================== */
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}

/* ===================== Code ===================== */
code, pre, kbd, samp {
  font-family: var(--enj-font-mono);
  font-size: var(--enj-fs-sm);
}

/* ===================== Linhas divisórias ===================== */
hr {
  border: 0;
  border-top: 1px solid var(--enj-border-subtle);
  margin: var(--enj-space-5) 0;
}

/* ===================== Utilitários ===================== */
.enj-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.enj-text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--enj-letter-wide);
}
.enj-text-muted     { color: var(--enj-text-muted); }
.enj-text-secondary { color: var(--enj-text-secondary); }
.enj-text-mono      { font-family: var(--enj-font-mono); }
