/* Muestral. Sistema visual: tokens y componentes compartidos.
   Fuente de verdad en identidad/sistema/. El sitio usa una copia en sitio/css/muestral.css
   y la plantilla de informe la enlaza desde acá. Si se cambia algo, se copia al sitio.

   Una sola idea organiza todo: la grilla de puntos es la población y los puntos cálidos
   encendidos son la muestra. Se repite a tres escalas: fondo (canvas), textura (CSS) y
   matriz de 4 x 4 (isotipo). */

@font-face {
  font-family: "Recursive";
  src: url("../fuentes/recursive-var.woff2?v=2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Superficies y tinta. Contrastes WCAG 2.2 sobre blanco y sobre --bg. */
  --bg: #F5F6FC;
  --surface: #FFFFFF;
  --surface-2: #ECEEF8;
  --line: #CDD1E4;
  --line-soft: #E2E5F2;
  --ink: #0C1030;        /* 18,5 y 17,2 */
  --ink-2: #3D4466;      /* 9,5 y 8,8 */
  --muted: #5B6285;      /* 6,0 y 5,5 */

  /* Lo sintético es cálido; lo humano (la encuesta del cliente) es azul. */
  --warm-1: #FFB020;
  --warm-2: #FF5A36;
  --grad: linear-gradient(100deg, var(--warm-1), var(--warm-2));
  --accent-ink: #C2410C; /* texto cálido: 5,2 y 4,8 */
  --on-accent: #0C1030;
  --hum: #2D5BFF;
  --neg: #C8197F;
  --neutral: #8C92B0;
  --focus: #2D5BFF;

  /* Perfiles. Cada perfil tiene un solo color y lo conserva en todo material. */
  --p-fieles: #2D5BFF;
  --p-precio: #F08A00;
  --p-desencantados: #C8197F;
  --p-curiosos: #7B5CFF;

  /* Puntos: la grilla de población. */
  --punto: rgba(12, 16, 48, .16);
  --paso: 22px;

  --f: "Recursive", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.1875rem;
  --t-xl: 1.5rem;
  --t-2xl: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);
  --t-3xl: clamp(2.3rem, 1.4rem + 4vw, 4.4rem);
  --t-4xl: clamp(3rem, 1.6rem + 6vw, 6.5rem);

  --d-fast: 120ms;
  --d-med: 240ms;
  --d-slow: 480ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-move: cubic-bezier(.6, 0, .2, 1);

  --r: 10px;
  --r-lg: 24px;
  --sombra: 0 1px 2px rgba(12, 16, 48, .05), 0 18px 40px -24px rgba(12, 16, 48, .22);
}

/* ---------- Títulos ---------- */
.titulo-xl { font-size: var(--t-4xl); font-weight: 800; letter-spacing: -0.045em; line-height: .98; text-wrap: balance; }
.titulo-l  { font-size: var(--t-3xl); font-weight: 790; letter-spacing: -0.035em; line-height: 1.03; text-wrap: balance; }

/* Palabra clave en cálido, como en el video. Una por título, como mucho. */
.acento {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  padding-bottom: .06em;
}

/* ---------- Matriz del isotipo ----------
   <span class="matriz" data-matriz="2"></span>: enciende la muestra de la fila 2.
   Con data-color toma el color de un perfil. Marca de sección, firma de perfil. */
.matriz { display: inline-block; width: 40px; height: 40px; color: var(--ink); flex: none; vertical-align: middle; }
.matriz svg { width: 100%; height: 100%; overflow: visible; }
.matriz.chica { width: 24px; height: 24px; }
.matriz.grande { width: 64px; height: 64px; }

/* Marca de sección: la matriz va a la izquierda del título, en la misma línea (.sec-tit en el sitio). */
.marca { display: block; margin-bottom: 22px; }

/* ---------- Regla de muestra ----------
   <div class="regla" data-semilla="3"></div>: fila de puntos con algunas muestras encendidas. */
.regla { display: block; height: 14px; color: var(--ink); overflow: hidden; }
.regla svg { display: block; }

/* ---------- Textura de puntos (CSS, sin animación) ----------
   La misma grilla del fondo animado, para paneles y bandas. Se desvanece con una máscara. */
.textura { position: relative; isolation: isolate; }
.textura::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background-image: radial-gradient(circle, var(--punto) 1.1px, transparent 1.6px);
  background-size: var(--paso) var(--paso);
  background-position: calc(var(--paso) / 2) calc(var(--paso) / 2);
  -webkit-mask-image: var(--mascara, linear-gradient(#000, #000));
          mask-image: var(--mascara, linear-gradient(#000, #000));
}
.textura.esquina { --mascara: radial-gradient(120% 90% at 100% 0%, #000 0%, transparent 62%); }
.textura.arriba  { --mascara: linear-gradient(180deg, #000 0%, transparent 70%); }
.textura.abajo   { --mascara: linear-gradient(0deg, #000 0%, transparent 70%); }
.textura.centro  { --mascara: radial-gradient(70% 70% at 50% 50%, #000 0%, transparent 100%); }

/* ---------- Panel ----------
   Superficie blanca, bordes amplios, textura en una esquina. Sin franjas de color en los bordes. */
.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sombra); }
.panel-in { background: var(--bg); border-radius: 16px; }

/* ---------- Voz de un perfil ----------
   Sin caja ni franja lateral. Matriz con la muestra en el color del perfil, nombre y frase grande. */
.voz { margin: 0; }
.voz-quien { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.voz-quien .matriz { width: 48px; height: 48px; }
.voz-nombre { font-weight: 700; font-size: var(--t-lg); letter-spacing: -0.01em; color: var(--perfil, var(--ink)); }
.voz-frase { margin: 0; font-size: var(--t-3xl); font-weight: 760; letter-spacing: -0.035em; line-height: 1.06; color: var(--ink); text-wrap: balance; }
.voz-frase::before { content: "«"; }
.voz-frase::after { content: "»"; }
.voz-hilo { display: flex; gap: 10px; align-items: center; margin: 0 0 18px; }
.voz-hilo i { display: block; border-radius: 50%; background: var(--perfil, var(--ink)); }

/* ---------- Cifra ----------
   Número grande con su intervalo debajo. El único número de una pieza, o casi. */
.cifra-num { margin: 0; font-size: clamp(3.5rem, 2rem + 6vw, 7rem); font-weight: 800; letter-spacing: -0.05em; line-height: .9; }
.cifra-sub { margin: 10px 0 0; font-size: var(--t-lg); font-weight: 620; color: var(--ink-2); }

/* ---------- Gráfico de puntos con intervalo ----------
   El gráfico de la marca: una vía gris, el intervalo como franja translúcida y el punto encima.
   Reemplaza a las barras apiladas. Se dibuja en SVG con estas clases. */
.g-via { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.g-int { stroke-width: 18; stroke-linecap: round; stroke-opacity: .28; }
.g-pto { stroke: #fff; stroke-width: 3; }
.g-rot { font-family: var(--f); font-size: 20px; font-weight: 680; letter-spacing: -0.02em; fill: var(--ink); }
.g-eje { font-family: var(--f); font-size: 15px; font-weight: 500; fill: var(--muted); }

/* ---------- Leyenda de perfiles ---------- */
.leyenda { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0; padding: 0; font-weight: 650; }
.leyenda li { display: inline-flex; align-items: center; gap: 8px; }
.leyenda li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--perfil, var(--ink)); }

.p-fieles { --perfil: var(--p-fieles); }
.p-precio { --perfil: var(--p-precio); }
.p-desencantados { --perfil: var(--p-desencantados); }
.p-curiosos { --perfil: var(--p-curiosos); }

/* ---------- Lista con muestra ----------
   Cada ítem lleva un punto cálido en lugar de una tilde; los separadores son filas de puntos. */
.lista-muestra { list-style: none; margin: 0; padding: 0; }
.lista-muestra li {
  position: relative; padding: 18px 0 18px 34px; font-size: var(--t-lg); font-weight: 650; line-height: 1.3;
  background-image: radial-gradient(circle, var(--line) 1.2px, transparent 1.7px);
  background-size: 10px 4px; background-repeat: repeat-x; background-position: 0 100%;
}
.lista-muestra li:last-child { background: none; }
.lista-muestra li::before { content: ""; position: absolute; left: 2px; top: calc(18px + .65em - 8px); width: 16px; height: 16px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 5px rgba(255, 140, 40, .16); }

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