/* StratLab — base
 * Reset corto, tipografía por rol y utilidades de layout.
 * Solo valores de tokens.css. Requiere tokens.css cargado antes.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  /* El header es fijo: los anclajes no deben quedar debajo de él */
  scroll-padding-top: 96px;
}
@media (max-width: 760px) {
  html { scroll-padding-top: 88px; }
}

body {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; }

/* ---------- Tipografía por rol ---------- */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-display);
}

h1 { font-size: var(--text-display-xl); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); letter-spacing: -0.02em; }

p { margin: 0; }

a {
  color: var(--accent-text);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--ink); }

.u-mono { font-family: var(--font-mono); }
.u-hand { font-family: var(--font-hand); font-weight: 600; }
.u-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.u-accent { color: var(--accent-text); }

/* Etiqueta chica en mono, mayúsculas espaciadas */
.u-label {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.u-lead {
  font-size: var(--text-lead);
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink-muted);
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--pad-section); }
.section--tight { padding-block: var(--pad-section-s); }
.section--rule { border-bottom: var(--border-w) solid var(--line-strong); }

/* ---------- Accesibilidad ---------- */

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--border-w) solid var(--line-strong);
  outline-offset: var(--border-w);
}
.theme-dark :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline-color: var(--brand-lima);
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 100;
  transform: translateY(-200%);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: var(--space-2) var(--space-3);
  border: var(--border-w) solid var(--line-strong);
}
.skip-link:focus { transform: none; }

/* Oculto a la vista, presente para lectores de pantalla */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Piezas decorativas del collage: se van en móvil */
@media (max-width: 760px) {
  .u-no-mobile { display: none !important; }
}
