/* styles.css — hoja única para todo el sitio. Sin build, sin dependencias. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f5f7;
  --text: #0f0f10;
  --text-muted: #6e6e72;
  --border: #e4e2e6;
  --accent: #83008b;
  --accent-contrast: #ffffff;
  --max-width: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111013;
    --bg-soft: #1b191e;
    --text: #f2f1f3;
    --text-muted: #a3a0a8;
    --border: #2e2b33;
    --accent: #d78fdd;
    --accent-contrast: #1b191e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ── Cabecera ─────────────────────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* ── Texto ────────────────────────────────────────────────────────────── */

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.375rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

.lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* ── Piezas ───────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.375rem;
  margin-bottom: 1rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.button:hover {
  opacity: 0.88;
}

.note {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.625rem 0.75rem 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-wrap {
  overflow-x: auto;
}

/* ── Pie ──────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer a {
  color: var(--text-muted);
}

/* ── Página de "abrir en la app" ──────────────────────────────────────── */

.centered {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  align-items: center;
}

.centered .stack {
  align-items: center;
}
