/* ═══════════════════════════════════════════════════════════
   DESKLY — Tipografía global
   Sora (títulos) + Inter (cuerpo) + JetBrains Mono (código)
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ── Base ─────────────────────────────────────────────── */
html {
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body) !important;
  font-feature-settings: 'cv11', 'ss01', 'cv01';
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.011em;
  line-height: 1.6;
  color: var(--text, #e8e8f0);
}

/* ── Headings ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.gh-info h1, .logo-text, .hero h1, .header-section h1,
.page-header h1, .u-title, .card h2 {
  font-family: var(--font-display) !important;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: clamp(20px, 3vw, 26px); font-weight: 700; letter-spacing: -0.03em; }
h3 { font-size: clamp(16px, 2vw, 20px); font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

/* ── Body text ────────────────────────────────────────── */
p, li, span, div, td, th, label, input, textarea, select, button {
  font-family: var(--font-body);
}

p { line-height: 1.7; letter-spacing: -0.008em; }

/* ── Monospace / code ─────────────────────────────────── */
code, pre, kbd, samp, .mono, .stat-val, .cmd-name, .cmd-aliases,
[class*="Space Mono"], [style*="font-family:monospace"],
[style*="font-family: monospace"],
[style*="font-family:'Space Mono'"],
[style*='font-family:"Space Mono"'],
[style*="font-family: 'Space Mono'"] {
  font-family: var(--font-mono) !important;
  font-variant-ligatures: none;
  letter-spacing: -0.02em;
}

/* Override inline Syne font-family */
[style*="font-family:'Syne'"],
[style*='font-family:"Syne"'],
[style*="font-family: 'Syne'"] {
  font-family: var(--font-display) !important;
}

pre, code {
  font-size: 0.9em;
  line-height: 1.65;
}

kbd {
  background: var(--surface2, #1a1a28);
  border: 1px solid var(--border2, #2a2a42);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-h, #7983f5);
}

/* ── Numbers & stats ──────────────────────────────────── */
.stat-val, .u-version, .num, .gb-sub,
[class*="Space Mono"] {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}

/* ── Labels (uppercase) ───────────────────────────────── */
.ng-label, .stat-label, .form-group label,
th, .u-body h4, .lbl {
  font-family: var(--font-body) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* ── Links ────────────────────────────────────────────── */
a {
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: none;
}

/* ── Selection ────────────────────────────────────────── */
::selection {
  background: rgba(88, 101, 242, 0.35);
  color: #fff;
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg, #0a0a0f); }
::-webkit-scrollbar-thumb {
  background: var(--border2, #2a2a42);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted, #6b6b88); }

/* ── Smooth transitions on interactive elements ───────── */
button, input, select, textarea, .btn, .nav-item, .nav-link {
  transition: all 0.15s ease;
}

/* ── Focus visible ────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent, #5865F2);
  outline-offset: 2px;
}

/* ── Responsive type scaling ──────────────────────────── */
@media (max-width: 768px) {
  html { font-size: 15px; }
  h1 { font-size: clamp(22px, 5vw, 30px); }
  h2 { font-size: clamp(18px, 4vw, 22px); }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
}
