/* ── Reset + Base ─────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar personalizada */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-dim); }

/* Selección de texto */
::selection {
  background: var(--color-primary-glow);
  color: var(--color-text);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semi);
  line-height: 1.3;
  color: var(--color-text);
}

/* Titulares grandes con la tipografía display del landing */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-dark); text-decoration: none; }

code, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-bg-input);
  border-radius: var(--radius-sm);
}
code { padding: 2px 6px; }
pre  { padding: var(--space-4); overflow-x: auto; }

ul, ol { padding-left: var(--space-6); }
li + li { margin-top: var(--space-1); }

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

button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* Utilidades generales */
.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;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-muted  { color: var(--color-text-muted); }
.text-dim    { color: var(--color-text-dim); }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }
.text-md     { font-size: var(--text-md); }
.text-center { text-align: center; }
.font-mono   { font-family: var(--font-mono); }
