/* ============================================================
   Koralum — base.css
   Reset + tipografía base. Heredado del brandbook.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* El scroll a anclas deja hueco para la barra fija */
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--surface-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

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

ul,
ol {
  list-style: none;
}

/* Foco accesible visible sólo con teclado */
:focus-visible {
  outline: 2px solid var(--accent-default);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Selección de texto con el acento de marca */
::selection {
  background: var(--accent-default);
  color: var(--text-inverse);
}

/* Cuerpo de texto legible: ~70 caracteres máximo por línea */
.prose {
  max-width: 68ch;
}

/* Números / datos técnicos en monoespaciada */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}
