/* ============================================================
   RELEVANTE.IA — P00 · BASE Y PRIMITIVOS
   ============================================================ */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

html, body { overflow-x: clip; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sobre-oscuro :focus-visible { outline-color: #FFFFFF; }

/* ---------- Contenedor ---------- */
.contenedor {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Sección ---------- */
.seccion {
  position: relative;
  padding-block: var(--space-section);
  border-top: 1px solid var(--rule);
}
.seccion--sin-filete { border-top: none; }

/* ---------- Tipos ---------- */
.t-mega { font-size: var(--text-mega); font-weight: 600; line-height: 0.95; letter-spacing: -0.03em; }
.t-h1   { font-size: var(--text-h1); font-weight: 600; line-height: 1.02; letter-spacing: -0.028em; }
.t-h2   { font-size: var(--text-h2); font-weight: 600; line-height: 1.08; letter-spacing: -0.022em; }
.t-h3   { font-size: var(--text-h3); font-weight: 500; line-height: 1.25; letter-spacing: -0.012em; }
.t-body { font-size: var(--text-body); color: var(--muted); max-width: 58ch; }
.t-mono { font-family: var(--font-mono); font-size: var(--text-mono); letter-spacing: 0.02em; }

/* ---------- Primitivo: Etiqueta ---------- */
.etiqueta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.etiqueta::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
}
.sobre-oscuro .etiqueta { color: var(--on-ink-muted); }

/* ---------- Primitivo: Botón ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 0;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
  white-space: nowrap;
}
.boton--primaria { background: var(--accent); color: var(--ink); }
.boton--primaria:hover { background: var(--ink); color: #FFFFFF; }
.boton--secundaria { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.boton--secundaria:hover { background: var(--ink); color: #FFFFFF; }
.boton--primaria:active, .boton--secundaria:active { transform: translateY(1px); }
.boton .flecha { width: 12px; height: 12px; }

/* ---------- Primitivo: BloqueOscuro ---------- */
.bloque-oscuro {
  position: relative;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 0;
  box-shadow: none;
  z-index: var(--z-bloque);
}
.bloque-oscuro--pad { padding: var(--space-block); }

/* Sangrados: el bloque llega hasta el borde del viewport.
   Fórmula válida también para items de grid (no dependen del ancho propio),
   y el padding compensado realinea el contenido con la retícula. */
.sangra-derecha  { margin-right: min(calc(-1 * var(--gutter)), calc(var(--container) / 2 - 50vw)); }
.sangra-izquierda{ margin-left:  min(calc(-1 * var(--gutter)), calc(var(--container) / 2 - 50vw)); }
.sangra-ambos    { margin-inline: min(calc(-1 * var(--gutter)), calc(var(--container) / 2 - 50vw)); }
.sangra-derecha.bloque-oscuro--pad  { padding-right: max(var(--space-block), calc(50vw - var(--container) / 2 + var(--gutter))); }
.sangra-izquierda.bloque-oscuro--pad{ padding-left:  max(var(--space-block), calc(50vw - var(--container) / 2 + var(--gutter))); }
.sangra-ambos.bloque-oscuro--pad    { padding-inline: max(var(--space-block), calc(50vw - var(--container) / 2 + var(--gutter))); }

/* ---------- Primitivo: Filete ---------- */
.filete { border: none; border-top: 1px solid var(--rule); }
.bloque-oscuro .filete, .filete--oscuro { border-top-color: var(--ink-soft); }
.filete-detras {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px solid var(--rule);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Primitivo: MetricaGrande ---------- */
.metrica { display: grid; gap: 6px; }
.metrica__cifra { font-size: var(--text-h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.metrica__cifra--lima { color: var(--accent); } /* SOLO dentro de bloques oscuros */
.metrica__caption { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sobre-oscuro .metrica__caption, .bloque-oscuro .metrica__caption { color: var(--on-ink-muted); }

/* ---------- Primitivo: Acordeón ---------- */
.acordeon { border-bottom: 1px solid var(--rule); }
.acordeon__boton {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 22px;
  text-align: left;
  font-size: var(--text-h3);
  font-weight: 500;
}
.acordeon__glifo { font-size: 22px; font-weight: 300; line-height: 1; transition: transform var(--dur-base) var(--ease-out); flex-shrink: 0; }
.acordeon[data-abierto="true"] .acordeon__glifo { transform: rotate(45deg); }
.acordeon__panel { overflow: hidden; height: 0; transition: height var(--dur-slow) var(--ease-out); }
.acordeon__contenido { padding-bottom: 24px; color: var(--muted); max-width: 68ch; }

/* ---------- Utilidades ---------- */
.oculto-visual {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.solo-movil { display: none; }
@media (max-width: 767px) {
  .solo-movil { display: block; }
  .solo-desktop { display: none; }
}
