/* ============================================================
   Forbys — Base styles
   Reset, fuentes, tipografía base.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600&display=swap');

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

/* ── Root ───────────────────────────────────────────────────────────── */
html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Tipografía ──────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Links ───────────────────────────────────────────────────────────── */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition), text-decoration var(--transition);
}
a:hover {
  text-decoration: underline;
}

/* ── Código y mono ──────────────────────────────────────────────────── */
code,
pre,
.mono,
kbd,
samp {
  font-family: var(--font-mono);
}

code {
  font-size: 0.85em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  color: var(--primary);
}

pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.6;
}

/* ── Selección ───────────────────────────────────────────────────────── */
::selection {
  background: var(--primary-light);
  color: var(--primary);
}

/* ── Misc ────────────────────────────────────────────────────────────── */
img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

input, select, textarea {
  font: inherit;
}

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

/* ── Utilidades de texto ─────────────────────────────────────────────── */
.text-muted    { color: var(--text-muted); }
.text-subtle   { color: var(--text-subtle); }
.text-primary  { color: var(--primary); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-danger   { color: var(--danger); }

.text-sm   { font-size: 0.857rem; }   /* 12px */
.text-xs   { font-size: 0.786rem; }   /* 11px */
.text-base { font-size: 1rem; }        /* 14px */

.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

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

.nowrap { white-space: nowrap; }
