/* Facturía · tokens y base compartidos por el sitio y la aplicación.
   Contrastes WCAG verificados: texto ≥ 4,5:1 y bordes de controles ≥ 3:1. */

@font-face {
  font-family: "Onest";
  src: url("/fuentes/Onest-400-800.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fuentes/JetBrainsMono-400.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --blanco: #ffffff;
  --niebla: #f5f7f8;
  --niebla-2: #eef2f4;
  --tinta: #0f1b2d;
  --texto: #0f1b2d;
  --texto-2: #475467;      /* 7,2:1 sobre niebla */
  --texto-3: #667085;      /* 4,6:1 sobre niebla */
  --verde: #0e7c6b;        /* botones: texto blanco 5,1:1 */
  --verde-profundo: #0a5c50;
  --menta: #e3f5f0;
  --menta-2: #c8ebe1;
  --resaltador: #f7e35a;   /* nunca como texto */
  --coral: #b4233c;
  --coral-suave: #fdf0f2;
  --ambar: #8a5a00;
  --ambar-suave: #fff6e0;
  --azul: #1d5fa8;
  --azul-suave: #eaf2fb;
  --borde: #e3e8ec;
  --borde-2: #d4dbe1;
  --borde-control: #808b9b; /* 3,4:1 */
  --sombra-1: 0 1px 2px rgba(15, 27, 45, 0.06), 0 1px 1px rgba(15, 27, 45, 0.04);
  --sombra-2: 0 8px 24px rgba(15, 27, 45, 0.08), 0 2px 6px rgba(15, 27, 45, 0.05);
  --sombra-3: 0 24px 64px rgba(15, 27, 45, 0.16);
  --radio: 10px;
  --radio-2: 14px;
  --fuente: "Onest", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 15px;
  line-height: 1.55;
  color: var(--texto);
  background: var(--niebla);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--verde-profundo); text-underline-offset: 3px; }
a:hover { color: var(--verde); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(14, 124, 107, 0.45); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--resaltador); color: var(--tinta); }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 16px; border-radius: var(--radio);
  border: 1px solid var(--verde); background: var(--verde); color: #fff;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
  white-space: nowrap;
}
.boton:hover { background: var(--verde-profundo); border-color: var(--verde-profundo); color: #fff; }
.boton:active { transform: translateY(1px); }
.boton[disabled], .boton.desactivado { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.boton-secundario { background: var(--blanco); color: var(--texto); border-color: var(--borde-2); box-shadow: var(--sombra-1); }
.boton-secundario:hover { background: var(--niebla); color: var(--texto); border-color: var(--borde-control); }
.boton-fantasma { background: transparent; border-color: transparent; color: var(--verde-profundo); }
.boton-fantasma:hover { background: var(--menta); border-color: transparent; color: var(--verde-profundo); }
.boton-peligro { background: var(--blanco); color: var(--coral); border-color: #e7b9c1; }
.boton-peligro:hover { background: var(--coral-suave); color: var(--coral); border-color: var(--coral); }
.boton-chico { min-height: 32px; padding: 6px 11px; font-size: 14px; border-radius: 8px; }
.boton-grande { min-height: 50px; padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.boton svg { width: 18px; height: 18px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ── Cookies ───────────────────────────────────────────────────────────── */
#aviso-cookies { position: fixed; z-index: 70; left: 16px; right: 96px; bottom: 16px; max-width: 520px; background: var(--tinta); color: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: var(--sombra-3); display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; }
#aviso-cookies a { color: #2bd4a4; }
#aviso-cookies .botones { display: flex; gap: 10px; justify-content: flex-end; }
#aviso-cookies .boton-secundario { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); box-shadow: none; }
@media (max-width: 600px) { #aviso-cookies { right: 80px; left: 12px; bottom: 12px; } }
