/* ============================================
   KONVERXO · Base styles · reset + typography
   ============================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  /* Espacio para el header sticky cuando se usan anchors */
  scroll-padding-top: calc(var(--kvx-header-h) + 16px);
}

body {
  font-family: var(--kvx-font-body);
  font-size: var(--kvx-text-base);
  line-height: 1.6;
  color: var(--kvx-fog);
  background: var(--kvx-black);
  min-height: 100vh;
  overflow-x: hidden;
  /* Texto base: peso 400 */
  font-weight: 400;
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--kvx-font-head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--kvx-paper);
}

h1 { font-size: var(--kvx-text-4xl); letter-spacing: -0.035em; }
h2 { font-size: var(--kvx-text-3xl); letter-spacing: -0.03em; }
h3 { font-size: var(--kvx-text-2xl); letter-spacing: -0.025em; }
h4 { font-size: var(--kvx-text-xl); }
h5 { font-size: var(--kvx-text-lg); }
h6 { font-size: var(--kvx-text-base); font-weight: 600; }

p {
  font-size: var(--kvx-text-base);
  line-height: 1.7;
  color: var(--kvx-fog);
  max-width: 68ch;
}

p.lead {
  font-size: var(--kvx-text-lg);
  line-height: 1.6;
  color: var(--kvx-mist);
}

strong, b { font-weight: 700; color: var(--kvx-paper); }
em, i { font-style: italic; }

/* ---------- Enlaces ---------- */
a {
  color: var(--kvx-green);
  text-decoration: none;
  transition: color var(--kvx-dur-fast) var(--kvx-ease);
}
a:hover {
  color: var(--kvx-green-soft);
}
a:focus-visible {
  outline: 2px solid var(--kvx-green);
  outline-offset: 4px;
  border-radius: var(--kvx-radius-xs);
}

/* ---------- Imágenes & media ---------- */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Listas ---------- */
ul, ol { list-style: none; }
li { line-height: 1.7; }

/* ---------- Formularios ---------- */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Selección ---------- */
::selection {
  background: var(--kvx-green);
  color: var(--kvx-black);
}

/* ---------- Scrollbar (sutil, oscura) ---------- */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--kvx-black);
}
::-webkit-scrollbar-thumb {
  background: var(--kvx-smoke);
  border-radius: var(--kvx-radius-pill);
  border: 3px solid var(--kvx-black);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--kvx-green-deep);
}

/* ---------- UTILIDADES ---------- */
.kvx-container {
  width: 100%;
  max-width: var(--kvx-max-width);
  margin: 0 auto;
  padding-inline: var(--kvx-gutter);
}

.kvx-container--wide {
  max-width: var(--kvx-max-wide);
}

.kvx-container--narrow {
  max-width: var(--kvx-max-narrow);
}

/* Mono labels: para etiquetas tipo "01 // SERVICIOS" */
.kvx-mono {
  font-family: var(--kvx-font-display);
  font-size: var(--kvx-text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kvx-green);
  font-weight: 400;
}

.kvx-mono--ash {
  color: var(--kvx-ash);
}

/* Texto display brutalista para hero */
.kvx-display {
  font-family: var(--kvx-font-head);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

/* Texto highlight verde */
.kvx-hl {
  color: var(--kvx-green);
  font-weight: inherit;
}
.kvx-hl-mag {
  color: var(--kvx-magenta);
}

/* Accesibilidad: hidden visualmente, accesible para SR */
.kvx-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;
}

/* ---------- Sections base ---------- */
section {
  position: relative;
  padding-block: var(--kvx-space-9);
}
@media (max-width: 768px) {
  section { padding-block: var(--kvx-space-7); }
}

/* ---------- prefers-reduced-motion ---------- */
@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;
  }
}
