/*
 * reset.css — Normalización base
 * Kinik Labs · Sitio corporativo
 *
 * Basado en "modern CSS reset" (Andy Bell) con ajustes propios.
 */

/* 1. Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Márgenes y paddings por defecto */
* {
  margin: 0;
  padding: 0;
}

/* 3. HTML y Body */
html {
  /* Scroll suave por defecto, respetando prefers-reduced-motion */
  scroll-behavior: smooth;
  /* Tamaño de fuente base (escala consistente con var(--text-base)) */
  font-size: 100%;
  /* Evitar overflow horizontal involuntario */
  overflow-x: hidden;
  /* Texto más nítido en WebKit */
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100dvh;
  line-height: var(--leading-normal, 1.6);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-base, 1rem);
  color: var(--text-primary);
  background-color: var(--bg-page);
  /* Transición suave al cambiar de tema */
  transition:
    background-color var(--duration-normal, 250ms) var(--ease-default),
    color var(--duration-normal, 250ms) var(--ease-default);
  /* Antialiasing */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 4. Listas sin estilo semántico */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* 5. Imágenes */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inputs, botones y elementos de formulario */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* 7. Párrafos y elementos de texto */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-weight: var(--font-weight-bold, 700);
  line-height: var(--leading-tight, 1.2);
  letter-spacing: var(--tracking-tight, -0.03em);
}

/* 8. Links */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--border-color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 9. Elementos pre/code */
pre,
code,
kbd,
samp {
  font-family: var(--font-mono, monospace);
  font-size: 0.9em;
}

/* 10. Separador horizontal */
hr {
  border: none;
  border-top: var(--border-thin, 1px) solid var(--border-color);
}

/* 11. Preservar espacio de texto si hay media queries de reducción */
@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;
  }
}
