/* V_Beta base.css — tokens y componentes mínimos
   Convenciones:
   - Paleta con variables en :root (tema claro) y [data-theme="dark"] (oscuro)
   - Tipografía del sistema para rendimiento; escala h1–h3 definida
   - Componentes: .container, .grid, .card, .pill, .meta
*/

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --step--1: 0.9rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;

  /* Paleta clara */
  --bg: #ffffff;
  --text: #0f172a;     /* slate-900 */
  --muted: #475569;    /* slate-600 */
  --card: #f8fafc;     /* slate-50 */
  --border: #e2e8f0;   /* slate-200 */
  --accent: #2563eb;   /* blue-600 */
  --accent-contrast: #ffffff;

  /* Layout */
  --maxw: 1100px;
  --radius: 16px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.06);
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --card: #0f172a;
  --border: #1f2937;
  --accent: #60a5fa;
  --accent-contrast: #0b1220;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: var(--step-0);
}

/* Tipografía */
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-2); }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-2); }
.meta { color: var(--muted); font-size: var(--step--1); }

/* Componentes básicos */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-2);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.card:hover, .card:focus {
  outline: none;
  border-color: var(--accent);
}

.pill {
  display: inline-block;
  padding: .4rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
}
.pill:hover, .pill:focus { border-color: var(--accent); }

/* Layout del sitio */
.site-header { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); background: var(--card); }
.brand { margin-bottom: var(--space-1); }
.top-nav .pill { margin-right: .5rem; }
.site-footer { padding: var(--space-3) 0; border-top: 1px solid var(--border); margin-top: var(--space-3); }

/* Accesibilidad y helpers */
a { color: var(--accent); }
a[aria-disabled="true"] { pointer-events: none; opacity: .6; }
img { max-width: 100%; height: auto; }
iframe { width: 100%; border: 0; min-height: 360px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Utilidades */
.mt-2 { margin-top: var(--space-2); }
.mb-0 { margin-bottom: 0; }

/* Tabla básica accesible */
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { border: 1px solid var(--border); padding: .5rem; text-align: left; }
thead { background: rgba(0,0,0,.03); }

/* Tarjetas con imagen (CTA) */
.cta-img { padding: 0; overflow: hidden; position: relative; }
.cta-img img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4/5; object-fit: cover; background: #000;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.cta-img .cta-caption {
  display: block; padding: .75rem 1rem; font-weight: 600;
}
.cta-img:hover, .cta-img:focus { transform: translateY(-1px); transition: transform .15s ease; }

.brandmark { margin: .5rem 0 0; }
.brandmark img { display: block; }

