/* ==========================================================================
   Los Amigos · base común (web pública y panel /admin)
   Solo tokens de marca, fuentes, reset y utilidades. Lo de cada superficie
   va en su propio fichero (sitio.css, admin.css).
   ========================================================================== */

/* ---------- Fuentes (OFL, autoalojadas, subconjunto latin) ---------- */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/fuentes/big-shoulders-display-variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fuentes/barlow-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fuentes/barlow-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fuentes/barlow-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens de marca ---------- */
:root {
  /* Marca (README) */
  --azul-noche: #161c4e;
  --azul-profundo: #0c1033;
  --dorado: #b8892e;
  --dorado-claro: #e2c275;
  --hueso: #f6f0e2;
  --cesped: #1e8a4c;
  --rojo-tarjeta: #c8372d;

  /* Derivados (contraste AA comprobado) */
  --azul-alto: #1f2763;          /* superficies elevadas sobre azul noche */
  --azul-borde: #2e377a;         /* bordes sobre azul */
  --texto-claro: #f4f1ea;        /* texto principal sobre azul */
  --texto-suave: #b6bbdc;        /* texto secundario sobre azul (≈ 8:1) */
  --tinta: #12163a;              /* texto sobre hueso */
  --tinta-suave: #4d5275;        /* texto secundario sobre hueso (≈ 7:1) */
  --hueso-borde: #e3d9c2;        /* líneas sobre hueso */
  --hueso-alto: #fbf8f0;         /* filas alternas / realce sobre hueso */
  --dorado-tinta: #876218;       /* dorado legible sobre hueso (≈ 4.7:1) */
  --cesped-fuerte: #187a42;      /* fondo con texto blanco (≈ 5.4:1) */
  --empate: #5a5f80;             /* fondo de «E» con texto blanco */

  /* Tipografía */
  --fuente-titulo: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --fuente-texto: "Barlow", "Segoe UI", system-ui, sans-serif;

  /* Escala */
  --radio-s: 6px;
  --radio: 10px;
  --radio-l: 16px;
  --sombra: 0 1px 2px rgb(5 8 30 / 0.35), 0 8px 24px -12px rgb(5 8 30 / 0.6);
  --anillo-foco: 0 0 0 3px var(--azul-profundo), 0 0 0 5px var(--dorado-claro);
  --transicion: 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --ancho-max: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}
body {
  margin: 0;
  font-family: var(--fuente-texto);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--texto-claro);
  background-color: var(--azul-noche);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}
img,
svg,
picture {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
table {
  border-collapse: collapse;
}

/* ---------- Foco visible ---------- */
:focus-visible {
  outline: 2px solid var(--dorado-claro);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Utilidades ---------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.salto {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--dorado-claro);
  color: var(--azul-profundo);
  font-weight: 700;
  border-radius: var(--radio-s);
  text-decoration: none;
}
.salto:focus {
  top: 0.75rem;
}
.contenedor {
  width: 100%;
  max-width: var(--ancho-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.titulo {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.cifra {
  font-family: var(--fuente-titulo);
  font-variant-numeric: tabular-nums lining-nums;
}
[hidden] {
  display: none !important;
}

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