/* ingizer · landing v2 · sistema de diseño
   Dirección: «Conversación». Todo el CSS de la página consume estas variables;
   ningún valor suelto fuera de este archivo.

   Breakpoints (las variables no sirven dentro de @media, por eso van aquí):
     base   360 px   móvil, el primero que se revisa
     sm     640 px
     md     960 px
     lg    1280 px
*/

/* Fuentes: Comfortaa (titulares y texto, la misma del logo), JetBrains Mono (cifras).
   Se cargan en el <head> con font-display: swap. */

:root {
  /* ---------- Tipografía ---------- */
  --font-display: "Comfortaa", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Comfortaa", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Escala con razón 1,25 (tercera mayor) sobre 17 px. Del paso 3 en adelante es fluida
     entre 360 px y 1280 px de ancho. */
  --step--1: 0.85rem;
  --step-0: 1.0625rem;
  --step-1: 1.3281rem;
  --step-2: clamp(1.3281rem, 1.2rem + 0.55vw, 1.66rem);
  --step-3: clamp(1.66rem, 1.4rem + 1.1vw, 2.075rem);
  --step-4: clamp(2.075rem, 1.6rem + 2vw, 2.594rem);
  --step-5: clamp(2.594rem, 1.8rem + 3.4vw, 3.243rem);
  --step-6: clamp(3rem, 1.9rem + 4.8vw, 4.5rem);

  --weight-body: 400;
  --weight-strong: 600;
  --weight-display: 700;
  --lh-tight: 1.04;
  --lh-snug: 1.25;
  --lh-body: 1.55;
  --track-display: -0.03em;
  --track-body: 0;
  --track-label: 0.08em;
  --measure: 62ch;

  /* ---------- Color ---------- */
  /* Hoja blanca; los neutros que la acompañan llevan un matiz verde apagado, nunca gris puro */
  --paper: #ffffff;
  --paper-2: #eef5f0;
  --paper-3: #e0ebe4;
  --line: #d8e1db;
  --muted: #55666f;      /* texto secundario sobre paper: 5,1:1 */
  --ink-2: #26394a;
  --ink: #081c2a;        /* azul tinta de la marca */
  --night: #081c2a;
  --night-2: #112a3c;
  --night-line: #25414f;
  --on-night: #f4f7f5;
  --on-night-muted: #a9b8bf;

  /* Un solo acento: el verde de la marca. Como relleno, con texto tinta encima. */
  --accent: #04c537;
  --accent-hover: #05d93e;
  --accent-ink: #0a7a2a;  /* el verde cuando es texto o ícono sobre paper */

  /* Semáforos del Radar */
  --ok: #0a7a2a;
  --ok-fill: #04c537;
  --warn: #8a4f00;
  --warn-fill: #f2a93b;
  --risk: #b3261e;
  --risk-fill: #e5483f;
  --info: #1f5fcc;

  --focus: #2a7dff;

  /* ---------- Espaciado (múltiplos de 8 px; 4 px solo para ajustes finos) ---------- */
  --s-half: 0.25rem;
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-6: 3rem;
  --s-8: 4rem;
  --s-12: 6rem;
  --s-16: 8rem;
  --s-24: 12rem;
  --gutter: 1rem;          /* 16 px a 360 px */

  /* ---------- Forma ---------- */
  --radius-1: 4px;         /* campos, botones, etiquetas */
  --radius-2: 18px;        /* ventana del chat y burbujas */
  --radius-pill: 999px;
  --border: 1px solid var(--line);
  --border-night: 1px solid var(--night-line);
  /* Una sola sombra, solo para el chat del hero. El resto se separa con líneas. */
  --shadow-lift: 0 1px 0 rgb(8 28 42 / 0.04), 0 18px 40px -12px rgb(8 28 42 / 0.28);

  /* ---------- Contenedor ---------- */
  --container: 88rem;      /* 1408 px */
  --container-narrow: 46rem;

  /* ---------- Movimiento ---------- */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-fast: 120ms;       /* retroalimentación: botones, foco */
  --dur-base: 220ms;       /* cambios de estado pequeños */
  --dur-enter: 420ms;      /* entrada de burbujas y secciones */
  --stagger: 90ms;
}

@media (min-width: 640px) { :root { --gutter: 1.5rem; } }
@media (min-width: 960px) { :root { --gutter: 2rem; } }

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: var(--weight-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-body);
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; max-width: var(--measure); hanging-punctuation: first; }
img, svg, video { display: block; max-width: 100%; height: auto; }

/* Cifras: siempre monoespaciadas y tabulares, para que los pesos se lean como columna */
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

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

/* Foco visible, siempre */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-1); }

/* Quien pide menos movimiento no recibe animación de entrada */
@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; }
}
